X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=intl%2Fmake-all-pot.sh;h=51e4eb38951663ebd8b0e0099a814a9590ce943c;hb=0daad481aac5b955e3d87aed919fcd43f769882f;hp=0078eef59bcfcf0e04e950c74c1c805533c8c410;hpb=d7b9d2772f2569450caf412026da1556772e3fa4;p=ccbs diff --git a/intl/make-all-pot.sh b/intl/make-all-pot.sh index 0078eef..51e4eb3 100755 --- a/intl/make-all-pot.sh +++ b/intl/make-all-pot.sh @@ -3,10 +3,19 @@ set -e rm -f templates/*.pot + +# Extract strings from all the Perl code +xgettext --keyword=_ --from-code=utf-8 -o templates/messages.pot -L Perl *.{pm,pl} + +# ...and from all the TT templates for FILE in templates/*.tmpl; do - perl -I../intl ../intl/make-pot.pl $FILE > $FILE.pot + echo $FILE... + perl -I../intl ../intl/make-pot.pl $FILE | msguniq > $FILE.pot done msgcat templates/*.pot > po/templates.pot rm -f templates/*.pot +for FILE in po/*.po; do + msgmerge -U $FILE po/templates.pot +done