diff --git a/app/src/modules/autoUpdater.js b/app/src/modules/autoUpdater.js index d5e77a345..fbd092b86 100644 --- a/app/src/modules/autoUpdater.js +++ b/app/src/modules/autoUpdater.js @@ -7,12 +7,12 @@ export default ({ autoUpdater, dialog }) => { autoUpdater.checkForUpdates(); }, 24 * 60 * 60 * 1000); - autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { + autoUpdater.on('update-downloaded', ({ version }) => { const dialogOpts = { type: 'info', - buttons: [i18n.t('Restart'), i18n.t('Later')], + buttons: [i18n.t('Update'), i18n.t('Later')], title: i18n.t('New version of Lisk Nano available'), - message: i18n.t('Version {{version}} has been downloaded. Please restart the application to apply the updates.', { version: releaseName }), + message: i18n.t('Version {{version}} has been downloaded. To install the update and restart the application, click "{{buttonLabel}}" button.', { version, buttonLabel: i18n.t('Update') }), }; dialog.showMessageBox(dialogOpts, (pressedButtonIndex) => { diff --git a/app/src/modules/autoUpdater.test.js b/app/src/modules/autoUpdater.test.js index 97f6e694f..e9e84db5d 100644 --- a/app/src/modules/autoUpdater.test.js +++ b/app/src/modules/autoUpdater.test.js @@ -3,9 +3,7 @@ import sinon, { spy } from 'sinon'; // eslint-disable-line import/no-extraneous- import autoUpdater from './autoUpdater'; describe('autoUpdater', () => { - const event = {}; - const releaseNotes = ''; - const releaseName = '1.2.3'; + const version = '1.2.3'; let params; let callbacks; let clock; @@ -60,14 +58,14 @@ describe('autoUpdater', () => { const dialogSpy = spy(params.dialog, 'showMessageBox'); autoUpdater(params); - callbacks['update-downloaded'](event, releaseNotes, releaseName); + callbacks['update-downloaded']({ version }); expect(dialogSpy).to.have.been.calledWith(); }); it('should params.autoUpdater.quitAndInstall() in params.dialog.showMessageBox callback if the first button was pressed', () => { autoUpdater(params); - callbacks['update-downloaded'](event, releaseNotes, releaseName); + callbacks['update-downloaded']({ version }); callbacks.dialog(0); expect(params.autoUpdater.quitAndInstall).to.have.been.calledWithExactly(); @@ -75,7 +73,7 @@ describe('autoUpdater', () => { it('should not params.autoUpdater.quitAndInstall() in params.dialog.showMessageBox callback if the second button was pressed', () => { autoUpdater(params); - callbacks['update-downloaded'](event, releaseNotes, releaseName); + callbacks['update-downloaded']({ version }); callbacks.dialog(1); expect(params.autoUpdater.quitAndInstall).to.not.have.been.calledWith(); diff --git a/i18n/locales/en/common.json b/i18n/locales/en/common.json index 5f0104331..99947c73c 100644 --- a/i18n/locales/en/common.json +++ b/i18n/locales/en/common.json @@ -121,7 +121,6 @@ "Repeat the transaction": "Repeat the transaction", "Report Issue...": "Report Issue...", "Required": "Required", - "Restart": "Restart", "Result": "Result", "Result copied to clipboard": "Result copied to clipboard", "Reward": "Reward", @@ -167,12 +166,13 @@ "URL is invalid": "URL is invalid", "Unable to connect to the node": "Unable to connect to the node", "Undo": "Undo", + "Update": "Update", "Uptime": "Uptime", "Upvotes:": "Upvotes:", "Username": "Username", "Verify message": "Verify message", "Version": "Version", - "Version {{version}} has been downloaded. Please restart the application to apply the updates.": "Version {{version}} has been downloaded. Please restart the application to apply the updates.", + "Version {{version}} has been downloaded. To install the update and restart the application, click \"{{buttonLabel}}\" button.": "Version {{version}} has been downloaded. To install the update and restart the application, click \"{{buttonLabel}}\" button.", "View": "View", "Vote": "Vote", "Vote for delegates": "Vote for delegates",