Skip to content
Agentmart
Submit a tool

dsh-plugin-i18n

给 DSH 插件的客户端 UI 做中英文国际化时使用:locale 命名空间、slot 声明、t() 取词与切语言即时生效。

Skill by hackerFish

IndexedMIT★ 4
Write a review

Chalk Labs

Need help deploying dsh-plugin-i18n?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/hackerfish-dsh-plugin-i18n

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

给 DSH 插件的客户端 UI 做中英文国际化时使用:locale 命名空间、slot 声明、t() 取词与切语言即时生效。

Use cases: design

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/dsh-plugin-i18n

What's inside

Skill name
dsh-plugin-i18n
Description
给 DSH 插件的客户端 UI 做中英文国际化时使用:locale 命名空间、slot 声明、t() 取词与切语言即时生效。
License
MIT
Instructions
37 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# DSH 插件客户端国际化(依据 @deepseek-ai/dsh-client-locale 实现与实战验证)

## 机制

- 每个插件注册自己的命名空间字典:`ctx.locale.register('my.ns', { zh: {...}, en: {...} })`
- 在 slot 注册里声明 `locale: 'my.ns'` → 组件 props 自动获得 `t(key, params)`
- `t` 每次调用实时读当前语言(切语言即时生效,无需重启)
- 未命中回退顺序:当前语言 → zh → 返回 key 本身

## 步骤

1. client 的 `inject` 数组加 `'locale'`
2. 定义命名空间与双字典(key 用点分命名,如 `'mic.err.network'`):

```ts
const NS = 'my.ns'
const zh = { 'btn.title': '开始', 'err.generic': '出错:{code}' }
const en = { 'btn.title': 'Start', 'err.generic': 'Error: {code}' }
```

3. apply 里注册(放 `ctx.effect`,随插件生命周期释放):

```ts
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'my-plugin: dictionaries')
```

4. slot 声明 `locale: NS`;组件内 `t('btn.title')`、`t('err.generic', { code })`(`{param}` 插值)
5. 设置页标签用惰性 label:`label: () => t('settings.tabLabel')` —— 每次渲染求值,切语言即更新

## 验证

- 切换入口:设置 → 语言(Language)选 zh/en,UI 文案即时切换
- 自测里 mock `ctx.locale.register/bind`,断言字典注册与 slot 的 `locale` 声明
- 双语 README 惯例:`README.md`(英文)+ `README.zh.md`(中文),开头互链 `[中文](README.zh.md)` / `[English](README.md)`
- 注意:经 HTTP API 写中文(如 GitHub description)避免 PowerShell 直接传中文 body,见 dsh-plugin-publish

From hackerFish/awesome-dsh-skills, MIT.

More from hackerFish/awesome-dsh-skills

Signals

Stars
4
Forks
2
Open issues
0
Last commit (this folder)
Aug 24, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from hackerFish

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get dsh-plugin-i18n running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying dsh-plugin-i18n?

CallGet help
Cite this page

dsh-plugin-i18n skill. Agent Mart. https://agentmart.dev/skills/hackerfish-dsh-plugin-i18n (last updated 2026-10-24)