diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index b4dbd2de..d7cbb3b1 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -53,9 +53,6 @@ jobs: exit 1 fi TRANSLATIONS=$(./scripts/generateFilelist.sh ${{ github.event.pull_request.commits }} ${{needs.string-change-verification.outputs.files}}) - TRANSLATIONS="${TRANSLATIONS//'%'/'%25'}" - TRANSLATIONS="${TRANSLATIONS//$'\n'/'%0A'}" - TRANSLATIONS="${TRANSLATIONS//$'\r'/'%0D'}" echo "TRANSLATIONS=$TRANSLATIONS" >> $GITHUB_OUTPUT shell: sh - name: Upload Raw Translations diff --git a/scripts/generateFilelist.sh b/scripts/generateFilelist.sh index 04fd3368..e308f032 100755 --- a/scripts/generateFilelist.sh +++ b/scripts/generateFilelist.sh @@ -7,4 +7,8 @@ fi DIFF=$(git diff -U0 HEAD~$1 ${@:2} | grep -E "^\+" | grep -v +++ | cut -c 2- | sed 's/^[ \t]*\(.*$\)/\1/') echo "$DIFF" | xmlstarlet sel -t -m '//string' -v . -n > changed_texts.txt -cat changed_texts.txt +TRANSLATIONS=$(cat changed_texts.txt) +TRANSLATIONS="${TRANSLATIONS//'%'/'%25'}" +TRANSLATIONS="${TRANSLATIONS//$'\n'/'%0A'}" +TRANSLATIONS="${TRANSLATIONS//$'\r'/'%0D'}" +echo $TRANSLATIONS \ No newline at end of file