1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03: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:
Jesse Duffield
2024-01-02 14:00:36 +11:00
parent 0aa6109d4d
commit 7bddf53223
43 changed files with 2525 additions and 2199 deletions

View File

@ -89,14 +89,14 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
Key: opts.GetKey(opts.Config.Universal.ScrollUpMain),
Handler: self.scrollUpMain,
Alternative: "fn+up/shift+k",
Description: self.c.Tr.ScrollUpMainPanel,
Description: self.c.Tr.ScrollUpMainWindow,
},
{
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.ScrollDownMain),
Handler: self.scrollDownMain,
Alternative: "fn+down/shift+j",
Description: self.c.Tr.ScrollDownMainPanel,
Description: self.c.Tr.ScrollDownMainWindow,
},
{
ViewName: "",
@ -127,7 +127,7 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
Handler: self.handleCopySelectedSideContextItemToClipboard,
GetDisabledReason: self.getCopySelectedSideContextItemToClipboardDisabledReason,
Description: self.c.Tr.CopyFileNameToClipboard,
Description: self.c.Tr.CopyPathToClipboard,
},
{
ViewName: "localBranches",
@ -181,13 +181,14 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
Handler: self.handleCopySelectedSideContextItemToClipboard,
GetDisabledReason: self.getCopySelectedSideContextItemToClipboardDisabledReason,
Description: self.c.Tr.CopyCommitFileNameToClipboard,
Description: self.c.Tr.CopyPathToClipboard,
},
{
ViewName: "",
Key: opts.GetKey(opts.Config.Universal.ExtrasMenu),
Handler: self.handleCreateExtrasMenuPanel,
Description: self.c.Tr.OpenExtrasMenu,
Description: self.c.Tr.OpenCommandLogMenu,
Tooltip: self.c.Tr.OpenCommandLogMenuTooltip,
OpensMenu: true,
},
{