From 519786848457683eb30e147b64bfa00d3216b373 Mon Sep 17 00:00:00 2001 From: thunderdog1138 <58536412+thunderdog1138@users.noreply.github.com> Date: Sun, 15 Dec 2019 18:27:09 -0500 Subject: [PATCH] Add files via upload --- .../3d_armor/tools/updatepo.sh | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 mods/minetest-3d_armor/3d_armor/tools/updatepo.sh diff --git a/mods/minetest-3d_armor/3d_armor/tools/updatepo.sh b/mods/minetest-3d_armor/3d_armor/tools/updatepo.sh new file mode 100644 index 00000000..52de9908 --- /dev/null +++ b/mods/minetest-3d_armor/3d_armor/tools/updatepo.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +# To create a new translation: +# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot + +cd "$(dirname "${BASH_SOURCE[0]}")/.."; + +# Extract translatable strings. +xgettext --from-code=UTF-8 \ + --language=Lua \ + --sort-by-file \ + --keyword=S \ + --keyword=NS:1,2 \ + --keyword=N_ \ + --add-comments='Translators:' \ + --add-location=file \ + -o locale/template.pot \ + $(find .. -name '*.lua') + +# Update translations. +find locale -name '*.po' | while read -r file; do + echo $file + msgmerge --update $file locale/template.pot; +done