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