Skip to content

Commit

Permalink
Improve menu item description
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Flügge committed Dec 25, 2024
1 parent 7d5c3c2 commit a784170
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/gui/controllers/helpers/refs_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions pkg/i18n/english.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ type TranslationSet struct {
CheckoutTypeNewBranchTooltip string
CheckoutTypeDetachedHead string
CheckoutTypeDetachedHeadTooltip string
AsDetachedHead string
NewBranch string
NewBranchFromStashTooltip string
NoBranchesThisRepo string
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit a784170

Please sign in to comment.