Skip to content

ci(i18n): add Crowdin upload/download workflows - #4148

Merged
nynexman4464 merged 1 commit into
mainfrom
nynexman4464/feat/crowdin-integration
Jul 22, 2026
Merged

nynexman4464 merged 1 commit into
mainfrom
nynexman4464/feat/crowdin-integration

Conversation

@nynexman4464

Copy link
Copy Markdown
Contributor

What

Wires up Crowdin OSS for community translations of astryx's UI strings. Follows the mastodon-style CLI-in-GitHub-Actions pattern — GitHub Actions runs the Crowdin CLI on the repo's own runners against crowdin/project/astryx. No third-party GitHub App, no server-side integration, no bot account.

Follows the plan in T280631283.

What's in this PR

  • crowdin.yml — Crowdin CLI config. Source is packages/core/locales/en.json (react_intl format); translations write to packages/core/locales/<lang>.json. skip_untranslated_files: true keeps empty per-locale files out of the repo until real content lands.
  • .github/workflows/crowdin-upload.yml — on push to main that touches en.json (or manual workflow_dispatch), pushes source strings up to Crowdin. Read-only repo permissions.
  • .github/workflows/crowdin-download.yml — workflow_dispatch only for now. Pulls translations, normalizes with prettier, opens a PR to a stable l10n/crowdin branch via peter-evans/create-pull-request. A cron schedule follows in a separate PR after we smoke-test the full flow end-to-end.
  • CONTRIBUTING.md — a Translations section pointing translators at the Crowdin project.

Third-party actions SHA-pinned per repo policy:

Secrets already in place on this repo

  • Secret CROWDIN_PERSONAL_TOKEN — Crowdin PAT for the astryx bot Crowdin account
  • Variable CROWDIN_PROJECT_ID — numeric Crowdin project ID (not sensitive)

Rollout plan

  1. Merge this PR — nothing changes for end users, no automatic runs.
  2. Smoke-test manually: run the crowdin-upload workflow via workflow_dispatch, verify sources land on Crowdin.
  3. When translators start submitting content, run crowdin-download manually and review the generated PR.
  4. Followup PR to add a daily cron schedule to crowdin-download once the flow is proven end-to-end.
  5. Followup PR to swap the peter-evans token: input from GITHUB_TOKEN to a maintainer PAT so CI runs on translation PRs.

Notes

  • No changeset — this is CI infra, no runtime package change. Matches the pattern of PR ci(scripts): teach verify-exports to expand subpath wildcard patterns #4042 (ci(scripts): teach verify-exports…).
  • Uses the existing ./.github/actions/setup composite for Node + pnpm bootstrap.
  • commit_message: '[ci skip]' in crowdin.yml is a safety default; Crowdin CLI doesn't commit anything in our setup (all PR creation is via peter-evans).
  • The en.json source of truth stays authoritative in git — Crowdin cannot edit source strings, only translations.

Refs: T280631283, #3641

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 21, 2026
@vercel

vercel Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jul 22, 2026 4:54pm

Request Review

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.7KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

Wire up Crowdin OSS for community translations of packages/core/locales/en.json
using the mastodon-style CLI-in-GitHub-Actions pattern (no Crowdin GitHub App).

- crowdin.yml: react_intl source at packages/core/locales/en.json, translations
  written to packages/core/locales/<lang>.json. skip_untranslated_files keeps
  empty per-locale files out of the repo until real content lands.
- crowdin-upload.yml: on push to main touching en.json (or workflow_dispatch),
  push source strings to Crowdin. Read-only permissions.
- crowdin-download.yml: workflow_dispatch only for now — pulls translations,
  normalizes with prettier, and opens a PR via peter-evans/create-pull-request
  against a stable l10n/crowdin branch. A cron schedule will follow after
  smoke-testing the full flow end-to-end.
- CONTRIBUTING.md: add a Translations section linking to the Crowdin project.

Third-party actions SHA-pinned per repo policy:
  crowdin/[email protected]              (e0c8f73)
  peter-evans/[email protected]    (22a9089)

This branch was successfully deployed

1 active deployment
Preview — 851d0a55 Deployed Jul 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant