1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2024-11-14 14:20:31 +01:00
display_modpack/signs_api/tools/updatepo.sh
Pierre-Yves Rollo d2c7abd98b Add 'signs_api/' from commit 'b837f9d38c3a81dc49c3c1234dbea0d34628b057'
git-subtree-dir: signs_api
git-subtree-mainline: ebadeb20d9
git-subtree-split: b837f9d38c
2019-12-31 17:07:27 +01:00

26 lines
573 B
Bash
Executable File

#! /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