Skip to content

Commit a2cf202

Browse files
committed
convert to ctx.Locale.Tr
1 parent 5efcc51 commit a2cf202

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

templates/repo/pulls/status.tmpl

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{{/*
22
Template Attributes:
3-
* locale: passed through for localization
43
* CommitStatus: summary of all commit status state
54
* CommitStatuses: all commit status elements
65
* IsTippy: whether this template is the content of tippy
@@ -11,25 +10,25 @@ Template Attributes:
1110
<div class="{{if .IsTippy}}tippy-commit-status{{else}}pr-commit-status{{end}}">
1211
<div class="ui attached header top">
1312
{{if eq .CommitStatus.State "pending"}}
14-
{{.locale.Tr "repo.pulls.status_checking"}}
13+
{{ctx.Locale.Tr "repo.pulls.status_checking"}}
1514
{{else if eq .CommitStatus.State "success"}}
16-
{{.locale.Tr "repo.pulls.status_checks_success"}}
15+
{{ctx.Locale.Tr "repo.pulls.status_checks_success"}}
1716
{{else if eq .CommitStatus.State "warning"}}
18-
{{.locale.Tr "repo.pulls.status_checks_warning"}}
17+
{{ctx.Locale.Tr "repo.pulls.status_checks_warning"}}
1918
{{else if eq .CommitStatus.State "failure"}}
20-
{{.locale.Tr "repo.pulls.status_checks_failure"}}
19+
{{ctx.Locale.Tr "repo.pulls.status_checks_failure"}}
2120
{{else if eq .CommitStatus.State "error"}}
22-
{{.locale.Tr "repo.pulls.status_checks_error"}}
21+
{{ctx.Locale.Tr "repo.pulls.status_checks_error"}}
2322
{{else}}
24-
{{.locale.Tr "repo.pulls.status_checking"}}
23+
{{ctx.Locale.Tr "repo.pulls.status_checking"}}
2524
{{end}}
2625

2726
{{if not .IsTippy}}
2827
<div class="ui right">
2928
<a class="hide-all-checks muted"
30-
data-show-all="{{.locale.Tr "repo.pulls.status_checks_show_all"}}"
31-
data-hide-all="{{.locale.Tr "repo.pulls.status_checks_hide_all"}}">
32-
{{.locale.Tr "repo.pulls.status_checks_hide_all"}}</a>
29+
data-show-all="{{ctx.Locale.Tr "repo.pulls.status_checks_show_all"}}"
30+
data-hide-all="{{ctx.Locale.Tr "repo.pulls.status_checks_hide_all"}}">
31+
{{ctx.Locale.Tr "repo.pulls.status_checks_hide_all"}}</a>
3332
</div>
3433
{{end}}
3534
</div>
@@ -42,9 +41,9 @@ Template Attributes:
4241
<span>{{.Context}} <span class="text grey">{{.Description}}</span></span>
4342
<div class="ui status-details">
4443
{{if $.is_context_required}}
45-
{{if (call $.is_context_required .Context)}}<div class="ui label">{{$.locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
44+
{{if (call $.is_context_required .Context)}}<div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
4645
{{end}}
47-
<span>{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
46+
<span>{{if .TargetURL}}<a href="{{.TargetURL}}">{{ctx.Locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
4847
</div>
4948
</div>
5049
</div>

0 commit comments

Comments
 (0)