chore(i18n): drop the CI translation bot; agents translate in the PR
What & why
The Translate Catalogs workflow filled missing translations with Claude and pushed a commit onto every PR that added a string. That left the agent's local branch behind its own PR and caused thrash. This removes it, along with the translator script and the Anthropic SDK dependency in packages/i18n. The agent that adds a string now writes its translations in the same change.
While here, the i18n check becomes trustworthy and linter-shaped:
- Lingui runs through
bunx --bun … --workers 1. The raw bin is a silent no-op under Node <22.18 (this is what every Mac with Node 22.16 gets), and under Bun's default worker poolcompile --strictprints the error but exits 0. Single-threaded under Bun it exits 1 and, with--verbose, lists each missing id with its English source. - Root
bun run check:i18n(extract + strict compile + stale-translation audit, ~7s) sits beside lint, typecheck, and test in CONTRIBUTING.md, DEVELOPMENT.md, and the ci-check command. Thepretypecheckhook that re-ran extract on every typecheck is gone. - CI runs the same command plus a diff against HEAD, so uncommitted catalogs fail there and only there.
- Catalogs carry no
#:origin lines (origins: false), so the reference sorter that existed only to make those lines platform-independent is deleted. The 120k deleted catalog lines are exactly those comments; the compiledmessages.tsfiles are unchanged. - The stale-translation audit was hardcoded to ja and zh-CN; it now covers every enabled locale.
A follow-up PR moves to Lingui's default text-as-id mode, which makes the stale audit unnecessary.
How I tested it
bun run check:i18nfrom a committed tree exits 0 in ~7s; with a German entry blanked,compile --strict --verbose --workers 1exits 1 and names the id. The same blanked catalog exits 0 under the oldbun run compile.- CI-form
bun run check:i18n && git diff --exit-code --stat HEAD -- packages/i18n/localesexits 0 on the committed tree and 1 with a file list when catalogs are regenerated but uncommitted. bun testin packages/i18n (111 pass),turbo typecheck --filter=@superset/i18n(now just tsc), biome on every changed file.- The deleted job is not in the main ruleset's required checks (Build, Test, Typecheck, Lint).
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (CI fails on lint warnings too) - "Allow edits from maintainers" is checked on fork PRs
https://claude.ai/code/session_013UiC9jnCiE3bpgg6YzPje1
Summary by cubic
Removes the Translate Catalogs CI workflow, which pushed generated translations onto PRs and left the author's branch out of sync. Authors now write translations for new strings in the same commit, and the i18n check reliably fails on missing or stale translations.
Changes
- Root
bun run check:i18nruns extract, strict compile, and the stale-translation audit; CI also fails if the regenerated catalogs differ from HEAD. linguiruns viabunx --bun … --workers 1; the raw binary silently no-ops on older Node and exited 0 on failures under Bun's worker pool.- The
pretypecheckextract hook is gone, and the stale audit now covers every enabled locale instead of onlyjaandzh-CN. - Catalogs no longer include
#:origin lines, so the platform-dependent reference sorter is removed; the deleted catalog lines are comments only, and the compiledmessages.tsfiles are unchanged. - The
ci-checkcommand runs the two fixers before the parallel checks, socheck:i18nnever reads a half-rewritten tree. - Removes the translator script and the
@anthropic-ai/sdkdependency frompackages/i18n.
Migration
- After changing a user-facing string, run
bun run check:i18n, write missing translations into eachpackages/i18n/locales/<locale>/messages.po, and commit the regenerated catalogs.
Summary by CodeRabbit
-
Documentation
- Updated localization guidance with a unified command for regenerating and checking translation catalogs.
- Clarified translation ID conventions, stale-translation handling, catalog determinism, and contributor responsibilities.
-
Chores
- Added automated catalog validation to development and pull-request checks.
- CI now verifies regenerated catalogs are committed and checks translation consistency across supported locales.
- Removed the automated workflow that filled missing translations in pull requests.