From 7918858023ee8975d525d804d174b1b51dc32828 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 30 Mar 2026 18:23:43 +0200 Subject: [PATCH] Localize "Dropping stash" log This was forgotten in #4850. --- pkg/gui/controllers/stash_controller.go | 6 ++++-- pkg/i18n/english.go | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/gui/controllers/stash_controller.go b/pkg/gui/controllers/stash_controller.go index 7027cd5fe..20dc2826e 100644 --- a/pkg/gui/controllers/stash_controller.go +++ b/pkg/gui/controllers/stash_controller.go @@ -1,6 +1,8 @@ package controllers import ( + "fmt" + "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/style" @@ -129,7 +131,7 @@ func (self *StashController) handleStashApply(stashEntry *models.StashEntry) err func (self *StashController) handleStashPop(stashEntry *models.StashEntry) error { pop := func() error { self.c.LogAction(self.c.Tr.Actions.PopStash) - self.c.LogCommand("Popping stash "+stashEntry.Hash, false) + self.c.LogCommand(fmt.Sprintf(self.c.Tr.Log.PoppingStash, stashEntry.Hash), false) err := self.c.Git().Stash.Pop(stashEntry.Index) self.postStashRefresh() if err != nil { @@ -163,7 +165,7 @@ func (self *StashController) handleStashDrop(stashEntries []*models.StashEntry) HandleConfirm: func() error { self.c.LogAction(self.c.Tr.Actions.DropStash) for i := len(stashEntries) - 1; i >= 0; i-- { - self.c.LogCommand("Dropping stash "+stashEntries[i].Hash, false) + self.c.LogCommand(fmt.Sprintf(self.c.Tr.Log.DroppingStash, stashEntries[i].Hash), false) err := self.c.Git().Stash.Drop(stashEntries[i].Index) self.c.Refresh(types.RefreshOptions{Scope: []types.RefreshableView{types.STASH}}) if err != nil { diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 079f6c991..8d4ced26e 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -963,6 +963,8 @@ type Log struct { CreateFileWithContent string AppendingLineToFile string EditRebaseFromBaseCommit string + DroppingStash string + PoppingStash string } type Actions struct { @@ -2197,6 +2199,8 @@ func EnglishTranslationSet() *TranslationSet { CreateFileWithContent: "Creating file '{{.path}}'", AppendingLineToFile: "Appending '{{.line}}' to file '{{.filename}}'", EditRebaseFromBaseCommit: "Beginning interactive rebase from '{{.baseCommit}}' onto '{{.targetBranchName}}", + DroppingStash: "Dropping stash %s", + PoppingStash: "Popping stash %s", }, BreakingChangesTitle: "Breaking Changes", BreakingChangesMessage: `You are updating to a new version of lazygit which contains breaking changes. Please review the notes below and update your configuration if necessary.