diff --git a/localization/locales/en/translation.json b/localization/locales/en/translation.json index a146ce9d..da9e65d3 100644 --- a/localization/locales/en/translation.json +++ b/localization/locales/en/translation.json @@ -14,6 +14,7 @@ "TiddlyGitSupport": "TiddlyGit Support", "TiddlyGitWebsite": "TiddlyGit Website", "Quit": "Quit", + "Notifications": "Notifications...", "More": "More", "About": "About", "CheckForUpdates": "Check for Updates", @@ -145,6 +146,7 @@ }, "Cancel": "Cancel", "Preference": { + "ClearBrowsingData": "Clear Browsing Data (git isn't affected)", "General": "General", "Sync": "Sync", "SyncInterval": "Sync Interval", diff --git a/localization/locales/zh_CN/translation.json b/localization/locales/zh_CN/translation.json index d891ac88..178b683c 100644 --- a/localization/locales/zh_CN/translation.json +++ b/localization/locales/zh_CN/translation.json @@ -16,6 +16,7 @@ "Quit": "退出", "More": "更多", "About": "关于", + "Notifications": "消息管理...", "CheckForUpdates": "检查更新", "Reload": "重新加载", "Forward": "向前→", @@ -145,6 +146,7 @@ }, "Cancel": "取消", "Preference": { + "ClearBrowsingData": "清空浏览器数据(不影响Git内容)", "UserNameDetail": "在 Wiki 中的编辑者名,重启后生效,将在创建或编辑 Tiddler 时填入 creator 字段", "UserName": "用户名", "Token": "Git身份凭证", diff --git a/public/libs/create-menu.js b/public/libs/create-menu.js index ed12300d..8316ad92 100755 --- a/public/libs/create-menu.js +++ b/public/libs/create-menu.js @@ -8,6 +8,7 @@ const goToUrlWindow = require('../windows/go-to-url'); const mainWindow = require('../windows/main'); const notificationsWindow = require('../windows/notifications'); const preferencesWindow = require('../windows/preferences'); +const i18next = require('./i18n'); const formatBytes = require('./format-bytes'); const getViewBounds = require('./get-view-bounds'); @@ -379,26 +380,26 @@ function createMenu() { label: 'TiddlyGit', submenu: [ { - label: 'About TiddlyGit', + label: i18next.t('ContextMenu.About'), click: () => aboutWindow.show(), }, { type: 'separator' }, updaterMenuItem, { type: 'separator' }, { - label: 'Preferences...', + label: i18next.t('ContextMenu.Preferences'), click: () => preferencesWindow.show(), accelerator: 'CmdOrCtrl+,', }, { type: 'separator' }, { - label: 'Notifications...', + label: i18next.t('ContextMenu.Notifications'), click: () => notificationsWindow.show(), accelerator: 'CmdOrCtrl+Shift+N', }, { type: 'separator' }, { - label: 'Clear Browsing Data...', + label: i18next.t('Preference.ClearBrowsingData'), click: () => ipcMain.emit('request-clear-browsing-data'), }, { type: 'separator' }, @@ -416,26 +417,26 @@ function createMenu() { label: 'File', submenu: [ { - label: 'About', + label: i18next.t('ContextMenu.About'), click: () => aboutWindow.show(), }, { type: 'separator' }, updaterMenuItem, { type: 'separator' }, { - label: 'Preferences...', + label: i18next.t('ContextMenu.Preferences'), accelerator: 'CmdOrCtrl+,', click: () => preferencesWindow.show(), }, { type: 'separator' }, { - label: 'Notifications...', + label: i18next.t('ContextMenu.Notifications'), click: () => notificationsWindow.show(), accelerator: 'CmdOrCtrl+Shift+N', }, { type: 'separator' }, { - label: 'Clear Browsing Data...', + label: i18next.t('Preference.ClearBrowsingData'), accelerator: 'CmdOrCtrl+Shift+Delete', click: () => ipcMain.emit('request-clear-browsing-data'), },