Skip to content

πŸ“– Localize with Crowdin #12

πŸ“– Localize with Crowdin

πŸ“– Localize with Crowdin #12

Workflow file for this run

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 }}