Browse Source

Fix newline when converting back modules by using printf instead of echo. fix #9

master
LecygneNoir 5 years ago
parent
commit
4ec2bdbd0c
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      rollback_module.sh

+ 2
- 3
rollback_module.sh View File

@ -43,10 +43,8 @@ function extract_translation {
msgid="$(awk 'NR{printf "%s",$0;next;}1' <<< ${tempMsgid})"
# Escape special char causing problem in with sed and xml
msgstr=${msgstr//'\n'/'\\n'}
msgstr=${msgstr//'\"'/"&quot;"}
msgstr=${msgstr//'&'/'\&'}
msgid=${msgid//'\n'/'\\n'}
msgid=${msgid//'\"'/"&quot;"}
msgid=${msgid//'&'/'\&'}
@ -57,7 +55,8 @@ function extract_translation {
translation=${msgstr}
fi
echo ${translation}
# Using printf is more consistent then echo, here it transforms \n in real newline 😄
printf "${translation}"
}
function rebuild_txt {

Loading…
Cancel
Save