mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-09 13:47:11 +02:00
mention path in tooltips
This commit is contained in:
parent
31b8524fe6
commit
38c7030b0f
0
lxGxGkGpXF
Normal file
0
lxGxGkGpXF
Normal file
@ -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(),
|
||||
},
|
||||
),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user