Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Apr 28, 2024
1 parent 8b9a259 commit 8dceb00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,21 @@ jobs:
with:
fetch-depth: 0
- name: Prepare Profanity Check
id: prep
run: |
sudo apt-get install -y xmlstarlet
pip3 install alt-profanity-check
chmod +x ./scripts/checkProfanity.py
chmod +x ./scripts/generateFilelist.sh
./scripts/generateFilelist.sh ${{ github.event.pull_request.commits }} ${{needs.string-change-verification.outputs.files}}
TRANSLATIONS=$(./scripts/generateFilelist.sh ${{ github.event.pull_request.commits }} ${{needs.string-change-verification.outputs.files}})
echo "TRANSLATIONS=$TRANSLATIONS" >> $GITHUB_OUTPUT
shell: sh
- uses: fabasoad/translation-action@main
id: google-step
id: google-translate
with:
provider: google
lang: auto-en
source: "Wir müssen Alarme und Wecker anlegen, sodass die Synchronisierungen pünktlich starten. Wenn diese Berechtigungen nicht gegeben ist, werden Synchronisierungen nicht funktionieren."
source: ${{ steps.prep.outputs.TRANSLATIONS }}
- name: Print the result
run: echo "Translation is '${{ steps.google-step.outputs.text }}'"
run: echo "Translation is '${{ steps.google-translate.outputs.text }}'"
shell: sh
10 changes: 5 additions & 5 deletions scripts/generateFilelist.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

if [ "$#" -ne 2 ]; then
echo "Only pass the amount of commits and one translation file!"
exit 1
fi

echo "$@"
echo "$1"
echo "$2"
echo "$3"
git diff -U0 HEAD~$1 | grep -E "^\+" | grep -v +++
git diff -U0 HEAD~$1 ${@:2}| grep -E "^\+" | grep -v +++ | cut -c 2- | sed 's/^[ \t]*\(.*$\)/\1/'

0 comments on commit 8dceb00

Please sign in to comment.