From 6d5a800ba32aa78ce22ab3c086e1d6de1665b2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?victor=20h=C3=A9ry?= Date: Sat, 2 Feb 2019 09:15:10 +0100 Subject: [PATCH] Convert properly & to & in databases modules, fix #3 --- rollback_database.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rollback_database.sh b/rollback_database.sh index fccaf62..a2f397b 100755 --- a/rollback_database.sh +++ b/rollback_database.sh @@ -51,11 +51,12 @@ for key in $(grep Key ${ORIGINAL_XML} | awk -F'"' '{print $2}'); do # Escape special char causing problem in with sed and xml msgstr=${msgstr//'\n'/'\\n'} + msgstr=${msgstr//'&'/'&'} msgstr=${msgstr//'\"'/"""} - msgstr=${msgstr//'&'/'\&'} msgid=${msgid//'\n'/'\\n'} + msgid=${msgid//'&'/'&'} msgid=${msgid//'\"'/"""} - msgid=${msgid//'&'/'\&'} + if [[ "${msgstr}" == "" ]]; then # if the msgstr is empty, then it's not translated yet, we use original string