π Localize with Crowdin #9
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: π Localize with Crowdin | |
on: | |
workflow_dispatch: | |
jobs: | |
sync-crowdin: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: πΌ Upload sources | |
uses: crowdin/github-action@v2 | |
with: | |
upload_sources: true | |
upload_translations: false | |
env: | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} | |
- name: π Pre-translate | |
uses: crowdin/github-action@v2 | |
with: | |
command: 'pre-translate' | |
command_args: '--translate-untranslated-only --method ai --ai-prompt 35779' | |
env: | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} | |
- name: β Check translation progress | |
uses: crowdin/github-action@v2 | |
with: | |
command: 'status translation' | |
command_args: '--fail-if-incomplete' | |
env: | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} | |
- name: π½ Download translations & create PR | |
uses: crowdin/github-action@v2 | |
with: | |
download_translations: true | |
create_pull_request: true | |
pull_request_title: 'π€ Sync Crowdin Translations' | |
pull_request_body: '_Auto-generated from by github action_' | |
localization_branch_name: 'l10n_crowdin_translations' | |
pull_request_base_branch_name: 'dev' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }} | |