From 31b8524fe681345f5051c0b5d9b9c658a2b48c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Marku=C5=A1i=C4=87?= Date: Thu, 2 Feb 2023 11:08:33 +0100 Subject: [PATCH] Add tooltips for discarding --- pkg/gui/controllers/files_remove_controller.go | 12 ++++++++---- pkg/i18n/english.go | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pkg/gui/controllers/files_remove_controller.go b/pkg/gui/controllers/files_remove_controller.go index 4d9ffa426..85815fb49 100644 --- a/pkg/gui/controllers/files_remove_controller.go +++ b/pkg/gui/controllers/files_remove_controller.go @@ -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, }) } } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 775a4c4bf..58604315e 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -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",