Add simple script to aid in extracting messages.

This commit is contained in:
Diego Martínez 2017-01-25 00:14:15 -03:00
parent c1223dc5d6
commit 152c9029d9
2 changed files with 1172 additions and 0 deletions

File diff suppressed because it is too large Load Diff

20
homedecor/tools/updatepo.sh Executable file
View File

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