cmux-localization
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecmux Localization
cmux 本地化
Use this skill for any user-facing string change.
任何涉及用户可见字符串修改的操作,请遵循此规范。
Hard rules
硬性规则
- All user-facing strings must be localized.
- Use for Swift/AppKit/SwiftUI strings.
String(localized: "key.name", defaultValue: "English text") - Keys go in with translations for all supported languages, currently English and Japanese.
Resources/Localizable.xcstrings - Never use bare string literals in SwiftUI ,
Text(), alert titles, tooltips, menus, or dialogs.Button() - Localization audit is required for every user-facing change.
- , English fallback text, schema descriptions, or copied English strings do not count as localization.
defaultValue - For localized web/docs content, update every supported message catalog, currently and
web/messages/en.json, plus any localized data structures carrying inline translations.web/messages/ja.json
- 所有用户可见字符串必须进行本地化处理。
- Swift/AppKit/SwiftUI 字符串请使用 语法。
String(localized: "key.name", defaultValue: "English text") - 键值需存入 ,并包含所有支持语言的翻译版本,目前支持英语和日语。
Resources/Localizable.xcstrings - 绝不能在 SwiftUI 的 、
Text()、提示框标题、工具提示、菜单或对话框中直接使用字符串字面量。Button() - 所有用户可见内容的修改都必须经过本地化审核。
- (英文回退文本)、架构描述或复制的英文字符串均不算作本地化处理。
defaultValue - 针对本地化的网页/文档内容,需更新所有支持的消息目录,目前包括 和
web/messages/en.json,以及任何包含内嵌翻译的本地化数据结构。web/messages/ja.json
Audit checklist
审核清单
Before finishing a task that changes UI, Settings rows, menus, shortcut metadata, schema/config text, docs, command/help text, alerts, or tooltips:
- Enumerate the changed user-facing surfaces.
- Verify each surface has entries for every supported locale.
- Parse touched localization files.
- Compare changed message keys across locales.
- Use over changed Swift/TS/TSX/docs files for newly introduced bare English.
rg - State the localization audit in the final handoff, or explicitly say what could not be verified.
在完成涉及界面、设置项、菜单、快捷键元数据、配置/架构文本、文档、命令/帮助文本、提示框或工具提示修改的任务前:
- 列出所有修改涉及的用户可见内容区域。
- 验证每个区域在所有支持的语言环境下都有对应的条目。
- 解析涉及的本地化文件。
- 对比不同语言环境下修改的消息键值。
- 使用 工具扫描修改后的 Swift/TS/TSX/文档文件,检查是否新增了未本地化的英文文本。
rg - 在最终交付时说明本地化审核情况,或明确指出无法验证的内容。
Related shortcut rule
相关快捷键规则
Every new cmux-owned keyboard shortcut must be added to , visible/editable in Settings, supported in , and documented in the keyboard shortcut and configuration docs.
KeyboardShortcutSettings~/.config/cmux/cmux.json每个 cmux 新增的键盘快捷键都必须添加至 ,可在设置中查看/编辑,支持在 中配置,并在键盘快捷键和配置文档中进行记录。
KeyboardShortcutSettings~/.config/cmux/cmux.jsonDetailed reference
详细参考
- Read references/audit-workflow.md for a deeper audit process, common false positives, and examples of surfaces that count as user-facing.
- 阅读 references/audit-workflow.md 了解更深入的审核流程、常见误判情况,以及属于用户可见内容的示例。