X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=util%2Fupdatepo.sh;h=f4a401f2cb71a2fe0a38ae0fe72c203f54642378;hb=f64a6259b2b5e79103cfd4bc151304e6da39bca9;hp=bcfa4c4de3a7fce0a1f2fd0cf5877db4f09e4e1d;hpb=4ef9c7675ada82961d83601712a47ebad78b67b5;p=dragonfireclient.git diff --git a/util/updatepo.sh b/util/updatepo.sh index bcfa4c4de..f4a401f2c 100755 --- a/util/updatepo.sh +++ b/util/updatepo.sh @@ -48,7 +48,18 @@ cd .. # directory at the top level. You a recent enough xgettext that supports # --package-name potfile=po/minetest.pot -xgettext --package-name=minetest -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 \ + --output $potfile \ + `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 +67,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