summaryrefslogtreecommitdiffstats
path: root/templates/package
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-06-27 22:58:46 +0200
committerGitHub <noreply@github.com>2022-06-27 15:58:46 -0500
commitd55a0b723809f5b94acd948b924c8518014445e0 (patch)
tree0ef9ea54f30769ca1d16ce20e551bd7a078f7f5e /templates/package
parentb551bc2a089d3310dde5706d1b9702f112fe3ea0 (diff)
downloadgitea-d55a0b723809f5b94acd948b924c8518014445e0.tar.gz
gitea-d55a0b723809f5b94acd948b924c8518014445e0.zip
Refactor `i18n` to `locale` (#20153)
* Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
Diffstat (limited to 'templates/package')
-rw-r--r--templates/package/content/composer.tmpl18
-rw-r--r--templates/package/content/composer_dependencies.tmpl4
-rw-r--r--templates/package/content/conan.tmpl12
-rw-r--r--templates/package/content/container.tmpl18
-rw-r--r--templates/package/content/generic.tmpl6
-rw-r--r--templates/package/content/helm.tmpl18
-rw-r--r--templates/package/content/maven.tmpl16
-rw-r--r--templates/package/content/npm.tmpl24
-rw-r--r--templates/package/content/npm_dependencies.tmpl4
-rw-r--r--templates/package/content/nuget.tmpl18
-rw-r--r--templates/package/content/pypi.tmpl12
-rw-r--r--templates/package/content/rubygems.tmpl22
-rw-r--r--templates/package/content/rubygems_dependencies.tmpl4
-rw-r--r--templates/package/metadata/composer.tmpl6
-rw-r--r--templates/package/metadata/conan.tmpl8
-rw-r--r--templates/package/metadata/container.tmpl12
-rw-r--r--templates/package/metadata/helm.tmpl4
-rw-r--r--templates/package/metadata/maven.tmpl4
-rw-r--r--templates/package/metadata/npm.tmpl8
-rw-r--r--templates/package/metadata/nuget.tmpl4
-rw-r--r--templates/package/metadata/pypi.tmpl6
-rw-r--r--templates/package/metadata/rubygems.tmpl6
-rw-r--r--templates/package/settings.tmpl26
-rw-r--r--templates/package/shared/list.tmpl20
-rw-r--r--templates/package/shared/versionlist.tmpl14
-rw-r--r--templates/package/view.tmpl20
26 files changed, 157 insertions, 157 deletions
diff --git a/templates/package/content/composer.tmpl b/templates/package/content/composer.tmpl
index 29162f97b0..8cc18f8ba8 100644
--- a/templates/package/content/composer.tmpl
+++ b/templates/package/content/composer.tmpl
@@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "composer"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-code"}} {{.i18n.Tr "packages.composer.registry" | Safe}}</label>
+ <label>{{svg "octicon-code"}} {{.locale.Tr "packages.composer.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>{
"repositories": [{
"type": "composer",
@@ -13,34 +13,34 @@
}</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.composer.install"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.composer.install"}}</label>
<div class="markup"><pre class="code-block"><code>composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.composer.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.composer.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if .PackageDescriptor.Metadata.Description}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">
{{.PackageDescriptor.Metadata.Description}}
</div>
{{end}}
{{if or .PackageDescriptor.Metadata.Require .PackageDescriptor.Metadata.RequireDev}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.dependencies"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment">
<div class="ui list">
- {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (.i18n.Tr "packages.composer.dependencies")}}
- {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (.i18n.Tr "packages.composer.dependencies.development")}}
+ {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (.locale.Tr "packages.composer.dependencies")}}
+ {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (.locale.Tr "packages.composer.dependencies.development")}}
</div>
</div>
{{end}}
{{if or .PackageDescriptor.Metadata.Keywords}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.keywords"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}}
{{.}}
diff --git a/templates/package/content/composer_dependencies.tmpl b/templates/package/content/composer_dependencies.tmpl
index 1ab644f417..b55c1b5b88 100644
--- a/templates/package/content/composer_dependencies.tmpl
+++ b/templates/package/content/composer_dependencies.tmpl
@@ -3,8 +3,8 @@
<table class="ui single line very basic table">
<thead>
<tr>
- <th class="eleven wide">{{.root.i18n.Tr "packages.dependency.id"}}</th>
- <th class="five wide">{{.root.i18n.Tr "packages.dependency.version"}}</th>
+ <th class="eleven wide">{{.root.locale.Tr "packages.dependency.id"}}</th>
+ <th class="five wide">{{.root.locale.Tr "packages.dependency.version"}}</th>
</tr>
</thead>
<tbody>
diff --git a/templates/package/content/conan.tmpl b/templates/package/content/conan.tmpl
index 3c1c35c00f..c496cee55c 100644
--- a/templates/package/content/conan.tmpl
+++ b/templates/package/content/conan.tmpl
@@ -1,30 +1,30 @@
{{if eq .PackageDescriptor.Package.Type "conan"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.conan.registry"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.conan.registry"}}</label>
<div class="markup"><pre class="code-block"><code>conan remote add gitea {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/conan</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.conan.install"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.conan.install"}}</label>
<div class="markup"><pre class="code-block"><code>conan install --remote=gitea {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.conan.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.conan.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if .PackageDescriptor.Metadata.Description}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
</div>
{{end}}
{{if or .PackageDescriptor.Metadata.Keywords}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.keywords"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}}
{{.}}
diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl
index 14d4a56398..44a64d13ee 100644
--- a/templates/package/content/container.tmpl
+++ b/templates/package/content/container.tmpl
@@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "container"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.container.pull"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.container.pull"}}</label>
{{if eq .PackageDescriptor.Metadata.Type "helm"}}
<div class="markup"><pre class="code-block"><code>helm pull oci://{{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}} --version {{.PackageDescriptor.Version.LowerVersion}}</code></pre></div>
{{else}}
@@ -15,12 +15,12 @@
{{end}}
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.container.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.container.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if .PackageDescriptor.Metadata.MultiArch}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.container.multi_arch"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.container.multi_arch"}}</h4>
<div class="ui attached segment">
<div class="ui form">
{{range $arch, $digest := .PackageDescriptor.Metadata.MultiArch}}
@@ -35,13 +35,13 @@
</div>
{{end}}
{{if .PackageDescriptor.Metadata.Description}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">
{{.PackageDescriptor.Metadata.Description}}
</div>
{{end}}
{{if .PackageDescriptor.Metadata.ImageLayers}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.container.layers"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.container.layers"}}</h4>
<div class="ui attached segment">
<table id="notice-table" class="ui very basic compact table">
<tbody>
@@ -55,13 +55,13 @@
</div>
{{end}}
{{if .PackageDescriptor.Metadata.Labels}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.container.labels"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.container.labels"}}</h4>
<div class="ui attached segment">
<table id="notice-table" class="ui very basic compact table">
<thead>
<tr>
- <th>{{.i18n.Tr "packages.container.labels.key"}}</th>
- <th>{{.i18n.Tr "packages.container.labels.value"}}</th>
+ <th>{{.locale.Tr "packages.container.labels.key"}}</th>
+ <th>{{.locale.Tr "packages.container.labels.value"}}</th>
</tr>
</thead>
<tbody>
diff --git a/templates/package/content/generic.tmpl b/templates/package/content/generic.tmpl
index 05a47b3ef4..045ff7d08a 100644
--- a/templates/package/content/generic.tmpl
+++ b/templates/package/content/generic.tmpl
@@ -1,13 +1,13 @@
{{if eq .PackageDescriptor.Package.Type "generic"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.generic.download"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.generic.download"}}</label>
<div class="markup"><pre class="code-block"><code>curl {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/generic/{{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}/{{(index .PackageDescriptor.Files 0).File.Name}}</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.generic.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.generic.documentation" | Safe}}</label>
</div>
</div>
</div>
diff --git a/templates/package/content/helm.tmpl b/templates/package/content/helm.tmpl
index a85f7c4850..59cdc157b4 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">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.helm.registry"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.helm.registry"}}</label>
<div class="markup"><pre class="code-block"><code>helm repo add gitea {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/helm
helm repo update</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.helm.install"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.helm.install"}}</label>
<div class="markup"><pre class="code-block"><code>helm install {{.PackageDescriptor.Package.Name}} gitea/{{.PackageDescriptor.Package.Name}}</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.helm.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.helm.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if .PackageDescriptor.Metadata.Description}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.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">{{.i18n.Tr "packages.dependencies"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment">
<table class="ui single line very basic table">
<thead>
<tr>
- <th class="ten wide">{{.i18n.Tr "packages.dependency.id"}}</th>
- <th class="six wide">{{.i18n.Tr "packages.dependency.version"}}</th>
+ <th class="ten wide">{{.locale.Tr "packages.dependency.id"}}</th>
+ <th class="six wide">{{.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">{{.i18n.Tr "packages.keywords"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}}
{{.}}
diff --git a/templates/package/content/maven.tmpl b/templates/package/content/maven.tmpl
index 32b89616cb..0b5612151c 100644
--- a/templates/package/content/maven.tmpl
+++ b/templates/package/content/maven.tmpl
@@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "maven"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-code"}} {{.i18n.Tr "packages.maven.registry" | Safe}}</label>
+ <label>{{svg "octicon-code"}} {{.locale.Tr "packages.maven.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>&lt;repositories&gt;
&lt;repository&gt;
&lt;id&gt;gitea&lt;/id&gt;
@@ -24,7 +24,7 @@
&lt;/distributionManagement&gt;</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-code"}} {{.i18n.Tr "packages.maven.install" | Safe}}</label>
+ <label>{{svg "octicon-code"}} {{.locale.Tr "packages.maven.install" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>&lt;dependency&gt;
&lt;groupId&gt;{{.PackageDescriptor.Metadata.GroupID}}&lt;/groupId&gt;
&lt;artifactId&gt;{{.PackageDescriptor.Metadata.ArtifactID}}&lt;/artifactId&gt;
@@ -32,28 +32,28 @@
&lt;/dependency&gt;</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.maven.install2"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.maven.install2"}}</label>
<div class="markup"><pre class="code-block"><code>mvn install</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.maven.download"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.maven.download"}}</label>
<div class="markup"><pre class="code-block"><code>mvn dependency:get -DremoteRepositories={{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/maven -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.maven.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.maven.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if .PackageDescriptor.Metadata.Description}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.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">{{.i18n.Tr "packages.dependencies"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment">
<div class="ui list">
{{range .PackageDescriptor.Metadata.Dependencies}}
diff --git a/templates/package/content/npm.tmpl b/templates/package/content/npm.tmpl
index bc714e5c97..33d51d4dfd 100644
--- a/templates/package/content/npm.tmpl
+++ b/templates/package/content/npm.tmpl
@@ -1,27 +1,27 @@
{{if eq .PackageDescriptor.Package.Type "npm"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-code"}} {{.i18n.Tr "packages.npm.registry" | Safe}}</label>
+ <label>{{svg "octicon-code"}} {{.locale.Tr "packages.npm.registry" | Safe}}</label>
<div class="markup"><pre class="code-block"><code>{{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry={{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/npm/</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.npm.install"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.npm.install"}}</label>
<div class="markup"><pre class="code-block"><code>npm install {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-code"}} {{.i18n.Tr "packages.npm.install2"}}</label>
+ <label>{{svg "octicon-code"}} {{.locale.Tr "packages.npm.install2"}}</label>
<div class="markup"><pre class="code-block"><code>&quot;{{.PackageDescriptor.Package.Name}}&quot;: &quot;{{.PackageDescriptor.Version.Version}}&quot;</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.npm.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.npm.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Readme}}
<div class="markup markdown">
@@ -34,19 +34,19 @@
{{end}}
{{if or .PackageDescriptor.Metadata.Dependencies .PackageDescriptor.Metadata.DevelopmentDependencies .PackageDescriptor.Metadata.PeerDependencies .PackageDescriptor.Metadata.OptionalDependencies}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.dependencies"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment">
<div class="ui list">
- {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Dependencies "title" (.i18n.Tr "packages.npm.dependencies")}}
- {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (.i18n.Tr "packages.npm.dependencies.development")}}
- {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.PeerDependencies "title" (.i18n.Tr "packages.npm.dependencies.peer")}}
- {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.OptionalDependencies "title" (.i18n.Tr "packages.npm.dependencies.optional")}}
+ {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Dependencies "title" (.locale.Tr "packages.npm.dependencies")}}
+ {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (.locale.Tr "packages.npm.dependencies.development")}}
+ {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.PeerDependencies "title" (.locale.Tr "packages.npm.dependencies.peer")}}
+ {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.OptionalDependencies "title" (.locale.Tr "packages.npm.dependencies.optional")}}
</div>
</div>
{{end}}
{{if .PackageDescriptor.Metadata.Keywords}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.keywords"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.keywords"}}</h4>
<div class="ui attached segment">
{{range .PackageDescriptor.Metadata.Keywords}}
{{.}}
diff --git a/templates/package/content/npm_dependencies.tmpl b/templates/package/content/npm_dependencies.tmpl
index 1ab644f417..b55c1b5b88 100644
--- a/templates/package/content/npm_dependencies.tmpl
+++ b/templates/package/content/npm_dependencies.tmpl
@@ -3,8 +3,8 @@
<table class="ui single line very basic table">
<thead>
<tr>
- <th class="eleven wide">{{.root.i18n.Tr "packages.dependency.id"}}</th>
- <th class="five wide">{{.root.i18n.Tr "packages.dependency.version"}}</th>
+ <th class="eleven wide">{{.root.locale.Tr "packages.dependency.id"}}</th>
+ <th class="five wide">{{.root.locale.Tr "packages.dependency.version"}}</th>
</tr>
</thead>
<tbody>
diff --git a/templates/package/content/nuget.tmpl b/templates/package/content/nuget.tmpl
index 879d7d0176..4ea41fa826 100644
--- a/templates/package/content/nuget.tmpl
+++ b/templates/package/content/nuget.tmpl
@@ -1,23 +1,23 @@
{{if eq .PackageDescriptor.Package.Type "nuget"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.nuget.registry"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.nuget.registry"}}</label>
<div class="markup"><pre class="code-block"><code>dotnet nuget add source --name Gitea --username your_username --password your_token {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.nuget.install"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.nuget.install"}}</label>
<div class="markup"><pre class="code-block"><code>dotnet add package --source Gitea --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.nuget.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.nuget.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">
{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
{{if .PackageDescriptor.Metadata.ReleaseNotes}}{{Str2html .PackageDescriptor.Metadata.ReleaseNotes}}{{end}}
@@ -25,14 +25,14 @@
{{end}}
{{if .PackageDescriptor.Metadata.Dependencies}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.dependencies"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment">
<table class="ui single line very basic table">
<thead>
<tr>
- <th class="ten wide">{{.i18n.Tr "packages.dependency.id"}}</th>
- <th class="three wide">{{.i18n.Tr "packages.dependency.version"}}</th>
- <th class="three wide">{{.i18n.Tr "packages.nuget.dependency.framework"}}</th>
+ <th class="ten wide">{{.locale.Tr "packages.dependency.id"}}</th>
+ <th class="three wide">{{.locale.Tr "packages.dependency.version"}}</th>
+ <th class="three wide">{{.locale.Tr "packages.nuget.dependency.framework"}}</th>
</tr>
</thead>
<tbody>
diff --git a/templates/package/content/pypi.tmpl b/templates/package/content/pypi.tmpl
index 352f4f617f..1cce31f537 100644
--- a/templates/package/content/pypi.tmpl
+++ b/templates/package/content/pypi.tmpl
@@ -1,18 +1,18 @@
{{if eq .PackageDescriptor.Package.Type "pypi"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.pypi.install"}}</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.pypi.install"}}</label>
<div class="markup"><pre class="code-block"><code>pip install --extra-index-url {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple {{.PackageDescriptor.Package.Name}}</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.pypi.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.pypi.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">
<p>{{if .PackageDescriptor.Metadata.Summary}}{{.PackageDescriptor.Metadata.Summary}}{{end}}</p>
{{if .PackageDescriptor.Metadata.LongDescription}}
@@ -23,9 +23,9 @@
</div>
{{end}}
{{if .PackageDescriptor.Metadata.RequiresPython}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.requirements"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.requirements"}}</h4>
<div class="ui attached segment">
- {{.i18n.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}}
+ {{.locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}}
</div>
{{end}}
{{end}}
diff --git a/templates/package/content/rubygems.tmpl b/templates/package/content/rubygems.tmpl
index 6e22d7fbea..0cb7b670b1 100644
--- a/templates/package/content/rubygems.tmpl
+++ b/templates/package/content/rubygems.tmpl
@@ -1,39 +1,39 @@
{{if eq .PackageDescriptor.Package.Type "rubygems"}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.installation"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">
<div class="field">
- <label>{{svg "octicon-terminal"}} {{.i18n.Tr "packages.rubygems.install" | Safe}}:</label>
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.rubygems.install" | Safe}}:</label>
<div class="markup"><pre class="code-block"><code>gem install {{.PackageDescriptor.Package.Name}} --version &quot;{{.PackageDescriptor.Version.Version}}&quot; --source &quot;{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems&quot;</code></pre></div>
</div>
<div class="field">
- <label>{{svg "octicon-code"}} {{.i18n.Tr "packages.rubygems.install2"}}:</label>
+ <label>{{svg "octicon-code"}} {{.locale.Tr "packages.rubygems.install2"}}:</label>
<div class="markup"><pre class="code-block"><code>source "{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems" do
gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}"
end</code></pre></div>
</div>
<div class="field">
- <label>{{.i18n.Tr "packages.rubygems.documentation" | Safe}}</label>
+ <label>{{.locale.Tr "packages.rubygems.documentation" | Safe}}</label>
</div>
</div>
</div>
{{if .PackageDescriptor.Metadata.Description}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.about"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.about"}}</h4>
<div class="ui attached segment">{{.PackageDescriptor.Metadata.Description}}</div>
{{end}}
{{if or .PackageDescriptor.Metadata.RequiredRubyVersion .PackageDescriptor.Metadata.RequiredRubygemsVersion}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.requirements"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.requirements"}}</h4>
<div class="ui attached segment">
- {{if .PackageDescriptor.Metadata.RequiredRubyVersion}}<p>{{.i18n.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}}
- {{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}<p>{{.i18n.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}}
+ {{if .PackageDescriptor.Metadata.RequiredRubyVersion}}<p>{{.locale.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}}
+ {{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}<p>{{.locale.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}</p>{{end}}
</div>
{{end}}
{{if or .PackageDescriptor.Metadata.RuntimeDependencies .PackageDescriptor.Metadata.DevelopmentDependencies}}
- <h4 class="ui top attached header">{{.i18n.Tr "packages.dependencies"}}</h4>
+ <h4 class="ui top attached header">{{.locale.Tr "packages.dependencies"}}</h4>
<div class="ui attached segment">
<div class="ui list">
- {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RuntimeDependencies "title" (.i18n.Tr "packages.rubygems.dependencies.runtime")}}
- {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (.i18n.Tr "packages.rubygems.dependencies.development")}}
+ {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RuntimeDependencies "title" (.locale.Tr "packages.rubygems.dependencies.runtime")}}
+ {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (.locale.Tr "packages.rubygems.dependencies.development")}}
</div>
</div>
{{end}}
diff --git a/templates/package/content/rubygems_dependencies.tmpl b/templates/package/content/rubygems_dependencies.tmpl
index 79f66ad3f9..80febc84f4 100644
--- a/templates/package/content/rubygems_dependencies.tmpl
+++ b/templates/package/content/rubygems_dependencies.tmpl
@@ -3,8 +3,8 @@
<table class="ui single line very basic table">
<thead>
<tr>
- <th class="eleven wide">{{.root.i18n.Tr "packages.dependency.id"}}</th>
- <th class="five wide">{{.root.i18n.Tr "packages.dependency.version"}}</th>
+ <th class="eleven wide">{{.root.locale.Tr "packages.dependency.id"}}</th>
+ <th class="five wide">{{.root.locale.Tr "packages.dependency.version"}}</th>
</tr>
</thead>
<tbody>
diff --git a/templates/package/metadata/composer.tmpl b/templates/package/metadata/composer.tmpl
index 1178d00e0d..2e76a10dab 100644
--- a/templates/package/metadata/composer.tmpl
+++ b/templates/package/metadata/composer.tmpl
@@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "composer"}}
- {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.i18n.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.Name}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.Homepage}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.Homepage}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div>{{end}}
- {{range .PackageDescriptor.Metadata.License}}<div class="item" title="{{$.i18n.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.}}</div>{{end}}
+ {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.Name}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.Homepage}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.Homepage}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{range .PackageDescriptor.Metadata.License}}<div class="item" title="{{$.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.}}</div>{{end}}
{{end}}
diff --git a/templates/package/metadata/conan.tmpl b/templates/package/metadata/conan.tmpl
index 1ef82aea4e..41cb42b692 100644
--- a/templates/package/metadata/conan.tmpl
+++ b/templates/package/metadata/conan.tmpl
@@ -1,6 +1,6 @@
{{if eq .PackageDescriptor.Package.Type "conan"}}
- {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.i18n.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div>{{end}}
- {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.i18n.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.conan.details.repository"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.conan.details.repository"}}</a></div>{{end}}
{{end}}
diff --git a/templates/package/metadata/container.tmpl b/templates/package/metadata/container.tmpl
index 117d7e46a2..1b13072c38 100644
--- a/templates/package/metadata/container.tmpl
+++ b/templates/package/metadata/container.tmpl
@@ -1,9 +1,9 @@
{{if eq .PackageDescriptor.Package.Type "container"}}
- <div class="item" title="{{.i18n.Tr "packages.container.details.type"}}">{{svg "octicon-package" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}</div>
- {{if .PackageDescriptor.Metadata.Platform}}<div class="item" title="{{$.i18n.Tr "packages.container.details.platform"}}">{{svg "octicon-cpu" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Platform}}</div>{{end}}
- {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.i18n.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.}}</div>{{end}}
+ <div class="item" title="{{.locale.Tr "packages.container.details.type"}}">{{svg "octicon-package" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}</div>
+ {{if .PackageDescriptor.Metadata.Platform}}<div class="item" title="{{$.locale.Tr "packages.container.details.platform"}}">{{svg "octicon-cpu" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Platform}}</div>{{end}}
+ {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.}}</div>{{end}}
{{if .PackageDescriptor.Metadata.Licenses}}<div class="item">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Licenses}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div>{{end}}
- {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.container.details.repository_site"}}</a></div>{{end}}
- {{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.container.details.documentation_site"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.RepositoryURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.RepositoryURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.container.details.repository_site"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.DocumentationURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.DocumentationURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.container.details.documentation_site"}}</a></div>{{end}}
{{end}}
diff --git a/templates/package/metadata/helm.tmpl b/templates/package/metadata/helm.tmpl
index 7c97c6358e..9f7f5d6ecd 100644
--- a/templates/package/metadata/helm.tmpl
+++ b/templates/package/metadata/helm.tmpl
@@ -1,4 +1,4 @@
{{if eq .PackageDescriptor.Package.Type "helm"}}
- {{range .PackageDescriptor.Metadata.Maintainers}}<div class="item" title="{{$.i18n.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.Name}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.Home}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.Home}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{range .PackageDescriptor.Metadata.Maintainers}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.Name}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.Home}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.Home}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{end}}
diff --git a/templates/package/metadata/maven.tmpl b/templates/package/metadata/maven.tmpl
index 14a613be47..f6fcdf6da8 100644
--- a/templates/package/metadata/maven.tmpl
+++ b/templates/package/metadata/maven.tmpl
@@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "maven"}}
{{if .PackageDescriptor.Metadata.Name}}<div class="item">{{svg "octicon-note" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Name}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div>{{end}}
- {{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{$.i18n.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{$.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.}}</div>{{end}}
{{end}}
diff --git a/templates/package/metadata/npm.tmpl b/templates/package/metadata/npm.tmpl
index 3279f9edbf..765566cadf 100644
--- a/templates/package/metadata/npm.tmpl
+++ b/templates/package/metadata/npm.tmpl
@@ -1,8 +1,8 @@
{{if eq .PackageDescriptor.Package.Type "npm"}}
- {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.i18n.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div>{{end}}
- {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.i18n.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{range .PackageDescriptor.Properties}}
- {{if eq .Name "npm.tag"}}<div class="item" title="{{$.i18n.Tr "packages.npm.details.tag"}}">{{svg "octicon-versions" 16 "mr-3"}} {{.Value}}</div>{{end}}
+ {{if eq .Name "npm.tag"}}<div class="item" title="{{$.locale.Tr "packages.npm.details.tag"}}">{{svg "octicon-versions" 16 "mr-3"}} {{.Value}}</div>{{end}}
{{end}}
{{end}}
diff --git a/templates/package/metadata/nuget.tmpl b/templates/package/metadata/nuget.tmpl
index d5a3e909b9..b4e62b5a08 100644
--- a/templates/package/metadata/nuget.tmpl
+++ b/templates/package/metadata/nuget.tmpl
@@ -1,4 +1,4 @@
{{if eq .PackageDescriptor.Package.Type "nuget"}}
- {{if .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{.i18n.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Authors}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Authors}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
{{end}}
diff --git a/templates/package/metadata/pypi.tmpl b/templates/package/metadata/pypi.tmpl
index 5cdfbdfe66..13b53d3591 100644
--- a/templates/package/metadata/pypi.tmpl
+++ b/templates/package/metadata/pypi.tmpl
@@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "pypi"}}
- {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.i18n.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div>{{end}}
- {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.i18n.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.Author}}<div class="item" title="{{.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div>{{end}}
+ {{if .PackageDescriptor.Metadata.License}}<div class="item" title="{{.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}</div>{{end}}
{{end}}
diff --git a/templates/package/metadata/rubygems.tmpl b/templates/package/metadata/rubygems.tmpl
index dff6830df3..bddb7b5422 100644
--- a/templates/package/metadata/rubygems.tmpl
+++ b/templates/package/metadata/rubygems.tmpl
@@ -1,5 +1,5 @@
{{if eq .PackageDescriptor.Package.Type "rubygems"}}
- {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.i18n.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.}}</div>{{end}}
- {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.i18n.Tr "packages.details.project_site"}}</a></div> {{end}}
- {{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{$.i18n.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.}}</div>{{end}}
+ {{range .PackageDescriptor.Metadata.Authors}}<div class="item" title="{{$.locale.Tr "packages.details.author"}}">{{svg "octicon-person" 16 "mr-3"}} {{.}}</div>{{end}}
+ {{if .PackageDescriptor.Metadata.ProjectURL}}<div class="item">{{svg "octicon-link-external" 16 "mr-3"}} <a href="{{.PackageDescriptor.Metadata.ProjectURL}}" target="_blank" rel="noopener noreferrer me">{{.locale.Tr "packages.details.project_site"}}</a></div> {{end}}
+ {{range .PackageDescriptor.Metadata.Licenses}}<div class="item" title="{{$.locale.Tr "packages.details.license"}}">{{svg "octicon-law" 16 "mr-3"}} {{.}}</div>{{end}}
{{end}}
diff --git a/templates/package/settings.tmpl b/templates/package/settings.tmpl
index bf2d1d4912..5f045e98b0 100644
--- a/templates/package/settings.tmpl
+++ b/templates/package/settings.tmpl
@@ -3,12 +3,12 @@
{{template "user/overview/header" .}}
<div class="ui container">
{{template "base/alert" .}}
- <p><a href="{{.PackageDescriptor.FullWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{.i18n.Tr "repo.settings"}}</strong></p>
+ <p><a href="{{.PackageDescriptor.FullWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{.locale.Tr "repo.settings"}}</strong></p>
<h4 class="ui top attached header">
- {{.i18n.Tr "packages.settings.link"}}
+ {{.locale.Tr "packages.settings.link"}}
</h4>
<div class="ui attached segment">
- <p>{{.i18n.Tr "packages.settings.link.description"}}</p>
+ <p>{{.locale.Tr "packages.settings.link.description"}}</p>
<form class="ui form" action="{{.Link}}" method="post">
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
@@ -21,7 +21,7 @@
{{end}}
<input type="hidden" name="repo_id" value="{{$repoID}}">
<i class="dropdown icon"></i>
- <div class="default text">{{.i18n.Tr "packages.settings.link.select"}}</div>
+ <div class="default text">{{.locale.Tr "packages.settings.link.select"}}</div>
<div class="menu">
{{range .Repos}}
<div class="item" data-value="{{.ID}}">{{.Name}}</div>
@@ -30,36 +30,36 @@
</div>
</div>
<div class="field">
- <button class="ui green button">{{.i18n.Tr "packages.settings.link.button"}}</button>
+ <button class="ui green button">{{.locale.Tr "packages.settings.link.button"}}</button>
</div>
</form>
</div>
<h4 class="ui top attached error header">
- {{.i18n.Tr "repo.settings.danger_zone"}}
+ {{.locale.Tr "repo.settings.danger_zone"}}
</h4>
<div class="ui attached error table danger segment">
<div class="item">
<div class="ui right">
- <button class="ui basic red show-modal button" data-modal="#delete-package-modal">{{.i18n.Tr "packages.settings.delete"}}</button>
+ <button class="ui basic red show-modal button" data-modal="#delete-package-modal">{{.locale.Tr "packages.settings.delete"}}</button>
</div>
<div>
- <h5>{{.i18n.Tr "packages.settings.delete"}}</h5>
- <p>{{.i18n.Tr "packages.settings.delete.description"}}</p>
+ <h5>{{.locale.Tr "packages.settings.delete"}}</h5>
+ <p>{{.locale.Tr "packages.settings.delete.description"}}</p>
</div>
<div class="ui tiny modal" id="delete-package-modal">
<div class="header">
- {{.i18n.Tr "packages.settings.delete"}}
+ {{.locale.Tr "packages.settings.delete"}}
</div>
<div class="content">
<div class="ui warning message text left">
- {{.i18n.Tr "packages.settings.delete.notice" .PackageDescriptor.Package.Name .PackageDescriptor.Version.Version}}
+ {{.locale.Tr "packages.settings.delete.notice" .PackageDescriptor.Package.Name .PackageDescriptor.Version.Version}}
</div>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="delete">
<div class="text right actions">
- <div class="ui cancel button">{{.i18n.Tr "cancel"}}</div>
- <button class="ui red button">{{.i18n.Tr "ok"}}</button>
+ <div class="ui cancel button">{{.locale.Tr "cancel"}}</div>
+ <button class="ui red button">{{.locale.Tr "ok"}}</button>
</div>
</form>
</div>
diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl
index eb2beac9e7..3b3a1720ea 100644
--- a/templates/package/shared/list.tmpl
+++ b/templates/package/shared/list.tmpl
@@ -2,10 +2,10 @@
{{template "base/alert" .}}
<form class="ui form ignore-dirty">
<div class="ui fluid action input">
- <input name="q" value="{{.Query}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
+ <input name="q" value="{{.Query}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
<select class="ui dropdown" name="type">
- <option value="">{{.i18n.Tr "packages.filter.type"}}</option>
- <option value="all">{{.i18n.Tr "packages.filter.type.all"}}</option>
+ <option value="">{{.locale.Tr "packages.filter.type"}}</option>
+ <option value="all">{{.locale.Tr "packages.filter.type.all"}}</option>
<option value="composer" {{if eq .PackageType "composer"}}selected="selected"{{end}}>Composer</option>
<option value="conan" {{if eq .PackageType "conan"}}selected="selected"{{end}}>Conan</option>
<option value="container" {{if eq .PackageType "container"}}selected="selected"{{end}}>Container</option>
@@ -17,7 +17,7 @@
<option value="pypi" {{if eq .PackageType "pypi"}}selected="selected"{{end}}>PyPi</option>
<option value="rubygems" {{if eq .PackageType "rubygems"}}selected="selected"{{end}}>RubyGems</option>
</select>
- <button class="ui primary button">{{.i18n.Tr "explore.search"}}</button>
+ <button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div>
</form>
<div class="ui {{if .PackageDescriptors}}issue list{{end}}">
@@ -29,15 +29,15 @@
<span class="ui label">{{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}</span>
</div>
<div class="desc issue-item-bottom-row df ac fw my-1">
- {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.i18n}}
+ {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}}
{{$hasRepositoryAccess := false}}
{{if .Repository}}
{{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}}
{{end}}
{{if $hasRepositoryAccess}}
- {{$.i18n.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.HTMLURL (.Repository.FullName | Escape) | Safe}}
+ {{$.locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.HTMLURL (.Repository.FullName | Escape) | Safe}}
{{else}}
- {{$.i18n.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
+ {{$.locale.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
{{end}}
</div>
</div>
@@ -46,11 +46,11 @@
{{if not .HasPackages}}
<div class="empty center">
{{svg "octicon-package" 32}}
- <h2>{{.i18n.Tr "packages.empty"}}</h2>
- <p>{{.i18n.Tr "packages.empty.documentation" | Safe}}</p>
+ <h2>{{.locale.Tr "packages.empty"}}</h2>
+ <p>{{.locale.Tr "packages.empty.documentation" | Safe}}</p>
</div>
{{else}}
- <p>{{.i18n.Tr "packages.filter.no_result"}}</p>
+ <p>{{.locale.Tr "packages.filter.no_result"}}</p>
{{end}}
{{end}}
{{template "base/paginate" .}}
diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl
index 3d9ae5ef44..02bda3fb8f 100644
--- a/templates/package/shared/versionlist.tmpl
+++ b/templates/package/shared/versionlist.tmpl
@@ -1,16 +1,16 @@
<div class="ui container">
- <p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{.i18n.Tr "packages.versions"}}</strong></p>
+ <p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{.locale.Tr "packages.versions"}}</strong></p>
<form class="ui form ignore-dirty">
<div class="ui fluid action input">
- <input name="q" value="{{.Query}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
+ <input name="q" value="{{.Query}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
{{if eq .PackageDescriptor.Package.Type "container"}}
<select class="ui dropdown" name="tagged">
{{$isTagged := or (eq .Tagged "") (eq .Tagged "tagged")}}
- <option value="tagged" {{if $isTagged}}selected="selected"{{end}}>{{.i18n.Tr "packages.filter.container.tagged"}}</option>
- <option value="untagged" {{if not $isTagged}}selected="selected"{{end}}>{{.i18n.Tr "packages.filter.container.untagged"}}</option>
+ <option value="tagged" {{if $isTagged}}selected="selected"{{end}}>{{.locale.Tr "packages.filter.container.tagged"}}</option>
+ <option value="untagged" {{if not $isTagged}}selected="selected"{{end}}>{{.locale.Tr "packages.filter.container.untagged"}}</option>
</select>
{{end}}
- <button class="ui primary button">{{.i18n.Tr "explore.search"}}</button>
+ <button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div>
</form>
<div class="ui {{if .PackageDescriptors}}issue list{{end}}">
@@ -21,12 +21,12 @@
<a class="title" href="{{.FullWebLink}}">{{.Version.LowerVersion}}</a>
</div>
<div class="desc issue-item-bottom-row df ac fw my-1">
- {{$.i18n.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.i18n) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
+ {{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
</div>
</div>
</li>
{{else}}
- <p>{{.i18n.Tr "packages.filter.no_result"}}</p>
+ <p>{{.locale.Tr "packages.filter.no_result"}}</p>
{{end}}
{{template "base/paginate" .}}
</div>
diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl
index 9a3157c284..ba309b6a77 100644
--- a/templates/package/view.tmpl
+++ b/templates/package/view.tmpl
@@ -9,11 +9,11 @@
<h1>{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</h1>
</div>
<div>
- {{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.i18n}}
+ {{$timeStr := TimeSinceUnix .PackageDescriptor.Version.CreatedUnix $.locale}}
{{if .HasRepositoryAccess}}
- {{.i18n.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.HTMLURL (.PackageDescriptor.Repository.FullName | Escape) | Safe}}
+ {{.locale.Tr "packages.published_by_in" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) .PackageDescriptor.Repository.HTMLURL (.PackageDescriptor.Repository.FullName | Escape) | Safe}}
{{else}}
- {{.i18n.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}}
+ {{.locale.Tr "packages.published_by" $timeStr .PackageDescriptor.Creator.HomeLink (.PackageDescriptor.Creator.GetDisplayName | Escape) | Safe}}
{{end}}
</div>
<div class="ui divider"></div>
@@ -32,7 +32,7 @@
</div>
<div class="four wide column">
<div class="ui segment metas">
- <strong>{{.i18n.Tr "packages.details"}}</strong>
+ <strong>{{.locale.Tr "packages.details"}}</strong>
<div class="ui relaxed list">
<div class="item">{{svg .PackageDescriptor.Package.Type.SVGName 16 "mr-3"}} {{.PackageDescriptor.Package.Type.Name}}</div>
{{if .HasRepositoryAccess}}
@@ -53,7 +53,7 @@
</div>
{{if not (eq .PackageDescriptor.Package.Type "container")}}
<div class="ui divider"></div>
- <strong>{{.i18n.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong>
+ <strong>{{.locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})</strong>
<div class="ui relaxed list">
{{range .PackageDescriptor.Files}}
<div class="item">
@@ -65,13 +65,13 @@
{{end}}
{{if .LatestVersions}}
<div class="ui divider"></div>
- <strong>{{.i18n.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong>
- <a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.i18n.Tr "packages.versions.view_all"}}</a>
+ <strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong>
+ <a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a>
<div class="ui relaxed list">
{{range .LatestVersions}}
<div class="item">
<a href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a>
- <span class="text small">{{$.i18n.Tr "packages.versions.on"}} {{.CreatedUnix.FormatDate}}</span>
+ <span class="text small">{{$.locale.Tr "packages.versions.on"}} {{.CreatedUnix.FormatDate}}</span>
</div>
{{end}}
</div>
@@ -80,10 +80,10 @@
<div class="ui divider"></div>
<div class="ui relaxed list">
{{if .HasRepositoryAccess}}
- <div class="item">{{svg "octicon-issue-opened" 16 "mr-3"}} <a href="{{.PackageDescriptor.Repository.HTMLURL}}/issues">{{.i18n.Tr "repo.issues"}}</a></div>
+ <div class="item">{{svg "octicon-issue-opened" 16 "mr-3"}} <a href="{{.PackageDescriptor.Repository.HTMLURL}}/issues">{{.locale.Tr "repo.issues"}}</a></div>
{{end}}
{{if .CanWritePackages}}
- <div class="item">{{svg "octicon-tools" 16 "mr-3"}} <a href="{{.Link}}/settings">{{.i18n.Tr "repo.settings"}}</a></div>
+ <div class="item">{{svg "octicon-tools" 16 "mr-3"}} <a href="{{.Link}}/settings">{{.locale.Tr "repo.settings"}}</a></div>
{{end}}
</div>
{{end}}