Skip to content

Commit

Permalink
Adds EditRebaseFromBaseCommit log message to i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlHeitmann committed Jul 31, 2023
1 parent b7ba06f commit 917cfd7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 27 deletions.
9 changes: 8 additions & 1 deletion pkg/commands/git_commands/rebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
54 changes: 28 additions & 26 deletions pkg/i18n/english.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}}",
},
}
}

0 comments on commit 917cfd7

Please sign in to comment.