From ad41d0af9d80568e50aac2c9512dcb8ca4f10060 Mon Sep 17 00:00:00 2001 From: "updatepo.sh" Date: Thu, 9 Mar 2023 15:57:12 +0100 Subject: Run updatepo.sh --- util/updatepo.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util') diff --git a/util/updatepo.sh b/util/updatepo.sh index 23e2c61e9..7e9928ef4 100755 --- a/util/updatepo.sh +++ b/util/updatepo.sh @@ -48,6 +48,7 @@ cd .. # directory at the top level. You a recent enough xgettext that supports # --package-name potfile=po/minetest.pot +echo "updating pot" xgettext --package-name=minetest \ --add-comments='~' \ --sort-by-file \ @@ -67,6 +68,10 @@ xgettext --package-name=minetest \ `find src/ -name '*.cpp' -o -name '*.h'` \ `find builtin/ -name '*.lua'` +# Gettext collects a bunch of bogus comments for the "Available commands: " string +# I couldn't figure out how to avoid that so get rid of them afterwards +sed '/^#\. ~.*relative_to/,/^#: /{ /^#: /!d; }' -i $potfile + # Now iterate on all languages and create the po file if missing, or update it # if it exists already for lang in $langs ; do # note the missing quotes around $langs @@ -79,4 +84,5 @@ for lang in $langs ; do # note the missing quotes around $langs echo "[$lang]: NEW strings" msginit --locale=$lang --output-file=$pofile --input=$potfile fi + done -- cgit v1.2.3