mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-1030: add localisation for about symphony window on Windows (#558)
* ELECTRON-1030: add localisation for about symphony window on Windows * ELECTRON-1030: add default values for the about app strings
This commit is contained in:
committed by
GitHub
parent
c5e26c49e7
commit
335f89fa26
@@ -88,7 +88,12 @@ function openAboutWindow(windowName) {
|
||||
// initialize crash reporter
|
||||
initCrashReporterMain({ process: 'about app window' });
|
||||
initCrashReporterRenderer(aboutWindow, { process: 'render | about app window' });
|
||||
aboutWindow.webContents.send('versionInfo', { version, clientVersion, buildNumber });
|
||||
aboutWindow.webContents.send('versionInfo', {
|
||||
version,
|
||||
clientVersion,
|
||||
buildNumber,
|
||||
i18n: i18n.getMessageFor('AboutSymphony')
|
||||
});
|
||||
if (!isMac) {
|
||||
// prevents from displaying menu items when "alt" key is pressed
|
||||
aboutWindow.setMenu(null);
|
||||
|
||||
@@ -19,10 +19,12 @@ function renderDom() {
|
||||
|
||||
ipcRenderer.on('versionInfo', (event, versionInfo) => {
|
||||
const versionText = document.getElementById('version');
|
||||
const { version, clientVersion, buildNumber } = versionInfo;
|
||||
const { version, clientVersion, buildNumber, i18n } = versionInfo;
|
||||
|
||||
document.title = i18n['About Symphony'] || 'About Symphony';
|
||||
|
||||
if (versionText) {
|
||||
versionText.innerHTML = version ? `Version ${clientVersion}-${version} (${buildNumber})` : 'N/A';
|
||||
versionText.innerHTML = version ? `${i18n.Version || 'Version'} ${clientVersion}-${version} (${buildNumber})` : 'N/A';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user