aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorupdatepo.sh <script@mt>2023-03-09 15:57:12 +0100
committersfan5 <sfan5@live.de>2023-03-09 15:57:12 +0100
commitad41d0af9d80568e50aac2c9512dcb8ca4f10060 (patch)
tree963cb9ffd4c90c44673e7a7d545eb21e8980c9b5 /util
parentc77f3d4dc46c15f0e5203c93b3cc7b943e3a2270 (diff)
downloadminetest-ad41d0af9d80568e50aac2c9512dcb8ca4f10060.tar.xz
Run updatepo.sh
Diffstat (limited to 'util')
-rwxr-xr-xutil/updatepo.sh6
1 files changed, 6 insertions, 0 deletions
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 '/^#\. ~<number>.*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