From 510fefb194aba4b365b96b150f89a9f36306560c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Jun 2018 18:12:48 +0200 Subject: Add french --- scripts/i18n/generate.sh | 3 ++- scripts/i18n/pull-hook.sh | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/i18n/generate.sh b/scripts/i18n/generate.sh index 429523ba4..f8ad8a3c1 100755 --- a/scripts/i18n/generate.sh +++ b/scripts/i18n/generate.sh @@ -8,4 +8,5 @@ npm run ngx-extractor -- --locale "en-US" -i 'src/**/*.ts' -f xlf -o src/locale/ # Zanata does not support inner elements in , so we hack these special elements # This regex translate the Angular elements to special entities (that we will reconvert on pull) -sed -i 's//\<x id=\1\/\>/g' src/locale/source/messages_en_US.xml \ No newline at end of file +#sed -i 's//\<x id=\1\/\>/g' src/locale/source/messages_en_US.xml +perl -pi -e 's||<x id=\1/>|g' src/locale/source/messages_en_US.xml \ No newline at end of file diff --git a/scripts/i18n/pull-hook.sh b/scripts/i18n/pull-hook.sh index cb969f83c..bbe4a813e 100755 --- a/scripts/i18n/pull-hook.sh +++ b/scripts/i18n/pull-hook.sh @@ -4,4 +4,8 @@ set -eu # Zanata does not support inner elements in , so we hack these special elements # This regex translate the converted elements to initial Angular elements -sed -i 's/\<x id=\([^\/]\+\?\)\/\>//g' client/src/locale/target/* \ No newline at end of file +#sed -i 's/\<x id=\(.\+\?\)\/\>//g' client/src/locale/target/* + +for i in 1 2 3; do + perl -pi -e 's|<x id=(.+?)/>([^"])|\2|g' client/src/locale/target/* +done \ No newline at end of file -- cgit v1.2.3