diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-03-03 16:11:20 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-03-03 16:11:20 +1100 |
commit | 43758cbb5f8c61d29d3f437a40d43daf2cebbfec (patch) | |
tree | 75a69f37f7195c9a579b422e1638f5c99b7e7943 /pkg/gui/commits_panel.go | |
parent | 00790151025ad58a0bf2b0913c5dd4983fc65b24 (diff) |
i18n for rebase loading states
Diffstat (limited to 'pkg/gui/commits_panel.go')
-rw-r--r-- | pkg/gui/commits_panel.go | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 2cdfc8853..2154ad5c9 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -144,7 +144,7 @@ func (gui *Gui) handleCommitSquashDown(g *gocui.Gui, v *gocui.View) error { } gui.createConfirmationPanel(g, v, gui.Tr.SLocalize("Squash"), gui.Tr.SLocalize("SureSquashThisCommit"), func(g *gocui.Gui, v *gocui.View) error { - return gui.WithWaitingStatus("squashing", func() error { + return gui.WithWaitingStatus(gui.Tr.SLocalize("SquashingStatus"), func() error { err := gui.GitCommand.InteractiveRebase(gui.State.Commits, gui.State.Panels.Commits.SelectedLine, "squash") return gui.handleGenericMergeCommandResult(err) }) @@ -176,7 +176,7 @@ func (gui *Gui) handleCommitFixup(g *gocui.Gui, v *gocui.View) error { } gui.createConfirmationPanel(g, v, gui.Tr.SLocalize("Fixup"), gui.Tr.SLocalize("SureFixupThisCommit"), func(g *gocui.Gui, v *gocui.View) error { - return gui.WithWaitingStatus("fixing up", func() error { + return gui.WithWaitingStatus(gui.Tr.SLocalize("FixingStatus"), func() error { err := gui.GitCommand.InteractiveRebase(gui.State.Commits, gui.State.Panels.Commits.SelectedLine, "fixup") return gui.handleGenericMergeCommandResult(err) }) @@ -276,7 +276,7 @@ func (gui *Gui) handleCommitDelete(g *gocui.Gui, v *gocui.View) error { } return gui.createConfirmationPanel(gui.g, v, gui.Tr.SLocalize("DeleteCommitTitle"), gui.Tr.SLocalize("DeleteCommitPrompt"), func(*gocui.Gui, *gocui.View) error { - return gui.WithWaitingStatus("deleting", func() error { + return gui.WithWaitingStatus(gui.Tr.SLocalize("DeletingStatus"), func() error { err := gui.GitCommand.InteractiveRebase(gui.State.Commits, gui.State.Panels.Commits.SelectedLine, "drop") return gui.handleGenericMergeCommandResult(err) }) @@ -297,7 +297,7 @@ func (gui *Gui) handleCommitMoveDown(g *gocui.Gui, v *gocui.View) error { return gui.refreshCommits(gui.g) } - return gui.WithWaitingStatus("moving", func() error { + return gui.WithWaitingStatus(gui.Tr.SLocalize("MovingStatus"), func() error { err := gui.GitCommand.MoveCommitDown(gui.State.Commits, index) if err == nil { gui.State.Panels.Commits.SelectedLine++ @@ -320,7 +320,7 @@ func (gui *Gui) handleCommitMoveUp(g *gocui.Gui, v *gocui.View) error { return gui.refreshCommits(gui.g) } - return gui.WithWaitingStatus("moving", func() error { + return gui.WithWaitingStatus(gui.Tr.SLocalize("MovingStatus"), func() error { err := gui.GitCommand.MoveCommitDown(gui.State.Commits, index-1) if err == nil { gui.State.Panels.Commits.SelectedLine-- @@ -338,7 +338,7 @@ func (gui *Gui) handleCommitEdit(g *gocui.Gui, v *gocui.View) error { return nil } - return gui.WithWaitingStatus("rebasing", func() error { + return gui.WithWaitingStatus(gui.Tr.SLocalize("RebasingStatus"), func() error { err = gui.GitCommand.InteractiveRebase(gui.State.Commits, gui.State.Panels.Commits.SelectedLine, "edit") return gui.handleGenericMergeCommandResult(err) }) @@ -346,7 +346,7 @@ func (gui *Gui) handleCommitEdit(g *gocui.Gui, v *gocui.View) error { func (gui *Gui) handleCommitAmendTo(g *gocui.Gui, v *gocui.View) error { return gui.createConfirmationPanel(gui.g, v, gui.Tr.SLocalize("AmendCommitTitle"), gui.Tr.SLocalize("AmendCommitPrompt"), func(*gocui.Gui, *gocui.View) error { - return gui.WithWaitingStatus("amending", func() error { + return gui.WithWaitingStatus(gui.Tr.SLocalize("AmendingStatus"), func() error { err := gui.GitCommand.AmendTo(gui.State.Commits[gui.State.Panels.Commits.SelectedLine].Sha) return gui.handleGenericMergeCommandResult(err) }) @@ -431,7 +431,9 @@ func (gui *Gui) handleCopyCommitRange(g *gocui.Gui, v *gocui.View) error { // HandlePasteCommits begins a cherry-pick rebase with the commits the user has copied func (gui *Gui) HandlePasteCommits(g *gocui.Gui, v *gocui.View) error { return gui.createConfirmationPanel(g, v, gui.Tr.SLocalize("CherryPick"), gui.Tr.SLocalize("SureCherryPick"), func(g *gocui.Gui, v *gocui.View) error { - err := gui.GitCommand.CherryPickCommits(gui.State.CherryPickedCommits) - return gui.handleGenericMergeCommandResult(err) + return gui.WithWaitingStatus(gui.Tr.SLocalize("CherryPickingStatus"), func() error { + err := gui.GitCommand.CherryPickCommits(gui.State.CherryPickedCommits) + return gui.handleGenericMergeCommandResult(err) + }) }, nil) } |