Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.31 KB

File metadata and controls

50 lines (33 loc) · 1.31 KB

Internationalization (i18n)

This project uses a single String Catalog file: ClawdHome/Stable.xcstrings. All UI/prompt copy should use stable keys via L10n.k(...) / L10n.f(...).

Supported Languages

  • zh-Hans (Simplified Chinese)
  • en (English)

Workflow

  1. Add or update stable keys in ClawdHome/Stable.xcstrings.
  2. Use semantic keys (for example user.add.title), not sentence-as-key.
  3. Keep placeholders consistent across languages (for example %@, %d, \(name)).
  4. In Swift, always reference copy by key, for example:
L10n.k("user.add.title", fallback: "Add macOS User")
L10n.f("user.remove.confirm", fallback: "Delete %@?", username)

Quality Checks

Run:

make i18n-check

Current checks include:

  • direct hard-coded CJK UI literals in Swift
  • missing translations in Stable.xcstrings
  • placeholder consistency between zh-Hans and en
  • keys used in code but missing in Stable.xcstrings

How To Contribute a New Language

  1. Add the language localization block for each key in ClawdHome/Stable.xcstrings.
  2. Keep key names unchanged.
  3. Keep placeholders exactly as-is.

Runtime Language Switch

Users can switch language in:

Settings -> Language -> Follow System / English / Simplified Chinese

The selected language applies immediately to all app windows.