提供 zh/en 本地化支持,从 Host 读取语言偏好作为首选,浏览器 navigator 作为 fallback,管理命名空间字典注册并在 locale/change 事件触发时更新页面语言
ⓘ 此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。
- 语言
- TypeScript
- License
- MIT
- 分支
- master
安装
$ dsh plugin --profile web add npm:@deepseek-ai/dsh-client-locale在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程
对话式安装
帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/client/locale:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。
把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。
English | 中文
Locale plugin: LocaleRuntime — 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 en 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, and the plugin points <html lang> 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<ns>; 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
/modelcommand description in the command registry) keeps the language it was registered under until re-registration; slot-rendered copy follows switches live.
收录徽章
[](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/client/locale)把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。