Skip to content

Commit

Permalink
Merge branch 'master' into ru
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton authored Apr 28, 2024
2 parents 8518890 + c9e3239 commit 01bc405
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/generateFilelist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ 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//'%'/' ; '}"


TRANSLATIONS="${TRANSLATIONS//$'\n'/' ; '}"
TRANSLATIONS="${TRANSLATIONS//$'\r'/' ; '}"
TRANSLATIONS="${TRANSLATIONS//$'\$'/''}"

# First, replace all string-substitutions
TRANSLATIONS=$(echo $TRANSLATIONS | sed 's/%1$s//g')
TRANSLATIONS=$(echo $TRANSLATIONS | sed 's/%d//g')
TRANSLATIONS=$(echo $TRANSLATIONS | sed 's/%s//g')
TRANSLATIONS=$(echo $TRANSLATIONS | sed 's/"//g')

echo $TRANSLATIONS

0 comments on commit 01bc405

Please sign in to comment.