diff --git a/pkg/gui/controllers/helpers/update_helper.go b/pkg/gui/controllers/helpers/update_helper.go index ba3f8551c..5fd4cc492 100644 --- a/pkg/gui/controllers/helpers/update_helper.go +++ b/pkg/gui/controllers/helpers/update_helper.go @@ -7,6 +7,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/constants" "github.com/jesseduffield/lazygit/pkg/gocui" + "github.com/jesseduffield/lazygit/pkg/gui/style" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/jesseduffield/lazygit/pkg/updates" "github.com/jesseduffield/lazygit/pkg/utils" @@ -91,11 +92,14 @@ func (self *UpdateHelper) CheckForUpdateInForeground() error { // a new version. Call it on a worker, because it accesses the file system. func (self *UpdateHelper) updateMenuOptions(newVersion *types.VersionNumber) types.CreateMenuOptions { installation := self.updater.Installation() + // The release notes are a link rather than a menu item, because choosing a + // menu item closes the menu paragraphs := []string{utils.ResolvePlaceholderString( self.c.Tr.NewVersionAvailable, map[string]string{ "newVersion": newVersion.String(), "currentVersion": self.updater.CurrentVersion().String(), + "releaseNotes": style.PrintHyperlink(self.c.Tr.ReleaseNotes, constants.Links.Releases), }, )} items := []*types.MenuItem{} @@ -144,10 +148,6 @@ func (self *UpdateHelper) updateMenuOptions(newVersion *types.VersionNumber) typ items = append(items, self.openInstallationInstructionsMenuItem()) } - items = append(items, &types.MenuItem{ - Label: self.c.Tr.OpenReleaseNotes, - OnPress: func() error { return self.c.OS().OpenLink(constants.Links.Releases) }, - }) paragraphs = append(paragraphs, self.c.Tr.TurnOffUpdateChecks) return types.CreateMenuOptions{ diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 22421d5f5..0315f5c5f 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -284,7 +284,7 @@ type TranslationSet struct { CopyUpdateCommand string UpdateCommandCopiedToClipboard string OpenInstallationInstructions string - OpenReleaseNotes string + ReleaseNotes string InstallingUpdateStatus string UpdateInstalled string UpdateInstallFailed string @@ -1509,7 +1509,7 @@ func EnglishTranslationSet() *TranslationSet { NoUpdateAvailableTitle: "No update available", NoUpdateAvailable: "You have the latest version ({{.currentVersion}}).", UpdateAvailableTitle: "Update available", - NewVersionAvailable: "lazygit {{.newVersion}} is available. You have {{.currentVersion}}.", + NewVersionAvailable: "lazygit {{.newVersion}} is available ({{.releaseNotes}}). You have {{.currentVersion}}.", UpdateFolderNotWritable: "lazygit can't update itself because you don't have write access to {{.folder}}. If you install lazygit in a folder that you can write to, it will keep itself up to date from then on.", UpdateWithPackageManager: "You installed lazygit with {{.packageManager}}. To update it, run:\n\n{{.command}}", PackageManagersCanBeSlow: "Package managers sometimes take a few days to get a new version.", @@ -1519,7 +1519,7 @@ func EnglishTranslationSet() *TranslationSet { CopyUpdateCommand: "Copy command", UpdateCommandCopiedToClipboard: "Command copied to clipboard", OpenInstallationInstructions: "Open installation instructions", - OpenReleaseNotes: "Open release notes", + ReleaseNotes: "Release notes", InstallingUpdateStatus: "Installing {{.newVersion}}", UpdateInstalled: "lazygit {{.newVersion}} is installed. It takes effect the next time you start lazygit.", UpdateInstallFailed: "Couldn't install lazygit {{.newVersion}}: {{.error}}",