Agent Skills
› HiEventsDev/Hi.Events
› translations
translations
GitHub管理前端多语言翻译工作流,支持提取、添加和编译Lingui翻译。涵盖12种语言,提供.po文件编辑指南及排查未翻译字符串、编译失败等问题的解决方案,确保开发时及时更新所有语言内容。
Trigger Scenarios
需要提取或编译前端翻译文件
为新功能添加多语言支持
检查或修复缺失的翻译条目
解决Lingui相关的翻译配置问题
Install
npx skills add HiEventsDev/Hi.Events --skill translations -g -y
SKILL.md
Frontmatter
{
"name": "translations",
"description": "Frontend translation workflow using Lingui - extracting, adding, and compiling translations for all supported languages"
}
Frontend Translation Workflow (Lingui)
IMPORTANT: Always update translations as you develop features. When adding new translatable strings, immediately add translations for all supported languages.
Core Commands
cd frontend
# Extract translatable strings (use --clean for accurate counts)
yarn messages:extract --clean
# Compile translations for production
yarn messages:compile
# Check for untranslated strings
cd scripts && ./list_untranslated_strings.sh
Process
- Extract:
yarn messages:extract --clean - Check: Look at the output table for missing translation counts
- Add translations: Update the
.pofiles for each language - Verify: Run extract again to confirm 0 missing
- Compile:
yarn messages:compile
Adding Translations
Add entries to each locale's .po file in frontend/src/locales/:
#: src/path/to/component.tsx:123
msgid "Your English String"
msgstr "Translated String"
Supported Languages
| Code | Language |
|---|---|
| en | English (source - no translation needed) |
| de | Deutsch |
| es | Espanol |
| fr | Francais |
| pt | Portugues |
| pt-br | Portugues do Brasil |
| it | Italiano |
| nl | Nederlands |
| zh-cn | Simplified Chinese |
| zh-hk | Traditional Chinese (HK) |
| vi | Tieng Viet |
| ru | Russian (currently untranslated) |
Troubleshooting
- Counts seem wrong: Use
--cleanflag to remove obsolete entries - Translation not appearing: Run
yarn messages:compileafter adding - Syntax errors: Check for proper escaping of quotes in
.pofiles
Version History
- 9de8863 Current 2026-07-24 17:38


