summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorMoritz Haase <Moritz.Haase@bmw.de>2022-03-24 13:42:57 +0100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-28 09:13:34 +1100
commitf2fb6453a13d7e609bb8456843e208e8e3e7901a (patch)
treed26e07d8033717f60580357852e78d6e932f6506 /pkg
parentb7079634ee6b597ab5f8082e2deda2b52d9cc648 (diff)
pkg/gui: Show notification popup when update was successful
Show a proper notification popup once an update has been installed successfully so the user knows we're done (so far a popup is only shown if an error occurred). The popup also reminds him to restart lazygit for the changes to take effect.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gui/updates.go2
-rw-r--r--pkg/i18n/english.go4
2 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/updates.go b/pkg/gui/updates.go
index edc208625..9bfa65720 100644
--- a/pkg/gui/updates.go
+++ b/pkg/gui/updates.go
@@ -68,7 +68,7 @@ func (gui *Gui) onUpdateFinish(statusId int, err error) error {
)
return gui.c.ErrorMsg(errMessage)
}
- return nil
+ return gui.c.Alert(gui.Tr.UpdateCompletedTitle, gui.Tr.UpdateCompleted)
})
return nil
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index f7f02600e..585da5e30 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -132,6 +132,8 @@ type TranslationSet struct {
UpdateAvailableTitle string
UpdateAvailable string
UpdateInProgressWaitingStatus string
+ UpdateCompletedTitle string
+ UpdateCompleted string
FailedToRetrieveLatestVersionErr string
OnLatestVersionErr string
MajorVersionErr string
@@ -729,6 +731,8 @@ func EnglishTranslationSet() TranslationSet {
UpdateAvailableTitle: "Update available!",
UpdateAvailable: "Download and install version {{.newVersion}}?",
UpdateInProgressWaitingStatus: "updating",
+ UpdateCompletedTitle: "Update completed!",
+ UpdateCompleted: "Update has been installed successfully. Restart lazygit for it to take effect.",
FailedToRetrieveLatestVersionErr: "Failed to retrieve version information",
OnLatestVersionErr: "You already have the latest version",
MajorVersionErr: "New version ({{.newVersion}}) has non-backwards compatible changes compared to the current version ({{.currentVersion}})",