Skip to content

Desktop app: localization with Simplified Chinese, reusing the menubar glossary #1335

Description

@iamtoruk

#1330 localized the macOS menubar and Capacity Dock (628 keys, English and Simplified Chinese) and added a Language picker in Settings (System / English / 中文). The Electron desktop app is still English only.

Scope:

  • Route every user-facing string in app/renderer through one lookup helper, keyed by the English sentence, same shape as L() in the menubar.
  • Ship en and zh-Hans catalogs. Reuse the glossary already reviewed in mac/Sources/CodeBurnMenubar/Resources/zh-Hans.lproj/Localizable.strings so the same terms read the same in every surface (Today 今天, Week 本周, Month 本月, Lifetime 累计, Cost 花费, Calls 调用, Sessions 会话, Providers 服务商, Capacity Dock 容量 Dock, Settings 设置).
  • Language setting in the desktop Settings pane with the same three choices. System follows app.getLocale(); the explicit choices persist in the app config.
  • A coverage test that fails when a key exists in one catalog but not the other, and a specifier check for interpolations, same as LocalizationCatalogTests in mac/.
  • Dates and numbers through Intl with the chosen locale, not hand-formatted.

Out of scope: the CLI and the web dash.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions