diff options
Diffstat (limited to 'scripts/i18n/pull-hook.sh')
-rwxr-xr-x | scripts/i18n/pull-hook.sh | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/scripts/i18n/pull-hook.sh b/scripts/i18n/pull-hook.sh deleted file mode 100755 index 8d1f7ee55..000000000 --- a/scripts/i18n/pull-hook.sh +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | for i in $(seq 1 10); 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 | |||
9 | # Zanata does not support inner elements in <source>, so we hack these special elements | ||
10 | # This regex translate the converted elements to initial Angular elements | ||
11 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml | ||
12 | done | ||
13 | |||
14 | npm run i18n:xliff2json | ||
15 | |||