From 02ba613049c0ebd082588f0845c541342dad8125 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 14 May 2019 08:39:42 +0200 Subject: Update translations --- scripts/build/client.sh | 4 ++-- scripts/i18n/pull-hook.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/build/client.sh b/scripts/build/client.sh index 780adb0c6..d409d0594 100755 --- a/scripts/build/client.sh +++ b/scripts/build/client.sh @@ -41,7 +41,7 @@ if [ -z ${1+x} ] || [ "$1" != "--light" ]; then languages=("fr_FR") else # Supported languages - languages=("zh_Hant_TW" "fr_FR" "ja_JP" "eu_ES" "ca_ES" "cs_CZ" "eo" "de_DE" "it_IT" "nl_NL" "es_ES" "oc" "pt_BR" "pt_PT" "sv_SE" "pl_PL" "ru_RU" "zh_Hans_CN") + languages=("nl_NL" "es_ES" "oc" "pt_BR" "pt_PT" "sv_SE" "pl_PL" "ru_RU" "zh_Hans_CN" "zh_Hant_TW" "fr_FR" "ja_JP" "eu_ES" "ca_ES" "cs_CZ" "eo" "de_DE" "it_IT") fi for lang in "${languages[@]}"; do @@ -51,7 +51,7 @@ if [ -z ${1+x} ] || [ "$1" != "--light" ]; then npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ --output-path "dist/$lang/" --deploy-url "/client/$lang/" - # Do no duplicate assets + # Do not duplicate assets rm -r "./dist/$lang/assets" # TODO: remove when the project will use runtime translations diff --git a/scripts/i18n/pull-hook.sh b/scripts/i18n/pull-hook.sh index e616f715b..2d728fef5 100755 --- a/scripts/i18n/pull-hook.sh +++ b/scripts/i18n/pull-hook.sh @@ -3,12 +3,12 @@ set -eu for i in 1 2 3; do + # Angular does not like when there is not target element, so we create it with the same content than the source element + perl -0pi -e 's#([^<]+)\s*\1\1, so we hack these special elements # This regex translate the converted elements to initial Angular elements perl -pi -e 's|<x id=(.+?)/>([^"])|\2|g' client/src/locale/target/*.xml - - # Angular does not like when there is not target element, so we create it with the same content than the source element - perl -0pi -e 's#(.+?)\s*\1\1