X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=utils%2Fupdate-translations.sh;h=b955ac28dd2cb6185e2235ca2bf1d46816f02667;hb=07fd4f8d9d4f301f5ad88ff9e80f042fc3eb0c36;hp=400c711b6211feccfeec28561ac0dd9fd67a6798;hpb=be212a00362cd18e14ef11967a5e4bc90c0c02b9;p=tt-rss.git diff --git a/utils/update-translations.sh b/utils/update-translations.sh index 400c711b..b955ac28 100755 --- a/utils/update-translations.sh +++ b/utils/update-translations.sh @@ -1,20 +1,16 @@ #!/bin/sh TEMPLATE=messages.pot -./utils/update-schema-translations.sh +xgettext -kT_js_decl -kT_sprintf -k_ngettext:1,2 -kT_ngettext:1,2 -k__ -L PHP -o $TEMPLATE *.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 help/*.php mobile/*.php include/*.php `find classes -iname '*.php'` +xgettext --from-code utf-8 -k__ -knotify_info -knotify_progress -kngettext -L Perl -j -o $TEMPLATE js/*.js `find plugins -iname '*.js'` -xgettext --from-code utf-8 -k__ -L Java -j -o $TEMPLATE js/*.js +xgettext --from-code utf-8 -k__ -knotify_info -knotify_progress -kngettext -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|]" fi