用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/loonghao/transx --skill transx-best-practices命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | transx-best-practices |
| description | Best practices for building i18n flows with TransX |
Use this skill when working on projects that use transx for localization.
tx.tr() for high-level runtime translation in app code.tx.translate() for low-level direct translation cases.context.Use standard gettext layout:
<locales_root>/<locale>/LC_MESSAGES/messages.po
<locales_root>/<locale>/LC_MESSAGES/messages.mo
Examples:
./locales/zh_CN/LC_MESSAGES/messages.po./locales/ja_JP/LC_MESSAGES/messages.moTransX supports:
TransX(locales_root=["./pkg_a/locales", "./pkg_b/locales"])
Rules:
(msgid, context)WARNING, do not raise by defaultlocales_root property still points to first rootlocales_rootsUse PotExtractor and keep keyword config explicit:
tr, _, gettext, pgettext, npgettextadditional_keywordsRecommended flow:
.pot.po files.mo filesWhen adding i18n features:
msgctxt)