From 6c9ca11602b96d42a7bd5edc447286e7f2c79b20 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 19 Jun 2026 15:46:33 +0000 Subject: [PATCH] ci: seed translators.json from Crowdin on every sync Adds a seed-translators job to the Crowdin workflow that runs scripts/translators.sh --seed (past two months) and opens/updates a single PR via peter-evans/create-pull-request whenever a new contributor appears, so docs/changelog/translators.json stays current without manual upkeep. The action is MIT and CI-only (not linked into any shipped artifact), and no-ops when there is no diff. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01FWQWVdWLAwBUBX2gJ55y6b --- .github/workflows/crowdin.yml | 36 ++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index e23a28596e..d270d80a45 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -31,4 +31,38 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} \ No newline at end of file + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} + + # Keep docs/changelog/translators.json seeded with everyone who has translated + # recently, so the per-release `## Translations` credits (scripts/translators.sh) + # can resolve them to npubs. Runs independently of the sync job above and only + # opens/updates a PR when a genuinely new contributor appears. + seed-translators: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Seed translator placeholders from Crowdin + run: bash scripts/translators.sh --seed + env: + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} + + - name: Open or update the seed PR + # peter-evans/create-pull-request is MIT-licensed CI-only tooling (not + # linked into any shipped artifact). It no-ops when there is no diff. + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + base: main + branch: chore/seed-translators + add-paths: docs/changelog/translators.json + commit-message: 'chore: seed translator npub placeholders from Crowdin' + title: 'Seed translator npub placeholders' + body: | + New Crowdin contributors were added to `docs/changelog/translators.json` + with blank npubs. Fill in the npubs you have so the next release's + `## Translations` credits generate automatically via + `scripts/translators.sh --from --to `. \ No newline at end of file