Skip to content

i18n: add Simplified Chinese (zh-CN), all 1307 strings - #59

Open
xwnxzz wants to merge 1 commit into
MakerViking:mainfrom
xwnxzz:i18n/zh-CN
Open

xwnxzz wants to merge 1 commit into
MakerViking:mainfrom
xwnxzz:i18n/zh-CN

Conversation

@xwnxzz

@xwnxzz xwnxzz commented Sep 30, 2026

Copy link
Copy Markdown

Adds locales/zh-CN.json with the full catalogue translated (1307 entries), registers it in
src/i18n/registry.ts, and adds a 简体中文 section to locales/CREDITS.md — following
locales/README.md exactly: keys untouched, {placeholders} untouched, plural categories kept,
one line in the registry.

Checks run

npm run i18n:check   → zh-CN: 1307 entries, 0 missing, 0 extra, 0 placeholder mismatches
npm run i18n:lint    → no hardcoded UI strings found
npm run build        → tsc --noEmit && vite build: OK
npx vitest run       → 2116 passed, 3 failed

The 3 failures (cjkTypography, sketch/textDrag, sketch/trimRawCursor) also fail on the
unmodified tree on this machine, so they are not caused by this change.

One thing worth your attention (pre-existing, not touched here)

Several tests assert English label text. On a machine whose Node/ICU default locale is zh-CN,
detectLocale() now resolves to zh-CN and 101 further tests fail purely because the strings
they assert are translated. On an English-locale runner (CI) they all pass. So the suite is
locale-sensitive today; pinning the locale in a test setup file would fix that, but it is your call
and this PR deliberately does not touch tests.

Notes

  • "zh-CN" is registered so an exact navigator.language of zh-CN is auto-detected. A bare zh
    still falls back to English (the picker offers 简体中文).
  • 26 strings warn as "identical to English": symbols and brands (D, R, B / I, TinkerAtlas,
    {a} ∩ {b}, …) where translating would be wrong.
  • Nothing outside locales/ and the one registry line is touched.

MakerViking added a commit that referenced this pull request Oct 2, 2026
Carries PR #50 onto main: a snapped endpoint gets a real coincident constraint, arcs
included, so joins survive the next solve. Also prepares the CJK font stack for
Simplified Chinese and makes vitest independent of the OS locale (for PR #59).
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