Fix calls to i18n in templates (#21394)

Although the `.i18n` has been refactored to `.locale`, some PRs using
`.i18n` were still merged.

* #20219
* #21246

This PR fixes the calls to `.i18n`.

At the moment, `{{.nosuch.nosuch "..."}}` won't cause template error so
these mistakes don't cause 500 and haven't been found.
tokarchuk/v1.18
wxiaoguang 2 years ago committed by GitHub
parent 7044d34ae5
commit 23b6827151
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      templates/repo/issue/list.tmpl
  2. 4
      templates/repo/issue/milestone_issues.tmpl
  3. 4
      templates/repo/settings/webhook/settings.tmpl

@ -47,7 +47,7 @@
<div class="menu"> <div class="menu">
<div class="ui icon search input"> <div class="ui icon search input">
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i> <i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_label"}}"> <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_label"}}">
</div> </div>
<span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span> <span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a> <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
@ -66,7 +66,7 @@
<div class="menu"> <div class="menu">
<div class="ui icon search input"> <div class="ui icon search input">
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i> <i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_milestone"}}"> <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_milestone"}}">
</div> </div>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_no_select"}}</a> <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_no_select"}}</a>
{{range .Milestones}} {{range .Milestones}}
@ -84,7 +84,7 @@
<div class="menu"> <div class="menu">
<div class="ui icon search input"> <div class="ui icon search input">
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i> <i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_poster"}}"> <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_poster"}}">
</div> </div>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.locale.Tr "repo.issues.filter_poster_no_select"}}</a> <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.locale.Tr "repo.issues.filter_poster_no_select"}}</a>
{{range .Posters}} {{range .Posters}}
@ -104,7 +104,7 @@
<div class="menu"> <div class="menu">
<div class="ui icon search input"> <div class="ui icon search input">
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i> <i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_assignee"}}"> <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignee"}}">
</div> </div>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a> <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
{{range .Assignees}} {{range .Assignees}}

@ -53,7 +53,7 @@
<div class="menu"> <div class="menu">
<div class="ui icon search input"> <div class="ui icon search input">
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i> <i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_label"}}"> <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_label"}}">
</div> </div>
<span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span> <span class="info">{{.locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a> <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_label_no_select"}}</a>
@ -88,7 +88,7 @@
<div class="menu"> <div class="menu">
<div class="ui icon search input"> <div class="ui icon search input">
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i> <i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
<input type="text" placeholder="{{.i18n.Tr "repo.issues.filter_assignee"}}"> <input type="text" placeholder="{{.locale.Tr "repo.issues.filter_assignee"}}">
</div> </div>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a> <a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
{{range .Assignees}} {{range .Assignees}}

@ -103,8 +103,8 @@
<div class="field"> <div class="field">
<div class="ui checkbox"> <div class="ui checkbox">
<input class="hidden" name="wiki" type="checkbox" tabindex="0" {{if .Webhook.Wiki}}checked{{end}}> <input class="hidden" name="wiki" type="checkbox" tabindex="0" {{if .Webhook.Wiki}}checked{{end}}>
<label>{{.i18n.Tr "repo.settings.event_wiki"}}</label> <label>{{.locale.Tr "repo.settings.event_wiki"}}</label>
<span class="help">{{.i18n.Tr "repo.settings.event_wiki_desc"}}</span> <span class="help">{{.locale.Tr "repo.settings.event_wiki_desc"}}</span>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save