feat: New Crowdin translations #14
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: Crowdin Synchronize | |
on: | |
push: | |
paths: | |
- 'app/src/main/res/values*/strings.xml' | |
- 'app/src/main/res/values*/languages.xml' | |
- 'app/src/main/res/values*/strings*.xml' | |
- 'eggs/AndroidNext/src/main/res/values*/strings*.xml' | |
- 'crowdin.yml' | |
branches: [ main ] | |
schedule: | |
- cron: '0 1 * * 0' | |
workflow_dispatch: | |
jobs: | |
crowdin: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check secrets | |
env: | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
if: ${{ env.CROWDIN_PROJECT_ID == '' || env.CROWDIN_PERSONAL_TOKEN == '' }} | |
run: exit 0 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Crowdin push | |
uses: crowdin/github-action@v2 | |
with: | |
upload_sources: true | |
upload_translations: true | |
download_translations: false | |
env: | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' # caching pip dependencies | |
- name: Update Crowdin progress | |
run: | | |
cd script/crowdin | |
pip install -r requirements.txt | |
python start.py ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
- name: Crowdin pull | |
uses: crowdin/github-action@v2 | |
with: | |
upload_sources: false | |
upload_translations: false | |
download_translations: true | |
create_pull_request: true | |
localization_branch_name: l10n_crowdin_translations | |
pull_request_title: 'feat: New Crowdin translations' | |
pull_request_body: 'New Crowdin pull request with translations 🚀' | |
commit_message: 'feat: New Crowdin translations' | |
pull_request_base_branch_name: 'main' | |
pull_request_labels: 'translations, enhancement' | |
pull_request_assignees: 'crowdin-bot' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |