i18nify

A code-editing command that replaces text written directly in a user interface with calls to an internationalization system, commonly called i18n. Internationalization lets the same interface show different languages.

In plain words
What is it for?
Use it to scan selected files or code, identify labels and messages shown to users, assign them translation namespaces, and replace them with translation calls.
Why use it?
It removes hard-coded interface text that would otherwise need separate manual edits for each supported language.

Command

Part of the i18n-helper plugin — 1 skill, 1 command shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/js-mark/skills/i18nify
Clone the repo
git clone --depth 1 https://github.com/JS-mark/skills

Or install i18n-helper, the plugin that ships this one along with the rest of its 1 skill, 1 command.

Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,321 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01321
Opus 5 $0.00009 $0.00660
Sonnet 5 $0.00004 $0.00264
Haiku 4.5 $0.00002 $0.00132

Measured 3d ago against content hash a589e49e820a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

i18nify scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/i18n-helper/commands/i18nify.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

执行步骤

步骤一:确定目标范围

检查用户是否指定了文件路径或代码片段:

  • 如果指定了文件路径,读取该文件
  • 如果指定了代码片段,分析该片段
  • 如果都没有指定,使用 AskUserQuestion 询问用户要处理哪个文件

步骤二:扫描硬编码文本

在目标代码中识别以下类型的硬编码文本:

  1. JSX 中的中文/英文文本<span>设置</span><Button>Save</Button>
  2. 字符串属性中的文本title="设置"placeholder="请输入"
  3. 变量赋值中的 UI 文本const label = "保存"
  4. Ant Design 组件的文本属性message.success("操作成功")Modal.confirm({ title: "确认删除" })

不处理的内容:

  • console.log / console.error 中的文本
  • 注释
  • CSS class 名
  • 纯英文的技术标识符(如 API key、URL、事件名)
  • 已经使用 t() 的文本

步骤三:确定 namespace

根据文件所在目录和功能模块,确定应该使用哪个 i18n namespace:

文件路径模式 Namespace
components/chat/ or pages/Chat.tsx chat
components/settings/ settings
components/mcp/ mcp
components/skill/ skills
components/plugin/ or pages/Plugin*.tsx plugins
components/workspace/ or pages/Workspaces.tsx workspaces
components/models/ models
components/logviewer/ logviewer
components/attachment/ attachment
components/layout/ app
pages/FloatWidget.tsx window
components/ErrorBoundary.tsx error
通用按钮/操作文本(保存、取消等) common

如果无法确定,使用 AskUserQuestion 询问用户。

步骤四:生成 translation key

Translation key 命名规则:

  1. 使用 camelCasesaveChangesconfirmDelete
  2. 使用嵌套分组:按功能分组,如 actions.savemessages.deleteSuccess
  3. 复用已有 key:先在对应 namespace 的 JSON 文件中搜索,如果已有相同含义的 key 则直接复用
  4. 命名语义化:key 要能反映文本含义,不要用 text1label2 这种无意义命名

常见分组前缀:

  • title / subtitle - 标题
  • actions.* - 按钮和操作
  • messages.* - 提示消息(success / error / confirm)
  • labels.* - 表单标签
  • placeholders.* - 占位文本
  • tooltips.* - 提示信息
  • status.* - 状态文本
  • validation.* - 校验提示
  • tabs.* - 标签页

步骤五:展示变更计划

使用 AskUserQuestion 向用户展示变更计划,包括:

  • 发现的硬编码文本列表
  • 每个文本对应的 translation key
  • 对应的 en / zh 翻译值
  • 将要修改的文件列表

选项:

  • 确认执行 (Recommended)
  • 修改后执行
  • 取消

步骤六:更新语言文件

  1. 读取 src/renderer/src/i18n/locales/en/<namespace>.json
  2. 读取 src/renderer/src/i18n/locales/zh/<namespace>.json
  3. 将新增的 key-value 追加到对应的 JSON 文件
  4. 保持 JSON 文件中已有 key 的顺序不变,新增 key 追加到同级的末尾
  5. 确保 JSON 格式正确,使用 2 空格缩进

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 130 lines · 18 tokens per session scan A a589e49e820a

Subscribe to this mod's changes

i18nify is a command published in the GitHub repository JS-mark/skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 1,321 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.