#!/bin/bash
mkdir ./debian/gtablix/usr/share/locale
mkdir ./debian/gtablix/usr/share/locale/en
mkdir ./debian/gtablix/usr/share/locale/sl
mkdir ./debian/gtablix/usr/share/locale/es
mkdir ./debian/gtablix/usr/share/locale/ru
mkdir ./debian/gtablix/usr/share/locale/it
mkdir ./debian/gtablix/usr/share/locale/it/LC_MESSAGES
mkdir ./debian/gtablix/usr/share/locale/sl/LC_MESSAGES
mkdir ./debian/gtablix/usr/share/locale/en/LC_MESSAGES
mkdir ./debian/gtablix/usr/share/locale/es/LC_MESSAGES
mkdir ./debian/gtablix/usr/share/locale/ru/LC_MESSAGES

cd po

intltool-update -p -o gtablix.pot

intltool-update gtablix.sl
intltool-update gtablix.en
intltool-update gtablix.es
intltool-update gtablix.ru
intltool-update gtablix.it

msgfmt gtablix.sl -o gtablix.sl.mo
msgfmt gtablix.en -o gtablix.en.mo
msgfmt gtablix.es -o gtablix.es.mo
msgfmt gtablix.ru -o gtablix.ru.mo
msgfmt gtablix.it -o gtablix.it.mo

install -o root -g root -m 644 gtablix.it.mo ../debian/gtablix/usr/share/locale/it/LC_MESSAGES/gtablix.mo
install -o root -g root -m 644 gtablix.en.mo ../debian/gtablix/usr/share/locale/en/LC_MESSAGES/gtablix.mo
install -o root -g root -m 644 gtablix.sl.mo ../debian/gtablix/usr/share/locale/sl/LC_MESSAGES/gtablix.mo
install -o root -g root -m 644 gtablix.es.mo ../debian/gtablix/usr/share/locale/es/LC_MESSAGES/gtablix.mo
install -o root -g root -m 644 gtablix.ru.mo ../debian/gtablix/usr/share/locale/ru/LC_MESSAGES/gtablix.mo
