feat: Add Chinese (zh-CN) localization#200
Open
2832599985 wants to merge 1 commit intosiddharthvaddem:mainfrom
Open
feat: Add Chinese (zh-CN) localization#2002832599985 wants to merge 1 commit intosiddharthvaddem:mainfrom
2832599985 wants to merge 1 commit intosiddharthvaddem:mainfrom
Conversation
- 前端组件通过 react-i18next 实现中英双语支持 - Electron 原生菜单栏汉化(文件/编辑/视图/窗口) - 系统托盘菜单汉化(打开/退出/停止录制) - 未保存变更对话框汉化 - 新增 i18n 配置和中英文语言包
siddharthvaddem
requested changes
Mar 15, 2026
Comment on lines
+120
to
+128
| label: "文件", | ||
| submenu: [ | ||
| { | ||
| label: "Load Project…", | ||
| label: "加载项目…", | ||
| accelerator: "CmdOrCtrl+O", | ||
| click: () => sendEditorMenuAction("menu-load-project"), | ||
| }, | ||
| { | ||
| label: "Save Project…", | ||
| label: "保存项目…", |
Owner
There was a problem hiding this comment.
Why are all off this is in Chinese? Shouldn't you be localizing them?
Owner
There was a problem hiding this comment.
Also this is probably not the best way to do it, as you'd want to add more languages. That convolutes the main.ts file.
Owner
There was a problem hiding this comment.
Only should be seeing them in the locale file of the language you are trying to add.
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.
Summary
react-i18nextwith English fallbacksrc/i18n.tsconfig and locale files (src/locales/zh-CN.json,src/locales/en.json)Test plan
npm run dev, verify menu bar shows Chinese labels on Windows