extend cheatsheet generator to contain context based keybindings

This commit is contained in:
Jesse Duffield
2019-03-02 18:45:18 +11:00
parent 8c0ea8f45f
commit 7a170bbccf
4 changed files with 72 additions and 42 deletions

View File

@@ -13,7 +13,6 @@ type Binding struct {
Key interface{} // FIXME: find out how to get `gocui.Key | rune`
Modifier gocui.Modifier
Description string
panic bool
}
// GetDisplayStrings returns the display string of a file
@@ -32,10 +31,6 @@ func (b *Binding) GetKey() string {
key = int(b.Key.(gocui.Key))
}
if b.panic {
panic(key)
}
// special keys
switch key {
case 27:

View File

@@ -311,10 +311,10 @@ func addEnglish(i18nObject *i18n.Bundle) error {
Other: "revert commit", // TODO: i18n
}, &i18n.Message{
ID: "OnlyRenameTopCommit",
Other: "Can only rename topmost commit from within lazygit. Use shift+R instead",
Other: "Can only reword topmost commit from within lazygit. Use shift+R instead",
}, &i18n.Message{
ID: "renameCommit",
Other: "rename commit",
Other: "reword commit",
}, &i18n.Message{
ID: "deleteCommit",
Other: "delete commit", // TODO: other languages