diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-13 14:26:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-13 14:26:00 +0200 |
commit | b59f12b0955d34b447a2bbcd3fbb0eb40b241631 (patch) | |
tree | 3a8190961d1c532650a2cc5f39e83878aef03abd /scripts | |
parent | 187a00f0852e82580574aa0a37eae2fcb969db23 (diff) | |
download | PeerTube-b59f12b0955d34b447a2bbcd3fbb0eb40b241631.tar.gz PeerTube-b59f12b0955d34b447a2bbcd3fbb0eb40b241631.tar.zst PeerTube-b59f12b0955d34b447a2bbcd3fbb0eb40b241631.zip |
Fix client build
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/i18n/pull-hook.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/i18n/pull-hook.sh b/scripts/i18n/pull-hook.sh index b0668436d..e616f715b 100755 --- a/scripts/i18n/pull-hook.sh +++ b/scripts/i18n/pull-hook.sh | |||
@@ -2,12 +2,13 @@ | |||
2 | 2 | ||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | # Zanata does not support inner elements in <source>, so we hack these special elements | ||
6 | # This regex translate the converted elements to initial Angular elements | ||
7 | |||
8 | for i in 1 2 3; do | 5 | for i in 1 2 3; do |
6 | # 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 | ||
9 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml | 8 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml |
10 | perl -0pi -e 's|<source>(.+?)</source>\s*<context-group |<source>\1</source><target>\1</target><context-group |g' client/src/locale/target/angular_*.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 | ||
11 | done | 12 | done |
12 | 13 | ||
13 | npm run i18n:xliff2json | 14 | npm run i18n:xliff2json |