#!/bin/sh set -eu for i in 1 2 3; do # Zanata does not support inner elements in , so we hack these special elements # This regex translate the converted elements to initial Angular elements perl -pi -e 's|<x id=(.+?)/>([^"])|\2|g' client/src/locale/target/*.xml # Angular does not like when there is not target element, so we create it with the same content than the source element perl -0pi -e 's#(.+?)\s*\1\1