diff options
author | Pierre-Yves Rollo <dev@pyrollo.com> | 2018-02-13 21:12:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 21:12:04 +0100 |
commit | 9c877a0244a5b50d1092b8a0b50e979468c6fb50 (patch) | |
tree | 3542b64df78d8f8a8cb1365d08469fd843c0ed37 /signs_api/tools | |
parent | 2acccd72610d240c115c17a63fe1d0b8a068406a (diff) | |
parent | f3970f641eb60bf92492b6715084273cc1bceb74 (diff) | |
download | display_modpack-9c877a0244a5b50d1092b8a0b50e979468c6fb50.tar.gz display_modpack-9c877a0244a5b50d1092b8a0b50e979468c6fb50.tar.bz2 display_modpack-9c877a0244a5b50d1092b8a0b50e979468c6fb50.zip |
Merge pull request #12 from Thomas--S/api
Seperate signs API from signs definitions
Diffstat (limited to 'signs_api/tools')
-rwxr-xr-x | signs_api/tools/updatepo.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/signs_api/tools/updatepo.sh b/signs_api/tools/updatepo.sh new file mode 100755 index 0000000..feb2504 --- /dev/null +++ b/signs_api/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 |