Feature #3748: Update .po generators for new dirs and hbs files

This commit is contained in:
Carlos Martín committed 2015-06-23 18:06:35 +02:00
1 parent bb2b57fedb
commit 19bf79095e
2 files changed
+17 -3

No files matched your search

+16 -3
View File
@@ -19,7 +19,20 @@
COPYRIGHT_HOLDER="2002-2014, OpenNebula Project (OpenNebula.org), C12G Labs"
PACKAGE_NAME="OpenNebula"
find ../public/js -name \*.js > file_list.txt
xgettext --from-code=utf-8 --copyright-holder="$COPYRIGHT_HOLDER" --package-name="$PACKAGE_NAME" --no-wrap --keyword=tr -L python -f file_list.txt -p .
find ../public/app -name \*.js > file_list.txt
xgettext --from-code=utf-8 --copyright-holder="$COPYRIGHT_HOLDER" --package-name="$PACKAGE_NAME" --no-wrap --keyword= --keyword=tr -L JavaScript -f file_list.txt -p .
# xgettext-template project: https://github.com/gmarty/xgettext
# tail removes the first configuration lines for msgid ""
find ../public/app -name \*.hbs -exec sh -c "xgettext-template -L Handlebars --from-code utf-8 --force-po --keyword tr {}| tail -n +3 >> messages.po" \;
mv messages.po messages.pot
rm file_list.txt
# Because hbs files are done individually, we have duplicated entries
msguniq messages.pot -o messages.pot --no-wrap
rm file_list.txt
# TODO hbs tr helper as a parameter to other helpers:
# {{#advancedSection (tr "Advanced Options") }}
@@ -20,4 +20,5 @@
for lang in $(ls languages/*.po); do
msgmerge --backup=off --no-wrap --update $lang messages.pot
echo
done