X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fi18n%2Fpull-hook.sh;h=b0668436d9b66524b31abb2dbc7efadb62c70a6f;hb=9644c2a88eb227e7441b0f0a75abb75b41cc60ca;hp=cb969f83cb82eb77650ef0b749d4e99357f0335e;hpb=989e526abf0c0dd7958deb630df009608561bb67;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/i18n/pull-hook.sh b/scripts/i18n/pull-hook.sh index cb969f83c..b0668436d 100755 --- a/scripts/i18n/pull-hook.sh +++ b/scripts/i18n/pull-hook.sh @@ -4,4 +4,11 @@ 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 + +for i in 1 2 3; do + perl -pi -e 's|<x id=(.+?)/>([^"])|\2|g' client/src/locale/target/*.xml + perl -0pi -e 's|(.+?)\s*\1\1