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

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
LobeHub Bot
2026-02-04 13:21:24 +08:00
committed by GitHub
parent 3f1fd102c5
commit e18b7a92c7
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -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;
+8 -8
View File
@@ -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`);
+1 -1
View File
@@ -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[] {