diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-14 08:39:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-14 09:50:36 +0200 |
commit | 02ba613049c0ebd082588f0845c541342dad8125 (patch) | |
tree | 7c363f576ee7bb5697a5bf5853dc7009e982f65f /scripts/i18n | |
parent | 26aef7c3fe5d81b7fcb84c4828a9d91ce7be7318 (diff) | |
download | PeerTube-02ba613049c0ebd082588f0845c541342dad8125.tar.gz PeerTube-02ba613049c0ebd082588f0845c541342dad8125.tar.zst PeerTube-02ba613049c0ebd082588f0845c541342dad8125.zip |
Update translations
Diffstat (limited to 'scripts/i18n')
-rwxr-xr-x | scripts/i18n/pull-hook.sh | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ | |||
3 | set -eu | 3 | set -eu |
4 | 4 | ||
5 | for i in 1 2 3; do | 5 | for 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|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml | 11 | perl -pi -e 's|<x id=(.+?)/>([^"])|<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 | ||
12 | done | 12 | done |
13 | 13 | ||
14 | npm run i18n:xliff2json | 14 | npm run i18n:xliff2json |