1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-17 22:32:58 +02:00

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.
This commit is contained in:
Moritz Haase 2022-03-24 13:42:57 +01:00 committed by Jesse Duffield
parent b7079634ee
commit f2fb6453a1
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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}})",