summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-10-10 22:05:32 +0800
committerGitHub <noreply@github.com>2022-10-10 15:05:32 +0100
commit23b6827151bbd85b645d2c74273410c100fc65e6 (patch)
tree4321fe290fdd3ff510f4cbdd3658c3e8eb28c8ac /templates/repo
parent7044d34ae577b54d42ea5dee13faa772036e9a77 (diff)
downloadgitea-23b6827151bbd85b645d2c74273410c100fc65e6.tar.gz
gitea-23b6827151bbd85b645d2c74273410c100fc65e6.zip
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.
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/issue/list.tmpl8
-rw-r--r--templates/repo/issue/milestone_issues.tmpl4
-rw-r--r--templates/repo/settings/webhook/settings.tmpl4
3 files changed, 8 insertions, 8 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 60a3c0d361..3df7dbca69 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -47,7 +47,7 @@
<div class="menu">
<div class="ui icon search input">
<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>
<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>
@@ -66,7 +66,7 @@
<div class="menu">
<div class="ui icon search input">
<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>
<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}}
@@ -84,7 +84,7 @@
<div class="menu">
<div class="ui icon search input">
<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>
<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}}
@@ -104,7 +104,7 @@
<div class="menu">
<div class="ui icon search input">
<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>
<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}}
diff --git a/templates/repo/issue/milestone_issues.tmpl b/templates/repo/issue/milestone_issues.tmpl
index ea03c2a16c..ba229cb5e8 100644
--- a/templates/repo/issue/milestone_issues.tmpl
+++ b/templates/repo/issue/milestone_issues.tmpl
@@ -53,7 +53,7 @@
<div class="menu">
<div class="ui icon search input">
<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>
<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>
@@ -88,7 +88,7 @@
<div class="menu">
<div class="ui icon search input">
<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>
<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}}
diff --git a/templates/repo/settings/webhook/settings.tmpl b/templates/repo/settings/webhook/settings.tmpl
index 57cf8a2f30..1543bef6ca 100644
--- a/templates/repo/settings/webhook/settings.tmpl
+++ b/templates/repo/settings/webhook/settings.tmpl
@@ -103,8 +103,8 @@
<div class="field">
<div class="ui checkbox">
<input class="hidden" name="wiki" type="checkbox" tabindex="0" {{if .Webhook.Wiki}}checked{{end}}>
- <label>{{.i18n.Tr "repo.settings.event_wiki"}}</label>
- <span class="help">{{.i18n.Tr "repo.settings.event_wiki_desc"}}</span>
+ <label>{{.locale.Tr "repo.settings.event_wiki"}}</label>
+ <span class="help">{{.locale.Tr "repo.settings.event_wiki_desc"}}</span>
</div>
</div>
</div>