]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - scripts/i18n/pull-hook.sh
Fix some zanata translations
[github/Chocobozzz/PeerTube.git] / scripts / i18n / pull-hook.sh
CommitLineData
989e526a
C
1#!/bin/sh
2
3set -eu
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
510fefb1
C
7
8for i in 1 2 3; do
e945b184 9 perl -pi -e 's|&lt;x id=(.+?)/&gt;([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml
57b97269 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
e945b184
C
11done
12
9c2e0dbf
C
13npm run i18n:xliff2json
14