i18n
i18n (internationalization) toolkit for projects using i18next. Provides three main functions: (1) i18n-check - Detect hardcoded Chinese text in HTML/JS files, (2) i18n-fix - Replace hardcoded text with i18n markers, (3) i18n-sync - Align translation keys across multiple languages (zh-CN, zh-TW, en, ja, ko, ru, es, pt). Use when working on internationalization tasks, detecting untranslated strings, or syncing locale files.
适合你,如果经常需要为项目添加多语言支持,处理繁重的国际化改造任务
npx oh-my-skill add project-n-e-k-o/n.e.k.o/i18ncurl -fsSL https://oh-my-skill.com/install.sh | bash -s -- project-n-e-k-o/n.e.k.o/i18nnpx oh-my-skill verify project-n-e-k-o/n.e.k.o/i18n怎么用
商店整理自技能原文 · 版本 b0c3c15 · 表述以原文为准装上这个技能后,Claude 可以帮你完成三项 i18n 任务:检查前端文件中是否有硬编码的中文文本,将硬编码文本替换成 i18n 标记,以及在不同语言(简体中文、繁体中文、英语、日语、韩语、俄语、西班牙语、葡萄牙语)间同步翻译键。
当你进行项目国际化工作,例如检测未翻译的中文字符串、替换硬编码文本或同步多语言文件时触发。也可以直接输入 /i18n-check、/i18n-fix 或 /i18n-sync 命令来使用。
技能原文 SKILL.md
i18n Toolkit
Complete i18n (internationalization) toolkit for projects using i18next.
Architecture
- i18n library: i18next
- Locale files:
static/locales/(zh-CN, zh-TW, en, ja, ko, ru, es, pt) - HTML attributes:
data-i18n,data-i18n-placeholder,data-i18n-title,data-i18n-alt - JS function:
window.t()ori18next.t() - Progress file:
.claude/i18n-progress.json
Three Main Commands
1. i18n-check - Detect Issues
Check frontend files for hardcoded Chinese text.
/i18n-check <module> [options]
Modules: main, live2d, voice, steam, settings, chat, custom
Options: --status, --reset, --files=<path>, --html, --js, --strict
See [references/check-modules.md](references/check-modules.md) for module file mappings.
2. i18n-fix - Fix Issues
Replace hardcoded Chinese with i18n markers.
/i18n-fix <module> [--add-keys]
Fix patterns:
- HTML: Add
data-i18n="key"attributes - JS: Use
window.t('key')with fallback
See [references/fix-patterns.md](references/fix-patterns.md) for examples.
3. i18n-sync - Sync Languages
Align translation keys across all languages.
uv run python scripts/i18n_sync.py # Check status uv run python scripts/i18n_sync.py --apply # Apply changes
Quick Workflow
- Check:
/i18n-check steam- Find hardcoded strings - Fix:
/i18n-fix steam- Replace with i18n markers - Verify:
/i18n-check steam- Confirm fixes - Sync:
/i18n-sync- Sync to other languages
Detection Rules
Check for:
- HTML: Chinese text in elements or attributes
- JS: Chinese strings not wrapped in
window.t()
Skip:
- Already has
data-i18n*orwindow.t()wrapper console.log/error/warndebug messages- Third-party libs (
static/libs/) - Comments
- Internal logic strings (e.g.,
includes('已离开')) - Data keys (e.g.,
data['档案名'])