internationalization-helper
自动管理i18n和翻译文件
管理多种语言的翻译既耗时又容易出错。此技能通过自动提取硬编码字符串并将翻译文件组织成正确的结构来简化i18n工作流程。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「internationalization-helper」。 查找我React登录表单中的硬编码字符串
預期結果:
- 在LoginForm.jsx中找到5个硬编码字符串:
- - 第23行:<h2>Log In</h2> → auth.login.title
- - 第34行:<label>Email</label> → common.labels.email
- - 第42行:<button>Sign In</button> → auth.login.submit
- - 第48行:Invalid email or password → auth.errors.invalid_credentials
- - 第55行:Forgot Password? → auth.login.forgot_password
安全審計
安全This skill is a pure documentation/prompt-based skill containing only instructions for internationalization tasks. The static scanner's 41 findings are all FALSE POSITIVES - the scanner misidentified SHA256 hashes as 'weak cryptographic algorithms,' GitHub URLs as 'network hardcoded URLs,' standard bash copy commands as 'external commands,' and i18n framework names as 'C2 keywords' and 'system reconnaissance.' This is a legitimate i18n guidance skill with no code execution capabilities.
風險因素
🌐 網路存取 (1)
⚙️ 外部命令 (23)
品質評分
你能建構什麼
提取React字符串
查找JSX中的硬编码文本并将其转换为react-i18next项目的翻译键。
审核翻译覆盖率
比较语言环境文件以识别缺失的翻译并确保完整的语言覆盖。
为现有应用添加i18n
为具有硬编码用户可见字符串的应用程序添加国际化支持。
試試這些提示
查找src/components目录中所有需要翻译为i18n支持的硬编码字符串。
将这些硬编码字符串转换为react-i18next项目的正确翻译键。
比较translations目录中的所有语言环境文件,列出所有缺失的键。
帮助我在Next.js应用中设置react-i18next,包括正确的配置和文件夹结构。
最佳實務
- 使用描述性的键名来指示上下文,而非内容
- 按功能或模块对翻译进行分组以获得更好的组织
- 使用翻译函数时始终提供默认值
避免
- 使用源文本作为翻译键而非语义键
- 连接翻译后的字符串来组成句子
- 硬编码日期、数字或货币格式