]> git.lizzy.rs Git - minetest.git/blobdiff - util/updatepo.sh
Fix undeclared global in devtest (#10133)
[minetest.git] / util / updatepo.sh
index 29d1f2fb16b871579fbc8ba54cc231799ce4abb4..168483bd44ea2f1370bf55f9534fab21d18d0b85 100755 (executable)
@@ -49,10 +49,20 @@ cd ..
 # --package-name
 potfile=po/minetest.pot
 xgettext --package-name=minetest \
-               -kN_ -kwgettext -kfgettext \
-               -F -n -o $potfile \
-               `find src/ -name '*.cpp' -o -name '*.h'` \
-               `find builtin/ -name '*.lua'`
+       --add-comments='~' \
+       --sort-by-file \
+       --add-location=file \
+       --keyword=N_ \
+       --keyword=wgettext \
+       --keyword=fgettext \
+       --keyword=fgettext_ne \
+       --keyword=strgettext \
+       --keyword=wstrgettext \
+       --keyword=showTranslatedStatusText \
+       --output $potfile \
+       --from-code=utf-8 \
+       `find src/ -name '*.cpp' -o -name '*.h'` \
+       `find builtin/ -name '*.lua'`
 
 # Now iterate on all languages and create the po file if missing, or update it
 # if it exists already
@@ -60,10 +70,10 @@ for lang in $langs ; do # note the missing quotes around $langs
        pofile=po/$lang/minetest.po
        if test -e $pofile; then
                echo "[$lang]: updating strings"
-               msgmerge -F -U $pofile $potfile
+               msgmerge --update --sort-by-file $pofile $potfile
        else
                # This will ask for the translator identity
                echo "[$lang]: NEW strings"
-               msginit -l $lang -o $pofile -i $potfile
+               msginit --locale=$lang --output-file=$pofile --input=$potfile
        fi
 done