Skip to content

Commit

Permalink
Delete empty translation templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster committed Jun 26, 2017
1 parent 45c3aeb commit 702e4b1
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 193 deletions.
30 changes: 0 additions & 30 deletions .tx/config
Expand Up @@ -7,12 +7,6 @@ source_file = vc_vidyo/indico_vc_vidyo/translations/messages.pot
source_lang = en
type = PO

[indico.vc-vidyo-messages-js]
file_filter = vc_vidyo/indico_vc_vidyo/translations/<lang>/LC_MESSAGES/messages-js.po
source_file = vc_vidyo/indico_vc_vidyo/translations/messages-js.pot
source_lang = en
type = PO

[indico.search-messages]
file_filter = search/indico_search/translations/<lang>/LC_MESSAGES/messages.po
source_file = search/indico_search/translations/messages.pot
Expand Down Expand Up @@ -67,24 +61,12 @@ source_file = payment_paypal/indico_payment_paypal/translations/messages.pot
source_lang = en
type = PO

[indico.payment-paypal-messages-js]
file_filter = payment_paypal/indico_payment_paypal/translations/<lang>/LC_MESSAGES/messages-js.po
source_file = payment_paypal/indico_payment_paypal/translations/messages-js.pot
source_lang = en
type = PO

[indico.payment-manual-messages]
file_filter = payment_manual/indico_payment_manual/translations/<lang>/LC_MESSAGES/messages.po
source_file = payment_manual/indico_payment_manual/translations/messages.pot
source_lang = en
type = PO

[indico.payment-manual-messages-js]
file_filter = payment_manual/indico_payment_manual/translations/<lang>/LC_MESSAGES/messages-js.po
source_file = payment_manual/indico_payment_manual/translations/messages-js.pot
source_lang = en
type = PO

[indico.livesync-messages]
file_filter = livesync/indico_livesync/translations/<lang>/LC_MESSAGES/messages.po
source_file = livesync/indico_livesync/translations/messages.pot
Expand All @@ -103,12 +85,6 @@ source_file = livesync_invenio/indico_livesync_invenio/translations/messages.pot
source_lang = en
type = PO

[indico.livesync-invenio-messages-js]
file_filter = livesync_invenio/indico_livesync_invenio/translations/<lang>/LC_MESSAGES/messages-js.po
source_file = livesync_invenio/indico_livesync_invenio/translations/messages-js.pot
source_lang = en
type = PO

[indico.importer-messages]
file_filter = importer/indico_importer/translations/<lang>/LC_MESSAGES/messages.po
source_file = importer/indico_importer/translations/messages.pot
Expand All @@ -126,9 +102,3 @@ file_filter = importer_invenio/indico_importer_invenio/translations/<lang>/LC_ME
source_file = importer_invenio/indico_importer_invenio/translations/messages.pot
source_lang = en
type = PO

[indico.importer-invenio-messages-js]
file_filter = importer_invenio/indico_importer_invenio/translations/<lang>/LC_MESSAGES/messages-js.po
source_file = importer_invenio/indico_importer_invenio/translations/messages-js.pot
source_lang = en
type = PO

This file was deleted.

19 changes: 0 additions & 19 deletions livesync_debug/indico_livesync_debug/translations/messages-js.pot

This file was deleted.

19 changes: 0 additions & 19 deletions livesync_debug/indico_livesync_debug/translations/messages.pot

This file was deleted.

This file was deleted.

12 changes: 11 additions & 1 deletion manage-i18n.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

USAGE="$0 [init <locale>|extract|update <locale>|compile <locale>]"

Expand Down Expand Up @@ -31,7 +31,17 @@ for plugin in $(find . -name setup.py -exec sh -c 'basename $(dirname $0)' {} \;
TRANSLATIONS_DIR="./indico_${plugin}/translations"
[[ ! -d "$TRANSLATIONS_DIR" ]] && mkdir "$TRANSLATIONS_DIR"
pybabel extract -o "${TRANSLATIONS_DIR}/messages.pot" "indico_${plugin}" -F ../babel.cfg
num_strings=$(grep msgid "${TRANSLATIONS_DIR}/messages.pot" | wc -l)
if (( $num_strings == 1 )); then
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
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"
rm "${TRANSLATIONS_DIR}/messages-js.pot"
fi
elif [[ "$ACTION" == "update" ]]; then
require_locale
pybabel update -i "./indico_${plugin}/translations/messages.pot" -l "$LOCALE" -d "./indico_${plugin}/translations"
Expand Down
21 changes: 0 additions & 21 deletions payment_manual/indico_payment_manual/translations/messages-js.pot

This file was deleted.

21 changes: 0 additions & 21 deletions payment_paypal/indico_payment_paypal/translations/messages-js.pot

This file was deleted.

19 changes: 0 additions & 19 deletions vc_dummy/indico_vc_dummy/translations/messages-js.pot

This file was deleted.

21 changes: 0 additions & 21 deletions vc_vidyo/indico_vc_vidyo/translations/messages-js.pot

This file was deleted.

0 comments on commit 702e4b1

Please sign in to comment.