diff options
author | fat115 <fat115@framasoft.org> | 2017-08-05 10:12:43 +0200 |
---|---|---|
committer | fat115 <fat115@framasoft.org> | 2017-08-05 10:12:43 +0200 |
commit | 2fef15d878f00c72a799aebc5b8a6bd61489296e (patch) | |
tree | 5d5ec63f18bb317fa7c56dcb00c8ffa7f3a62b10 /steles/tools | |
parent | 54108e8054ee21e1a3b229f4a4e9e521f5700aa6 (diff) | |
download | display_modpack-2fef15d878f00c72a799aebc5b8a6bd61489296e.tar.gz display_modpack-2fef15d878f00c72a799aebc5b8a6bd61489296e.tar.bz2 display_modpack-2fef15d878f00c72a799aebc5b8a6bd61489296e.zip |
add intllib support (i18n)
-> mods ontime_clocks, signs, signs_roads & steles
add french translations
add updatepo.sh script to update po/pot files
add specific array for full description of steles
Diffstat (limited to 'steles/tools')
-rwxr-xr-x | steles/tools/updatepo.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/steles/tools/updatepo.sh b/steles/tools/updatepo.sh new file mode 100755 index 0000000..feb2504 --- /dev/null +++ b/steles/tools/updatepo.sh @@ -0,0 +1,25 @@ +#! /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_ \ + --keyword=F \ + --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 |