feat: Update translations #247
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: Update translation | |
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 | |
python chameleonultragui/lib/l10n/updateCrowdin.py | |
else | |
echo "The file 'app_en.arb' has not changed." | |
fi |