Skip to content

feat: i18n support for desktop application menu#35602

Open
2024sy wants to merge 1 commit into
anomalyco:devfrom
2024sy:docs/zh-cn-desktop-menu-i18n
Open

feat: i18n support for desktop application menu#35602
2024sy wants to merge 1 commit into
anomalyco:devfrom
2024sy:docs/zh-cn-desktop-menu-i18n

Conversation

@2024sy

@2024sy 2024sy commented Jul 6, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #35601

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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 via useLanguage().

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 via menu.ts.

How did you verify your code works?

  • bun test - i18n parity and desktop-menu tests pass
  • bun typecheck - zero errors
  • Manual key verification: all 48 menu labels present in both en.ts and zh.ts

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.
@2024sy 2024sy requested review from Brendonovich and Hona as code owners July 6, 2026 20:06
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #34103: fix(i18n): translate Windows desktop app menu (File/Edit/View/Go) for all locales
#34103

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.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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)

1 participant