File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2769,6 +2769,10 @@ branch.new_branch_from = Create new branch from "%s"
2769
2769
branch.renamed = Branch %s was renamed to %s.
2770
2770
branch.rename_default_or_protected_branch_error = Only admins can rename default or protected branches.
2771
2771
branch.rename_protected_branch_failed = This branch is protected by glob-based protection rules.
2772
+ branch.commits_ahead_1 = %d commit ahead of %s
2773
+ branch.commits_ahead_n = %d commits ahead of %s
2774
+ branch.commits_behind_1 = %d commit behind %s
2775
+ branch.commits_behind_n = %d commits behind %s
2772
2776
2773
2777
tag.create_tag = Create tag %s
2774
2778
tag.create_tag_operation = Create tag
Original file line number Diff line number Diff line change 110
110
{{if and (not .DBBranch.IsDeleted) $.DefaultBranchBranch}}
111
111
<div class="commit-divergence">
112
112
<div class="bar-group">
113
- <div class="count count-behind" data-tooltip-content="{{.CommitsBehind}} {{if eq .CommitsBehind 1}}commit {{else}}commits{{end}} behind {{ $.DefaultBranchBranch.DBBranch.Name}}">{{.CommitsBehind}}</div>
113
+ <div class="count count-behind" data-tooltip-content="{{if eq .CommitsBehind 1}}{{ctx.Locale.Tr "repo.branch.commits_behind_1" .CommitsBehind $.DefaultBranchBranch.DBBranch.Name}} {{else}}{{ctx.Locale.Tr "repo.branch.commits_behind_n" .CommitsBehind $.DefaultBranchBranch.DBBranch.Name}}{{end }}">{{.CommitsBehind}}</div>
114
114
{{/* old code bears 0/0.0 = NaN output, so it might output invalid "width: NaNpx", it just works and doesn't caues any problem. */}}
115
115
<div class="bar bar-behind" style="width: {{Eval 100 "*" .CommitsBehind "/" "(" .CommitsBehind "+" .CommitsAhead "+" 0.0 ")"}}%"></div>
116
116
</div>
117
117
<div class="bar-group">
118
- <div class="count count-ahead" data-tooltip-content="{{.CommitsAhead}} {{if eq .CommitsAhead 1}}commit {{else}}commits{{end}} ahead of {{ $.DefaultBranchBranch.DBBranch.Name}}">{{.CommitsAhead}}</div>
118
+ <div class="count count-ahead" data-tooltip-content="{{if eq .CommitsAhead 1}}{{ctx.Locale.Tr "repo.branch.commits_ahead_1" .CommitsAhead $.DefaultBranchBranch.DBBranch.Name}} {{else}}{{ctx.Locale.Tr "repo.branch.commits_ahead_n" .CommitsAhead $.DefaultBranchBranch.DBBranch.Name}}{{end }}">{{.CommitsAhead}}</div>
119
119
<div class="bar bar-ahead" style="width: {{Eval 100 "*" .CommitsAhead "/" "(" .CommitsBehind "+" .CommitsAhead "+" 0.0 ")"}}%"></div>
120
120
</div>
121
121
</div>
You can’t perform that action at this time.
0 commit comments