diff --git a/pkg/gui/controllers/undo_controller.go b/pkg/gui/controllers/undo_controller.go index b7979d2b6..ecff5bea8 100644 --- a/pkg/gui/controllers/undo_controller.go +++ b/pkg/gui/controllers/undo_controller.go @@ -260,7 +260,7 @@ func (self *UndoController) hardResetWithAutoStash(commitHash string, options ha dirtyWorkingTree := self.c.Helpers().WorkingTree.IsWorkingTreeDirty() if dirtyWorkingTree { return self.c.WithWaitingStatus(options.WaitingStatus, func(gocui.Task) error { - if err := self.c.Git().Stash.Push(self.c.Tr.StashPrefix + commitHash); err != nil { + if err := self.c.Git().Stash.Push(fmt.Sprintf(self.c.Tr.AutoStashForUndo, utils.ShortHash(commitHash))); err != nil { return err } if err := reset(); err != nil { diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index ca7377a8e..9c6663d9a 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -448,6 +448,7 @@ type TranslationSet struct { AutoStashTitle string AutoStashPrompt string StashPrefix string + AutoStashForUndo string Discard string DiscardChangesTitle string DiscardFileChangesTooltip string @@ -1541,6 +1542,7 @@ func EnglishTranslationSet() *TranslationSet { AutoStashTitle: "Autostash?", AutoStashPrompt: "You must stash and pop your changes to bring them across. Do this automatically? (enter/esc)", StashPrefix: "Auto-stashing changes for ", + AutoStashForUndo: "Auto-stashing changes for undoing to %s", Discard: "Discard", DiscardFileChangesTooltip: "View options for discarding changes to the selected file.", DiscardChangesTitle: "Discard changes",