From 917cfd758689064d5af52c3393f41bb0f731625e Mon Sep 17 00:00:00 2001 From: Karl Heitmann Date: Mon, 31 Jul 2023 19:57:14 -0400 Subject: [PATCH] Adds EditRebaseFromBaseCommit log message to i18n --- pkg/commands/git_commands/rebase.go | 9 ++++- pkg/i18n/english.go | 54 +++++++++++++++-------------- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/pkg/commands/git_commands/rebase.go b/pkg/commands/git_commands/rebase.go index dd76d057901..5732bc0d33d 100644 --- a/pkg/commands/git_commands/rebase.go +++ b/pkg/commands/git_commands/rebase.go @@ -175,7 +175,14 @@ func (self *RebaseCommands) EditRebase(branchRef string) error { } func (self *RebaseCommands) EditRebaseFromBaseCommit(targetBranchName string, baseCommit string) error { - self.os.LogCommand(fmt.Sprintf("Beginning interactive rebase from '%s' onto '%s", baseCommit, targetBranchName), false) + msg := utils.ResolvePlaceholderString( + self.Tr.Log.EditRebaseFromBaseCommit, + map[string]string{ + "baseCommit": baseCommit, + "targetBranchName": targetBranchName, + }, + ) + self.os.LogCommand(msg, false) return self.PrepareInteractiveRebaseCommand(PrepareInteractiveRebaseCommandOpts{ baseShaOrRoot: baseCommit, onto: targetBranchName, diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 5a560bd5404..6dee0046766 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -611,19 +611,20 @@ type Bisect struct { } type Log struct { - EditRebase string - MoveCommitUp string - MoveCommitDown string - CherryPickCommits string - HandleUndo string - HandleMidRebaseCommand string - MovingCommitUp string - MovingCommitDown string - RemoveFile string - CopyToClipboard string - Remove string - CreateFileWithContent string - AppendingLineToFile string + EditRebase string + MoveCommitUp string + MoveCommitDown string + CherryPickCommits string + HandleUndo string + HandleMidRebaseCommand string + MovingCommitUp string + MovingCommitDown string + RemoveFile string + CopyToClipboard string + Remove string + CreateFileWithContent string + AppendingLineToFile string + EditRebaseFromBaseCommit string } type Actions struct { @@ -1474,19 +1475,20 @@ func EnglishTranslationSet() TranslationSet { Bisecting: "Bisecting", }, Log: Log{ - EditRebase: "Beginning interactive rebase at '{{.ref}}'", - MoveCommitUp: "Moving TODO down: '{{.shortSha}}'", - MoveCommitDown: "Moving TODO down: '{{.shortSha}}'", - CherryPickCommits: "Cherry-picking commits:\n'{{.commitLines}}'", - HandleUndo: "Undoing last conflict resolution", - HandleMidRebaseCommand: "Updating rebase action of commit {{.shortSha}} to '{{.action}}'", - MovingCommitUp: "Moving commit {{.shortSha}} up", - MovingCommitDown: "Moving commit {{.shortSha}} down", - RemoveFile: "Deleting path '{{.path}}'", - CopyToClipboard: "Copying '{{.str}}' to clipboard", - Remove: "Removing '{{.filename}}'", - CreateFileWithContent: "Creating file '{{.path}}'", - AppendingLineToFile: "Appending '{{.line}}' to file '{{.filename}}'", + EditRebase: "Beginning interactive rebase at '{{.ref}}'", + MoveCommitUp: "Moving TODO down: '{{.shortSha}}'", + MoveCommitDown: "Moving TODO down: '{{.shortSha}}'", + CherryPickCommits: "Cherry-picking commits:\n'{{.commitLines}}'", + HandleUndo: "Undoing last conflict resolution", + HandleMidRebaseCommand: "Updating rebase action of commit {{.shortSha}} to '{{.action}}'", + MovingCommitUp: "Moving commit {{.shortSha}} up", + MovingCommitDown: "Moving commit {{.shortSha}} down", + RemoveFile: "Deleting path '{{.path}}'", + CopyToClipboard: "Copying '{{.str}}' to clipboard", + Remove: "Removing '{{.filename}}'", + CreateFileWithContent: "Creating file '{{.path}}'", + AppendingLineToFile: "Appending '{{.line}}' to file '{{.filename}}'", + EditRebaseFromBaseCommit: "Beginning interactive rebase from '{{.baseCommit}}' onto '{{.targetBranchName}}", }, } }