Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🌐 chore: translate non-English comments to English in desktop menus (#12056)

LobeHub Bote18b7a92c7fa
diff --git a/apps/desktop/src/main/menus/impls/linux.ts b/apps/desktop/src/main/menus/impls/linux.ts
index 3b39124c1d5..4bd2c3f5bc6 100644
--- a/apps/desktop/src/main/menus/impls/linux.ts
+++ b/apps/desktop/src/main/menus/impls/linux.ts
@@ -45,7 +45,7 @@ export class LinuxMenu extends BaseMenuPlatform implements IMenuPlatform {
this.buildAndSetAppMenu(options);
}
- // --- 私有方法:定义菜单模板和逻辑 ---
+ // --- Private methods: define menu templates and logic ---
private getAppMenuTemplate(options?: MenuOptions): MenuItemConstructorOptions[] {
const showDev = isDev || options?.showDevItems;
diff --git a/apps/desktop/src/main/menus/impls/macOS.ts b/apps/desktop/src/main/menus/impls/macOS.ts
index ec91d8027ab..c061e000902 100644
--- a/apps/desktop/src/main/menus/impls/macOS.ts
+++ b/apps/desktop/src/main/menus/impls/macOS.ts
@@ -48,23 +48,23 @@ export class MacOSMenu extends BaseMenuPlatform implements IMenuPlatform {
}
refresh(options?: MenuOptions): void {
- // 重建Application menu
+ // Rebuild Application menu
this.buildAndSetAppMenu(options);
- // 如果托盘菜单存在,也重建它(如果需要动态更新)
+ // If tray menu exists, rebuild it as well (if dynamic update is needed)
// this.trayMenu = this.buildTrayMenu();
- // 需要考虑如何更新现有托盘图标的菜单
+ // Need to consider how to update the menu for existing tray icons
}
- // --- 私有方法:定义菜单模板和逻辑 ---
+ // --- Private methods: define menu templates and logic ---
private getAppMenuTemplate(options?: MenuOptions): MenuItemConstructorOptions[] {
const appName = app.getName();
const showDev = isDev || options?.showDevItems;
- // 创建命名空间翻译函数
+ // Create namespaced translation function
const t = this.app.i18n.ns('menu');
- // 添加调试日志
- // console.log('[MacOSMenu] 菜单渲染, i18n实例:', !!this.app.i18n);
+ // Add debug logging
+ // console.log('[MacOSMenu] Menu rendering, i18n instance:', !!this.app.i18n);
const template: MenuItemConstructorOptions[] = [
{
@@ -324,7 +324,7 @@ export class MacOSMenu extends BaseMenuPlatform implements IMenuPlatform {
},
{
click: () => {
- // @ts-expect-error cache 目录好像暂时不在类型定义里
+ // @ts-expect-error cache directory seems to be temporarily missing from type definitions
const cachePath = app.getPath('cache');
const updaterCachePath = path.join(cachePath, `${app.getName()}-updater`);
diff --git a/apps/desktop/src/main/menus/impls/windows.ts b/apps/desktop/src/main/menus/impls/windows.ts
index a518cc1d397..8a56006c41f 100644
--- a/apps/desktop/src/main/menus/impls/windows.ts
+++ b/apps/desktop/src/main/menus/impls/windows.ts
@@ -43,7 +43,7 @@ export class WindowsMenu extends BaseMenuPlatform implements IMenuPlatform {
refresh(options?: MenuOptions): void {
this.buildAndSetAppMenu(options);
- // 如果有必要更新托盘菜单,可以在这里添加逻辑
+ // If it's necessary to update tray menu, logic can be added here
}
private getAppMenuTemplate(options?: MenuOptions): MenuItemConstructorOptions[] {