From 14ea4714b9c81b1d7b0c78ad2fc4645e26e07293 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 29 Aug 2010 19:17:13 +0200 Subject: [PATCH] l10n: rename template po file to .pot, merge scripts --- pyfpdb/locale/create-mo-files.sh | 4 ---- pyfpdb/locale/create-po-file.sh | 4 ---- pyfpdb/locale/{fpdb-en_GB.po => fpdb-en_GB.pot} | 0 pyfpdb/locale/localise.sh | 14 ++++++++++++++ pyfpdb/locale/update-po-files.sh | 3 --- 5 files changed, 14 insertions(+), 11 deletions(-) delete mode 100755 pyfpdb/locale/create-mo-files.sh delete mode 100755 pyfpdb/locale/create-po-file.sh rename pyfpdb/locale/{fpdb-en_GB.po => fpdb-en_GB.pot} (100%) create mode 100755 pyfpdb/locale/localise.sh delete mode 100755 pyfpdb/locale/update-po-files.sh diff --git a/pyfpdb/locale/create-mo-files.sh b/pyfpdb/locale/create-mo-files.sh deleted file mode 100755 index 5df25bcb..00000000 --- a/pyfpdb/locale/create-mo-files.sh +++ /dev/null @@ -1,4 +0,0 @@ -cd .. -python /usr/share/doc/python-2.7/examples/Tools/i18n/msgfmt.py --output-file=locale/hu/LC_MESSAGES/fpdb.mo locale/fpdb-hu_HU.po -python /usr/share/doc/python-2.7/examples/Tools/i18n/msgfmt.py --output-file=locale/de/LC_MESSAGES/fpdb.mo locale/fpdb-de_DE.po - diff --git a/pyfpdb/locale/create-po-file.sh b/pyfpdb/locale/create-po-file.sh deleted file mode 100755 index 49adc81f..00000000 --- a/pyfpdb/locale/create-po-file.sh +++ /dev/null @@ -1,4 +0,0 @@ -cd .. -rm *.pyc -python /usr/share/doc/python-2.7/examples/Tools/i18n/pygettext.py --output-dir=locale --default-domain=fpdb --output=fpdb-en_GB.po *.py* - diff --git a/pyfpdb/locale/fpdb-en_GB.po b/pyfpdb/locale/fpdb-en_GB.pot similarity index 100% rename from pyfpdb/locale/fpdb-en_GB.po rename to pyfpdb/locale/fpdb-en_GB.pot diff --git a/pyfpdb/locale/localise.sh b/pyfpdb/locale/localise.sh new file mode 100755 index 00000000..89fba06f --- /dev/null +++ b/pyfpdb/locale/localise.sh @@ -0,0 +1,14 @@ +cd .. +rm *.pyc + +echo "creating template po file" +python /usr/share/doc/python-2.7/examples/Tools/i18n/pygettext.py --output-dir=locale --default-domain=fpdb --output=fpdb-en_GB.pot *.py* + +echo "merging template with existing translations" +msgmerge --update locale/fpdb-hu_HU.po locale/fpdb-en_GB.pot +msgmerge --update locale/fpdb-de_DE.po locale/fpdb-en_GB.pot + +echo "compiling mo files" +python /usr/share/doc/python-2.7/examples/Tools/i18n/msgfmt.py --output-file=locale/hu/LC_MESSAGES/fpdb.mo locale/fpdb-hu_HU.po +python /usr/share/doc/python-2.7/examples/Tools/i18n/msgfmt.py --output-file=locale/de/LC_MESSAGES/fpdb.mo locale/fpdb-de_DE.po + diff --git a/pyfpdb/locale/update-po-files.sh b/pyfpdb/locale/update-po-files.sh deleted file mode 100755 index f39b143d..00000000 --- a/pyfpdb/locale/update-po-files.sh +++ /dev/null @@ -1,3 +0,0 @@ -msgmerge --update fpdb-hu_HU.po fpdb-en_GB.po -msgmerge --update fpdb-de_DE.po fpdb-en_GB.po -