1
0
mirror of https://gitlab.com/rubenwardy/awards.git synced 2024-12-27 11:10:41 +01:00

Add helper script to update translations.

This commit is contained in:
Diego Martínez 2017-02-21 04:48:55 -03:00 committed by rubenwardy
parent ccd9a01424
commit e919355bec

22
tools/updatepo.sh Executable file
View File

@ -0,0 +1,22 @@
#! /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 \
--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