aboutsummaryrefslogtreecommitdiffstats
path: root/templates/package/view.tmpl
diff options
context:
space:
mode:
authordelvh <dev.lh@web.de>2023-09-25 10:56:50 +0200
committerGitHub <noreply@github.com>2023-09-25 08:56:50 +0000
commit7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e (patch)
treecfcc4836ba1bb71518742f2aaf980f1f34248468 /templates/package/view.tmpl
parente6d8b146207de0f5d88b7c08dc75b1f2f078cbbe (diff)
downloadgitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.tar.gz
gitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.zip
Always use `ctx.Locale.Tr` inside templates (#27231)
Diffstat (limited to 'templates/package/view.tmpl')
-rw-r--r--templates/package/view.tmpl16
1 files changed, 8 insertions, 8 deletions
diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl
index 2f22b4ec2a..8856dbf930 100644
--- a/templates/package/view.tmpl
+++ b/templates/package/view.tmpl
@@ -10,9 +10,9 @@
<div>
{{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}}
{{if .HasRepositoryAccess}}
- {{.locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.Link (.PackageDescriptor.Repository.FullName | Escape) | Safe}}
+ {{ctx.Locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.Link (.PackageDescriptor.Repository.FullName | Escape) | Safe}}
{{else}}
- {{.locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}}
+ {{ctx.Locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}}
{{end}}
</div>
</div>
@@ -41,7 +41,7 @@
{{template "package/content/vagrant" .}}
</div>
<div class="issue-content-right ui segment">
- <strong>{{.locale.Tr "packages.details"}}</strong>
+ <strong>{{ctx.Locale.Tr "packages.details"}}</strong>
<div class="ui relaxed list">
<div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "gt-mr-3"}} {{.PackageDescriptor.Package.Type.Name}}</div>
{{if .HasRepositoryAccess}}
@@ -75,7 +75,7 @@
</div>
{{if not (eq .PackageDescriptor.Package.Type "container")}}
<div class="divider"></div>
- <strong>{{.locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong>
+ <strong>{{ctx.Locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong>
<div class="ui relaxed list">
{{range .PackageDescriptor.Files}}
<div class="item">
@@ -86,8 +86,8 @@
</div>
{{end}}
<div class="divider"></div>
- <strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong>
- <a class="gt-float-right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a>
+ <strong>{{ctx.Locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong>
+ <a class="gt-float-right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{ctx.Locale.Tr "packages.versions.view_all"}}</a>
<div class="ui relaxed list">
{{range .LatestVersions}}
<div class="item gt-df">
@@ -100,10 +100,10 @@
<div class="divider"></div>
<div class="ui relaxed list">
{{if .HasRepositoryAccess}}
- <div class="item">{{svg "octicon-issue-opened" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{.locale.Tr "repo.issues"}}</a></div>
+ <div class="item">{{svg "octicon-issue-opened" 16 "gt-mr-3"}} <a href="{{.PackageDescriptor.Repository.Link}}/issues">{{ctx.Locale.Tr "repo.issues"}}</a></div>
{{end}}
{{if .CanWritePackages}}
- <div class="item">{{svg "octicon-tools" 16 "gt-mr-3"}} <a href="{{.Link}}/settings">{{.locale.Tr "repo.settings"}}</a></div>
+ <div class="item">{{svg "octicon-tools" 16 "gt-mr-3"}} <a href="{{.Link}}/settings">{{ctx.Locale.Tr "repo.settings"}}</a></div>
{{end}}
</div>
{{end}}