diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-07-15 13:06:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-15 13:06:16 +0200 |
commit | 6103a4d13c5300bf071573df69b4f295dc819fe0 (patch) | |
tree | 8f21f1fe31e8b59453396ca394ab2a7f2fab605d | |
parent | bfcff3222c732bc410e4a84f8c2735dc83065587 (diff) | |
parent | 69575dd4f3911b3968e37b75e9bad15cc90770d9 (diff) |
Fix potentially wrong help text in commit message panel (#2777)
-rw-r--r-- | pkg/gui/views.go | 7 | ||||
-rw-r--r-- | pkg/i18n/english.go | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/pkg/gui/views.go b/pkg/gui/views.go index 15bd3c867..8567af797 100644 --- a/pkg/gui/views.go +++ b/pkg/gui/views.go @@ -3,7 +3,9 @@ package gui import ( "github.com/jesseduffield/generics/slices" "github.com/jesseduffield/gocui" + "github.com/jesseduffield/lazygit/pkg/gui/keybindings" "github.com/jesseduffield/lazygit/pkg/theme" + "github.com/jesseduffield/lazygit/pkg/utils" ) type viewNameMapping struct { @@ -159,7 +161,10 @@ func (gui *Gui) createAllViews() error { gui.Views.CommitDescription.Visible = false gui.Views.CommitDescription.Title = gui.c.Tr.CommitDescriptionTitle - gui.Views.CommitDescription.Subtitle = gui.Tr.CommitDescriptionSubTitle + gui.Views.CommitDescription.Subtitle = utils.ResolvePlaceholderString(gui.Tr.CommitDescriptionSubTitle, + map[string]string{ + "togglePanelKeyBinding": keybindings.Label(gui.UserConfig.Keybinding.Universal.TogglePanel), + }) gui.Views.CommitDescription.FgColor = theme.GocuiDefaultTextColor gui.Views.CommitDescription.Editable = true gui.Views.CommitDescription.Editor = gocui.EditorFunc(gui.commitDescriptionEditor) diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index f916c3c4d..5f937057d 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -886,7 +886,7 @@ func EnglishTranslationSet() TranslationSet { RebaseOptionsTitle: "Rebase options", CommitMessageTitle: "Commit summary", CommitDescriptionTitle: "Commit description", - CommitDescriptionSubTitle: "Press tab to toggle focus", + CommitDescriptionSubTitle: "Press {{.togglePanelKeyBinding}} to toggle focus", LocalBranchesTitle: "Local branches", SearchTitle: "Search", TagsTitle: "Tags", |