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