Skip to content

i18n: make English the source text (Chinese becomes a catalog) - #3

Merged
minchenlee merged 11 commits into
mainfrom
feat/english-source
Nov 18, 2026
Merged

minchenlee merged 11 commits into
mainfrom
feat/english-source

Conversation

@minchenlee

Copy link
Copy Markdown
Owner

Make English the source text of the UI. Chinese (zh-TW) becomes a translation catalog.

What changes

  • Message ids are now the English text. src/i18n/zh-TW.ts maps English → Chinese.
  • A missing Chinese string is a warning in npm run i18n:check, not an error, so contributors can add English-only examples and practice questions. The nightly job still checks that Chinese is complete.
  • Old Chinese lookups keep working (for example, the scenario menu still finds a preset by its old Chinese name).
  • Schema descriptions are in English.
  • The one-time codemod and the text-dump test are removed after use.

Review

  • Codex: 3 rounds; the last one has no P1/P2.
  • A second reviewer (gh-sysdes-rev): 2 rounds; OK to merge.

Tests

CI on this PR: check and e2e.

🤖 Generated with Claude Code

https://claude.ai/code/session_015uxaDTazJv7ozbPd3u5Cub

minchenlee and others added 11 commits November 17, 2026 20:29
Output of scripts/codemod-english-source.ts plus the hand-made parts:
t()/tx() ids, KINDS, examples, scenarios and the 17 practice questions
are English; src/i18n/zh-TW.ts (English id -> Traditional Chinese)
replaces src/i18n/en.ts. Thirteen English texts with two Chinese texts
carry a context mark (Off@@not-used) that t() strips. Old Chinese ids
in saved designs still translate in English mode.

One English text changes: the saas-instagram PostgreSQL label was 61
characters, over the 60-character label limit, and is now
"PostgreSQL (12 shards, replicas in another AZ)" (lead decision).
Golden hashes do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
i18n:check lists entries without Traditional Chinese and passes; it
still fails on placeholder mismatches and an out-of-date zh-TW.ts.
i18n:strict (nightly on main) fails on missing Chinese. AGENTS.md,
CONTRIBUTING.md and docs/design-system.md say English is the source
text. schema/design.schema.json descriptions are now English (191 lines).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assertions on message ids and raw example data use the English ids;
assertions on zh-TW output stay and go through t(). The text dump used
for the acceptance check runs only with DUMP_OUT set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An example added in English only leaves its zh-TW entry empty, so zh-TW
shows English. Only require Chinese when the catalog has it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR #2 added nightly.yml with its own schedule and concurrency group, so
ci.yml goes back to main's version and the nightly translation check
becomes a job next to the slow tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
t() stripped the @@context from any text, so a scenario named
"壓測@@臺北" showed as "壓測" in both languages. Only a catalog id has a
context mark now; other text stays as written. Catalog lookups use
Object.hasOwn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check only looked at the Traditional Chinese title, so an English
title with no translation ("Database failure") passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Replica reads" -> "Read replica count", "Replica applies write cost" ->
"Replica write-apply cost", "Not enough result" -> "Insufficient data"
(with the three import messages that start with it). The Traditional
Chinese moves with each id and does not change. Regenerated schema/ and
the AI guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Built-in scenario names are English now. An old share link or a saved
version still has the Traditional Chinese name, so the menu did not mark
the current preset. presetOf() (src/app/presetName.ts) also matches the
Chinese name in zh-TW.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The English source text conversion is done and checked; copies stay
with the validation data outside the repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-18T13:08:22.820588Z
We couldn’t complete this review. Comment @codex review to try again.
398f76f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@minchenlee
minchenlee merged commit 1e8e9c6 into main Nov 18, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant