Add tooltips for discarding

This commit is contained in:
Luka Markušić
2023-02-02 11:08:33 +01:00
committed by Jesse Duffield
parent 0ae34aeeb7
commit 31b8524fe6
2 changed files with 12 additions and 4 deletions

View File

@@ -51,7 +51,8 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
}
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}})
},
Key: 'x',
Key: 'x',
Tooltip: self.c.Tr.DiscardAllTooltip,
},
}
@@ -66,7 +67,8 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}})
},
Key: 'u',
Key: 'u',
Tooltip: self.c.Tr.DiscardUnstagedTooltip,
})
}
} else {
@@ -95,7 +97,8 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
}
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}})
},
Key: 'x',
Key: 'x',
Tooltip: self.c.Tr.DiscardAllTooltip,
},
}
@@ -110,7 +113,8 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}})
},
Key: 'u',
Key: 'u',
Tooltip: self.c.Tr.DiscardUnstagedTooltip,
})
}
}

View File

@@ -115,6 +115,8 @@ type TranslationSet struct {
LcRedoReflog string
UndoTooltip string
RedoTooltip string
DiscardAllTooltip string
DiscardUnstagedTooltip string
LcPop string
LcDrop string
LcApply string
@@ -762,6 +764,8 @@ func EnglishTranslationSet() TranslationSet {
LcRedoReflog: "redo (via reflog) (experimental)",
UndoTooltip: "The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration.",
RedoTooltip: "The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration.",
DiscardAllTooltip: "Discard both staged and unstaged changes.",
DiscardUnstagedTooltip: "Discard unstaged changes.",
LcPop: "pop",
LcDrop: "drop",
LcApply: "apply",