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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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';
}
});

View File

@ -124,6 +124,10 @@
"Pen": "Pen",
"Snipping Tool": "Snipping Tool"
},
"AboutSymphony": {
"About Symphony": "About Symphony",
"Version": "Version"
},
"Select All": "Select All",
"Services": "Services",
"Show All": "Show All",

View File

@ -124,6 +124,10 @@
"Pen": "Pen",
"Snipping Tool": "Snipping Tool"
},
"AboutSymphony": {
"About Symphony": "About Symphony",
"Version": "Version"
},
"Select All": "Select All",
"Services": "Services",
"Show All": "Show All",

View File

@ -124,6 +124,10 @@
"Pen": "Stylo",
"Snipping Tool": "Outil Capture"
},
"AboutSymphony": {
"About Symphony": "À propos de Symphony",
"Version": "Version"
},
"Select All": "Tout sélectionner",
"Services": "Services",
"Show All": "Tout afficher",

View File

@ -124,6 +124,10 @@
"Pen": "Stylo",
"Snipping Tool": "Outil Capture"
},
"AboutSymphony": {
"About Symphony": "À propos de Symphony",
"Version": "Version"
},
"Select All": "Tout sélectionner",
"Services": "Services",
"Show All": "Tout afficher",

View File

@ -124,6 +124,10 @@
"Pen": "ペン",
"Snipping Tool": "切り取りツール"
},
"AboutSymphony": {
"About Symphony": "Symphonyについて",
"Version": "バージョン"
},
"Select All": "すべてを選択",
"Services": "サービス",
"Show All": "すべてを表示",

View File

@ -124,6 +124,10 @@
"Pen": "ペン",
"Snipping Tool": "切り取りツール"
},
"AboutSymphony": {
"About Symphony": "Symphonyについて",
"Version": "バージョン"
},
"Select All": "すべてを選択",
"Services": "サービス",
"Show All": "すべてを表示",