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
This commit is contained in:
fat115
2017-08-05 10:12:43 +02:00
parent 54108e8054
commit 2fef15d878
30 changed files with 715 additions and 50 deletions

25
signs_road/tools/updatepo.sh Executable file
View File

@ -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