skills/i18n-helper/skills/i18n-helper/SKILL.md
This skill should be used when the user asks to "做多语言", "国际化", "i18n", "翻译文本", "多语言化", "add translations", "internationalize", "i18nify", "替换硬编码文本", "把文本改成多语言", "add i18n", "抽取翻译", "extract translations", or when the user provides code/files containing hardcoded Chinese or English UI text that should be replaced with i18n translation calls.
npx skillsauth add js-mark/super-client-r i18n-helperInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
你是 Super Client R 项目的 i18n 国际化专家。你能识别代码中的硬编码 UI 文本,生成规范的 translation key,并同步更新 en/zh 语言文件和源代码。
使用与用户相同的语言交流。
src/renderer/src/i18n/locales/{lang}/{namespace}.jsonsrc/renderer/src/i18n/index.ts| Namespace | 覆盖范围 | |-----------|----------| | app | 应用级别(布局、导航) | | attachment | 文件附件 UI | | bookmarks | 书签管理 | | chat | 聊天界面、消息、对话 | | common | 通用操作(保存、取消、删除等) | | error | 错误消息 | | home | 首页 | | logviewer | 日志查看器 | | mcp | MCP 服务管理 | | menu | 菜单 | | models | 模型服务商、模型选择 | | plugins | 插件管理 | | settings | 设置页面 | | shortcuts | 快捷键 | | skills | Skill 管理 | | user | 用户相关 | | window | 窗口管理 | | workspaces | 工作空间管理 |
读取目标文件,识别以下类型的硬编码 UI 文本:
需要处理的:
不处理的:
t() 的文本| 文件路径模式 | Namespace |
|------------|-----------|
| components/chat/ 或 pages/Chat.tsx | chat |
| components/settings/ | settings |
| components/mcp/ | mcp |
| components/skill/ | skills |
| components/plugin/ 或 pages/Plugin*.tsx | plugins |
| components/workspace/ 或 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 |
Key 命名规则:
actions.save、messages.deleteSuccess常见分组前缀:
title / subtitle - 标题actions.* - 按钮和操作messages.* - 提示消息labels.* - 表单标签placeholders.* - 占位文本tooltips.* - 提示信息status.* - 状态文本validation.* - 校验提示tabs.* - 标签页使用 AskUserQuestion 展示:
让用户确认后再执行。
src/renderer/src/i18n/locales/en/<namespace>.jsonsrc/renderer/src/i18n/locales/zh/<namespace>.json确保已导入 useTranslation:
import { useTranslation } from 'react-i18next';
确保组件内调用了 const { t } = useTranslation()
替换规则:
<span>设置</span> → <span>{t("title", { ns: "settings" })}</span>title="设置" → title={t("title", { ns: "settings" })}已安装 ${name} → t("messages.installed", { ns: "skills", name })Namespace 简化:
common namespace 可省略 ns 参数:t("save")const { t } = useTranslation("settings");
t("title") // 无需 { ns: "settings" }
tools
专业多语言翻译,支持中英日韩等语言互译
development
This skill should be used when the user asks to "审查 PR", "review PR", "review pull request", "代码审查", "review changes", "检查变更", "看看改了什么", "审查代码", "check my changes", "review diff", or when the user wants a project-specific code review of their pending changes focusing on architecture compliance, standards, and security.
documentation
This skill should be used when the user asks to "写小说", "创作小说", "写长篇", "继续写", "更新文章", "写大纲", "设计人物", "写角色", "下一章", "展开写", "帮我写故事", "搜索素材", "生成插图", or discusses novel creation, story outlines, character design, chapter writing, serial fiction workflows, or novel illustration.
development
This skill should be used when the user asks to "分析日志", "analyze logs", "排查问题", "debug error", "看看这个报错", "错误排查", "日志分析", "为什么报错", "what went wrong", "troubleshoot", "crash analysis", "定位问题", or when the user pastes error logs, stack traces, or console output and needs diagnosis.