peiyuwang54/deepseek-harness-cli--packages-client-locale ↗★ 62

@deepseek-ai/dsh-client-locale

Locale plugin: Host-backed zh/en preference, browser-derived fallback, locale snapshots, and typed namespace dictionaries 适合需要中英等多语言界面切换的客户端,依赖 Host 语言偏好设置。

Package
@deepseek-ai/dsh-client-locale
Compatibility
Unverified
Harness peer range
workspace:^
Cordis peer range
workspace:^
Version
0.1.0-rc.14
License
MIT
Last updated
Sep 13, 2026

Other repositories with this package name

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

@deepseek-ai/dsh-client-locale

English | 中文

Locale plugin: LocaleRuntime — the browser client ships zh/en dictionaries while the shared locale.preference setting in $DSH_HOME/settings.yaml accepts en, zh, zh-tw, ar, fr, ru, es, ja, and ko for the Web and TUI front doors. A fresh browser starts provisionally in the language navigator asks for (primary-subtag matching, with en when it asks for no language this app ships); it applies an explicit zh or en Host value and retains the provisional language when the stored preference is terminal-only. The Host read runs after plugin activation so an unavailable settings service cannot block the page, and a supported 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, and the plugin points `` at the active locale (zh-CN/en) on activation and on every switch. The service also owns the ns×locale dictionary registry (typed register(ns, {zh, en}) checked against LocaleNamespaceMap, bind(ns)→TranslateNS; lookup chain ns → common → en → 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.