mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-519: support Japanese localization for menus, dialogs and windows (#401)
- add basic localisation implementation for menu items - add more strings to support localisation on menus - add more strings to support localisation on menus - add all menu items for localisation - refactor i18n code - Add localization for screen picker, basic auth and notification settings child windows - Add localization bridge - add i18n support to more strings - update translations - add events to change language and redo menu template - move config update logic to windowMgr - fix linting issues and refactor - add snipping tool messages
This commit is contained in:
committed by
GitHub
parent
fd39d680a0
commit
a26a1d609c
@@ -142,12 +142,13 @@ electron.ipcMain.on(apiName, (event, arg) => {
|
||||
openScreenPickerWindow(event.sender, arg.sources, arg.id);
|
||||
}
|
||||
break;
|
||||
case apiCmds.popupMenu:
|
||||
var browserWin = electron.BrowserWindow.fromWebContents(event.sender);
|
||||
case apiCmds.popupMenu: {
|
||||
let browserWin = electron.BrowserWindow.fromWebContents(event.sender);
|
||||
if (browserWin && !browserWin.isDestroyed()) {
|
||||
windowMgr.getMenu().popup(browserWin, { x: 20, y: 15, async: true });
|
||||
windowMgr.getMenu().popup(browserWin, {x: 20, y: 15, async: true});
|
||||
}
|
||||
break;
|
||||
}
|
||||
case apiCmds.optimizeMemoryConsumption:
|
||||
if (typeof arg.memory === 'object' && typeof arg.cpuUsage === 'object' && typeof arg.memory.workingSetSize === 'number') {
|
||||
optimizeMemory(arg.memory, arg.cpuUsage);
|
||||
@@ -158,6 +159,11 @@ electron.ipcMain.on(apiName, (event, arg) => {
|
||||
setIsInMeeting(arg.isInMeeting);
|
||||
}
|
||||
break;
|
||||
case apiCmds.setLocale:
|
||||
if (typeof arg.locale === 'string') {
|
||||
eventEmitter.emit('language-changed', { language: arg.locale });
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user