cmux-localization
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.
How do I install this agent skill?
npx skills add https://github.com/manaflow-ai/cmux --skill cmux-localizationIs this agent skill safe to install?
- Gen Agent Trust Hubpass
It can run repository-local scripts and tools like git and rg to manage and validate localization data.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
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 inResources/Localizable.xcstrings. A feature PR writes the source locales, English and Japanese, which are always required. The other macOS locales (de,fr,ar,es,zh-Hant,zh-Hans,ko) are filled on main by thelocalization-fillworkflow (scripts/localization_fill.py), which lands them as its own PR; until then they show the EnglishdefaultValue. A PR may still include them, and any it includes are validated.scripts/localization_catalog.py check --strictrequires every locale. defaultValue, English fallback text, schema descriptions, and copied English strings do not count as localization. Record deliberate invariant literals inscripts/localization-allowed-omissions.json, with the exact source and omission class. A correct translation that shares the English spelling needs a documentedidentityLocalesexception for that key and locale; the translated entry remains required.- Localized web/docs content adds the key to
web/messages/en.jsonandweb/messages/ja.json. Thelocalization-fillworkflow fills the other locales declared byweb/i18n/routing.tson main; until thenweb/i18n/messages.tsfalls back to English. Localized data structures carrying inline translations still need every locale. Keys meant to stay English in some locales are listed underenglishOnlyinscripts/localization-fill-state.json. - 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.
- Enumerate the changed user-facing surfaces.
- Verify each surface has a catalog key with
enandjavalues in the feature PR. The bot fills the other macOS locales (de,fr,ar,es,zh-Hant,zh-Hans,ko) on main. - Parse the touched localization files and compare changed message keys across locales.
- Run
rgover changed Swift/TS/TSX/docs files for newly introduced bare English. - 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 en and ja entries; the bot fills the other seven, and check --strict requires all nine unless covered by an exact omission record. 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
- references/audit-workflow.md: what counts as user-facing, search patterns, and handoff wording.
New keyboard shortcuts also need docs and Settings entries; see ../cmux-keyboard-shortcuts/SKILL.md.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/manaflow-ai/cmux/cmux-localization">View cmux-localization on skillZs</a>