Agent Skills › HiEventsDev/Hi.Events › translations

translations

GitHub

指导前端用户界面字符串的国际化处理,包括使用Lingui提取、翻译至所有支持语言包并编译,确保多语言覆盖。

.agents/skills/translations/SKILL.md HiEventsDev/Hi.Events

触发场景

新增或修改前端用户可见文本 需要更新多语言翻译文件

安装

npx skills add HiEventsDev/Hi.Events --skill translations -g -y
更多选项

非标准路径

npx skills add https://github.com/HiEventsDev/Hi.Events/tree/develop/.agents/skills/translations -g -y

不安装直接使用

npx skills use HiEventsDev/Hi.Events@translations

指定 Agent (Claude Code)

npx skills add HiEventsDev/Hi.Events --skill translations -a claude-code -g -y

安装 repo 全部 skill

npx skills add HiEventsDev/Hi.Events --all -g -y

预览 repo 内 skill

npx skills add HiEventsDev/Hi.Events --list

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
  1. Add a translation to every .po file in frontend/src/locales/ except en.po (English is the source):

    #: src/path/to/component.tsx:123
    msgid "Your English String"
    msgstr "Translated String"
    
  2. Run yarn messages:extract --clean again and confirm 0 missing for each locale.

  3. Run yarn messages:compile.

frontend/scripts/list_untranslated_strings.sh lists anything still untranslated.

Troubleshooting

  • Counts look wrong: run extract with --clean to drop obsolete entries.
  • Translation not showing: run yarn messages:compile.
  • .po syntax errors: check the escaping of quotes.

版本历史

  • 439a48b 当前 2026-10-19 04:33

    从通用工作流调整为路径 scoped 规则,并移至 AGENTS.md

  • 8d020d5 2026-08-16 08:57

同 Skill 集合

.agents/skills/api-smoke-test/SKILL.md
.agents/skills/e2e-dev-stack/SKILL.md
.claude/skills/api-smoke-test/SKILL.md
.claude/skills/e2e-dev-stack/SKILL.md
.claude/skills/translations/SKILL.md

元信息

文件数
0
版本
1def73a
Hash
25991205
收录时间
2026-08-16 08:57

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-04 15:21
浙ICP备14020137号-1