From 8917dd95bfb7c6cb6cfa83d8728cda4599f34693 Mon Sep 17 00:00:00 2001 From: tiddlygit-test Date: Fri, 19 Mar 2021 01:34:43 +0800 Subject: [PATCH] fix: menu item not translated --- src/services/windows/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/windows/index.ts b/src/services/windows/index.ts index b6722af0..2ced51b2 100644 --- a/src/services/windows/index.ts +++ b/src/services/windows/index.ts @@ -469,24 +469,24 @@ export class Window implements IWindowService { // TODO: restore updater options here this.menuService.insertMenu('TiddlyGit', [ { - label: i18n.t('ContextMenu.About'), + label: () => i18n.t('ContextMenu.About'), click: async () => await this.open(WindowNames.about), }, { type: 'separator' }, { - label: i18n.t('ContextMenu.Preferences'), + label: () => i18n.t('ContextMenu.Preferences'), click: async () => await this.open(WindowNames.preferences), accelerator: 'CmdOrCtrl+,', }, { type: 'separator' }, { - label: i18n.t('ContextMenu.Notifications'), + label: () => i18n.t('ContextMenu.Notifications'), click: async () => await this.open(WindowNames.notifications), accelerator: 'CmdOrCtrl+Shift+N', }, { type: 'separator' }, { - label: i18n.t('Preference.ClearBrowsingData'), + label: () => i18n.t('Preference.ClearBrowsingData'), click: () => ipcMain.emit('request-clear-browsing-data'), }, { type: 'separator' },