Agent skill

Chatbox i18n Translator

by chatboxai in chatboxai/chatbox

Translates new or changed i18n keys from a Chatbox Pro diff, staged changes or a commit range, writing the locale JSON files directly with a built-in glossary.

GPL-3.0Auto-check passedFrontend & Design

SKILL.md written in Chinese; this summary is our English description.

Install Chatbox i18n Translator

skills CLI
$ npx skills add chatboxai/chatbox --skill i18n-translate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install chatboxai/chatbox i18n-translate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/chatboxai/chatbox.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/i18n-translate .claude/skills/i18n-translate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
i18n-translate
GitHub stars
42k
Token cost
~508 tokens
SKILL.md length
134 words
Files
4 (incl. scripts, references)
Skills in repo
3
Repo updated
First seen
Licence
GPL-3.0

At a glance

Translates new or changed i18n keys from a Chatbox Pro diff, staged changes or a commit range, writing the locale JSON files directly with a built-in glossary.

  • Works in 3 steps: 先判断 en value 是否是有意的 slug key。 → 如果不是,再检查是否由 children 或动态 key 扫描造成的源文错误。 → 只有在确认是源文错误时才修改源码,否则只更新 JSON。
  • Translating UI strings after changing Chatbox components
  • SKILL.md covers 必读, 怎么找 key, 翻译原则 and 完成前
  • Runs JavaScript scripts from its folder; calls node and pnpm

What it does

The agent reads the diff and the surrounding component code to find new or affected i18n keys, such as t() and i18n.t() calls, Trans components with an i18nKey, keys in error objects and changed English values. By default it covers all staged and unstaged changes, or a single commit or Git range if you give one, and it stops to report an invalid commit or range instead of guessing. It edits each locale's translation.json directly and does not run the pnpm translate command or an extraction script to decide the content.

Translation follows the role of each string in the UI, such as a button, tooltip, aria label, placeholder, error or toast, and matches terms already used in the same component. Missing English values come first, placeholders, named tags and spacing are preserved, and references/glossary.json fixes reserved words and mandatory translations. Each language is written to its file before the next begins. If one English key would need different translations in different roles, the agent stops and asks whether to rename it. A checker script, check-chatbox-i18n.mjs, flags missing, empty or extra keys at the end, and the agent never commits.

When your agent uses it

  • Translating UI strings after changing Chatbox components
  • Filling in missing locale keys from staged changes
  • Translating the keys changed in a specific commit or range

Example prompts

  • “Translate the i18n keys I changed in the working tree into all locales.”
  • “Fill in the translations for the keys added in my last commit.”
  • “Check which locale files are missing keys after my UI changes and translate them.”

Requirements

  • The Chatbox repository with its locale files
  • Node.js, for the checker script

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 先判断 en value 是否是有意的 slug key。
  2. 如果不是,再检查是否由 children 或动态 key 扫描造成的源文错误。
  3. 只有在确认是源文错误时才修改源码,否则只更新 JSON。

What it can do on your machine

Read from SKILL.md and the folder at commit 0ac6385. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Chatbox i18n Translator loads about 508 tokens when it runs, and up to ~808 if it reads all its reference files. Until then it costs about 45 tokens; SKILL.md has 134 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~508
With references · SKILL.md plus every file in references/, read only if the agent opens them
~808

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from chatboxai/chatbox at commit 0ac6385, republished under its GPL-3.0 licence (© chatboxai). 134 words, ~508 tokens.

Download SKILL.mdSave it as .claude/skills/i18n-translate/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
i18n-translate
description
翻译 Chatbox Pro 当前未提交改动、暂存改动或用户指定 commit/range 中新增或受影响的 i18n key。当用户要求翻译、补全与改动 UI 文案相关的翻译时使用。Agent 需要阅读 diff 和组件上下文,遵守 skill 内置 glossary,并直接写 locale JSON;脚本只用于最后校验。
metadata.short-description
翻译 Chatbox 改动中的 i18n key

i18n-translate

