Skip to content

fix(desktop): localize application menus - #37724

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

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

Conversation

@Hona

@HonaHona 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 ownerJuly 19, 2026 06:45
CopilotAI review requested due to automatic review settings July 19, 2026 06:45

CopilotAI 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.

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

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

@Hona