]> git.wh0rd.org - tt-rss.git/blame - utils/update-translations.sh
pngcrush.sh
[tt-rss.git] / utils / update-translations.sh
CommitLineData
659468eb
AD
1#!/bin/sh
2TEMPLATE=messages.pot
3
d3b0e348 4xgettext -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'`
659468eb 5
f8eb8d78 6xgettext --from-code utf-8 -k__ -knotify_info -knotify_progress -kngettext -L Perl -j -o $TEMPLATE js/*.js `find plugins -iname '*.js'`
7a1ecd39 7
ec5ac2ec
AD
8xgettext --from-code utf-8 -k__ -knotify_info -knotify_progress -kngettext -L Java -j -o $TEMPLATE js/*.js `find plugins -iname '*.js'`
9
0d2ff12c 10update_lang() {
659468eb 11 if [ -f $1.po ]; then
e5abf36d
TC
12 msgmerge --no-wrap --width 1 -U $1.po $TEMPLATE
13 msgfmt --statistics $1.po -o $1.mo
659468eb
AD
14 else
15 echo "Usage: $0 [-p|<basename>]"
16 fi
0d2ff12c
AD
17}
18
19LANGS=`find locale -name 'messages.po'`
20
21for lang in $LANGS; do
22 echo Updating $lang...
23 PO_BASENAME=`echo $lang | sed s/.po//`
24 update_lang $PO_BASENAME
25done
10bccf7d 26
8182e647 27#./utils/update-js-translations.sh