From 0efb1ca808826d6b4429e64ecb7e198e8d45bc66 Mon Sep 17 00:00:00 2001 From: loucass003 Date: Fri, 18 Sep 2026 19:27:28 +0200 Subject: [PATCH] Configure Crowdin for l10n_main and update translation workflows --- .github/workflows/pontoon-pr.yml | 3 ++- .github/workflows/rebase.yml | 38 ++++++++++++++++++++++++++++---- crowdin.yml | 17 ++++++++++++-- 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pontoon-pr.yml b/.github/workflows/pontoon-pr.yml index a8fd3c83c..7dba575f3 100644 --- a/.github/workflows/pontoon-pr.yml +++ b/.github/workflows/pontoon-pr.yml @@ -3,6 +3,7 @@ on: push: branches: - pontoon + - l10n_main jobs: pull_request: if: ${{ github.repository == 'SlimeVR/SlimeVR-Server' }} @@ -18,4 +19,4 @@ jobs: GH_TOKEN: ${{ secrets.PONTOON_BOT_KEY }} run: | gh_pr_up() { gh pr create "$@" --label "Area: Translation" --base main || gh pr edit "$@"; } - gh_pr_up --title "New Pontoon translations" --body "Please don't squash me 🥺" + gh_pr_up --title "New translations" --body "Please don't squash me 🥺" diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index b8ee95409..1351d3d48 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -1,14 +1,44 @@ -# This workflow will rebase `pontoon` with `main` changes, it's for making the -# Pontoon bot not try making commits to main +# This workflow will rebase `l10n_main` and `pontoon` with `main` changes, it's for making the +# translation bots not try making commits to main -name: Rebase pontoon branch to main +name: Rebase translation branches to main on: push: branches: - main jobs: - rebase: + rebase-l10n: + if: ${{ github.repository == 'SlimeVR/SlimeVR-Server' }} + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - uses: actions/checkout@v6 + with: + ref: l10n_main + submodules: recursive + # Get all the git history for rebasing + fetch-depth: 0 + - name: Rebase + run: | + git config --local user.name "slimevr-bot" + git config --local user.email 'pantoon@slimevr.dev' + git fetch origin main + git rebase origin/main + git submodule update + - name: Push rebase + uses: github-actions-x/commit@v2.9 + with: + github-token: ${{ secrets.PONTOON_BOT_KEY }} + push-branch: "l10n_main" + commit-message: "update" + force-push: "true" + name: "slimevr-bot" + email: "pantoon@slimevr.dev" + + rebase-pontoon: if: ${{ github.repository == 'SlimeVR/SlimeVR-Server' }} runs-on: ubuntu-latest permissions: diff --git a/crowdin.yml b/crowdin.yml index 365e7ac5c..9f7d03056 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,3 +1,16 @@ +# Crowdin Configuration File +# https://developer.crowdin.com/configuration-file/ + files: - - source: gui/public/i18n/en/translation.ftl - translation: gui/public/i18n/%two_letters_code%/translation.ftl + - source: /gui/app/public/i18n/en/translation.ftl + translation: /gui/app/public/i18n/%locale%/%original_file_name% + languages_mapping: + locale: + zh-CN: zh-Hans + zh-TW: zh-Hant + nb: nb-NO + nb-NO: nb-NO + sv: sv-SE + sv-SE: sv-SE + en-OWO: en-x-owo + owo: en-x-owo