From 6920cf77b9373ed25f882ce68f17dde582e0a5be Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 27 Nov 2018 08:31:08 -0500 Subject: [PATCH] show project name in update alert titles --- src/electron/updater.main.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/electron/updater.main.ts b/src/electron/updater.main.ts index 5130159cf4..59f61aaf1d 100644 --- a/src/electron/updater.main.ts +++ b/src/electron/updater.main.ts @@ -28,7 +28,8 @@ export class UpdaterMain { constructor(private i18nService: I18nService, private windowMain: WindowMain, private gitHubProject: string, private onCheckingForUpdate: () => void = null, - private onReset: () => void = null, private onUpdateDownloaded: () => void = null) { + private onReset: () => void = null, private onUpdateDownloaded: () => void = null, + private projectName: string) { autoUpdater.logger = log; const linuxCanUpdate = process.platform === 'linux' && isAppImage(); @@ -58,7 +59,7 @@ export class UpdaterMain { const result = dialog.showMessageBox(this.windowMain.win, { type: 'info', - title: this.i18nService.t('updateAvailable'), + title: this.i18nService.t(this.projectName) + ' - ' + this.i18nService.t('updateAvailable'), message: this.i18nService.t('updateAvailable'), detail: this.i18nService.t('updateAvailableDesc'), buttons: [this.i18nService.t('yes'), this.i18nService.t('no')], @@ -99,7 +100,7 @@ export class UpdaterMain { const result = dialog.showMessageBox(this.windowMain.win, { type: 'info', - title: this.i18nService.t('restartToUpdate'), + title: this.i18nService.t(this.projectName) + ' - ' + this.i18nService.t('restartToUpdate'), message: this.i18nService.t('restartToUpdate'), detail: this.i18nService.t('restartToUpdateDesc', info.version), buttons: [this.i18nService.t('restart'), this.i18nService.t('later')],