From 241d182da7d589e4a30520ff8d9ea4143c9e658a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Marku=C5=A1i=C4=87?= Date: Sun, 15 May 2022 12:16:20 +0200 Subject: [PATCH] Make tooltip i18n-able --- pkg/gui/controllers/workspace_reset_controller.go | 2 +- pkg/i18n/english.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/gui/controllers/workspace_reset_controller.go b/pkg/gui/controllers/workspace_reset_controller.go index 93277173b..f34739af7 100644 --- a/pkg/gui/controllers/workspace_reset_controller.go +++ b/pkg/gui/controllers/workspace_reset_controller.go @@ -69,7 +69,7 @@ func (self *FilesController) createResetMenu() error { self.c.Tr.LcDiscardStagedChanges, red.Sprint("stash staged and drop stash"), }, - Tooltip: "This will create a new stash entry containing only staged files and then drop it.", + Tooltip: self.c.Tr.DiscardStagedChangesDescription, OnPress: func() error { self.c.LogAction(self.c.Tr.Actions.RemoveStagedFiles) if !self.helpers.WorkingTree.IsWorkingTreeDirty() { diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 4a2f2f7b9..ee14b8193 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -492,6 +492,7 @@ type TranslationSet struct { HardResetAutostashPrompt string UpstreamGone string NukeDescription string + DiscardStagedChangesDescription string Actions Actions Bisect Bisect } @@ -1112,6 +1113,7 @@ func EnglishTranslationSet() TranslationSet { CheckoutPrompt: "Are you sure you want to checkout '%s'?", UpstreamGone: "(upstream gone)", NukeDescription: "If you want to make all the changes in the worktree go away, this is the way to do it. If there are dirty submodule changes this will stash those changes in the submodule(s).", + DiscardStagedChangesDescription: "This will create a new stash entry containing only staged files and then drop it, so that the working tree is left with only unstaged changes", Actions: Actions{ // TODO: combine this with the original keybinding descriptions (those are all in lowercase atm) CheckoutCommit: "Checkout commit",