]> git.lizzy.rs Git - minetest.git/blobdiff - util/updatepo.sh
Silence invalid clang format warnings in guiScrollBar.cpp (#8724)
[minetest.git] / util / updatepo.sh
index fbf1aad002b0f4af01d4e97c3f3e4e5ca98462de..84dfd3ddb0c5708869b420ade068ad3adfe5508e 100755 (executable)
@@ -48,7 +48,20 @@ cd ..
 # directory at the top level. You a recent enough xgettext that supports
 # --package-name
 potfile=po/minetest.pot
-xgettext --package-name=minetest -kN_ -kwgettext -F -n -o $potfile src/*.cpp src/*.h
+xgettext --package-name=minetest \
+       --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
@@ -56,10 +69,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