glances/i18n-gen.sh

20 lines
665 B
Bash
Raw Normal View History

2012-11-13 20:58:52 +00:00
#!/bin/sh
#
# To create a new language pack XX
# > mkdir -p ./i18n/XX/LC_MESSAGES/
# > msginit --input=./i18n/glances.pot --output=./i18n/XX/LC_MESSAGES/glances.po
# Translate using the ./i18n/XX/LC_MESSAGES/glances.po file
# Then add XX to the LANG_LIST
# Run this script
#
2013-07-28 08:31:05 +00:00
LANG_LIST='es fr it pt_BR zh_CN'
2012-11-13 20:58:52 +00:00
xgettext --language=Python --keyword=_ --output=./i18n/glances.pot ./glances/glances.py
2013-04-08 14:16:00 +00:00
for i in $LANG_LIST; do
2012-11-13 20:58:52 +00:00
echo "Generate language pack for: $i"
2013-02-22 19:55:00 +00:00
msgmerge --update --no-fuzzy-matching --backup=off ./i18n/$i/LC_MESSAGES/glances.po ./i18n/glances.pot
2012-11-13 20:58:52 +00:00
msgfmt ./i18n/$i/LC_MESSAGES/glances.po --output-file ./i18n/$i/LC_MESSAGES/glances.mo
done