Skip to content

[FEATURE]: add i18n support for desktop application menu (zh-CN) #35601

Description

@2024sy

Feature hasn`t been suggested before.

  • I have verified this feature Im about to request hasnt been suggested before.

Describe the enhancement you want to request

The OpenCode desktop application menu bar (File/Edit/View/Go/Window/Help) currently has no i18n support - menu labels are hardcoded in English in packages/app/src/desktop-menu.ts, even when the app language is set to Chinese (zh-CN).

Id like to add Chinese translations for all desktop menu items by integrating them into the existing i18n framework. The windows-app-menu.tsxcomponent already runs in the renderer process whereuseLanguage()is available, so this is a straightforward addition ofmenu.*` i18n keys.

Related closed issues:

Implementation approach:

  • Add 48 menu.* i18n keys to en.ts and zh.ts
  • Update desktop-menu.ts labels to use i18n keys
  • Wire useLanguage() translation in windows-app-menu.tsx
  • Resolve labels in menu.ts for macOS via en.ts import

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions