mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-14 01:26:24 -04:00
fix restore branch keybinding conflict and i18n
This commit is contained in:
parent
c271831399
commit
b04d4b4ed1
|
|
@ -1126,7 +1126,7 @@ func GetDefaultConfigForPlatform(platform string) *UserConfig {
|
|||
FetchRemote: Keybinding{"f"},
|
||||
AddForkRemote: Keybinding{"F"},
|
||||
SortOrder: Keybinding{"s"},
|
||||
RestoreBranch: Keybinding{"R"},
|
||||
RestoreBranch: Keybinding{"<ctrl+r>"},
|
||||
},
|
||||
Commits: KeybindingCommitsConfig{
|
||||
SquashDown: Keybinding{"s"},
|
||||
|
|
|
|||
|
|
@ -605,16 +605,16 @@ func (self *BranchesController) restoreDeletedBranch() error {
|
|||
branch.Recency,
|
||||
},
|
||||
OnPress: func() error {
|
||||
self.c.LogAction(self.c.Tr.Actions.RestoreBranch)
|
||||
upstream, err := self.c.Git().Branch.RestoreBranch(branch.Name, branch.CommitHash)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
self.c.LogAction(self.c.Tr.Actions.RestoreBranch)
|
||||
toast := utils.ResolvePlaceholderString(self.c.Tr.RestoredBranch, map[string]string{"branchName": branch.Name})
|
||||
if upstream != "" {
|
||||
self.c.Toast(fmt.Sprintf("%s %s (%s)", self.c.Tr.RestoredBranch, branch.Name, self.c.Tr.RestoredBranchUpstream))
|
||||
} else {
|
||||
self.c.Toast(fmt.Sprintf("%s %s", self.c.Tr.RestoredBranch, branch.Name))
|
||||
toast = fmt.Sprintf("%s (%s)", toast, self.c.Tr.RestoredBranchUpstream)
|
||||
}
|
||||
self.c.Toast(toast)
|
||||
self.c.Refresh(types.RefreshOptions{
|
||||
Scope: []types.RefreshableView{types.BRANCHES},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1287,7 +1287,7 @@ func EnglishTranslationSet() *TranslationSet {
|
|||
RestoreBranchTooltip: "Restore a locally deleted branch from the reflog. The branch's upstream will be re-attached if a matching remote-tracking branch still exists.",
|
||||
RestoreBranchTitle: "Deleted branches",
|
||||
NoDeletedBranches: "No deleted branches were found in the reflog",
|
||||
RestoredBranch: "Restored branch",
|
||||
RestoredBranch: "Restored branch '{{.branchName}}'",
|
||||
RestoredBranchUpstream: "re-attached upstream",
|
||||
ForceDeleteBranchTitle: "Force delete branch",
|
||||
ForceDeleteBranchMessage: "'{{.selectedBranchName}}' is not fully merged. Are you sure you want to delete it?",
|
||||
|
|
|
|||
Loading…
Reference in a new issue