From 7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e Mon Sep 17 00:00:00 2001 From: delvh Date: Mon, 25 Sep 2023 10:56:50 +0200 Subject: Always use `ctx.Locale.Tr` inside templates (#27231) --- templates/package/content/alpine.tmpl | 22 ++++----- templates/package/content/cargo.tmpl | 18 ++++---- templates/package/content/chef.tmpl | 16 +++---- templates/package/content/composer.tmpl | 18 ++++---- .../package/content/composer_dependencies.tmpl | 4 +- templates/package/content/conan.tmpl | 12 ++--- templates/package/content/conda.tmpl | 10 ++-- templates/package/content/container.tmpl | 26 +++++------ templates/package/content/cran.tmpl | 12 ++--- templates/package/content/debian.tmpl | 22 ++++----- templates/package/content/generic.tmpl | 6 +-- templates/package/content/go.tmpl | 6 +-- templates/package/content/helm.tmpl | 18 ++++---- templates/package/content/maven.tmpl | 16 +++---- templates/package/content/npm.tmpl | 24 +++++----- templates/package/content/npm_dependencies.tmpl | 4 +- templates/package/content/nuget.tmpl | 18 ++++---- templates/package/content/pub.tmpl | 8 ++-- templates/package/content/pypi.tmpl | 12 ++--- templates/package/content/rpm.tmpl | 18 ++++---- templates/package/content/rubygems.tmpl | 22 ++++----- .../package/content/rubygems_dependencies.tmpl | 4 +- templates/package/content/swift.tmpl | 14 +++--- templates/package/content/vagrant.tmpl | 8 ++-- templates/package/metadata/alpine.tmpl | 6 +-- templates/package/metadata/cargo.tmpl | 10 ++-- templates/package/metadata/chef.tmpl | 6 +-- templates/package/metadata/composer.tmpl | 6 +-- templates/package/metadata/conan.tmpl | 8 ++-- templates/package/metadata/conda.tmpl | 6 +-- templates/package/metadata/container.tmpl | 12 ++--- templates/package/metadata/cran.tmpl | 6 +-- templates/package/metadata/debian.tmpl | 4 +- templates/package/metadata/helm.tmpl | 4 +- templates/package/metadata/maven.tmpl | 4 +- templates/package/metadata/npm.tmpl | 8 ++-- templates/package/metadata/nuget.tmpl | 4 +- templates/package/metadata/pub.tmpl | 6 +-- templates/package/metadata/pypi.tmpl | 6 +-- templates/package/metadata/rpm.tmpl | 4 +- templates/package/metadata/rubygems.tmpl | 6 +-- templates/package/metadata/swift.tmpl | 4 +- templates/package/metadata/vagrant.tmpl | 6 +-- templates/package/settings.tmpl | 22 ++++----- templates/package/shared/cargo.tmpl | 12 ++--- templates/package/shared/cleanup_rules/edit.tmpl | 54 +++++++++++----------- templates/package/shared/cleanup_rules/list.tmpl | 20 ++++---- .../package/shared/cleanup_rules/preview.tmpl | 18 ++++---- templates/package/shared/list.tmpl | 18 ++++---- templates/package/shared/versionlist.tmpl | 20 ++++---- templates/package/view.tmpl | 16 +++---- 51 files changed, 317 insertions(+), 317 deletions(-) (limited to 'templates/package') diff --git a/templates/package/content/alpine.tmpl b/templates/package/content/alpine.tmpl index fa34f82140..a1003cd6ff 100644 --- a/templates/package/content/alpine.tmpl +++ b/templates/package/content/alpine.tmpl @@ -1,42 +1,42 @@ {{if eq .PackageDescriptor.Package.Type "alpine"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
/$branch/$repository
-

{{.locale.Tr "packages.alpine.registry.info" | Safe}}

+

{{ctx.Locale.Tr "packages.alpine.registry.info" | Safe}}

- +
curl -JO 
- +
sudo apk add {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}
- +
-

{{.locale.Tr "packages.alpine.repository"}}

+

{{ctx.Locale.Tr "packages.alpine.repository"}}

- + - + - + @@ -44,7 +44,7 @@ {{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{.PackageDescriptor.Metadata.Description}}
diff --git a/templates/package/content/cargo.tmpl b/templates/package/content/cargo.tmpl index 67e003c9d1..da9fc4ab39 100644 --- a/templates/package/content/cargo.tmpl +++ b/templates/package/content/cargo.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "cargo"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
[registry]
 default = "gitea"
 
@@ -15,29 +15,29 @@ index = "
-				
+				
 				
cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}
- +
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Description}}
{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if .PackageDescriptor.Metadata.Readme}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
{{end}} {{end}} {{if .PackageDescriptor.Metadata.Dependencies}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

{{.locale.Tr "packages.alpine.repository.branches"}}
{{ctx.Locale.Tr "packages.alpine.repository.branches"}}
{{StringUtils.Join .Branches ", "}}
{{.locale.Tr "packages.alpine.repository.repositories"}}
{{ctx.Locale.Tr "packages.alpine.repository.repositories"}}
{{StringUtils.Join .Repositories ", "}}
{{.locale.Tr "packages.alpine.repository.architectures"}}
{{ctx.Locale.Tr "packages.alpine.repository.architectures"}}
{{StringUtils.Join .Architectures ", "}}
- - + + @@ -53,7 +53,7 @@ git-fetch-with-cli = true {{end}} {{if .PackageDescriptor.Metadata.Keywords}} -

{{.locale.Tr "packages.keywords"}}

+

{{ctx.Locale.Tr "packages.keywords"}}

{{range .PackageDescriptor.Metadata.Keywords}} {{.}} diff --git a/templates/package/content/chef.tmpl b/templates/package/content/chef.tmpl index 2596f8d493..0588c6e4b3 100644 --- a/templates/package/content/chef.tmpl +++ b/templates/package/content/chef.tmpl @@ -1,23 +1,23 @@ {{if eq .PackageDescriptor.Package.Type "chef"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
knife[:supermarket_site] = ''
- +
knife supermarket install {{.PackageDescriptor.Package.Name}} {{.PackageDescriptor.Version.Version}}
- +
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Description}}

{{.PackageDescriptor.Metadata.Description}}

{{end}} {{if .PackageDescriptor.Metadata.LongDescription}}{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.LongDescription}}{{end}} @@ -25,13 +25,13 @@ {{end}} {{if .PackageDescriptor.Metadata.Dependencies}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

{{.locale.Tr "packages.dependency.id"}}{{.locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
- - + + diff --git a/templates/package/content/composer.tmpl b/templates/package/content/composer.tmpl index 80997c583f..862f1c6925 100644 --- a/templates/package/content/composer.tmpl +++ b/templates/package/content/composer.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "composer"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
{
 	"repositories": [{
 			"type": "composer",
@@ -13,34 +13,34 @@
 }
- +
composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}
- +
{{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if or .PackageDescriptor.Metadata.Require .PackageDescriptor.Metadata.RequireDev}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

- {{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")}} + {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (ctx.Locale.Tr "packages.composer.dependencies")}} + {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (ctx.Locale.Tr "packages.composer.dependencies.development")}}
{{end}} {{if or .PackageDescriptor.Metadata.Keywords}} -

{{.locale.Tr "packages.keywords"}}

+

{{ctx.Locale.Tr "packages.keywords"}}

{{range .PackageDescriptor.Metadata.Keywords}} {{.}} diff --git a/templates/package/content/composer_dependencies.tmpl b/templates/package/content/composer_dependencies.tmpl index b55c1b5b88..dba45750b7 100644 --- a/templates/package/content/composer_dependencies.tmpl +++ b/templates/package/content/composer_dependencies.tmpl @@ -3,8 +3,8 @@
{{.locale.Tr "packages.dependency.id"}}{{.locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
- - + + diff --git a/templates/package/content/conan.tmpl b/templates/package/content/conan.tmpl index c8904216af..55b84d12b1 100644 --- a/templates/package/content/conan.tmpl +++ b/templates/package/content/conan.tmpl @@ -1,30 +1,30 @@ {{if eq .PackageDescriptor.Package.Type "conan"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
conan remote add gitea 
- +
conan install --remote=gitea {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}
- +
{{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
{{end}} {{if or .PackageDescriptor.Metadata.Keywords}} -

{{.locale.Tr "packages.keywords"}}

+

{{ctx.Locale.Tr "packages.keywords"}}

{{range .PackageDescriptor.Metadata.Keywords}} {{.}} diff --git a/templates/package/content/conda.tmpl b/templates/package/content/conda.tmpl index 23d640944b..0fd0c3db3f 100644 --- a/templates/package/content/conda.tmpl +++ b/templates/package/content/conda.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "conda"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
channel_alias: 
 channels:
   - 
@@ -11,18 +11,18 @@ default_channels:
   - 
- + {{$channel := .PackageDescriptor.PackageProperties.GetByName "conda.channel"}}
conda install{{if $channel}} -c {{$channel}}{{end}} {{.PackageDescriptor.PackageProperties.GetByName "conda.name"}}={{.PackageDescriptor.Version.Version}}
- +
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Summary}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{else}}{{.PackageDescriptor.Metadata.Summary}}{{end}}
diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl index cba5d9e7c1..f5ee902c94 100644 --- a/templates/package/content/container.tmpl +++ b/templates/package/content/container.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "container"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- + {{if eq .PackageDescriptor.Metadata.Type "helm"}}
helm pull oci://{{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}} --version {{.PackageDescriptor.Version.LowerVersion}}
{{else}} @@ -15,23 +15,23 @@ {{end}}
- +
{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}
- +
{{if .PackageDescriptor.Metadata.Manifests}} -

{{.locale.Tr "packages.container.multi_arch"}}

+

{{ctx.Locale.Tr "packages.container.multi_arch"}}

{{.root.locale.Tr "packages.dependency.id"}}{{.root.locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
- - - + + + @@ -47,13 +47,13 @@ {{end}} {{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if .PackageDescriptor.Metadata.ImageLayers}} -

{{.locale.Tr "packages.container.layers"}}

+

{{ctx.Locale.Tr "packages.container.layers"}}

{{.locale.Tr "packages.container.digest"}}{{.locale.Tr "packages.container.multi_arch"}}{{.locale.Tr "admin.packages.size"}}{{ctx.Locale.Tr "packages.container.digest"}}{{ctx.Locale.Tr "packages.container.multi_arch"}}{{ctx.Locale.Tr "admin.packages.size"}}
@@ -67,13 +67,13 @@ {{end}} {{if .PackageDescriptor.Metadata.Labels}} -

{{.locale.Tr "packages.container.labels"}}

+

{{ctx.Locale.Tr "packages.container.labels"}}

- - + + diff --git a/templates/package/content/cran.tmpl b/templates/package/content/cran.tmpl index 1f3200130c..f9a3f70107 100644 --- a/templates/package/content/cran.tmpl +++ b/templates/package/content/cran.tmpl @@ -1,30 +1,30 @@ {{if eq .PackageDescriptor.Package.Type "cran"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
options("repos" = c(getOption("repos"), c(gitea="")))
- +
install.packages("{{.PackageDescriptor.Package.Name}}")
- +
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Title}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Title}}{{else}}{{end}}
{{end}} {{if or .PackageDescriptor.Metadata.Imports .PackageDescriptor.Metadata.Depends .PackageDescriptor.Metadata.LinkingTo .PackageDescriptor.Metadata.Suggests}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

{{.locale.Tr "packages.container.labels.key"}}{{.locale.Tr "packages.container.labels.value"}}{{ctx.Locale.Tr "packages.container.labels.key"}}{{ctx.Locale.Tr "packages.container.labels.value"}}
diff --git a/templates/package/content/debian.tmpl b/templates/package/content/debian.tmpl index b222767035..242ee1fba4 100644 --- a/templates/package/content/debian.tmpl +++ b/templates/package/content/debian.tmpl @@ -1,40 +1,40 @@ {{if eq .PackageDescriptor.Package.Type "debian"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
sudo curl  -o /etc/apt/trusted.gpg.d/gitea-{{$.PackageDescriptor.Owner.Name}}.asc
 echo "deb  $distribution $component" | sudo tee -a /etc/apt/sources.list.d/gitea.list
 sudo apt update
-

{{.locale.Tr "packages.debian.registry.info" | Safe}}

+

{{ctx.Locale.Tr "packages.debian.registry.info" | Safe}}

- +
sudo apt install {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}
- +
-

{{.locale.Tr "packages.debian.repository"}}

+

{{ctx.Locale.Tr "packages.debian.repository"}}

- + - + - + @@ -42,14 +42,14 @@ sudo apt update {{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if .PackageDescriptor.Metadata.Dependencies}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

{{.locale.Tr "packages.debian.repository.distributions"}}
{{ctx.Locale.Tr "packages.debian.repository.distributions"}}
{{StringUtils.Join .Distributions ", "}}
{{.locale.Tr "packages.debian.repository.components"}}
{{ctx.Locale.Tr "packages.debian.repository.components"}}
{{StringUtils.Join .Components ", "}}
{{.locale.Tr "packages.debian.repository.architectures"}}
{{ctx.Locale.Tr "packages.debian.repository.architectures"}}
{{StringUtils.Join .Architectures ", "}}
diff --git a/templates/package/content/generic.tmpl b/templates/package/content/generic.tmpl index 01012a5f0a..ba4df0a57d 100644 --- a/templates/package/content/generic.tmpl +++ b/templates/package/content/generic.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "generic"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +

 {{- range .PackageDescriptor.Files -}}
 curl 
@@ -11,7 +11,7 @@ curl 
-				
+				
 			
diff --git a/templates/package/content/go.tmpl b/templates/package/content/go.tmpl index db25cc2b92..f98fc69fb6 100644 --- a/templates/package/content/go.tmpl +++ b/templates/package/content/go.tmpl @@ -1,13 +1,13 @@ {{if eq .PackageDescriptor.Package.Type "go"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
GOPROXY= go install {{$.PackageDescriptor.Package.Name}}@{{$.PackageDescriptor.Version.Version}}
- +
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"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
helm repo add {{AppDomain}} 
 helm repo update
- +
helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}
- +
{{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if .PackageDescriptor.Metadata.Dependencies}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

- - + + @@ -47,7 +47,7 @@ helm repo update {{end}} {{if .PackageDescriptor.Metadata.Keywords}} -

{{.locale.Tr "packages.keywords"}}

+

{{ctx.Locale.Tr "packages.keywords"}}

{{range .PackageDescriptor.Metadata.Keywords}} {{.}} diff --git a/templates/package/content/maven.tmpl b/templates/package/content/maven.tmpl index f5da72d711..b2cd567e16 100644 --- a/templates/package/content/maven.tmpl +++ b/templates/package/content/maven.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "maven"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
<repositories>
 	<repository>
 		<id>gitea</id>
@@ -24,7 +24,7 @@
 </distributionManagement>
- +
<dependency>
 	<groupId>{{.PackageDescriptor.Metadata.GroupID}}</groupId>
 	<artifactId>{{.PackageDescriptor.Metadata.ArtifactID}}</artifactId>
@@ -32,28 +32,28 @@
 </dependency>
- +
mvn install
- +
mvn dependency:get -DremoteRepositories= -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}
- +
{{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if .PackageDescriptor.Metadata.Dependencies}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

{{range .PackageDescriptor.Metadata.Dependencies}} diff --git a/templates/package/content/npm.tmpl b/templates/package/content/npm.tmpl index c648d96162..882e999bed 100644 --- a/templates/package/content/npm.tmpl +++ b/templates/package/content/npm.tmpl @@ -1,27 +1,27 @@ {{if eq .PackageDescriptor.Package.Type "npm"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
{{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry=
- +
npm install {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}
- +
"{{.PackageDescriptor.Package.Name}}": "{{.PackageDescriptor.Version.Version}}"
- +
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Readme}}
@@ -34,19 +34,19 @@ {{end}} {{if or .PackageDescriptor.Metadata.Dependencies .PackageDescriptor.Metadata.DevelopmentDependencies .PackageDescriptor.Metadata.PeerDependencies .PackageDescriptor.Metadata.OptionalDependencies}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

- {{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")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Dependencies "title" (ctx.Locale.Tr "packages.npm.dependencies")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.development")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.PeerDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.peer")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.OptionalDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.optional")}}
{{end}} {{if .PackageDescriptor.Metadata.Keywords}} -

{{.locale.Tr "packages.keywords"}}

+

{{ctx.Locale.Tr "packages.keywords"}}

{{range .PackageDescriptor.Metadata.Keywords}} {{.}} diff --git a/templates/package/content/npm_dependencies.tmpl b/templates/package/content/npm_dependencies.tmpl index b55c1b5b88..dba45750b7 100644 --- a/templates/package/content/npm_dependencies.tmpl +++ b/templates/package/content/npm_dependencies.tmpl @@ -3,8 +3,8 @@
{{.locale.Tr "packages.dependency.id"}}{{.locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
- - + + diff --git a/templates/package/content/nuget.tmpl b/templates/package/content/nuget.tmpl index 2b3a74316c..04dac89843 100644 --- a/templates/package/content/nuget.tmpl +++ b/templates/package/content/nuget.tmpl @@ -1,23 +1,23 @@ {{if eq .PackageDescriptor.Package.Type "nuget"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token 
- +
dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}
- +
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{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}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

{{.root.locale.Tr "packages.dependency.id"}}{{.root.locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
- - - + + + diff --git a/templates/package/content/pub.tmpl b/templates/package/content/pub.tmpl index 075d52cf49..8657d55dbf 100644 --- a/templates/package/content/pub.tmpl +++ b/templates/package/content/pub.tmpl @@ -1,18 +1,18 @@ {{if eq .PackageDescriptor.Package.Type "pub"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=
- +
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Description}}
{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if .PackageDescriptor.Metadata.Readme}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
{{end}} {{end}} diff --git a/templates/package/content/pypi.tmpl b/templates/package/content/pypi.tmpl index 1534197219..ef9beb4280 100644 --- a/templates/package/content/pypi.tmpl +++ b/templates/package/content/pypi.tmpl @@ -1,18 +1,18 @@ {{if eq .PackageDescriptor.Package.Type "pypi"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
pip install --index-url  {{.PackageDescriptor.Package.Name}}
- +
{{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Summary}}{{.PackageDescriptor.Metadata.Summary}}{{end}}

{{if .PackageDescriptor.Metadata.LongDescription}} @@ -23,9 +23,9 @@
{{end}} {{if .PackageDescriptor.Metadata.RequiresPython}} -

{{.locale.Tr "packages.requirements"}}

+

{{ctx.Locale.Tr "packages.requirements"}}

- {{.locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}} + {{ctx.Locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}}
{{end}} {{end}} diff --git a/templates/package/content/rpm.tmpl b/templates/package/content/rpm.tmpl index fc7af639aa..3fd979567c 100644 --- a/templates/package/content/rpm.tmpl +++ b/templates/package/content/rpm.tmpl @@ -1,33 +1,33 @@ {{if eq .PackageDescriptor.Package.Type "rpm"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- -
# {{.locale.Tr "packages.rpm.distro.redhat"}}
+				
+				
# {{ctx.Locale.Tr "packages.rpm.distro.redhat"}}
 dnf config-manager --add-repo 
 
-# {{.locale.Tr "packages.rpm.distro.suse"}}
+# {{ctx.Locale.Tr "packages.rpm.distro.suse"}}
 zypper addrepo 
- +
-
# {{.locale.Tr "packages.rpm.distro.redhat"}}
+					
# {{ctx.Locale.Tr "packages.rpm.distro.redhat"}}
 dnf install {{$.PackageDescriptor.Package.Name}}
 
-# {{.locale.Tr "packages.rpm.distro.suse"}}
+# {{ctx.Locale.Tr "packages.rpm.distro.suse"}}
 zypper install {{$.PackageDescriptor.Package.Name}}
- +
{{if or .PackageDescriptor.Metadata.Summary .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Summary}}
{{.PackageDescriptor.Metadata.Summary}}
{{end}} {{if .PackageDescriptor.Metadata.Description}}
{{.PackageDescriptor.Metadata.Description}}
{{end}} {{end}} diff --git a/templates/package/content/rubygems.tmpl b/templates/package/content/rubygems.tmpl index f94968b094..180ff60f7d 100644 --- a/templates/package/content/rubygems.tmpl +++ b/templates/package/content/rubygems.tmpl @@ -1,39 +1,39 @@ {{if eq .PackageDescriptor.Package.Type "rubygems"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
gem install {{.PackageDescriptor.Package.Name}} --version "{{.PackageDescriptor.Version.Version}}" --source ""
- +
source "" do
 	gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}"
 end
- +
{{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{.PackageDescriptor.Metadata.Description}}
{{end}} {{if or .PackageDescriptor.Metadata.RequiredRubyVersion .PackageDescriptor.Metadata.RequiredRubygemsVersion}} -

{{.locale.Tr "packages.requirements"}}

+

{{ctx.Locale.Tr "packages.requirements"}}

- {{if .PackageDescriptor.Metadata.RequiredRubyVersion}}

{{.locale.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}

{{end}} - {{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}

{{.locale.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}

{{end}} + {{if .PackageDescriptor.Metadata.RequiredRubyVersion}}

{{ctx.Locale.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}

{{end}} + {{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}

{{ctx.Locale.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}

{{end}}
{{end}} {{if or .PackageDescriptor.Metadata.RuntimeDependencies .PackageDescriptor.Metadata.DevelopmentDependencies}} -

{{.locale.Tr "packages.dependencies"}}

+

{{ctx.Locale.Tr "packages.dependencies"}}

- {{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")}} + {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RuntimeDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.runtime")}} + {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.development")}}
{{end}} diff --git a/templates/package/content/rubygems_dependencies.tmpl b/templates/package/content/rubygems_dependencies.tmpl index 80febc84f4..2c42dcead2 100644 --- a/templates/package/content/rubygems_dependencies.tmpl +++ b/templates/package/content/rubygems_dependencies.tmpl @@ -3,8 +3,8 @@
{{.locale.Tr "packages.dependency.id"}}{{.locale.Tr "packages.dependency.version"}}{{.locale.Tr "packages.nuget.dependency.framework"}}{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.nuget.dependency.framework"}}
- - + + diff --git a/templates/package/content/swift.tmpl b/templates/package/content/swift.tmpl index 92559491a9..ca36033df9 100644 --- a/templates/package/content/swift.tmpl +++ b/templates/package/content/swift.tmpl @@ -1,36 +1,36 @@ {{if eq .PackageDescriptor.Package.Type "swift"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
swift package-registry set 
- +
dependencies: [
 	.package(id: "{{.PackageDescriptor.Package.Name}}", from:"{{.PackageDescriptor.Version.Version}}")
 ]
- +
swift package resolve
- +
{{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}}
{{end}} {{if .PackageDescriptor.Metadata.Keywords}} -

{{.locale.Tr "packages.keywords"}}

+

{{ctx.Locale.Tr "packages.keywords"}}

{{range .PackageDescriptor.Metadata.Keywords}} {{.}} diff --git a/templates/package/content/vagrant.tmpl b/templates/package/content/vagrant.tmpl index 8590b44b37..bbb461e4fb 100644 --- a/templates/package/content/vagrant.tmpl +++ b/templates/package/content/vagrant.tmpl @@ -1,18 +1,18 @@ {{if eq .PackageDescriptor.Package.Type "vagrant"}} -

{{.locale.Tr "packages.installation"}}

+

{{ctx.Locale.Tr "packages.installation"}}

- +
vagrant box add --box-version {{.PackageDescriptor.Version.Version}} ""
- +
{{if .PackageDescriptor.Metadata.Description}} -

{{.locale.Tr "packages.about"}}

+

{{ctx.Locale.Tr "packages.about"}}

{{.PackageDescriptor.Metadata.Description}}
{{end}} {{end}} diff --git a/templates/package/metadata/alpine.tmpl b/templates/package/metadata/alpine.tmpl index 9011bfce10..73cbc06aac 100644 --- a/templates/package/metadata/alpine.tmpl +++ b/templates/package/metadata/alpine.tmpl @@ -1,5 +1,5 @@ {{if eq .PackageDescriptor.Package.Type "alpine"}} - {{if .PackageDescriptor.Metadata.Maintainer}}
{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} + {{if .PackageDescriptor.Metadata.Maintainer}}
{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} {{end}} diff --git a/templates/package/metadata/cargo.tmpl b/templates/package/metadata/cargo.tmpl index 79078b4008..9cc0fde730 100644 --- a/templates/package/metadata/cargo.tmpl +++ b/templates/package/metadata/cargo.tmpl @@ -1,7 +1,7 @@ {{if eq .PackageDescriptor.Package.Type "cargo"}} - {{range .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.cargo.details.repository_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.DocumentationURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.cargo.details.documentation_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} + {{range .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.cargo.details.repository_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.cargo.details.documentation_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} {{end}} diff --git a/templates/package/metadata/chef.tmpl b/templates/package/metadata/chef.tmpl index b414535f9a..fa6e068d23 100644 --- a/templates/package/metadata/chef.tmpl +++ b/templates/package/metadata/chef.tmpl @@ -1,5 +1,5 @@ {{if eq .PackageDescriptor.Package.Type "chef"}} - {{if .PackageDescriptor.Metadata.Author}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.repository_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} + {{if .PackageDescriptor.Metadata.Author}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} {{end}} diff --git a/templates/package/metadata/composer.tmpl b/templates/package/metadata/composer.tmpl index e6f67a1dd5..fbdc33f73d 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}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}
{{end}} - {{if .PackageDescriptor.Metadata.Homepage}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{range .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}
{{end}} + {{range .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}
{{end}} + {{if .PackageDescriptor.Metadata.Homepage}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{range .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}
{{end}} {{end}} diff --git a/templates/package/metadata/conan.tmpl b/templates/package/metadata/conan.tmpl index 0060f91d75..55892bb919 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}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.conan.details.repository"}}
{{end}} + {{if .PackageDescriptor.Metadata.Author}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.conan.details.repository"}}
{{end}} {{end}} diff --git a/templates/package/metadata/conda.tmpl b/templates/package/metadata/conda.tmpl index 4021e6b91c..fb7c212863 100644 --- a/templates/package/metadata/conda.tmpl +++ b/templates/package/metadata/conda.tmpl @@ -1,6 +1,6 @@ {{if eq .PackageDescriptor.Package.Type "conda"}} {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.conda.details.repository_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.DocumentationURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.conda.details.documentation_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.conda.details.repository_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.conda.details.documentation_site"}}
{{end}} {{end}} diff --git a/templates/package/metadata/container.tmpl b/templates/package/metadata/container.tmpl index 7ff137080e..b05ef0b846 100644 --- a/templates/package/metadata/container.tmpl +++ b/templates/package/metadata/container.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "container"}} -
{{svg "octicon-package" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}
- {{if .PackageDescriptor.Metadata.Platform}}
{{svg "octicon-cpu" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Platform}}
{{end}} - {{range .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}
{{end}} +
{{svg "octicon-package" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}
+ {{if .PackageDescriptor.Metadata.Platform}}
{{svg "octicon-cpu" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Platform}}
{{end}} + {{range .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}
{{end}} {{if .PackageDescriptor.Metadata.Licenses}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Licenses}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.repository_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.DocumentationURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.documentation_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.documentation_site"}}
{{end}} {{end}} diff --git a/templates/package/metadata/cran.tmpl b/templates/package/metadata/cran.tmpl index 7b113ec797..1d5a11e196 100644 --- a/templates/package/metadata/cran.tmpl +++ b/templates/package/metadata/cran.tmpl @@ -1,5 +1,5 @@ {{if eq .PackageDescriptor.Package.Type "cran"}} - {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} - {{range .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "mr-3"}} {{.}}
{{end}} - {{range .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "mr-3"}} {{$.locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} + {{range .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "mr-3"}} {{.}}
{{end}} + {{range .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} {{end}} diff --git a/templates/package/metadata/debian.tmpl b/templates/package/metadata/debian.tmpl index 93b6db3bd2..3cd845c9fe 100644 --- a/templates/package/metadata/debian.tmpl +++ b/templates/package/metadata/debian.tmpl @@ -1,4 +1,4 @@ {{if eq .PackageDescriptor.Package.Type "debian"}} - {{if .PackageDescriptor.Metadata.Maintainer}}
{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.Maintainer}}
{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Maintainer}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} {{end}} diff --git a/templates/package/metadata/helm.tmpl b/templates/package/metadata/helm.tmpl index 33e603bb32..499f77e80d 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}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}
{{end}} - {{if .PackageDescriptor.Metadata.Home}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} + {{range .PackageDescriptor.Metadata.Maintainers}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.Name}}
{{end}} + {{if .PackageDescriptor.Metadata.Home}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} {{end}} diff --git a/templates/package/metadata/maven.tmpl b/templates/package/metadata/maven.tmpl index 78c0d32267..36f5eca840 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}}
{{svg "octicon-note" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Name}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{range .PackageDescriptor.Metadata.Licenses}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{range .PackageDescriptor.Metadata.Licenses}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}
{{end}} {{end}} diff --git a/templates/package/metadata/npm.tmpl b/templates/package/metadata/npm.tmpl index cbebf996f4..9794d851af 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}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} + {{if .PackageDescriptor.Metadata.Author}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} {{range .PackageDescriptor.VersionProperties}} - {{if eq .Name "npm.tag"}}
{{svg "octicon-versions" 16 "gt-mr-3"}} {{.Value}}
{{end}} + {{if eq .Name "npm.tag"}}
{{svg "octicon-versions" 16 "gt-mr-3"}} {{.Value}}
{{end}} {{end}} {{end}} diff --git a/templates/package/metadata/nuget.tmpl b/templates/package/metadata/nuget.tmpl index 3b56102203..48c8d602dd 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}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Authors}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Authors}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} {{end}} diff --git a/templates/package/metadata/pub.tmpl b/templates/package/metadata/pub.tmpl index 8147ba85cc..1e4a90e78c 100644 --- a/templates/package/metadata/pub.tmpl +++ b/templates/package/metadata/pub.tmpl @@ -1,5 +1,5 @@ {{if eq .PackageDescriptor.Package.Type "pub"}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.repository_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.DocumentationURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.documentation_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.repository_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.documentation_site"}}
{{end}} {{end}} diff --git a/templates/package/metadata/pypi.tmpl b/templates/package/metadata/pypi.tmpl index 205487d3ce..f447cb7f4f 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}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} + {{if .PackageDescriptor.Metadata.Author}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} {{end}} diff --git a/templates/package/metadata/rpm.tmpl b/templates/package/metadata/rpm.tmpl index 1bbc2c89ae..026f129590 100644 --- a/templates/package/metadata/rpm.tmpl +++ b/templates/package/metadata/rpm.tmpl @@ -1,4 +1,4 @@ {{if eq .PackageDescriptor.Package.Type "rpm"}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.License}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.License}}
{{end}} {{end}} diff --git a/templates/package/metadata/rubygems.tmpl b/templates/package/metadata/rubygems.tmpl index 7e9af01eb7..62150b1a43 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}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{range .PackageDescriptor.Metadata.Licenses}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}
{{end}} + {{range .PackageDescriptor.Metadata.Authors}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{range .PackageDescriptor.Metadata.Licenses}}
{{svg "octicon-law" 16 "gt-mr-3"}} {{.}}
{{end}} {{end}} diff --git a/templates/package/metadata/swift.tmpl b/templates/package/metadata/swift.tmpl index 8a9ab071fc..3df38e3200 100644 --- a/templates/package/metadata/swift.tmpl +++ b/templates/package/metadata/swift.tmpl @@ -1,4 +1,4 @@ {{if eq .PackageDescriptor.Package.Type "swift"}} - {{if .PackageDescriptor.Metadata.Author.String}}
{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.Author.String}}
{{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} {{end}} diff --git a/templates/package/metadata/vagrant.tmpl b/templates/package/metadata/vagrant.tmpl index 030da9c156..62c50a0dfd 100644 --- a/templates/package/metadata/vagrant.tmpl +++ b/templates/package/metadata/vagrant.tmpl @@ -1,5 +1,5 @@ {{if eq .PackageDescriptor.Package.Type "vagrant"}} - {{if .PackageDescriptor.Metadata.Author}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.details.project_site"}}
{{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{.locale.Tr "packages.conan.details.repository"}}
{{end}} + {{if .PackageDescriptor.Metadata.Author}}
{{svg "octicon-person" 16 "gt-mr-3"}} {{.PackageDescriptor.Metadata.Author}}
{{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.details.project_site"}}
{{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
{{svg "octicon-link-external" 16 "gt-mr-3"}} {{ctx.Locale.Tr "packages.conan.details.repository"}}
{{end}} {{end}} diff --git a/templates/package/settings.tmpl b/templates/package/settings.tmpl index d6c431de03..6ef62753e2 100644 --- a/templates/package/settings.tmpl +++ b/templates/package/settings.tmpl @@ -4,12 +4,12 @@
{{template "user/overview/header" .}} {{template "base/alert" .}} -

{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}}) / {{.locale.Tr "repo.settings"}}

+

{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}}) / {{ctx.Locale.Tr "repo.settings"}}

- {{.locale.Tr "packages.settings.link"}} + {{ctx.Locale.Tr "packages.settings.link"}}

-

{{.locale.Tr "packages.settings.link.description"}}

+

{{ctx.Locale.Tr "packages.settings.link.description"}}

{{template "base/disable_form_autofill"}} {{.CsrfTokenHtml}} @@ -22,7 +22,7 @@ {{end}} {{svg "octicon-triangle-down" 14 "dropdown icon"}} -
{{.locale.Tr "packages.settings.link.select"}}
+
{{ctx.Locale.Tr "packages.settings.link.select"}}
- +

- {{.locale.Tr "repo.settings.danger_zone"}} + {{ctx.Locale.Tr "repo.settings.danger_zone"}}

-
{{.locale.Tr "packages.settings.delete"}}
-
{{.locale.Tr "packages.settings.delete.description"}}
+
{{ctx.Locale.Tr "packages.settings.delete"}}
+
{{ctx.Locale.Tr "packages.settings.delete.description"}}
- +
{{else}} -
{{.locale.Tr "packages.owner.settings.cleanuprules.none"}}
+
{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.none"}}
{{end}}
diff --git a/templates/package/shared/cleanup_rules/preview.tmpl b/templates/package/shared/cleanup_rules/preview.tmpl index 5992ea60be..7a50d5ccca 100644 --- a/templates/package/shared/cleanup_rules/preview.tmpl +++ b/templates/package/shared/cleanup_rules/preview.tmpl @@ -1,17 +1,17 @@ -

{{.locale.Tr "packages.owner.settings.cleanuprules.preview"}}

+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview"}}

-

{{.locale.Tr "packages.owner.settings.cleanuprules.preview.overview" (len .VersionsToRemove)}}

+

{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview.overview" (len .VersionsToRemove)}}

{{.root.locale.Tr "packages.dependency.id"}}{{.root.locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
- - - - - - + + + + + + @@ -26,7 +26,7 @@ {{else}} - + {{end}} diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index d30767cd7f..249ba8c53c 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -3,13 +3,13 @@
{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}} - +
@@ -28,9 +28,9 @@ {{$hasRepositoryAccess = index $.RepositoryAccessMap .Repository.ID}} {{end}} {{if $hasRepositoryAccess}} - {{$.locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.Link (.Repository.FullName | Escape) | Safe}} + {{ctx.Locale.Tr "packages.published_by_in" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) .Repository.Link (.Repository.FullName | Escape) | Safe}} {{else}} - {{$.locale.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} + {{ctx.Locale.Tr "packages.published_by" $timeStr .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} {{end}}
@@ -40,15 +40,15 @@ {{if not .HasPackages}}
{{svg "octicon-package" 48}} -

{{.locale.Tr "packages.empty"}}

+

{{ctx.Locale.Tr "packages.empty"}}

{{if and .Repository .CanWritePackages}} {{$packagesUrl := URLJoin .Owner.HomeLink "-" "packages"}} -

{{.locale.Tr "packages.empty.repo" $packagesUrl | Safe}}

+

{{ctx.Locale.Tr "packages.empty.repo" $packagesUrl | Safe}}

{{end}} -

{{.locale.Tr "packages.empty.documentation" "https://docs.gitea.com/usage/packages/overview/" | Safe}}

+

{{ctx.Locale.Tr "packages.empty.documentation" "https://docs.gitea.com/usage/packages/overview/" | Safe}}

{{else}} -

{{.locale.Tr "packages.filter.no_result"}}

+

{{ctx.Locale.Tr "packages.filter.no_result"}}

{{end}} {{end}} {{template "base/paginate" .}} diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index b372d45df2..18b4916f4a 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -1,21 +1,21 @@ -

{{.PackageDescriptor.Package.Name}} / {{.locale.Tr "packages.versions"}}

+

{{.PackageDescriptor.Package.Name}} / {{ctx.Locale.Tr "packages.versions"}}

{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}} {{if eq .PackageDescriptor.Package.Type "container"}} {{end}} - +
@@ -25,13 +25,13 @@
{{.Version.LowerVersion}}
- {{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}} + {{ctx.Locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
{{else}} -

{{.locale.Tr "packages.filter.no_result"}}

+

{{ctx.Locale.Tr "packages.filter.no_result"}}

{{end}} {{template "base/paginate" .}} 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 @@
{{$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}}
@@ -41,7 +41,7 @@ {{template "package/content/vagrant" .}}
- {{.locale.Tr "packages.details"}} + {{ctx.Locale.Tr "packages.details"}}
{{svg .PackageDescriptor.Package.Type.SVGName 16 "gt-mr-3"}} {{.PackageDescriptor.Package.Type.Name}}
{{if .HasRepositoryAccess}} @@ -75,7 +75,7 @@
{{if not (eq .PackageDescriptor.Package.Type "container")}}
- {{.locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}}) + {{ctx.Locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})
{{range .PackageDescriptor.Files}}
@@ -86,8 +86,8 @@
{{end}}
- {{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}}) - {{.locale.Tr "packages.versions.view_all"}} + {{ctx.Locale.Tr "packages.versions"}} ({{.TotalVersionCount}}) + {{ctx.Locale.Tr "packages.versions.view_all"}}
{{range .LatestVersions}}
@@ -100,10 +100,10 @@
{{if .HasRepositoryAccess}} -
{{svg "octicon-issue-opened" 16 "gt-mr-3"}} {{.locale.Tr "repo.issues"}}
+
{{svg "octicon-issue-opened" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.issues"}}
{{end}} {{if .CanWritePackages}} -
{{svg "octicon-tools" 16 "gt-mr-3"}} {{.locale.Tr "repo.settings"}}
+
{{svg "octicon-tools" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.settings"}}
{{end}}
{{end}} -- cgit v1.2.3
{{.locale.Tr "admin.packages.type"}}{{.locale.Tr "admin.packages.name"}}{{.locale.Tr "admin.packages.version"}}{{.locale.Tr "admin.packages.creator"}}{{.locale.Tr "admin.packages.size"}}{{.locale.Tr "admin.packages.published"}}{{ctx.Locale.Tr "admin.packages.type"}}{{ctx.Locale.Tr "admin.packages.name"}}{{ctx.Locale.Tr "admin.packages.version"}}{{ctx.Locale.Tr "admin.packages.creator"}}{{ctx.Locale.Tr "admin.packages.size"}}{{ctx.Locale.Tr "admin.packages.published"}}
{{.locale.Tr "packages.owner.settings.cleanuprules.preview.none"}}{{ctx.Locale.Tr "packages.owner.settings.cleanuprules.preview.none"}}