feat: i18n support for desktop application menu#35602
Open
2024sy wants to merge 1 commit into
Open
Conversation
Add menu.* i18n keys to en.ts and zh.ts, update desktop-menu.ts labels to use i18n keys, wire translation in windows-app-menu.tsx via useLanguage(), and resolve labels in menu.ts for macOS native menu.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #34103: fix(i18n): translate Windows desktop app menu (File/Edit/View/Go) for all locales Why it's related: This PR also addresses translating the desktop application menu (File/Edit/View/Go menu items). PR #35602 appears to be a continuation or expansion of this work, adding complete i18n support for all menu categories with Chinese (zh-CN) translations, while #34103 focused on the initial translation implementation for Windows desktop menu. You should check if #34103 is already merged or if there's overlap in the menu translation work between these two PRs. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #35601
Type of change
What does this PR do?
Add Chinese (zh-CN) i18n support for the desktop application menu bar (File/Edit/View/Go/Window/Help and all sub-items). Menu labels were previously hardcoded English strings in
desktop-menu.ts. This PR integrates them into the existing i18n framework viauseLanguage().Related: #34103 targets the same area but hasn't been merged. This PR takes a different approach - adding dedicated
menu.*i18n keys to the dictionary instead of reusing command keys, and also handles the macOS native menu viamenu.ts.How did you verify your code works?
bun test- i18n parity and desktop-menu tests passbun typecheck- zero errorsChecklist