aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/client.sh4
-rwxr-xr-xscripts/i18n/pull-hook.sh6
2 files changed, 5 insertions, 5 deletions
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
41 languages=("fr_FR") 41 languages=("fr_FR")
42 else 42 else
43 # Supported languages 43 # Supported languages
44 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") 44 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")
45 fi 45 fi
46 46
47 for lang in "${languages[@]}"; do 47 for lang in "${languages[@]}"; do
@@ -51,7 +51,7 @@ if [ -z ${1+x} ] || [ "$1" != "--light" ]; then
51 npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \ 51 npm run ng build -- --prod --i18n-file "./src/locale/target/angular_$lang.xml" --i18n-format xlf --i18n-locale "$lang" \
52 --output-path "dist/$lang/" --deploy-url "/client/$lang/" 52 --output-path "dist/$lang/" --deploy-url "/client/$lang/"
53 53
54 # Do no duplicate assets 54 # Do not duplicate assets
55 rm -r "./dist/$lang/assets" 55 rm -r "./dist/$lang/assets"
56 56
57 # TODO: remove when the project will use runtime translations 57 # 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 @@
3set -eu 3set -eu
4 4
5for i in 1 2 3; do 5for i in 1 2 3; do
6 # Angular does not like when there is not target element, so we create it with the same content than the source element
7 perl -0pi -e 's#<source>([^<]+)</source>\s*<context-group #<source>\1</source><target>\1</target><context-group #g' client/src/locale/target/angular_*.xml
8
6 # Zanata does not support inner elements in <source>, so we hack these special elements 9 # Zanata does not support inner elements in <source>, so we hack these special elements
7 # This regex translate the converted elements to initial Angular elements 10 # This regex translate the converted elements to initial Angular elements
8 perl -pi -e 's|&lt;x id=(.+?)/&gt;([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml 11 perl -pi -e 's|&lt;x id=(.+?)/&gt;([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml
9
10 # Angular does not like when there is not target element, so we create it with the same content than the source element
11 perl -0pi -e 's#<source>(.+?)</source>\s*<context-group #<source>\1</source><target>\1</target><context-group #g' client/src/locale/target/angular_*.xml
12done 12done
13 13
14npm run i18n:xliff2json 14npm run i18n:xliff2json