mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-12 23:27:22 +00:00
Fix i18n extraction
This commit is contained in:
parent
d96f5fa6b7
commit
41bc004747
@ -1,4 +1,4 @@
|
||||
[javascript: static/**.js]
|
||||
[javascript: client/**.js]
|
||||
encoding = utf-8
|
||||
domain = messages-js
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ if [[ ! "init extract update compile" =~ $ACTION ]]; then
|
||||
fi
|
||||
|
||||
for plugin in $(find . -name setup.py -exec sh -c 'basename $(dirname $0)' {} \;); do
|
||||
[[ "$plugin" == "_meta" ]] && continue
|
||||
pushd "${plugin}" >/dev/null
|
||||
if [[ "$ACTION" == "init" ]]; then
|
||||
require_locale
|
||||
@ -36,7 +37,7 @@ for plugin in $(find . -name setup.py -exec sh -c 'basename $(dirname $0)' {} \;
|
||||
echo "deleting empty dict ${TRANSLATIONS_DIR}/messages.pot"
|
||||
rm "${TRANSLATIONS_DIR}/messages.pot"
|
||||
fi
|
||||
pybabel extract -o "${TRANSLATIONS_DIR}/messages-js.pot" "indico_${plugin}" -k 'gettext' -k 'ngettext:1,2' -k '$T' -F ../babel-js.cfg
|
||||
pybabel extract -o "${TRANSLATIONS_DIR}/messages-js.pot" "indico_${plugin}" -k '$t.gettext' -k '$t.ngettext:1,2' -F ../babel-js.cfg
|
||||
num_strings=$(grep msgid "${TRANSLATIONS_DIR}/messages-js.pot" | wc -l)
|
||||
if (( $num_strings == 1 )); then
|
||||
echo "deleting empty js dict ${TRANSLATIONS_DIR}/messages-js.pot"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user