forked from mtcontrib/plantlife_modpack
5ca1ed261e
idea taken from homedecor_modpack and its homedecor_i18n all translated mods have a new dependency : plantlife_i18n translations are stored in po/pot file : one file for all mods added french translation (almost complete) transfered de/es/tr/pt translations to corresponding .po file (only for some mods, unfortunately translations are incomplete)
25 lines
558 B
Bash
Executable File
25 lines
558 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_ \
|
|
--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
|