diff options
author | delvh <dev.lh@web.de> | 2023-09-25 10:56:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 08:56:50 +0000 |
commit | 7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e (patch) | |
tree | cfcc4836ba1bb71518742f2aaf980f1f34248468 /templates/package/content/helm.tmpl | |
parent | e6d8b146207de0f5d88b7c08dc75b1f2f078cbbe (diff) | |
download | gitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.tar.gz gitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.zip |
Always use `ctx.Locale.Tr` inside templates (#27231)
Diffstat (limited to 'templates/package/content/helm.tmpl')
-rw-r--r-- | templates/package/content/helm.tmpl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/templates/package/content/helm.tmpl b/templates/package/content/helm.tmpl index 44d01b6013..68e53133f1 100644 --- a/templates/package/content/helm.tmpl +++ b/templates/package/content/helm.tmpl @@ -1,37 +1,37 @@ {{if eq .PackageDescriptor.Package.Type "helm"}} - <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4> + <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4> <div class="ui attached segment"> <div class="ui form"> <div class="field"> - <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.helm.registry"}}</label> + <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.helm.registry"}}</label> <div class="markup"><pre class="code-block"><code>helm repo add {{AppDomain}} <gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/helm"></gitea-origin-url> helm repo update</code></pre></div> </div> <div class="field"> - <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.helm.install"}}</label> + <label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.helm.install"}}</label> <div class="markup"><pre class="code-block"><code>helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}</code></pre></div> </div> <div class="field"> - <label>{{.locale.Tr "packages.registry.documentation" "Helm" "https://docs.gitea.com/usage/packages/helm/" | Safe}}</label> + <label>{{ctx.Locale.Tr "packages.registry.documentation" "Helm" "https://docs.gitea.com/usage/packages/helm/" | Safe}}</label> </div> </div> </div> {{if .PackageDescriptor.Metadata.Description}} - <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4> + <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.about"}}</h4> <div class="ui attached segment"> {{.PackageDescriptor.Metadata.Description}} </div> {{end}} {{if .PackageDescriptor.Metadata.Dependencies}} - <h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4> + <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.dependencies"}}</h4> <div class="ui attached segment"> <table class="ui single line very basic table"> <thead> <tr> - <th class="ten wide">{{.locale.Tr "packages.dependency.id"}}</th> - <th class="six wide">{{.locale.Tr "packages.dependency.version"}}</th> + <th class="ten wide">{{ctx.Locale.Tr "packages.dependency.id"}}</th> + <th class="six wide">{{ctx.Locale.Tr "packages.dependency.version"}}</th> </tr> </thead> <tbody> @@ -47,7 +47,7 @@ helm repo update</code></pre></div> {{end}} {{if .PackageDescriptor.Metadata.Keywords}} - <h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4> + <h4 class="ui top attached header">{{ctx.Locale.Tr "packages.keywords"}}</h4> <div class="ui attached segment"> {{range .PackageDescriptor.Metadata.Keywords}} {{.}} |