mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-795, ELECTRON-789: localise download manager messages (#507)
The messages "Downloaded" and "File not found" were not localised in japanese, this adds localisation to those messages
This commit is contained in:
parent
85884305cb
commit
f345660129
@ -7,8 +7,11 @@ const local = {
|
||||
downloadItems: []
|
||||
};
|
||||
|
||||
let showInFolderText = "Show in Folder";
|
||||
let openText = "Open";
|
||||
let showInFolderText = 'Show in Folder';
|
||||
let openText = 'Open';
|
||||
let downloadedText = 'Downloaded';
|
||||
let fileNotFoundTitle = 'File not Found';
|
||||
let fileNotFoundMessage = 'The file you are trying to open cannot be found in the specified path.';
|
||||
|
||||
// listen for file download complete event
|
||||
local.ipcRenderer.on('downloadCompleted', (event, arg) => {
|
||||
@ -26,8 +29,12 @@ local.ipcRenderer.on('locale-changed', (event, data) => {
|
||||
if (data && typeof data === 'object') {
|
||||
|
||||
if (data.downloadManager) {
|
||||
showInFolderText = data.downloadManager['Show in Folder'];
|
||||
openText = data.downloadManager.Open;
|
||||
downloadedText = data.downloadManager.Downloaded;
|
||||
|
||||
showInFolderText = data.downloadManager['Show in Folder'];
|
||||
fileNotFoundTitle = data.downloadManager['File not Found'];
|
||||
fileNotFoundMessage = data.downloadManager['The file you are trying to open cannot be found in the specified path.'];
|
||||
}
|
||||
|
||||
}
|
||||
@ -46,7 +53,7 @@ function openFile(id) {
|
||||
let openResponse = remote.shell.openExternal(`file:///${local.downloadItems[fileIndex].savedPath}`);
|
||||
let focusedWindow = remote.BrowserWindow.getFocusedWindow();
|
||||
if (!openResponse && focusedWindow && !focusedWindow.isDestroyed()) {
|
||||
remote.dialog.showMessageBox(focusedWindow, {type: 'error', title: 'File not found', message: 'The file you are trying to open cannot be found in the specified path.'});
|
||||
remote.dialog.showMessageBox(focusedWindow, {type: 'error', title: fileNotFoundTitle, message: fileNotFoundMessage});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -63,7 +70,7 @@ function showInFinder(id) {
|
||||
let showResponse = remote.shell.showItemInFolder(local.downloadItems[showFileIndex].savedPath);
|
||||
let focusedWindow = remote.BrowserWindow.getFocusedWindow();
|
||||
if (!showResponse && focusedWindow && !focusedWindow.isDestroyed()) {
|
||||
remote.dialog.showMessageBox(focusedWindow, {type: 'error', title: 'File not found', message: 'The file you are trying to open cannot be found in the specified path.'});
|
||||
remote.dialog.showMessageBox(focusedWindow, {type: 'error', title: fileNotFoundTitle, message: fileNotFoundMessage});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -133,7 +140,7 @@ function createDOM(arg) {
|
||||
|
||||
let fileProgressTitle = document.createElement('span');
|
||||
fileProgressTitle.id = 'per';
|
||||
fileProgressTitle.innerHTML = arg.total + ' Downloaded';
|
||||
fileProgressTitle.innerHTML = `${arg.total} ${downloadedText}`;
|
||||
fileNameDiv.appendChild(fileProgressTitle);
|
||||
|
||||
let caret = document.createElement('div');
|
||||
|
@ -36,7 +36,10 @@
|
||||
"DownloadManager": {
|
||||
"Show in Folder": "Show in Folder",
|
||||
"Reveal in Finder": "Reveal in Finder",
|
||||
"Open": "Open"
|
||||
"Open": "Open",
|
||||
"Downloaded": "Downloaded",
|
||||
"File not Found": "File not Found",
|
||||
"The file you are trying to open cannot be found in the specified path.": "The file you are trying to open cannot be found in the specified path."
|
||||
},
|
||||
"Copy": "Copy",
|
||||
"Custom": "Custom",
|
||||
|
@ -36,7 +36,10 @@
|
||||
"DownloadManager": {
|
||||
"Show in Folder": "Show in Folder",
|
||||
"Reveal in Finder": "Reveal in Finder",
|
||||
"Open": "Open"
|
||||
"Open": "Open",
|
||||
"Downloaded": "Downloaded",
|
||||
"File not Found": "File not Found",
|
||||
"The file you are trying to open cannot be found in the specified path.": "The file you are trying to open cannot be found in the specified path."
|
||||
},
|
||||
"Copy": "Copy",
|
||||
"Custom": "Custom",
|
||||
|
@ -36,7 +36,10 @@
|
||||
"DownloadManager": {
|
||||
"Show in Folder": "フォルダで見て",
|
||||
"Reveal in Finder": "Finderで明らかにする",
|
||||
"Open": "開いた"
|
||||
"Open": "開いた",
|
||||
"Downloaded": "ダウンロード済み",
|
||||
"File not Found": "ファイルが見つかりません",
|
||||
"The file you are trying to open cannot be found in the specified path.": "開こうとしているファイルが指定されたパスに見つかりません."
|
||||
},
|
||||
"Copy": "コピー",
|
||||
"Custom": "カスタム",
|
||||
|
@ -36,7 +36,10 @@
|
||||
"DownloadManager": {
|
||||
"Show in Folder": "フォルダで見て",
|
||||
"Reveal in Finder": "Finderで明らかにする",
|
||||
"Open": "開いた"
|
||||
"Open": "開いた",
|
||||
"Downloaded": "ダウンロード済み",
|
||||
"File not Found": "ファイルが見つかりません",
|
||||
"The file you are trying to open cannot be found in the specified path.": "開こうとしているファイルが指定されたパスに見つかりません."
|
||||
},
|
||||
"Copy": "コピー",
|
||||
"Custom": "カスタム",
|
||||
|
Loading…
Reference in New Issue
Block a user