feat(i18n): locale layer with a complete Simplified Chinese translation (#60)
Adds a dependency-free i18n layer (src/lib/i18n.ts: locale state, lookup,
{var} interpolation) with English as the compile-time source of truth and
a full zh-CN dictionary — 1649 keys each, key parity enforced by the type
of `en`. Lookup falls back to English for anything a locale hasn't
translated, so a partial locale renders mixed rather than blank.
Design choices aimed at keeping future merges painless:
- No data-shape changes. Tables that carry UI text (STATUS_LABEL,
PURPOSE_META, TABS, PRESETS…) keep their Record<string, string> shape
and inline English; parallel *_KEY lookup tables plus a shared
tLabel(t, key, fallback) helper (exported from lib/i18n.ts) overlay the
translation at render time and always fall back to the inline English.
- Locale is a per-device choice (localStorage), defaulting to the
browser language; a LanguagePicker in Me → Preferences (desktop and
mobile) switches it live. `zh`, `zh-Hans`, `zh-CN`, `zh-SG` all land on
Simplified Chinese.
- Product and brand names (Cumora, Convene, Claude Code, Codex, Grok
Build, Cursor) stay in English in every locale.
- docs/I18N.md documents the layer, the overlay pattern, and how to add
strings or a new locale.
Covers the desktop, mobile, web-shell and admin surfaces end to end,
including the Novita hint that landed in #55.
Validated: tsc --noEmit clean, vite build clean, biome diagnostics
identical to the pre-change baseline on every touched file.
Co-authored-by: always1ov <always1ov@users.noreply.github.com> A
always1ov committed
c3ed38358fb2cb6b1da60a43fa5c309655ae7faf
Parent: bd8dba8
Committed by GitHub <noreply@github.com>
on 8/22/2026, 6:30:16 PM