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:
Vishwas Shashidhar
2019-01-25 12:26:38 +05:30
committed by GitHub
parent c5e26c49e7
commit 335f89fa26
8 changed files with 34 additions and 3 deletions

View File

@@ -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);

View File

@@ -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';
}
});