mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Always use ctx.Locale.Tr
inside templates (#27231)
This commit is contained in:
@@ -24,17 +24,17 @@
|
||||
|
||||
<script type="module">
|
||||
const data = {
|
||||
'textReleaseCompare': {{.root.locale.Tr "repo.release.compare"}},
|
||||
'textCreateTag': {{.root.locale.Tr "repo.tag.create_tag"}},
|
||||
'textCreateBranch': {{.root.locale.Tr "repo.branch.create_branch"}},
|
||||
'textCreateBranchFrom': {{.root.locale.Tr "repo.branch.create_from"}},
|
||||
'textBranches': {{.root.locale.Tr "repo.branches"}},
|
||||
'textTags': {{.root.locale.Tr "repo.tags"}},
|
||||
'textDefaultBranchLabel': {{.root.locale.Tr "repo.default_branch_label"}},
|
||||
'textReleaseCompare': {{ctx.Locale.Tr "repo.release.compare"}},
|
||||
'textCreateTag': {{ctx.Locale.Tr "repo.tag.create_tag"}},
|
||||
'textCreateBranch': {{ctx.Locale.Tr "repo.branch.create_branch"}},
|
||||
'textCreateBranchFrom': {{ctx.Locale.Tr "repo.branch.create_from"}},
|
||||
'textBranches': {{ctx.Locale.Tr "repo.branches"}},
|
||||
'textTags': {{ctx.Locale.Tr "repo.tags"}},
|
||||
'textDefaultBranchLabel': {{ctx.Locale.Tr "repo.default_branch_label"}},
|
||||
|
||||
'mode': '{{if or .root.IsViewTag .isTag}}tags{{else}}branches{{end}}',
|
||||
'showBranchesInDropdown': {{$showBranchesInDropdown}},
|
||||
'searchFieldPlaceholder': '{{if $.noTag}}{{.root.locale.Tr "repo.pulls.filter_branch"}}{{else if $showBranchesInDropdown}}{{.root.locale.Tr "repo.filter_branch_and_tag"}}{{else}}{{.root.locale.Tr "repo.find_tag"}}{{end}}...',
|
||||
'searchFieldPlaceholder': '{{if $.noTag}}{{ctx.Locale.Tr "repo.pulls.filter_branch"}}{{else if $showBranchesInDropdown}}{{ctx.Locale.Tr "repo.filter_branch_and_tag"}}{{else}}{{ctx.Locale.Tr "repo.find_tag"}}{{end}}...',
|
||||
'branchForm': {{$.branchForm}},
|
||||
'disableCreateBranch': {{if .disableCreateBranch}}{{.disableCreateBranch}}{{else}}{{not .root.CanCreateBranch}}{{end}},
|
||||
'setAction': {{.setAction}},
|
||||
@@ -56,7 +56,7 @@
|
||||
'repoLink': {{.root.RepoLink}},
|
||||
'treePath': {{.root.TreePath}},
|
||||
'branchNameSubURL': {{.root.BranchNameSubURL}},
|
||||
'noResults': {{.root.locale.Tr "repo.pulls.no_results"}},
|
||||
'noResults': {{ctx.Locale.Tr "repo.pulls.no_results"}},
|
||||
};
|
||||
{{if .release}}
|
||||
data.release = {
|
||||
@@ -73,7 +73,7 @@
|
||||
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df gt-m-0">
|
||||
<span class="text gt-df gt-ac gt-mr-2">
|
||||
{{if .release}}
|
||||
{{.root.locale.Tr "repo.release.compare"}}
|
||||
{{ctx.Locale.Tr "repo.release.compare"}}
|
||||
{{else}}
|
||||
{{if eq $type "tag"}}
|
||||
{{svg "octicon-tag"}}
|
||||
|
Reference in New Issue
Block a user