From 957dc638f77d47fee53e4a40f8167df31bc52a86 Mon Sep 17 00:00:00 2001 From: Typed SIGTERM Date: Tue, 25 Nov 2025 11:48:34 +0800 Subject: [PATCH] chore(ci): add Crowdin action (#762) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Neko --- .github/workflows/autofix.yaml | 2 +- .github/workflows/crowdin.yaml | 29 +++++++++++++++++++++++++ apps/stage-tamagotchi/src/main/index.ts | 2 +- crowdin.yml | 4 ++++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/crowdin.yaml diff --git a/.github/workflows/autofix.yaml b/.github/workflows/autofix.yaml index b78a2efce..c2ab35209 100644 --- a/.github/workflows/autofix.yaml +++ b/.github/workflows/autofix.yaml @@ -5,7 +5,7 @@ permissions: on: pull_request: - branches: [main] + branches: [main, crowdin] jobs: autofix: diff --git a/.github/workflows/crowdin.yaml b/.github/workflows/crowdin.yaml new file mode 100644 index 000000000..b8b46487a --- /dev/null +++ b/.github/workflows/crowdin.yaml @@ -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 }} diff --git a/apps/stage-tamagotchi/src/main/index.ts b/apps/stage-tamagotchi/src/main/index.ts index 6453fbc73..516ca919d 100644 --- a/apps/stage-tamagotchi/src/main/index.ts +++ b/apps/stage-tamagotchi/src/main/index.ts @@ -53,7 +53,7 @@ if (isLinux) { app.commandLine.appendSwitch('enable-features', 'Vulkan') // NOTICE: we need UseOzonePlatform, WaylandWindowDecorations for working on Wayland. - // Partially related to https://github.com/electron/electron/issues/41551, since X11 is deprecating now, + // Partially related to https://github.com/electron/electron/issues/41551, since X11 is deprecating now, // we can safely remove the feature flags for Electron once they made it default supported. // Fixes: https://github.com/moeru-ai/airi/issues/757 // Ref: https://github.com/mmaura/poe2linuxcompanion/blob/90664607a147ea5ccea28df6139bd95fb0ebab0e/electron/main/index.ts#L28-L46 diff --git a/crowdin.yml b/crowdin.yml index 9372d76fc..e5caa1486 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -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: