Skip to content

TagSpaces is an offline, open source, document manager with tagging support

translating the tray menu

Ilian Sapundshievd8b6ade4dc65
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index c6228b691..f7c80c71e 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -324,5 +324,8 @@
"watchForChangesInLocation": "Watch for external changes in this location",
"proFeature": "feature available in the PRO version",
"collectedTags": "Collected Tags",
+ "pauseResumePlayback": "Pause/Resume Playback",
+ "showTagSpaces": "Show TagSpaces",
+ "quitTagSpaces": "Quit TagSpaces",
"-": "-"
}
diff --git a/app/services/electron-tray-menu.js b/app/services/electron-tray-menu.js
index 1625dc7cb..91e012866 100644
--- a/app/services/electron-tray-menu.js
+++ b/app/services/electron-tray-menu.js
@@ -28,8 +28,7 @@ export default function buildTrayIconMenu(mainPageProps: Object) {
}
const trayMenuTemplate = [
{
- label: 'TagSpaces', // (' + ctrlName + '+Alt+W)',
- accelerator: 'CmdOrCtrl+Alt+W',
+ label: i18n.t('core:showTagSpaces'),
click: () => {
PlatformIO.showMainWindow();
}
@@ -39,7 +38,6 @@ export default function buildTrayIconMenu(mainPageProps: Object) {
},
{
label: i18n.t('core:newFileNote'), // (' + ctrlName + '+Alt+N)',
- // accelerator: '',
click: () => {
mainPageProps.toggleCreateFileDialog();
}
@@ -48,27 +46,28 @@ export default function buildTrayIconMenu(mainPageProps: Object) {
type: 'separator'
},
{
- label: 'Open Next File',
- accelerator: 'CmdOrCtrl+Alt+D',
+ label: i18n.t('core:openNextFileTooltip'),
click: () => {
- mainPageProps.getNextFile();
+ const path = mainPageProps.getNextFile();
+ mainPageProps.openFile(path);
+ mainPageProps.setLastSelectedEntry(path);
}
},
{
- label: 'Open Previous File',
- accelerator: 'CmdOrCtrl+Alt+A',
+ label: i18n.t('core:openPrevFileTooltip'),
click: () => {
- mainPageProps.getPrevFile();
+ const path = mainPageProps.getPrevFile();
+ mainPageProps.openFile(path);
+ mainPageProps.setLastSelectedEntry(path);
}
},
{
type: 'separator'
},
{
- label: 'Pause/Resume Playback',
- accelerator: 'CmdOrCtrl+Alt+P',
+ label: i18n.t('core:pauseResumePlayback'),
click: () => {
- const audioEvent = new CustomEvent('toggle-resume', { detail: 'audioevent' });
+ const audioEvent = new CustomEvent('toggle-resume', { detail: '' });
window.dispatchEvent(audioEvent);
}
},
@@ -76,10 +75,11 @@ export default function buildTrayIconMenu(mainPageProps: Object) {
type: 'separator'
},
{
- label: 'Quit TagSpaces',
- click: () => {
+ label: i18n.t('core:quitTagSpaces'),
+ role: 'quit',
+ /* click: () => {
PlatformIO.quitApp();
- }
+ } */
}
];
PlatformIO.initTrayMenu(trayMenuTemplate);