From 93729ba61bc374c1ffa3d8a521ff75796fb899a2 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 6 Jan 2022 11:44:41 +1100 Subject: fix some things --- pkg/commands/oscommands/os.go | 1 - pkg/gui/commits_panel.go | 4 +--- pkg/gui/pull_request_menu_panel.go | 2 +- pkg/i18n/english.go | 6 ++++-- 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'pkg') diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go index bf1bb9ac6..5beb5da81 100644 --- a/pkg/commands/oscommands/os.go +++ b/pkg/commands/oscommands/os.go @@ -100,7 +100,6 @@ func (c *OSCommand) OpenFile(filename string) error { } func (c *OSCommand) OpenLink(link string) error { - c.LogCommand(fmt.Sprintf("Opening link '%s'", link), false) commandTemplate := c.UserConfig.OS.OpenLinkCommand templateValues := map[string]string{ "link": c.Quote(link), diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 76f81022e..3e3bf3dca 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -814,12 +814,10 @@ func (gui *Gui) handleOpenCommitInBrowser() error { return gui.surfaceError(err) } + gui.logAction(gui.Tr.Actions.OpenCommitInBrowser) if err := gui.GitCommand.OSCommand.OpenLink(url); err != nil { return gui.surfaceError(err) } - gui.logAction(gui.Tr.CreatePullRequest) - gui.logCommand(fmt.Sprintf(gui.Tr.OpeningCommitInBrowser, url), false) - return nil } diff --git a/pkg/gui/pull_request_menu_panel.go b/pkg/gui/pull_request_menu_panel.go index efc72dc46..3bbda6f0a 100644 --- a/pkg/gui/pull_request_menu_panel.go +++ b/pkg/gui/pull_request_menu_panel.go @@ -61,7 +61,7 @@ func (gui *Gui) createPullRequest(from string, to string) error { return gui.surfaceError(err) } - gui.logAction(gui.Tr.CreatePullRequest) + gui.logAction(gui.Tr.Actions.OpenPullRequest) if err := gui.GitCommand.OSCommand.OpenLink(url); err != nil { return gui.surfaceError(err) diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index da87f0d10..7ab71465f 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -438,7 +438,6 @@ type TranslationSet struct { LcDefaultBranch string LcSelectBranch string CreatePullRequest string - OpeningCommitInBrowser string SelectConfigFile string NoConfigFileFoundErr string LcLoadingFileSuggestions string @@ -541,6 +540,8 @@ type Actions struct { Redo string CopyPullRequestURL string OpenMergeTool string + OpenCommitInBrowser string + OpenPullRequest string } const englishIntroPopupMessage = ` @@ -990,7 +991,6 @@ func EnglishTranslationSet() TranslationSet { LcCreatePullRequestOptions: "create pull request options", LcDefaultBranch: "default branch", LcSelectBranch: "select branch", - OpeningCommitInBrowser: "Opening commit in browser at URL: %s", SelectConfigFile: "Select config file", NoConfigFileFoundErr: "No config file found", LcLoadingFileSuggestions: "loading file suggestions", @@ -1091,6 +1091,8 @@ func EnglishTranslationSet() TranslationSet { Redo: "Redo", CopyPullRequestURL: "Copy pull request URL", OpenMergeTool: "Open merge tool", + OpenCommitInBrowser: "Open commit in browser", + OpenPullRequest: "Open pull request in browser", }, } } -- cgit v1.2.3