diff options
author | Andrew Dolgov <[email protected]> | 2013-03-24 09:00:55 -0700 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-24 09:00:55 -0700 |
commit | 8850646ff375f8858442900dac790c5e38e86f88 (patch) | |
tree | f6d895a7f31180c14a5baaa0d53c03d746164303 /utils/update-translations.sh | |
parent | 7be3fcd5e1fa6f8ec04fd550543b01622b5e7feb (diff) | |
parent | a28c6ec9db46098ba24940f79bc52c8164d2cf82 (diff) |
Merge pull request #77 from scarabeusiv/master
Fix pluralized forms and whitespace in translations and fix the l10n tools
Diffstat (limited to 'utils/update-translations.sh')
-rwxr-xr-x | utils/update-translations.sh | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/utils/update-translations.sh b/utils/update-translations.sh index 25e0e7568..087c3c228 100755 --- a/utils/update-translations.sh +++ b/utils/update-translations.sh @@ -3,18 +3,14 @@ TEMPLATE=messages.pot ./utils/update-schema-translations.sh -xgettext -kT_js_decl -kT_sprintf -kT_ngettext:1,2 -k__ -L PHP -o $TEMPLATE *.php mobile/*.php include/*.php `find classes -iname '*.php'` `find plugins -iname '*.php'` +xgettext -kT_js_decl -kT_sprintf -kT_ngettext:1,2 -k__ -L PHP -o $TEMPLATE *.php include/*.php `find classes -iname '*.php'` `find plugins -iname '*.php'` xgettext --from-code utf-8 -k__ -L Java -j -o $TEMPLATE js/*.js `find plugins -iname '*.js'` update_lang() { if [ -f $1.po ]; then - TMPFILE=/tmp/update-translations.$$ - - msgmerge -o $TMPFILE $1.po $TEMPLATE - mv $TMPFILE $1.po - msgfmt --statistics $1.po - msgfmt -o $1.mo $1.po + msgmerge --no-wrap --width 1 -U $1.po $TEMPLATE + msgfmt --statistics $1.po -o $1.mo else echo "Usage: $0 [-p|<basename>]" fi |