diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-11 19:35:42 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-11 23:36:34 +1000 |
commit | adee0b8ccbeb8e3b6f77c067312dcf457c0bb5bb (patch) | |
tree | 7eb522aa9df554c09dd1f48d25a4ea1cfb57cf85 /pkg/gui/submodules_panel.go | |
parent | 0bebfe454e99264cfab7d97c8f861536e1365c6f (diff) |
add spans to i18n
Diffstat (limited to 'pkg/gui/submodules_panel.go')
-rw-r--r-- | pkg/gui/submodules_panel.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pkg/gui/submodules_panel.go b/pkg/gui/submodules_panel.go index a9d1d2eca..8a1d8d753 100644 --- a/pkg/gui/submodules_panel.go +++ b/pkg/gui/submodules_panel.go @@ -81,7 +81,7 @@ func (gui *Gui) removeSubmodule(submodule *models.SubmoduleConfig) error { title: gui.Tr.RemoveSubmodule, prompt: fmt.Sprintf(gui.Tr.RemoveSubmodulePrompt, submodule.Name), handleConfirm: func() error { - if err := gui.GitCommand.WithSpan("Remove submodule").SubmoduleDelete(submodule); err != nil { + if err := gui.GitCommand.WithSpan(gui.Tr.Spans.RemoveSubmodule).SubmoduleDelete(submodule); err != nil { return gui.surfaceError(err) } @@ -107,7 +107,7 @@ func (gui *Gui) fileForSubmodule(submodule *models.SubmoduleConfig) *models.File } func (gui *Gui) resetSubmodule(submodule *models.SubmoduleConfig) error { - gitCommand := gui.GitCommand.WithSpan("Reset submodule") + gitCommand := gui.GitCommand.WithSpan(gui.Tr.Spans.ResetSubmodule) file := gui.fileForSubmodule(submodule) if file != nil { @@ -142,7 +142,7 @@ func (gui *Gui) handleAddSubmodule() error { initialContent: submoduleName, handleConfirm: func(submodulePath string) error { return gui.WithWaitingStatus(gui.Tr.LcAddingSubmoduleStatus, func() error { - err := gui.GitCommand.WithSpan("Add submodule").SubmoduleAdd(submoduleName, submodulePath, submoduleUrl) + err := gui.GitCommand.WithSpan(gui.Tr.Spans.AddSubmodule).SubmoduleAdd(submoduleName, submodulePath, submoduleUrl) gui.handleCredentialsPopup(err) return gui.refreshSidePanels(refreshOptions{scope: []RefreshableView{SUBMODULES}}) @@ -162,7 +162,7 @@ func (gui *Gui) handleEditSubmoduleUrl(submodule *models.SubmoduleConfig) error initialContent: submodule.Url, handleConfirm: func(newUrl string) error { return gui.WithWaitingStatus(gui.Tr.LcUpdatingSubmoduleUrlStatus, func() error { - err := gui.GitCommand.WithSpan("Update submodule URL").SubmoduleUpdateUrl(submodule.Name, submodule.Path, newUrl) + err := gui.GitCommand.WithSpan(gui.Tr.Spans.UpdateSubmoduleUrl).SubmoduleUpdateUrl(submodule.Name, submodule.Path, newUrl) gui.handleCredentialsPopup(err) return gui.refreshSidePanels(refreshOptions{scope: []RefreshableView{SUBMODULES}}) @@ -173,7 +173,7 @@ func (gui *Gui) handleEditSubmoduleUrl(submodule *models.SubmoduleConfig) error func (gui *Gui) handleSubmoduleInit(submodule *models.SubmoduleConfig) error { return gui.WithWaitingStatus(gui.Tr.LcInitializingSubmoduleStatus, func() error { - err := gui.GitCommand.WithSpan("Initialise submodule").SubmoduleInit(submodule.Path) + err := gui.GitCommand.WithSpan(gui.Tr.Spans.InitialiseSubmodule).SubmoduleInit(submodule.Path) gui.handleCredentialsPopup(err) return gui.refreshSidePanels(refreshOptions{scope: []RefreshableView{SUBMODULES}}) @@ -216,7 +216,7 @@ func (gui *Gui) handleBulkSubmoduleActionsMenu() error { displayStrings: []string{gui.Tr.LcBulkInitSubmodules, utils.ColoredString(gui.GitCommand.SubmoduleBulkInitCmdStr(), color.FgGreen)}, onPress: func() error { return gui.WithWaitingStatus(gui.Tr.LcRunningCommand, func() error { - if err := gui.OSCommand.WithSpan("Bulk initialise submodules").RunCommand(gui.GitCommand.SubmoduleBulkInitCmdStr()); err != nil { + if err := gui.OSCommand.WithSpan(gui.Tr.Spans.BulkInitialiseSubmodules).RunCommand(gui.GitCommand.SubmoduleBulkInitCmdStr()); err != nil { return gui.surfaceError(err) } @@ -228,7 +228,7 @@ func (gui *Gui) handleBulkSubmoduleActionsMenu() error { displayStrings: []string{gui.Tr.LcBulkUpdateSubmodules, utils.ColoredString(gui.GitCommand.SubmoduleBulkUpdateCmdStr(), color.FgYellow)}, onPress: func() error { return gui.WithWaitingStatus(gui.Tr.LcRunningCommand, func() error { - if err := gui.OSCommand.WithSpan("Bulk update submodules").RunCommand(gui.GitCommand.SubmoduleBulkUpdateCmdStr()); err != nil { + if err := gui.OSCommand.WithSpan(gui.Tr.Spans.BulkUpdateSubmodules).RunCommand(gui.GitCommand.SubmoduleBulkUpdateCmdStr()); err != nil { return gui.surfaceError(err) } @@ -240,7 +240,7 @@ func (gui *Gui) handleBulkSubmoduleActionsMenu() error { displayStrings: []string{gui.Tr.LcSubmoduleStashAndReset, utils.ColoredString(fmt.Sprintf("git stash in each submodule && %s", gui.GitCommand.SubmoduleForceBulkUpdateCmdStr()), color.FgRed)}, onPress: func() error { return gui.WithWaitingStatus(gui.Tr.LcRunningCommand, func() error { - if err := gui.GitCommand.WithSpan("Bulk stash and reset submodules").ResetSubmodules(gui.State.Submodules); err != nil { + if err := gui.GitCommand.WithSpan(gui.Tr.Spans.BulkStashAndResetSubmodules).ResetSubmodules(gui.State.Submodules); err != nil { return gui.surfaceError(err) } @@ -252,7 +252,7 @@ func (gui *Gui) handleBulkSubmoduleActionsMenu() error { displayStrings: []string{gui.Tr.LcBulkDeinitSubmodules, utils.ColoredString(gui.GitCommand.SubmoduleBulkDeinitCmdStr(), color.FgRed)}, onPress: func() error { return gui.WithWaitingStatus(gui.Tr.LcRunningCommand, func() error { - if err := gui.OSCommand.WithSpan("Bulk deinitialise submodules").RunCommand(gui.GitCommand.SubmoduleBulkDeinitCmdStr()); err != nil { + if err := gui.OSCommand.WithSpan(gui.Tr.Spans.BulkDeinitialiseSubmodules).RunCommand(gui.GitCommand.SubmoduleBulkDeinitCmdStr()); err != nil { return gui.surfaceError(err) } @@ -267,7 +267,7 @@ func (gui *Gui) handleBulkSubmoduleActionsMenu() error { func (gui *Gui) handleUpdateSubmodule(submodule *models.SubmoduleConfig) error { return gui.WithWaitingStatus(gui.Tr.LcUpdatingSubmoduleStatus, func() error { - err := gui.GitCommand.WithSpan("Update submodule").SubmoduleUpdate(submodule.Path) + err := gui.GitCommand.WithSpan(gui.Tr.Spans.UpdateSubmodule).SubmoduleUpdate(submodule.Path) gui.handleCredentialsPopup(err) return gui.refreshSidePanels(refreshOptions{scope: []RefreshableView{SUBMODULES}}) |