你一名UI翻译者。请你读 diff、读源码上下文、判断哪些 i18n key 需要补译,然后直接编辑 src/renderer/i18n/locales/*/translation.json。注意不要运行 pnpm translate,也不要依赖抽取脚本来决定翻译内容。你(LLM)来检查哪些 key 需要翻译,并且直接翻译成目标语言。

必读

  • 翻译前读取 references/glossary.json,这是本 skill 的术语表来源。
  • 默认处理工作区中所有未提交改动(包括已暂存和未暂存);如果用户提供单个 commit SHA 或 Git range,则仅处理该范围内新增或修改的 key。
  • 如果用户提供的 commit 或 range 无法解析,请停止并向用户报告该输入无效,而不是猜测要处理的文件。

怎么找 key

从 diff/commit 中找新增或受影响的文案,重点看:

  • t('...')、i18n.t('...')
  • <Trans i18nKey="...">
  • i18nKey: '...',尤其是错误对象或 src/shared 中的 key
  • src/renderer/i18n/for-key-scan.ts 等动态 key 辅助文件
  • src/renderer/i18n/locales/en/translation.json 中被改动的英文 value

翻译原则

  • 先理解 key 所在文件、组件、UI 角色和周围文案,再翻译。
  • UI 角色包括按钮、菜单、tooltip、aria label、placeholder、错误提示、toast、modal、设置项、状态文案、聊天消息和产品文案。
  • 参考同一组件中目标语言已有译文,保持语气和术语一致。
  • 以 en[key] || key 作为源文;大多数情况下 en[key] 应等于 key。先补全 en/translation.json 中缺失或空的 key,再翻译其他语言。
  • 如果 en 文案发生变化,更新所有已请求 locale 中对应 key 的翻译值;如果某个已有翻译需要更新而不是新增,请直接覆盖旧译文。
  • 当 en value 和源码 key 不一致时,按 3 步判断:
    1. 先判断 en value 是否是有意的 slug key。
    2. 如果不是,再检查是否由 <Trans> children 或动态 key 扫描造成的源文错误。
    3. 只有在确认是源文错误时才修改源码,否则只更新 JSON。
  • 保留所有 {{placeholder}}、<NamedTag>、<0> 标签和源文前后空格。
  • 遵守 glossary 的保留词和强制译法。不要机械直译,写自然、符合目标语言 UI 习惯的译文。
  • 按语言逐个翻译:一种语言翻译完就立即写入该语言的 translation.json,再开始下一种语言。不要把所有语言的译文都攒到最后一次性写入。
  • 如果同一个英文 key 在不同 UI 角色中需要不同译法,先不要直接给出不同译文;停止并询问用户是否应将 key 改为更具体的名称,除非仓库已经有明确的命名约定。

完成前

可运行 checker 做确定性检查:

bash
node .codex/skills/i18n-translate/scripts/check-chatbox-i18n.mjs

如果你维护了本次改动 key 列表,可以做严格检查:

bash
node .codex/skills/i18n-translate/scripts/check-chatbox-i18n.mjs --keys-file /tmp/changed-i18n-keys.txt

checker 默认只因缺 key、空 value、多余 key 失败;历史 glossary/placeholder 问题会作为 warning。不要提交 commit,把改动留给用户 review。

© chatboxai, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in .claude/skills/i18n-translate of chatboxai/chatbox.

  • SKILL.md
  • agents/openai.yaml
  • references/glossary.json
  • scripts/check-chatbox-i18n.mjs

Open the folder on GitHubat commit 0ac6385

Compare with similar skills

Chatbox i18n Translator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Chatbox i18n Translator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Chatbox i18n Translator this skillchatboxai/chatbox42k—~508Automated safety check: PassGPL-3.0
Enforce Rules For I18nmoeru-ai/airi50k—~1.5kAutomated safety check: PassMIT
Translation ReviewDevolutions/UniGetUI26k—~1.3kAutomated safety check: PassMIT
Lingui Best PracticesB0und/WikiSpeedrun1332 repos~4.2kAutomated safety check: PassMIT
Ok Script I18nAliceJump/ok-end-field555—~828Automated safety check: PassAGPL-3.0
I18next Localizationi18next/i18next-cli241—~1.6kAutomated safety check: PassMIT

Similar skills

  • Review pending AIRI translations on Crowdin in a batch, then sync them into the repository.

    50k GitHub stars~1.5k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Translation Review

    Devolutions/UniGetUI

    Reviews UniGetUI .json language files for localization quality, detects parity issues, English-equal entries, wrong-script content, and cross-language outliers, then generates a dataset for…

    26k GitHub stars~1.3k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Lingui Best Practices

    B0und/WikiSpeedrun

    Implement internationalization with Lingui in React and JavaScript applications.

    133 GitHub starsUsed in 2 repos~4.2k tokens
    Frontend & DesignAuto-check passed
  • Ok Script I18n

    AliceJump/ok-end-field

    Maintain gettext translations for ok-script task UI and runtime messages.

    555 GitHub stars~828 tokensUpdated today
    Frontend & DesignAuto-check passed
  • I18next Localization

    i18next/i18next-cli

    Takes an app from hardcoded strings to a localized, continuously translated one with i18next (Locize optional): stack detection, config, wrapping strings in t(), key extraction, Locize sync, and AI…

    241 GitHub stars~1.6k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Jta

    ckanner/jta

    Translate JSON i18n files to multiple languages with AI-powered quality optimization.

    133 GitHub stars~2.4k tokensUpdated 11 mo ago
    Frontend & DesignAuto-check: notes

More from chatboxai/chatbox

  • Cherry-picks commits from the chatbox-pro repo into the open chatbox repo, skipping mobile-only files and keeping the open package name.

    42k GitHub stars~1.2k tokensUpdated 16 days ago
    Auto-check passed
  • Chatbox Session RAG Eval

    chatboxai/chatbox

    Runs and debugs evaluations of how Chatbox models answer questions about large attached files, using synthetic and real long-document fixtures.

    42k GitHub stars~758 tokensUpdated 16 days ago
    Auto-check passed

Questions about Chatbox i18n Translator

What does Chatbox i18n Translator do?

Translates new or changed i18n keys from a Chatbox Pro diff, staged changes or a commit range, writing the locale JSON files directly with a built-in glossary. t() calls, Trans components with an i18nKey, keys in error objects and changed English values. By default it covers all staged and unstaged changes, or a single commit or Git range if you give one, and it stops to report an invalid commit or range instead of guessing.

When should I use Chatbox i18n Translator?

Chatbox i18n Translator fits situations like: translating UI strings after changing Chatbox components; filling in missing locale keys from staged changes; translating the keys changed in a specific commit or range.

How do I install Chatbox i18n Translator in Claude Code?

Run `npx skills add chatboxai/chatbox --skill i18n-translate -a claude-code`. Or copy the skill folder (.claude/skills/i18n-translate in chatboxai/chatbox) into .claude/skills/i18n-translate in your project. Claude Code loads it when a task matches its description.

How do I install Chatbox i18n Translator in Codex?

Run `npx skills add chatboxai/chatbox --skill i18n-translate -a codex`. Or copy the skill folder (.claude/skills/i18n-translate in chatboxai/chatbox) into .agents/skills/i18n-translate in your project. Codex loads it when a task matches its description.

Can I use Chatbox i18n Translator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add chatboxai/chatbox --skill i18n-translate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/i18n-translate, .gemini/skills/i18n-translate, .github/skills/i18n-translate and .opencode/skills/i18n-translate in your project.

What does Chatbox i18n Translator need to run?

Going by SKILL.md and its folder, Chatbox i18n Translator needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node and pnpm). Our summary lists: The Chatbox repository with its locale files; Node.js, for the checker script.

Does Chatbox i18n Translator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Chatbox i18n Translator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Chatbox i18n Translator use?

Chatbox i18n Translator is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Chatbox i18n Translator use?

About 508 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 300 tokens, read only when the agent opens those files.

What are the alternatives to Chatbox i18n Translator?

Skills that share tags, products or a category with Chatbox i18n Translator: Enforce Rules For I18n (moeru-ai/airi, 50k stars), Translation Review (Devolutions/UniGetUI, 26k stars), Lingui Best Practices (B0und/WikiSpeedrun, 133 stars) and Ok Script I18n (AliceJump/ok-end-field, 555 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Chatbox i18n Translator?

chatboxai (a GitHub organization) maintains it in chatboxai/chatbox, which has 41,984 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 24, 2026.

Source: chatboxai/chatbox on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.