Node >= 21 exposes a global `navigator` reporting the machine's own language,
so gating detection on `navigator` let a non-browser boot of the client tree
resolve to `en` instead of the documented fallback; `window` is the browser
test. `navigator.languages` is spec-required but absent on some embedders and
older WebViews, where spreading it would throw at boot, so the walk tolerates
its absence and `navigator.language` covers that host.
The per-spec pin boilerplate collapses into one suite-level
`usePinnedBrowserLanguages('zh-CN')`, which owns the rationale in
dsh-client-test-runtime, and the English-browser e2e scenario now clears the
console warnings channel too — its page has no closing inventory spec.
@deepseek-ai/dsh-client-locale
English | 中文
Locale plugin: LocaleService — the browser locale preference (zh/en, persisted under dsh.locale; with nothing persisted a fresh browser opens in the language navigator asks for — matched on the primary subtag, zh when it asks for none this app ships; locale/change fires on switches only) plus the ns×locale dictionary registry (typed register(ns, {zh, en}) checked against LocaleNamespaceMap, bind(ns)→TranslateNS<ns>; lookup chain ns → common → zh → key). The service implements the slot system's LocaleFace and installs itself through ctx.slots.installLocale, backing the framework-injected t standard seat (Translate/TranslateNS are ui-slots types; import them from there — this package only re-exports for dictionary owners' convenience).
Model Experience
None, as the locale registry serves browser UI copy; nothing here reaches a model request.
KV Cache effect
None; this package neither assembles nor sends a provider request.
Known Limitations and Deferred Work
- Most surfaces keep inline copy — the standard seat is adopted by the Settings rows, sidebar, question composer, and model select; the remaining packages migrate in follow-up PRs.
- Registry-held text reads its translation once — copy captured at registration time outside the slot render path (e.g. the
/modelcommand description in the command registry) keeps the language it was registered under until re-registration; slot-rendered copy follows switches live.