chore(ci): add Crowdin action (#762)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Neko <neko@ayaka.moe>
This commit is contained in:
Typed SIGTERM
2025-11-25 11:48:34 +08:00
committed by GitHub
co-authored by autofix-ci[bot] Neko
parent 73d68c91be
commit 957dc638f7
4 changed files with 35 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ permissions:
on:
pull_request:
branches: [main]
branches: [main, crowdin]
jobs:
autofix:
+29
View File
@@ -0,0 +1,29 @@
name: Sync Translations from Crowdin
on:
schedule:
- cron: '2 1 * * *' # random time every day
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
sync-transitions-from-crowdin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: crowdin
create_pull_request: true
pull_request_title: 'chore(i18n): update translations'
pull_request_body: 'This PR contains updated translations from Crowdin. Created from [GitHub Actions](https://github.com/moeru-ai/airi/blob/main/.github/workflows/crowdin.yaml).\n\n You can review the source of translations [here](https://crowdin.com/project/proj-airi)'
pull_request_base_branch_name: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
+4
View File
@@ -1,3 +1,7 @@
project_id: proj-airi
api_token_env: CROWDIN_PERSONAL_TOKEN
preserve_hierarchy: true
files:
- source: packages/i18n/src/locales/en/**/*
ignore: