Skip to content

Commit

Permalink
properly substitute line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Apr 28, 2024
1 parent e8f9c59 commit 0dc3d91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/generateFilelist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ fi
DIFF=$(git diff -U0 HEAD~$1 ${@:2} | grep -E "^\+" | grep -v +++ | cut -c 2- | sed 's/^[ \t]*\(.*$\)/\1/')
echo "<xml>$DIFF</xml>" | xmlstarlet sel -t -m '//string' -v . -n > changed_texts.txt
TRANSLATIONS=$(cat changed_texts.txt)
TRANSLATIONS="${TRANSLATIONS//'%'/'%25'}"
TRANSLATIONS="${TRANSLATIONS//$'\n'/'%0A'}"
TRANSLATIONS="${TRANSLATIONS//$'\r'/'%0D'}"
TRANSLATIONS="${TRANSLATIONS//$'\n'/' '}"
TRANSLATIONS="${TRANSLATIONS//$'\r'/' '}"
echo $TRANSLATIONS

0 comments on commit 0dc3d91

Please sign in to comment.