Files
deepseek-harness/packages/client/locale
imccyu 7ad54e7791 refactor(client): name the compile face in every client test filename
A test file under packages/client now says which face it covers:
`*.client.spec.{ts,tsx}` and its `*.client.{ts,tsx}` helpers belong to the
Client aggregate, `*.host.spec.ts` to the host aggregate. The carrier's four
node-half specs take the Host suffix.

The two suffixes are mutually exclusive, so each aggregate excludes the
other's and both keep one broad test glob: `exclude` wins over `include`, and
`packages/client/**` no longer has to be excluded wholesale from the host
program with per-file `files` entries carved back out of it. A Host-face spec
that reaches only Host source therefore needs no cross-face project
reference, which the split-project rule rejects.

vitest still discovers every file through `**/*.spec.{ts,tsx}`.
2026-08-12 01:41:40 +08:00
..
2026-08-11 22:52:39 +08:00

@deepseek-ai/dsh-client-locale

English | 中文

Locale plugin: LocaleService — the zh/en preference stored as locale.preference in $DSH_HOME/settings.yaml; when that explicit Host value is absent, a fresh browser starts provisionally in the language navigator asks for (primary-subtag matching, with zh when it asks for no language this app ships). The Host read runs after plugin activation so an unavailable settings service cannot block the page; its result replaces the provisional browser value live. Remote browsers retain only a process-local selection because the settings API is loopback-only. locale/change fires on switches. The service also owns the ns×locale dictionary registry (typed register(ns, {zh, en}) checked against LocaleNamespaceMap, bind(ns)TranslateNS<ns>; lookup chain ns → common → zh → key), 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). The Host-backed preferences decision owns the persistence boundary.

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

  • Some surfaces keep inline copy — Settings rows, the sidebar, question composer, and model select use locale seats; other packages still own static text directly.
  • Registry-held text reads its translation once — copy captured at registration time outside the slot render path (e.g. the /model command description in the command registry) keeps the language it was registered under until re-registration; slot-rendered copy follows switches live.