By chyelong
i18n automation plugin for Vue, static HTML/JS, and WeChat Mini Program projects, with skills and sub-agents for init, replace, sync, workflow, translation, and review.
接收 i18n-validate 产出的 issues JSON 报告,对每条命中做语义判断(真问题 / 误报 / 需上下文),输出结构化 verdicts JSON。 不自行 grep 或扫描项目,输入由主线程通过 validator 提供。 当用户说"审核i18n"、"判断替换问题"、"review i18n issues"时触发。
扫描项目文件,生成文件树并标记 i18n 完成状态,输出未完成文件的分块任务文档。 支持 Vue 项目(.vue/.js)、静态 HTML/JS 项目(.html/.js/.ts)和微信小程序(.wxml/.js)。 当用户说"扫描i18n进度"、"i18n文件扫描"、"检查i18n完成情况"、"生成i18n任务"时触发。
翻译 JSON 语言包文件,将中文(zh / tw)的 value 翻译为目标语言并保持 key 结构不变。 当用户说"翻译语言包"、"翻译json"、"生成英文翻译"、"i18n翻译"、"translate locale"时触发。 【模型选择】默认跑在 haiku(常规 en/ja/ko/tw/de/fr/es/ru 等主流语言够用)。 调度时若目标语言是冷门语言(如 la 拉丁 / is 冰岛 / sw 斯瓦希里 / cy 威尔士 / eu 巴斯克 / gd 苏格兰盖尔 / mt 马耳他 / yo 约鲁巴 等训练语料稀少的语种),**必须**在 Agent 调用时 传 `model: "sonnet"` 或 `model: "opus"` 覆盖默认值,否则翻译质量不可控。
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
这是一个面向 Vue / 静态 HTML / 微信小程序项目的 i18n 自动化插件与技能集合,提供初始化 i18n、自动替换中文、同步翻译、全流程工作流,以及扫描/翻译/审核子代理能力。兼容 Claude CLI、Gemini CLI、Codex。
.claude-plugin/plugin.json:插件元数据(必需)skills/:可调用技能(i18n-init、i18n-replace、i18n-sync、i18n-workflow)agents/:子代理(i18n-files、i18n-text、i18n-code)GEMINI.md:Gemini CLI 入口与执行约定CODEX.md:Codex 入口与执行约定其他用户可直接通过以下命令安装:
/plugin marketplace add Chyelong/i18n-vue-plugin
/plugin install i18n-vue@i18n-vue-plugin
安装后可用命令示例(自动带插件命名空间):
# Vue 项目
/i18n-vue:i18n-workflow ./src --langs en
/i18n-vue:i18n-init ./src/i18n --langs en,ja
/i18n-vue:i18n-replace ./src/views --lang en
/i18n-vue:i18n-sync ./src --lang en
# 微信小程序
/i18n-vue:i18n-workflow ./pages --type wx --langs tw
/i18n-vue:i18n-init ./i18n --type wx --langs tw
/i18n-vue:i18n-replace ./pages --type wx --lang tw
本地调试:
claude --plugin-dir /absolute/path/to/i18n-vue-plugin
Gemini 当前按“仓库技能”方式使用,不读取 .claude-plugin/*。步骤如下:
git clone https://github.com/Chyelong/i18n-vue-plugin.git
cd i18n-vue-plugin
skills/*/SKILL.md 与 agents/*.md# Vue 项目
node skills/i18n-init/i18n-init.js ./src/i18n --type vue --langs en,ja
node skills/i18n-replace/vue-i18n-replace.js ./src --i18n-dir ./src/i18n --lang en
node skills/i18n-sync/sync-i18n.js ./src --i18n-dir ./src/i18n --lang en
# 微信小程序
node skills/i18n-init/i18n-init.js ./i18n --type wx --langs tw
node skills/i18n-replace/wx-i18n-replace.js ./pages --i18n-dir ./i18n --lang tw
详细约定见:GEMINI.md
也支持 Gemini 扩展安装方式(推荐):
gemini extensions install https://github.com/Chyelong/i18n-vue-plugin.git --auto-update
常用管理命令:
gemini extensions update i18n-vue
gemini extensions uninstall i18n-vue
Codex 当前按“仓库技能”方式使用,不读取 .claude-plugin/*。步骤如下:
git clone https://github.com/Chyelong/i18n-vue-plugin.git
cd i18n-vue-plugin
skills/*/SKILL.md 与 agents/*.md# Vue 项目
node skills/i18n-init/i18n-init.js ./src/i18n --type vue --langs en,ja
node skills/i18n-replace/vue-i18n-replace.js ./src --i18n-dir ./src/i18n --lang en
node skills/i18n-sync/sync-i18n.js ./src --i18n-dir ./src/i18n --lang en
# 微信小程序
node skills/i18n-init/i18n-init.js ./i18n --type wx --langs tw
node skills/i18n-replace/wx-i18n-replace.js ./pages --i18n-dir ./i18n --lang tw
详细约定见:CODEX.md
也支持 Codex 的远程安装说明模式(Fetch and follow):
Fetch and follow instructions from https://raw.githubusercontent.com/Chyelong/i18n-vue-plugin/refs/heads/main/.codex/INSTALL.md
/plugin update i18n-vue
如果是本地 --plugin-dir 调试方式,先拉代码再重载:
git pull
/reload-plugins
手动更新:
gemini extensions update i18n-vue
如果安装时使用了 --auto-update,会按 Gemini 的机制自动更新:
gemini extensions install https://github.com/Chyelong/i18n-vue-plugin.git --auto-update
更新本地仓库:
cd ~/.codex/i18n-vue-plugin && git pull
如果你是用远程安装说明模式,也可以重新执行一次:
Fetch and follow instructions from https://raw.githubusercontent.com/Chyelong/i18n-vue-plugin/refs/heads/main/.codex/INSTALL.md
修改后可在 Claude 会话中执行:
/reload-plugins
新版审核分成两层:
skills/i18n-replace/i18n-validate.js — 机械化高危模式扫描 + 翻译质量检查,输出结构化 JSONagents/i18n-code.md — 读取 validator 产出的 JSON,对每条命中做语义判断(confirmed / falsePositive / needsContext)| 分类 | 数量 | 说明 |
|---|---|---|
| V01-V10 | 10 | Vue 项目高危模式(switch、等值、路由 name、habit 等) |
| W01-W08 | 8 | 微信小程序高危模式(global.$t 前缀) |
| H01-H05 | 5 | 静态 HTML/JS(data-i18n-value 等) |
| A1-A14 | 14 | 跨类型踩坑(对象 key、嵌套 $t、body、$mode、HTML 注释残留、弯引号、¥/¥ 等) |
| C1-C4 | 4 | 翻译质量(变量名保护、简繁漂移、重复值、空值白名单) |
# 文本报告(默认)
node skills/i18n-replace/i18n-validate.js src/ --type vue --i18n-dir src/i18n --lang tw
# JSON 报告(供 agent 审核使用)
node skills/i18n-replace/i18n-validate.js src/ --type vue --i18n-dir src/i18n --lang tw \
--format json --out .i18n-issues.json
退出码:0 全绿 / 1 有 🔴 严重 / 2 有 🟠 高危 / 3 脚本错误
报告每条命中带规则 ID(如 [V01]、[A4]),规则详情查 skills/i18n-replace/validate-rules.js 或 docs/superpowers/specs/2026-04-11-audit-system-upgrade-design.md。
为减少 validator 反复报错的负担,vue/wx/html 替换脚本在源头做了更全面的预防扫描:
已修复的脚本 bug(v2.6.1):
$t() / data-i18nUnterminated string constant)smartQuoteAndWrap),避开 \" 转义陷阱三脚本统一的源头跳过规则(v2.6.1):
npx claudepluginhub chyelong/i18n-vue-plugin --plugin i18n-vueClaude Code skill pack for Lokalise (24 skills)
Advanced Vue skills for Composition API, components, and reactivity.
Intlayer language server: Go-to-Definition for useIntlayer / getIntlayer / useDictionary / getDictionary keys across all *-intlayer packages
Implements multi-language support using i18next, gettext, or Intl API with translation workflows and RTL support. Use when building multilingual applications, handling date/currency formatting, or supporting right-to-left languages.
Enterprise Localization Specialist for i18n/l10n, ICU formatting, and global market expansion
AI-powered translation plugin with /tr command (--hq for high-quality)