Agent Skills › manaflow-ai/cmux › cmux-localization

cmux-localization

GitHub

规范 cmux UI 字符串本地化流程,提供脚本执行、翻译包生成及审计检查指南,确保所有用户可见文本符合多语言支持要求。

skills/cmux-localization/SKILL.md manaflow-ai/cmux

Trigger Scenarios

修改用户界面文案 更新多语言翻译文件 执行本地化审计

Install

npx skills add manaflow-ai/cmux --skill cmux-localization -g -y
More Options

Use without installing

npx skills use manaflow-ai/cmux@cmux-localization

指定 Agent (Claude Code)

npx skills add manaflow-ai/cmux --skill cmux-localization -a claude-code -g -y

安装 repo 全部 skill

npx skills add manaflow-ai/cmux --all -g -y

预览 repo 内 skill

npx skills add manaflow-ai/cmux --list

SKILL.md

Frontmatter
{
    "name": "cmux-localization",
    "description": "Localization rules and audit workflow for cmux UI strings, settings rows, menus, shortcuts, schema\/config text, docs, command\/help text, alerts, tooltips, and web messages. Use whenever changing user-facing text."
}

cmux Localization

Use this skill for any user-facing string change.

Normal contributor flow

After adding or changing user-facing copy, run ./scripts/localize-changes.

The command compares the current worktree with the mainline base, discovers changed Swift localization keys and English web messages, prepares simple new or changed macOS catalog entries with minimal edits, and writes a machine-readable translation packet under git metadata. Fill value for simple translations or localization for plural or variant entries, then run the same command again. When an existing translation is still correct after an English change, fill value with that same text; the packet remembers the confirmation so later runs do not mark it for review again. Completed macOS rows are imported through scripts/localization_catalog.py merge, and scripts/localization_catalog.py check remains the final authoritative validator.

Use --base <ref> for another comparison base and --work-file <path> when a translation helper needs a visible packet. The default packet stays outside the worktree. Ambiguous catalog ownership, a key whose Swift call sites (changed or not) disagree on defaultValue, count-like new strings, unsupported Swift literal forms, and invalid generated translations stop with a concrete human-attention item so the existing placeholder, plural, bidi, omission, identity-translation, copied-English, and catalog checks stay intact.

Hard rules

  • Every user-facing string is localized. Never a bare string literal in SwiftUI Text(), Button(), alert titles, tooltips, menus, or dialogs.
  • Swift/AppKit/SwiftUI: String(localized: "key.name", defaultValue: "English text"), with keys in Resources/Localizable.xcstrings. Every feature PR includes translated entries for all supported macOS languages required by scripts/localization_catalog.py (currently en, de, fr, ar, es, zh-Hant, zh-Hans, ko, ja), subject to the exact omission records below. English and Japanese entries are always required.
  • defaultValue, English fallback text, schema descriptions, and copied English strings do not count as localization. Record deliberate invariant literals in scripts/localization-allowed-omissions.json, with the exact source and omission class. A correct translation that shares the English spelling needs a documented identityLocales exception for that key and locale; the translated entry remains required.
  • Localized web/docs content updates every locale declared by web/i18n/routing.ts, with a matching web/messages/<locale>.json entry plus any localized data structures carrying inline translations.
  • A localization audit is required for every user-facing change.

Audit checklist

Before finishing a task that changes UI, Settings rows, menus, shortcut metadata, schema/config text, docs, command/help text, alerts, or tooltips:

Run ./scripts/localize-changes first and resolve every reported translation row or human-attention item.

  1. Enumerate the changed user-facing surfaces.
  2. Verify each surface has a catalog key and translated values for every supported macOS locale (en, de, fr, ar, es, zh-Hant, zh-Hans, ko, ja) in the feature PR, unless an exact omission record allows an absent value. Omission records still require en and ja entries.
  3. Parse the touched localization files and compare changed message keys across locales.
  4. Run rg over changed Swift/TS/TSX/docs files for newly introduced bare English.
  5. State in the final handoff what audit was performed, or explicitly say what could not be verified.

Resources/Localizable.xcstrings, Resources/InfoPlist.xcstrings, and the linked macOS package catalogs must pass python3 scripts/localization_catalog.py check. New keys must carry all nine macOS locale entries unless covered by an exact omission record; en and ja entries remain required. Preserve printf placeholders and use plural variations for count strings where the source has a count.

Count strings are recorded in scripts/localization-plurals.json with the English source and the argument numbers that select plurals. Every required plural category must contain translated text. Use substitutions when more than one count varies or when the count is not the first argument. Arabic requires zero/one/two/few/many/other; French and Spanish include many. Keep every message inside the catalog's strings object so Xcode compiles it.

For a shared-spelling word inside a plural substitution, use an identityLocales object with reason and an explicit values list. This permits the listed leaf text (for example French %d machines) while continuing to reject an untranslated English sentence around it.

Detailed reference

New keyboard shortcuts also need docs and Settings entries; see ../cmux-keyboard-shortcuts/SKILL.md.

Version History

  • ea17450 Current 2026-09-22 21:38

    引入一键式贡献者工作流,优化了默认值冲突处理、Web消息校验及已确认翻译的记忆机制,显著提升性能并减少人工审查负担。

  • c05e1b4 2026-09-09 15:45

    优化了 defaultValue 的合规性说明,明确其在特性 PR 中作为占位符的接受条件;简化了版本支持描述。

  • cef69a7 2026-08-20 08:16

Same Skill Collection

skills/cmux-architecture/SKILL.md
skills/cmux-backend/SKILL.md
skills/cmux-billing/SKILL.md
skills/cmux-browser/SKILL.md
skills/cmux-cloud-vm/SKILL.md
skills/cmux-cua/SKILL.md
skills/cmux-custom-sidebar/SKILL.md
skills/cmux-customization/SKILL.md
skills/cmux-debugging/SKILL.md
skills/cmux-dev-workflow/SKILL.md
skills/cmux-diagnostics/SKILL.md
skills/cmux-ghostty/SKILL.md
skills/cmux-keyboard-shortcuts/SKILL.md
skills/cmux-markdown/SKILL.md
skills/cmux-release/SKILL.md
skills/cmux-review/SKILL.md
skills/cmux-settings/SKILL.md
skills/cmux-shared-behavior/SKILL.md
skills/cmux-socket-policy/SKILL.md
skills/cmux-test-bisect/SKILL.md
skills/cmux-testing/SKILL.md
skills/cmux-workspace/SKILL.md
skills/cmux/SKILL.md

Metadata

Files
0
Version
a616a2b
Hash
a404e1c3
Indexed
2026-08-20 08:16

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-05 11:24
浙ICP备14020137号-1