feat(ui): add custom branding and Chinese localization#165
Conversation
…olo renders Resolves the CLAUDE.md paragraph conflict with Ark0N#162, skips the windowTitle recompute for solo-session renders so a detached window cannot reset the push-notification hostTitle prefix to the default, and prettier-formats test/mobile/devices.ts (came in unformatted via the Ark0N#162 merge; CI format:check only covers src/**). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thank you as always for the contribution! This is a thoughtfully engineered take on bolting i18n onto a plain-JS app: English-canonical keys with graceful fallback, the MutationObserver translating dynamic DOM while skipping terminal/response/file/user-content surfaces, language as a per-device display key (matching the skin pattern), and displayName strictly limited to user-facing copy with textContent/escaped-title rendering (the hostile-name test is appreciated). It also fits the project's existing direction with README.zh-CN.md and CJK input support. Reviewed in detail and verified locally on the merged tree: the new i18n suite, typecheck, lint, frontend syntax, public assets, format, and the full test:ci sweep (3656 tests) all pass. I updated the branch with a master merge (resolved the CLAUDE.md paragraph conflict with #162) plus two small additions in the same commit:
Two non-blocking notes for future passes: the pre-paint language script in index.html picks the settings namespace by viewport width, which can briefly read the wrong blob on tablets and unfolded foldables until applyLocalization corrects it after load (the stable isHandheldDevice() classifier is not yet loaded at that point, so this is understandable); and the client caps displayName at 40 code points while the schema caps 40 UTF-16 units, so a name with more than 20 astral characters (e.g. many emoji) passes the client but fails the server validation. Merging. Thanks again! |
Summary
Validation
npm run test:ci— 180 files passed, 3651 tests passed (existing skips unchanged)Notes
English remains the canonical fallback. The display name syncs through server settings; language remains device-local, matching the existing display preference model.