diff --git a/lxGxGkGpXF b/lxGxGkGpXF new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/gui/controllers/files_remove_controller.go b/pkg/gui/controllers/files_remove_controller.go index 85815fb49..646118550 100644 --- a/pkg/gui/controllers/files_remove_controller.go +++ b/pkg/gui/controllers/files_remove_controller.go @@ -5,6 +5,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/filetree" "github.com/jesseduffield/lazygit/pkg/gui/types" + "github.com/jesseduffield/lazygit/pkg/utils" ) // splitting this action out into its own file because it's self-contained @@ -51,8 +52,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { } return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'x', - Tooltip: self.c.Tr.DiscardAllTooltip, + Key: 'x', + Tooltip: utils.ResolvePlaceholderString( + self.c.Tr.DiscardAllTooltip, + map[string]string{ + "path": node.GetPath(), + }, + ), }, } @@ -67,8 +73,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'u', - Tooltip: self.c.Tr.DiscardUnstagedTooltip, + Key: 'u', + Tooltip: utils.ResolvePlaceholderString( + self.c.Tr.DiscardUnstagedTooltip, + map[string]string{ + "path": node.GetPath(), + }, + ), }) } } else { @@ -97,8 +108,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { } return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'x', - Tooltip: self.c.Tr.DiscardAllTooltip, + Key: 'x', + Tooltip: utils.ResolvePlaceholderString( + self.c.Tr.DiscardAllTooltip, + map[string]string{ + "path": node.GetPath(), + }, + ), }, } @@ -113,8 +129,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error { return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}}) }, - Key: 'u', - Tooltip: self.c.Tr.DiscardUnstagedTooltip, + Key: 'u', + Tooltip: utils.ResolvePlaceholderString( + self.c.Tr.DiscardUnstagedTooltip, + map[string]string{ + "path": node.GetPath(), + }, + ), }) } } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 58604315e..ed89592e8 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -764,8 +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.", + DiscardAllTooltip: "Discard both staged and unstaged changes in '{{.path}}'.", + DiscardUnstagedTooltip: "Discard unstaged changes in '{{.path}}'.", LcPop: "pop", LcDrop: "drop", LcApply: "apply",