Skip to content

fix(desktop): localize application menus#37724

Open
Hona wants to merge 2 commits into
anomalyco:devfrom
Hona:desktop-menu-i18n
Open

fix(desktop): localize application menus#37724
Hona wants to merge 2 commits into
anomalyco:devfrom
Hona:desktop-menu-i18n

Conversation

@Hona

@Hona Hona commented Jul 19, 2026

Copy link
Copy Markdown
Member

Issue for this PR

Closes #35601

Also addresses #28797.

Type of change

  • Bug fix

What does this PR do?

  • Adds typed desktop menu translation keys for all 18 supported app locales.
  • Updates the Windows and Linux titlebar menu reactively when the selected language changes.
  • Synchronizes translated labels to Electron's native macOS menu while preserving native roles and accelerators.
  • Rebuilds the process-global menu safely when the selected language changes.
  • Requires every literal menu label to provide a translation key or explicitly opt out.
  • Removes obsolete duplicate menu strings from the desktop-only dictionaries.
  • Keeps English fallbacks and channel-specific OpenCode app names for startup and malformed IPC payloads.

This covers the all-locale and native-menu lifecycle gaps left by #34103 and #35602.

How did you verify your code works?

  • bun typecheck in packages/app
  • bun typecheck in packages/desktop
  • Repository pre-push hook: all 30 workspace typechecks passed
  • Targeted Oxlint: zero errors
  • Translation drift check confirms every new menu key is present in every supported locale

Tests were not added or run.

Checklist

  • I have not included unrelated changes in this PR

@Hona
Hona requested a review from Brendonovich as a code owner July 19, 2026 06:45
Copilot AI review requested due to automatic review settings July 19, 2026 06:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants