From a7841700ef2e75232b824f4a0d76915e88c30349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Fl=C3=BCgge?= Date: Wed, 25 Dec 2024 17:57:15 +0100 Subject: [PATCH] Improve menu item description --- pkg/gui/controllers/helpers/refs_helper.go | 3 ++- pkg/i18n/english.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/gui/controllers/helpers/refs_helper.go b/pkg/gui/controllers/helpers/refs_helper.go index f8d0964e47c..6cb838e7f52 100644 --- a/pkg/gui/controllers/helpers/refs_helper.go +++ b/pkg/gui/controllers/helpers/refs_helper.go @@ -274,8 +274,9 @@ func (self *RefsHelper) CreateGitResetMenu(ref string) error { func (self *RefsHelper) CreateCheckoutMenu(ref string, branches []*models.Branch) error { var menuItems []*types.MenuItem + menuItems = append(menuItems, &types.MenuItem{ - LabelColumns: []string{ref}, + LabelColumns: []string{fmt.Sprintf("%s %s", self.c.Tr.CheckoutCommit, self.c.Tr.AsDetachedHead), style.FgRed.Sprint(ref[:8])}, OnPress: func() error { self.c.Confirm(types.ConfirmOpts{ Title: self.c.Tr.CheckoutCommit, diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 631f2cc8545..a92c9380315 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -130,6 +130,7 @@ type TranslationSet struct { CheckoutTypeNewBranchTooltip string CheckoutTypeDetachedHead string CheckoutTypeDetachedHeadTooltip string + AsDetachedHead string NewBranch string NewBranchFromStashTooltip string NoBranchesThisRepo string @@ -1124,6 +1125,7 @@ func EnglishTranslationSet() *TranslationSet { CheckoutTypeNewBranchTooltip: "Checkout the remote branch as a local branch, tracking the remote branch.", CheckoutTypeDetachedHead: "Detached head", CheckoutTypeDetachedHeadTooltip: "Checkout the remote branch as a detached head, which can be useful if you just want to test the branch but not work on it yourself. You can still create a local branch from it later.", + AsDetachedHead: "as detached head", NewBranch: "New branch", NewBranchFromStashTooltip: "Create a new branch from the selected stash entry. This works by git checking out the commit that the stash entry was created from, creating a new branch from that commit, then applying the stash entry to the new branch as an additional commit.", NoBranchesThisRepo: "No branches for this repo",