Skip to content

[🌐]: Crowdin Translations #92 #92

[🌐]: Crowdin Translations #92

[🌐]: Crowdin Translations #92 #92

Workflow file for this run

name: "Crowdin Translations"
run-name: "[🌐]: Crowdin Translations #${{ github.run_number }}"
on:
push:
branches: [dev]
paths:
- 'shaders/lang/en_us.lang'
workflow_dispatch:
inputs:
create_pr:
description: "Create Pull Request after sync"
type: boolean
default: false
required: true
schedule:
# Run daily at 3 AM UTC
- cron: '0 3 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
LOCALIZATION_BRANCH: translations
TARGET_BRANCH: dev
jobs:
sync-language:
name: "[🔄] Sync Language"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v6
- name: "Crowdin (Language)"
uses: crowdin/github-action@v2
with:
upload_sources: true
download_translations: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
skip_untranslated_strings: true
# export_only_approved: true
create_pull_request: false
localization_branch_name: ${{ env.LOCALIZATION_BRANCH }}
pull_request_base_branch_name: ${{ env.TARGET_BRANCH }}
commit_message: "[translation] New translations"
config: .github/config/crowdin_lang.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
CROWDIN_ID: ${{ vars.CROWDIN_ID }}
create-pr:
name: "[🤝] Create Pull Request"
runs-on: ubuntu-latest
needs: [sync-language]
if: (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && inputs.create_pr)
steps:
- name: "Checkout repository"
uses: actions/checkout@v6
- name: "Create Pull Request"
uses: devops-infra/action-pull-request@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: ${{ env.LOCALIZATION_BRANCH }}
target_branch: ${{ env.TARGET_BRANCH }}
ignore_users: "dependabot"
label: "Pull request: Translation"
title: 'add: New Crowdin translations'
body: |
## 🌐 New translations from Crowdin
### 🔄 Changes
- Updated translation files
### 🧪 Testing
Test in-game with different languages.