mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Improve keybinding descriptions
This adds a bunch of tooltips to keybindings and updates some keybinding descriptions (i.e. labels). It's in preparation for displaying more keybindings on-screen (in the bottom right of the screen), and so due in part to laziness it shortens some descriptions so that we don't need to manage both a short and long description (for on-screen vs in-menu). Nonetheless I've added a ShortDescription field for when we do want to have both a short and long description. You'll notice that some keybindings I deemed unworthy of the options view have longer descriptions, because I could get away with it.
This commit is contained in:
@ -25,16 +25,19 @@ func (self *CustomPatchOptionsMenuAction) Call() error {
|
||||
menuItems := []*types.MenuItem{
|
||||
{
|
||||
Label: self.c.Tr.ResetPatch,
|
||||
Tooltip: self.c.Tr.ResetPatchTooltip,
|
||||
OnPress: self.c.Helpers().PatchBuilding.Reset,
|
||||
Key: 'c',
|
||||
},
|
||||
{
|
||||
Label: self.c.Tr.ApplyPatch,
|
||||
Tooltip: self.c.Tr.ApplyPatchTooltip,
|
||||
OnPress: func() error { return self.handleApplyPatch(false) },
|
||||
Key: 'a',
|
||||
},
|
||||
{
|
||||
Label: self.c.Tr.ApplyPatchInReverse,
|
||||
Tooltip: self.c.Tr.ApplyPatchInReverseTooltip,
|
||||
OnPress: func() error { return self.handleApplyPatch(true) },
|
||||
Key: 'r',
|
||||
},
|
||||
@ -44,16 +47,19 @@ func (self *CustomPatchOptionsMenuAction) Call() error {
|
||||
menuItems = append(menuItems, []*types.MenuItem{
|
||||
{
|
||||
Label: fmt.Sprintf(self.c.Tr.RemovePatchFromOriginalCommit, self.c.Git().Patch.PatchBuilder.To),
|
||||
Tooltip: self.c.Tr.RemovePatchFromOriginalCommitTooltip,
|
||||
OnPress: self.handleDeletePatchFromCommit,
|
||||
Key: 'd',
|
||||
},
|
||||
{
|
||||
Label: self.c.Tr.MovePatchOutIntoIndex,
|
||||
Tooltip: self.c.Tr.MovePatchOutIntoIndexTooltip,
|
||||
OnPress: self.handleMovePatchIntoWorkingTree,
|
||||
Key: 'i',
|
||||
},
|
||||
{
|
||||
Label: self.c.Tr.MovePatchIntoNewCommit,
|
||||
Tooltip: self.c.Tr.MovePatchIntoNewCommitTooltip,
|
||||
OnPress: self.handlePullPatchIntoNewCommit,
|
||||
Key: 'n',
|
||||
},
|
||||
@ -75,6 +81,7 @@ func (self *CustomPatchOptionsMenuAction) Call() error {
|
||||
[]*types.MenuItem{
|
||||
{
|
||||
Label: fmt.Sprintf(self.c.Tr.MovePatchToSelectedCommit, selectedCommit.Sha),
|
||||
Tooltip: self.c.Tr.MovePatchToSelectedCommitTooltip,
|
||||
OnPress: self.handleMovePatchToSelectedCommit,
|
||||
Key: 'm',
|
||||
DisabledReason: disabledReason,
|
||||
|
Reference in New Issue
Block a user