From 6bfcb3d6f0363ed4b0592356bf3b9669330380dd Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 8 Jul 2025 17:20:50 +0200 Subject: [PATCH] Add tooltips for commit log menu --- pkg/gui/controllers/local_commits_controller.go | 2 ++ pkg/i18n/english.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/pkg/gui/controllers/local_commits_controller.go b/pkg/gui/controllers/local_commits_controller.go index 1458756cb..c4c9fba44 100644 --- a/pkg/gui/controllers/local_commits_controller.go +++ b/pkg/gui/controllers/local_commits_controller.go @@ -1180,6 +1180,7 @@ func (self *LocalCommitsController) handleOpenLogMenu() error { }, { Label: self.c.Tr.ShowGitGraph, + Tooltip: self.c.Tr.ShowGitGraphTooltip, OpensMenu: true, OnPress: func() error { currentValue := self.c.UserConfig().Git.Log.ShowGraph @@ -1215,6 +1216,7 @@ func (self *LocalCommitsController) handleOpenLogMenu() error { }, { Label: self.c.Tr.SortCommits, + Tooltip: self.c.Tr.SortCommitsTooltip, OpensMenu: true, OnPress: func() error { currentValue := self.c.UserConfig().Git.Log.Order diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 369a7c98d..44ed670aa 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -758,12 +758,14 @@ type TranslationSet struct { LogMenuTitle string ToggleShowGitGraphAll string ShowGitGraph string + ShowGitGraphTooltip string SortOrder string SortAlphabetical string SortByDate string SortByRecency string SortBasedOnReflog string SortCommits string + SortCommitsTooltip string CantChangeContextSizeError string OpenCommitInBrowser string ViewBisectOptions string @@ -1803,12 +1805,14 @@ func EnglishTranslationSet() *TranslationSet { LogMenuTitle: "Commit Log Options", ToggleShowGitGraphAll: "Toggle show whole git graph (pass the `--all` flag to `git log`)", ShowGitGraph: "Show git graph", + ShowGitGraphTooltip: "Show or hide the git graph in the commit log.\n\nThe default can be changed in the config file with the key 'git.log.showGraph'.", SortOrder: "Sort order", SortAlphabetical: "Alphabetical", SortByDate: "Date", SortByRecency: "Recency", SortBasedOnReflog: "(based on reflog)", SortCommits: "Commit sort order", + SortCommitsTooltip: "Change the sort order of the commits in the commit log.\n\nThe default can be changed in the config file with the key 'git.log.sortOrder'.", CantChangeContextSizeError: "Cannot change context while in patch building mode because we were too lazy to support it when releasing the feature. If you really want it, please let us know!", OpenCommitInBrowser: "Open commit in browser", ViewBisectOptions: "View bisect options",