Agent Skills
› HiEventsDev/Hi.Events
› translations
translations
GitHub指导前端用户界面字符串的国际化处理,包括使用Lingui提取、翻译至所有支持语言包并编译,确保多语言覆盖。
触发场景
新增或修改前端用户可见文本
需要更新多语言翻译文件
安装
npx skills add HiEventsDev/Hi.Events --skill translations -g -y
SKILL.md
Frontmatter
{
"name": "translations",
"description": "Add or update frontend translations with Lingui. Use after adding or changing any user-facing frontend string, to extract it, translate it into every supported locale and compile."
}
Frontend translations (Lingui)
Every new or changed user-facing string is translated into all supported locales in the same change.
Steps
cd frontend
yarn messages:extract --clean # the table shows missing translations per locale
-
Add a translation to every
.pofile infrontend/src/locales/excepten.po(English is the source):#: src/path/to/component.tsx:123 msgid "Your English String" msgstr "Translated String" -
Run
yarn messages:extract --cleanagain and confirm 0 missing for each locale. -
Run
yarn messages:compile.
frontend/scripts/list_untranslated_strings.sh lists anything still untranslated.
Troubleshooting
- Counts look wrong: run extract with
--cleanto drop obsolete entries. - Translation not showing: run
yarn messages:compile. .posyntax errors: check the escaping of quotes.
版本历史
-
439a48b
当前 2026-10-19 04:33
从通用工作流调整为路径 scoped 规则,并移至 AGENTS.md
- 8d020d5 2026-08-16 08:57


