summaryrefslogtreecommitdiffstats
path: root/pkg/git/commit_list_builder.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-02-20 22:52:17 +1100
committerJesse Duffield Duffield <jesseduffieldduffield@Jesses-MacBook-Pro-3.local>2019-02-24 09:42:35 +1100
commit6c1d2d45ef2d001e28ec31095826422ba7461664 (patch)
tree857cea81552243eb28cd76cb8521f6afc6464c27 /pkg/git/commit_list_builder.go
parentf6b3a9b1842438ece889ce4ef7045365325e53fe (diff)
some i18n and restricting rewording during interactive rebase
Diffstat (limited to 'pkg/git/commit_list_builder.go')
-rw-r--r--pkg/git/commit_list_builder.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/git/commit_list_builder.go b/pkg/git/commit_list_builder.go
index df44908a7..78ba4b80f 100644
--- a/pkg/git/commit_list_builder.go
+++ b/pkg/git/commit_list_builder.go
@@ -10,6 +10,7 @@ import (
"github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/commands"
+ "github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/jesseduffield/lazygit/pkg/utils"
"github.com/sirupsen/logrus"
)
@@ -28,14 +29,16 @@ type CommitListBuilder struct {
Log *logrus.Entry
GitCommand *commands.GitCommand
OSCommand *commands.OSCommand
+ Tr *i18n.Localizer
}
// NewCommitListBuilder builds a new commit list builder
-func NewCommitListBuilder(log *logrus.Entry, gitCommand *commands.GitCommand, osCommand *commands.OSCommand) (*CommitListBuilder, error) {
+func NewCommitListBuilder(log *logrus.Entry, gitCommand *commands.GitCommand, osCommand *commands.OSCommand, tr *i18n.Localizer) (*CommitListBuilder, error) {
return &CommitListBuilder{
Log: log,
GitCommand: gitCommand,
OSCommand: osCommand,
+ Tr: tr,
}, nil
}
@@ -77,7 +80,7 @@ func (c *CommitListBuilder) GetCommits() ([]*commands.Commit, error) {
if rebaseMode != "" {
currentCommit := commits[len(rebasingCommits)]
blue := color.New(color.FgYellow)
- youAreHere := blue.Sprint("<-- YOU ARE HERE ---")
+ youAreHere := blue.Sprintf("<-- %s ---", c.Tr.SLocalize("YouAreHere"))
currentCommit.Name = fmt.Sprintf("%s %s", youAreHere, currentCommit.Name)
}
return c.setCommitMergedStatuses(commits)