iOS and other fixes #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Add Crowdin Translation Strings | |
on: | |
pull_request: | |
branches: [ main ] | |
types: | |
- closed | |
jobs: | |
check_changes: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
env: | |
CROWDIN_API: ${{ secrets.CROWDIN_API }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Watching for changes in app_en.arb and run Python script | |
run: | | |
CHANGED_FILES=$(git diff --name-only -r HEAD^1 HEAD) | |
# Check if the specific file is in the changed files list | |
if echo "$CHANGED_FILES" | grep -q 'app_en.arb'; then | |
FILE=$(git diff HEAD^1:chameleonultragui/lib/l10n/app_en.arb HEAD:chameleonultragui/lib/l10n/app_en.arb --no-ext-diff --unified=0 -a --no-prefix | egrep "^\+") | |
python chameleonultragui/lib/l10n/updateCrowdin.py "$FILE" | |
else | |
echo "The file 'app_en.arb' has not changed." | |
fi |