Backport ctx locale refactoring manually (#27231) (#27259) (#27260)

Backport #27231 #27259 manually

---------

Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
wxiaoguang
2023-09-25 21:15:51 +08:00
committed by GitHub
parent 2774a2afc6
commit 597b04fe2f
314 changed files with 3888 additions and 3889 deletions

View File

@@ -2,10 +2,10 @@
<table class="ui very basic striped table unstackable" id="commits-table">
<thead>
<tr>
<th class="three wide">{{.locale.Tr "repo.commits.author"}}</th>
<th class="three wide">{{ctx.Locale.Tr "repo.commits.author"}}</th>
<th class="two wide sha">SHA1</th>
<th class="nine wide message">{{.locale.Tr "repo.commits.message"}}</th>
<th class="two wide right aligned">{{.locale.Tr "repo.commits.date"}}</th>
<th class="nine wide message">{{ctx.Locale.Tr "repo.commits.message"}}</th>
<th class="two wide right aligned">{{ctx.Locale.Tr "repo.commits.date"}}</th>
</tr>
</thead>
<tbody class="commit-list">
@@ -72,9 +72,9 @@
{{end}}
</td>
{{if .Committer}}
<td class="text right aligned">{{TimeSince .Committer.When $.locale}}</td>
<td class="text right aligned">{{TimeSince .Committer.When ctx.Locale}}</td>
{{else}}
<td class="text right aligned">{{TimeSince .Author.When $.locale}}</td>
<td class="text right aligned">{{TimeSince .Author.When ctx.Locale}}</td>
{{end}}
</tr>
{{end}}