diff --git a/modules/context/context.go b/modules/context/context.go index dcc43973ca2..68f8a1b408c 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -794,7 +794,7 @@ func Contexter() func(next http.Handler) http.Handler { ctx.Data["UnitPullsGlobalDisabled"] = unit.TypePullRequests.UnitGlobalDisabled() ctx.Data["UnitProjectsGlobalDisabled"] = unit.TypeProjects.UnitGlobalDisabled() - ctx.Data["i18n"] = locale + ctx.Data["locale"] = locale ctx.Data["AllLangs"] = translation.AllLangs() next.ServeHTTP(ctx.Resp, ctx.Req) diff --git a/routers/install/install.go b/routers/install/install.go index bf95cae1c61..27c3509fdec 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -69,7 +69,7 @@ func Init(next http.Handler) http.Handler { Render: rnd, Session: session.GetSession(req), Data: map[string]interface{}{ - "i18n": locale, + "locale": locale, "Title": locale.Tr("install.install"), "PageIsInstall": true, "DbTypeNames": dbTypeNames, diff --git a/routers/install/routes.go b/routers/install/routes.go index e77081afe0a..32829ede9e2 100644 --- a/routers/install/routes.go +++ b/routers/install/routes.go @@ -57,7 +57,7 @@ func installRecovery() func(next http.Handler) http.Handler { store := dataStore{ "Language": lc.Language(), "CurrentURL": setting.AppSubURL + req.URL.RequestURI(), - "i18n": lc, + "locale": lc, "SignedUserID": int64(0), "SignedUserName": "", } diff --git a/routers/web/base.go b/routers/web/base.go index 5f817c77ce7..c7ade55a61f 100644 --- a/routers/web/base.go +++ b/routers/web/base.go @@ -139,7 +139,7 @@ func Recovery() func(next http.Handler) http.Handler { store := dataStore{ "Language": lc.Language(), "CurrentURL": setting.AppSubURL + req.URL.RequestURI(), - "i18n": lc, + "locale": lc, } user := context.GetContextUser(req) diff --git a/services/mailer/mail.go b/services/mailer/mail.go index 52011ce352e..b8d79bd818a 100644 --- a/services/mailer/mail.go +++ b/services/mailer/mail.go @@ -80,7 +80,7 @@ func sendUserMail(language string, u *user_model.User, tpl base.TplName, code, s "Code": code, "Language": locale.Language(), // helper - "i18n": locale, + "locale": locale, "Str2html": templates.Str2html, "DotEscape": templates.DotEscape, } @@ -131,7 +131,7 @@ func SendActivateEmailMail(u *user_model.User, email *user_model.EmailAddress) { "Email": email.Email, "Language": locale.Language(), // helper - "i18n": locale, + "locale": locale, "Str2html": templates.Str2html, "DotEscape": templates.DotEscape, } @@ -162,7 +162,7 @@ func SendRegisterNotifyMail(u *user_model.User) { "Username": u.Name, "Language": locale.Language(), // helper - "i18n": locale, + "locale": locale, "Str2html": templates.Str2html, "DotEscape": templates.DotEscape, } @@ -196,7 +196,7 @@ func SendCollaboratorMail(u, doer *user_model.User, repo *repo_model.Repository) "Link": repo.HTMLURL(), "Language": locale.Language(), // helper - "i18n": locale, + "locale": locale, "Str2html": templates.Str2html, "DotEscape": templates.DotEscape, } @@ -281,7 +281,7 @@ func composeIssueCommentMessages(ctx *mailCommentContext, lang string, recipient "ReviewComments": reviewComments, "Language": locale.Language(), // helper - "i18n": locale, + "locale": locale, "Str2html": templates.Str2html, "DotEscape": templates.DotEscape, } diff --git a/services/mailer/mail_release.go b/services/mailer/mail_release.go index b6bddeac045..dd9f78612c4 100644 --- a/services/mailer/mail_release.go +++ b/services/mailer/mail_release.go @@ -75,7 +75,7 @@ func mailNewRelease(ctx context.Context, lang string, tos []string, rel *models. "Subject": subject, "Language": locale.Language(), // helper - "i18n": locale, + "locale": locale, "Str2html": templates.Str2html, "DotEscape": templates.DotEscape, } diff --git a/services/mailer/mail_repo.go b/services/mailer/mail_repo.go index 7f856f2d403..6fe9df0926e 100644 --- a/services/mailer/mail_repo.go +++ b/services/mailer/mail_repo.go @@ -74,7 +74,7 @@ func sendRepoTransferNotifyMailPerLang(lang string, newOwner, doer *user_model.U "Language": locale.Language(), "Destination": destination, // helper - "i18n": locale, + "locale": locale, "Str2html": templates.Str2html, "DotEscape": templates.DotEscape, } diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 6e491d6cf41..af3f381c8e5 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -4,7 +4,7 @@
{{template "base/alert" .}}

- {{.i18n.Tr "admin.auths.edit"}} + {{.locale.Tr "admin.auths.edit"}}

@@ -12,12 +12,12 @@ {{.CsrfTokenHtml}}
- + {{.Source.TypeName}}
- +
@@ -25,7 +25,7 @@ {{if or .Source.IsLDAP .Source.IsDLDAP}} {{ $cfg:=.Source.Cfg }}
- +
- +
- +
- +
{{if .Source.IsLDAP}}
- +
- +
{{end}}
- +
{{if .Source.IsDLDAP}}
- +
{{end}}
- +
- +
- + -

{{.i18n.Tr "admin.auths.restricted_filter_helper"}}

+

{{.locale.Tr "admin.auths.restricted_filter_helper"}}

- - + +
- +
- +
- +
- +
- +
@@ -113,33 +113,33 @@
- +
- +
- +
- +
- +
- +
- +
@@ -148,31 +148,31 @@ {{if .Source.IsLDAP}}
- +
- +
- +
{{end}}
- + -

{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}

+

{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}

- +
@@ -182,7 +182,7 @@ {{if .Source.IsSMTP}} {{ $cfg:=.Source.Cfg }}
- +
- +
- +
- +
-

{{.i18n.Tr "admin.auths.force_smtps_helper"}}

+

{{.locale.Tr "admin.auths.force_smtps_helper"}}

- +
- + -

{{.i18n.Tr "admin.auths.helo_hostname_helper"}}

+

{{.locale.Tr "admin.auths.helo_hostname_helper"}}

- +
- + -

{{.i18n.Tr "admin.auths.allowed_domains_helper"}}

+

{{.locale.Tr "admin.auths.allowed_domains_helper"}}

- + -

{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}

+

{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}

{{end}} @@ -244,18 +244,18 @@ {{if .Source.IsPAM}} {{ $cfg:=.Source.Cfg }}
- +
- +
- + -

{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}

+

{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}

{{end}} @@ -264,7 +264,7 @@ {{if .Source.IsOAuth2}} {{ $cfg:=.Source.Cfg }}
- +
- +
- +
- +
- +
- + -

{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}

+

{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}

- +
- +
- +
- +
- +
- +
@@ -336,29 +336,29 @@ {{end}}{{end}}
- +
- + -

{{.i18n.Tr "admin.auths.oauth2_required_claim_name_helper"}}

+

{{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}

- + -

{{.i18n.Tr "admin.auths.oauth2_required_claim_value_helper"}}

+

{{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}

- +
- +
- +
{{end}} @@ -368,32 +368,32 @@ {{ $cfg:=.Source.Cfg }}
- + -

{{.i18n.Tr "admin.auths.sspi_auto_create_users_helper"}}

+

{{.locale.Tr "admin.auths.sspi_auto_create_users_helper"}}

- + -

{{.i18n.Tr "admin.auths.sspi_auto_activate_users_helper"}}

+

{{.locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}

- + -

{{.i18n.Tr "admin.auths.sspi_strip_domain_names_helper"}}

+

{{.locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}

- + -

{{.i18n.Tr "admin.auths.sspi_separator_replacement_helper"}}

+

{{.locale.Tr "admin.auths.sspi_separator_replacement_helper"}}

- +
-

{{.i18n.Tr "admin.auths.sspi_default_language_helper"}}

+

{{.locale.Tr "admin.auths.sspi_default_language_helper"}}

{{end}} {{if .Source.IsLDAP}}
- +
{{end}}
- +
- -
{{.i18n.Tr "admin.auths.delete"}}
+ +
{{.locale.Tr "admin.auths.delete"}}
@@ -435,10 +435,10 @@ diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl index f1b4da35eb3..3ce138449d3 100644 --- a/templates/admin/auth/list.tmpl +++ b/templates/admin/auth/list.tmpl @@ -4,9 +4,9 @@
{{template "base/alert" .}}

- {{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) + {{.locale.Tr "admin.auths.auth_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})

@@ -14,12 +14,12 @@ ID - {{.i18n.Tr "admin.auths.name"}} - {{.i18n.Tr "admin.auths.type"}} - {{.i18n.Tr "admin.auths.enabled"}} - {{.i18n.Tr "admin.auths.updated"}} - {{.i18n.Tr "admin.users.created"}} - {{.i18n.Tr "admin.users.edit"}} + {{.locale.Tr "admin.auths.name"}} + {{.locale.Tr "admin.auths.type"}} + {{.locale.Tr "admin.auths.enabled"}} + {{.locale.Tr "admin.auths.updated"}} + {{.locale.Tr "admin.users.created"}} + {{.locale.Tr "admin.users.edit"}} diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 9882cde03bc..6bfda9fcd3b 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -4,7 +4,7 @@
{{template "base/alert" .}}

- {{.i18n.Tr "admin.auths.new"}} + {{.locale.Tr "admin.auths.new"}}

@@ -12,7 +12,7 @@ {{.CsrfTokenHtml}}
- +
- +
@@ -37,16 +37,16 @@
- + - +
- + -

{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}

+

{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}

@@ -58,67 +58,67 @@
- +
- +
- +
- +

- {{.i18n.Tr "admin.auths.tips"}} + {{.locale.Tr "admin.auths.tips"}}

GMail Settings:

Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true

-
{{.i18n.Tr "admin.auths.tips.oauth2.general"}}:
-

{{.i18n.Tr "admin.auths.tips.oauth2.general.tip"}}

+
{{.locale.Tr "admin.auths.tips.oauth2.general"}}:
+

{{.locale.Tr "admin.auths.tips.oauth2.general.tip"}}

-
{{.i18n.Tr "admin.auths.tip.oauth2_provider"}}
+
{{.locale.Tr "admin.auths.tip.oauth2_provider"}}
  • Bitbucket
  • - {{.i18n.Tr "admin.auths.tip.bitbucket"}} + {{.locale.Tr "admin.auths.tip.bitbucket"}}
  • Dropbox
  • - {{.i18n.Tr "admin.auths.tip.dropbox"}} + {{.locale.Tr "admin.auths.tip.dropbox"}}
  • Facebook
  • - {{.i18n.Tr "admin.auths.tip.facebook"}} + {{.locale.Tr "admin.auths.tip.facebook"}}
  • GitHub
  • - {{.i18n.Tr "admin.auths.tip.github"}} + {{.locale.Tr "admin.auths.tip.github"}}
  • GitLab
  • - {{.i18n.Tr "admin.auths.tip.gitlab"}} + {{.locale.Tr "admin.auths.tip.gitlab"}}
  • Google
  • - {{.i18n.Tr "admin.auths.tip.google_plus"}} + {{.locale.Tr "admin.auths.tip.google_plus"}}
  • OpenID Connect
  • - {{.i18n.Tr "admin.auths.tip.openid_connect"}} + {{.locale.Tr "admin.auths.tip.openid_connect"}}
  • Twitter
  • - {{.i18n.Tr "admin.auths.tip.twitter"}} + {{.locale.Tr "admin.auths.tip.twitter"}}
  • Discord
  • - {{.i18n.Tr "admin.auths.tip.discord"}} + {{.locale.Tr "admin.auths.tip.discord"}}
  • Gitea
  • - {{.i18n.Tr "admin.auths.tip.gitea"}} + {{.locale.Tr "admin.auths.tip.gitea"}}
  • Nextcloud
  • - {{.i18n.Tr "admin.auths.tip.nextcloud"}} + {{.locale.Tr "admin.auths.tip.nextcloud"}}
  • Yandex
  • - {{.i18n.Tr "admin.auths.tip.yandex"}} + {{.locale.Tr "admin.auths.tip.yandex"}}
  • Mastodon
  • - {{.i18n.Tr "admin.auths.tip.mastodon"}} + {{.locale.Tr "admin.auths.tip.mastodon"}}
    diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index afdfbadd651..b44eb799b9e 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -1,6 +1,6 @@
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - + -

    {{.i18n.Tr "admin.auths.restricted_filter_helper"}}

    +

    {{.locale.Tr "admin.auths.restricted_filter_helper"}}

    - - + +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    @@ -117,24 +117,24 @@
    - +
    - +
    - + -

    {{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}

    +

    {{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}

    - +
    diff --git a/templates/admin/auth/source/oauth.tmpl b/templates/admin/auth/source/oauth.tmpl index 3991dc21707..166373a3248 100644 --- a/templates/admin/auth/source/oauth.tmpl +++ b/templates/admin/auth/source/oauth.tmpl @@ -1,6 +1,6 @@
    - +
    - +
    - +
    - +
    - +
    - + -

    {{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}

    +

    {{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}

    - +
    - +
    - +
    - +
    - +
    - +
    @@ -73,29 +73,29 @@ {{end}}{{end}}
    - +
    - + -

    {{.i18n.Tr "admin.auths.oauth2_required_claim_name_helper"}}

    +

    {{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}

    - + -

    {{.i18n.Tr "admin.auths.oauth2_required_claim_value_helper"}}

    +

    {{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}

    - +
    - +
    - +
    diff --git a/templates/admin/auth/source/smtp.tmpl b/templates/admin/auth/source/smtp.tmpl index 8572d6dc56e..2d577412c1b 100644 --- a/templates/admin/auth/source/smtp.tmpl +++ b/templates/admin/auth/source/smtp.tmpl @@ -1,6 +1,6 @@
    - +
    - +
    - +
    - + -

    {{.i18n.Tr "admin.auths.force_smtps_helper"}}

    +

    {{.locale.Tr "admin.auths.force_smtps_helper"}}

    - +
    - + -

    {{.i18n.Tr "admin.auths.helo_hostname_helper"}}

    +

    {{.locale.Tr "admin.auths.helo_hostname_helper"}}

    - +
    - + -

    {{.i18n.Tr "admin.auths.allowed_domains_helper"}}

    +

    {{.locale.Tr "admin.auths.allowed_domains_helper"}}

    - + -

    {{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}

    +

    {{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}

    diff --git a/templates/admin/auth/source/sspi.tmpl b/templates/admin/auth/source/sspi.tmpl index 91697ef9c51..dee40d9fd53 100644 --- a/templates/admin/auth/source/sspi.tmpl +++ b/templates/admin/auth/source/sspi.tmpl @@ -1,32 +1,32 @@
    - + -

    {{.i18n.Tr "admin.auths.sspi_auto_create_users_helper"}}

    +

    {{.locale.Tr "admin.auths.sspi_auto_create_users_helper"}}

    - + -

    {{.i18n.Tr "admin.auths.sspi_auto_activate_users_helper"}}

    +

    {{.locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}

    - + -

    {{.i18n.Tr "admin.auths.sspi_strip_domain_names_helper"}}

    +

    {{.locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}

    - + -

    {{.i18n.Tr "admin.auths.sspi_separator_replacement_helper"}}

    +

    {{.locale.Tr "admin.auths.sspi_separator_replacement_helper"}}

    - +
    -

    {{.i18n.Tr "admin.auths.sspi_default_language_helper"}}

    +

    {{.locale.Tr "admin.auths.sspi_default_language_helper"}}

    diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index 4ec62c162c3..28bc478f6a2 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -2,22 +2,22 @@
    - - + +
    diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 2a27baf5359..a55a797262a 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -4,50 +4,50 @@
    {{template "base/alert" .}}

    - {{.i18n.Tr "admin.config.server_config"}} + {{.locale.Tr "admin.config.server_config"}}

    -
    {{.i18n.Tr "admin.config.app_name"}}
    +
    {{.locale.Tr "admin.config.app_name"}}
    {{AppName}}
    -
    {{.i18n.Tr "admin.config.app_ver"}}
    +
    {{.locale.Tr "admin.config.app_ver"}}
    {{AppVer}}{{AppBuiltWith}}
    -
    {{.i18n.Tr "admin.config.custom_conf"}}
    +
    {{.locale.Tr "admin.config.custom_conf"}}
    {{.CustomConf}}
    -
    {{.i18n.Tr "admin.config.app_url"}}
    +
    {{.locale.Tr "admin.config.app_url"}}
    {{.AppUrl}}
    -
    {{.i18n.Tr "admin.config.domain"}}
    +
    {{.locale.Tr "admin.config.domain"}}
    {{.Domain}}
    -
    {{.i18n.Tr "admin.config.offline_mode"}}
    +
    {{.locale.Tr "admin.config.offline_mode"}}
    {{if .OfflineMode}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.disable_router_log"}}
    +
    {{.locale.Tr "admin.config.disable_router_log"}}
    {{if .DisableRouterLog}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.run_user"}}
    +
    {{.locale.Tr "admin.config.run_user"}}
    {{.RunUser}}
    -
    {{.i18n.Tr "admin.config.run_mode"}}
    +
    {{.locale.Tr "admin.config.run_mode"}}
    {{.RunMode}}
    -
    {{.i18n.Tr "admin.config.git_version"}}
    +
    {{.locale.Tr "admin.config.git_version"}}
    {{.GitVersion}}
    -
    {{.i18n.Tr "admin.config.repo_root_path"}}
    +
    {{.locale.Tr "admin.config.repo_root_path"}}
    {{.RepoRootPath}}
    -
    {{.i18n.Tr "admin.config.static_file_root_path"}}
    +
    {{.locale.Tr "admin.config.static_file_root_path"}}
    {{.StaticRootPath}}
    -
    {{.i18n.Tr "admin.config.custom_file_root_path"}}
    +
    {{.locale.Tr "admin.config.custom_file_root_path"}}
    {{.CustomRootPath}}
    -
    {{.i18n.Tr "admin.config.log_file_root_path"}}
    +
    {{.locale.Tr "admin.config.log_file_root_path"}}
    {{.LogRootPath}}
    -
    {{.i18n.Tr "admin.config.script_type"}}
    +
    {{.locale.Tr "admin.config.script_type"}}
    {{.ScriptType}}
    -
    {{.i18n.Tr "admin.config.reverse_auth_user"}}
    +
    {{.locale.Tr "admin.config.reverse_auth_user"}}
    {{.ReverseProxyAuthUser}}
    {{if .EnvVars }} @@ -62,33 +62,33 @@

    - {{.i18n.Tr "admin.config.ssh_config"}} + {{.locale.Tr "admin.config.ssh_config"}}

    -
    {{.i18n.Tr "admin.config.ssh_enabled"}}
    +
    {{.locale.Tr "admin.config.ssh_enabled"}}
    {{if not .SSH.Disabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{if not .SSH.Disabled}} -
    {{.i18n.Tr "admin.config.ssh_start_builtin_server"}}
    +
    {{.locale.Tr "admin.config.ssh_start_builtin_server"}}
    {{if .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.ssh_domain"}}
    +
    {{.locale.Tr "admin.config.ssh_domain"}}
    {{.SSH.Domain}}
    -
    {{.i18n.Tr "admin.config.ssh_port"}}
    +
    {{.locale.Tr "admin.config.ssh_port"}}
    {{.SSH.Port}}
    -
    {{.i18n.Tr "admin.config.ssh_listen_port"}}
    +
    {{.locale.Tr "admin.config.ssh_listen_port"}}
    {{.SSH.ListenPort}}
    {{if not .SSH.StartBuiltinServer}} -
    {{.i18n.Tr "admin.config.ssh_root_path"}}
    +
    {{.locale.Tr "admin.config.ssh_root_path"}}
    {{.SSH.RootPath}}
    -
    {{.i18n.Tr "admin.config.ssh_key_test_path"}}
    +
    {{.locale.Tr "admin.config.ssh_key_test_path"}}
    {{.SSH.KeyTestPath}}
    -
    {{.i18n.Tr "admin.config.ssh_keygen_path"}}
    +
    {{.locale.Tr "admin.config.ssh_keygen_path"}}
    {{.SSH.KeygenPath}}
    -
    {{.i18n.Tr "admin.config.ssh_minimum_key_size_check"}}
    +
    {{.locale.Tr "admin.config.ssh_minimum_key_size_check"}}
    {{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{if .SSH.MinimumKeySizeCheck}} -
    {{.i18n.Tr "admin.config.ssh_minimum_key_sizes"}}
    +
    {{.locale.Tr "admin.config.ssh_minimum_key_sizes"}}
    {{.SSH.MinimumKeySizes}}
    {{end}} {{end}} @@ -97,304 +97,304 @@

    - {{.i18n.Tr "admin.config.lfs_config"}} + {{.locale.Tr "admin.config.lfs_config"}}

    -
    {{.i18n.Tr "admin.config.lfs_enabled"}}
    +
    {{.locale.Tr "admin.config.lfs_enabled"}}
    {{if .LFS.StartServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{if .LFS.StartServer}} -
    {{.i18n.Tr "admin.config.lfs_content_path"}}
    +
    {{.locale.Tr "admin.config.lfs_content_path"}}
    {{.LFS.Path}}
    -
    {{.i18n.Tr "admin.config.lfs_http_auth_expiry"}}
    +
    {{.locale.Tr "admin.config.lfs_http_auth_expiry"}}
    {{.LFS.HTTPAuthExpiry}}
    {{end}}

    - {{.i18n.Tr "admin.config.db_config"}} + {{.locale.Tr "admin.config.db_config"}}

    -
    {{.i18n.Tr "admin.config.db_type"}}
    +
    {{.locale.Tr "admin.config.db_type"}}
    {{.DbCfg.Type}}
    {{if not (eq .DbCfg.Type "sqlite3")}} -
    {{.i18n.Tr "admin.config.db_host"}}
    +
    {{.locale.Tr "admin.config.db_host"}}
    {{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}
    -
    {{.i18n.Tr "admin.config.db_name"}}
    +
    {{.locale.Tr "admin.config.db_name"}}
    {{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}
    -
    {{.i18n.Tr "admin.config.db_user"}}
    +
    {{.locale.Tr "admin.config.db_user"}}
    {{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}
    {{end}} {{if eq .DbCfg.Type "postgres"}} -
    {{.i18n.Tr "admin.config.db_schema"}}
    +
    {{.locale.Tr "admin.config.db_schema"}}
    {{if .DbCfg.Schema}}{{.DbCfg.Schema}}{{else}}-{{end}}
    -
    {{.i18n.Tr "admin.config.db_ssl_mode"}}
    +
    {{.locale.Tr "admin.config.db_ssl_mode"}}
    {{if .DbCfg.SSLMode}}{{.DbCfg.SSLMode}}{{else}}-{{end}}
    {{end}} {{if eq .DbCfg.Type "sqlite3"}} -
    {{.i18n.Tr "admin.config.db_path"}}
    +
    {{.locale.Tr "admin.config.db_path"}}
    {{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}}
    {{end}}

    - {{.i18n.Tr "admin.config.service_config"}} + {{.locale.Tr "admin.config.service_config"}}

    -
    {{.i18n.Tr "admin.config.register_email_confirm"}}
    +
    {{.locale.Tr "admin.config.register_email_confirm"}}
    {{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.disable_register"}}
    +
    {{.locale.Tr "admin.config.disable_register"}}
    {{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.allow_only_internal_registration"}}
    +
    {{.locale.Tr "admin.config.allow_only_internal_registration"}}
    {{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.allow_only_external_registration"}}
    +
    {{.locale.Tr "admin.config.allow_only_external_registration"}}
    {{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.show_registration_button"}}
    +
    {{.locale.Tr "admin.config.show_registration_button"}}
    {{if .Service.ShowRegistrationButton}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.enable_openid_signup"}}
    +
    {{.locale.Tr "admin.config.enable_openid_signup"}}
    {{if .Service.EnableOpenIDSignUp}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.enable_openid_signin"}}
    +
    {{.locale.Tr "admin.config.enable_openid_signin"}}
    {{if .Service.EnableOpenIDSignIn}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.require_sign_in_view"}}
    +
    {{.locale.Tr "admin.config.require_sign_in_view"}}
    {{if .Service.RequireSignInView}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.mail_notify"}}
    +
    {{.locale.Tr "admin.config.mail_notify"}}
    {{if .Service.EnableNotifyMail}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.disable_key_size_check"}}
    +
    {{.locale.Tr "admin.config.disable_key_size_check"}}
    {{if .SSH.MinimumKeySizeCheck}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.enable_captcha"}}
    +
    {{.locale.Tr "admin.config.enable_captcha"}}
    {{if .Service.EnableCaptcha}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.default_keep_email_private"}}
    +
    {{.locale.Tr "admin.config.default_keep_email_private"}}
    {{if .Service.DefaultKeepEmailPrivate}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.default_allow_create_organization"}}
    +
    {{.locale.Tr "admin.config.default_allow_create_organization"}}
    {{if .Service.DefaultAllowCreateOrganization}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.enable_timetracking"}}
    +
    {{.locale.Tr "admin.config.enable_timetracking"}}
    {{if .Service.EnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{if .Service.EnableTimetracking}} -
    {{.i18n.Tr "admin.config.default_enable_timetracking"}}
    +
    {{.locale.Tr "admin.config.default_enable_timetracking"}}
    {{if .Service.DefaultEnableTimetracking}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.default_allow_only_contributors_to_track_time"}}
    +
    {{.locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}
    {{if .Service.DefaultAllowOnlyContributorsToTrackTime}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{end}} -
    {{.i18n.Tr "admin.config.default_visibility_organization"}}
    +
    {{.locale.Tr "admin.config.default_visibility_organization"}}
    {{.Service.DefaultOrgVisibility}}
    -
    {{.i18n.Tr "admin.config.no_reply_address"}}
    +
    {{.locale.Tr "admin.config.no_reply_address"}}
    {{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}
    -
    {{.i18n.Tr "admin.config.default_enable_dependencies"}}
    +
    {{.locale.Tr "admin.config.default_enable_dependencies"}}
    {{if .Service.DefaultEnableDependencies}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.active_code_lives"}}
    -
    {{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}
    -
    {{.i18n.Tr "admin.config.reset_password_code_lives"}}
    -
    {{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}
    +
    {{.locale.Tr "admin.config.active_code_lives"}}
    +
    {{.Service.ActiveCodeLives}} {{.locale.Tr "tool.raw_minutes"}}
    +
    {{.locale.Tr "admin.config.reset_password_code_lives"}}
    +
    {{.Service.ResetPwdCodeLives}} {{.locale.Tr "tool.raw_minutes"}}

    - {{.i18n.Tr "admin.config.webhook_config"}} + {{.locale.Tr "admin.config.webhook_config"}}

    -
    {{.i18n.Tr "admin.config.queue_length"}}
    +
    {{.locale.Tr "admin.config.queue_length"}}
    {{.Webhook.QueueLength}}
    -
    {{.i18n.Tr "admin.config.deliver_timeout"}}
    -
    {{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}
    -
    {{.i18n.Tr "admin.config.skip_tls_verify"}}
    +
    {{.locale.Tr "admin.config.deliver_timeout"}}
    +
    {{.Webhook.DeliverTimeout}} {{.locale.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.skip_tls_verify"}}
    {{if .Webhook.SkipTLSVerify}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}

    - {{.i18n.Tr "admin.config.mailer_config"}} + {{.locale.Tr "admin.config.mailer_config"}}

    -
    {{.i18n.Tr "admin.config.mailer_enabled"}}
    +
    {{.locale.Tr "admin.config.mailer_enabled"}}
    {{if .MailerEnabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{if .MailerEnabled}} -
    {{.i18n.Tr "admin.config.mailer_name"}}
    +
    {{.locale.Tr "admin.config.mailer_name"}}
    {{.Mailer.Name}}
    {{if eq .Mailer.MailerType "smtp"}} -
    {{.i18n.Tr "admin.config.mailer_disable_helo"}}
    +
    {{.locale.Tr "admin.config.mailer_disable_helo"}}
    {{if .DisableHelo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.mailer_host"}}
    +
    {{.locale.Tr "admin.config.mailer_host"}}
    {{.Mailer.Host}}
    {{else if eq .Mailer.MailerType "sendmail"}} -
    {{.i18n.Tr "admin.config.mailer_use_sendmail"}}
    +
    {{.locale.Tr "admin.config.mailer_use_sendmail"}}
    {{svg "octicon-check"}}
    -
    {{.i18n.Tr "admin.config.mailer_sendmail_path"}}
    +
    {{.locale.Tr "admin.config.mailer_sendmail_path"}}
    {{.Mailer.SendmailPath}}
    -
    {{.i18n.Tr "admin.config.mailer_sendmail_args"}}
    +
    {{.locale.Tr "admin.config.mailer_sendmail_args"}}
    {{.Mailer.SendmailArgs}}
    -
    {{.i18n.Tr "admin.config.mailer_sendmail_timeout"}}
    -
    {{.Mailer.SendmailTimeout}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.mailer_sendmail_timeout"}}
    +
    {{.Mailer.SendmailTimeout}} {{.locale.Tr "tool.raw_seconds"}}
    {{end}} -
    {{.i18n.Tr "admin.config.mailer_user"}}
    +
    {{.locale.Tr "admin.config.mailer_user"}}
    {{if .Mailer.User}}{{.Mailer.User}}{{else}}(empty){{end}}

    {{.CsrfTokenHtml}}
    - +
    - +
    {{end}}

    - {{.i18n.Tr "admin.config.cache_config"}} + {{.locale.Tr "admin.config.cache_config"}}

    -
    {{.i18n.Tr "admin.config.cache_adapter"}}
    +
    {{.locale.Tr "admin.config.cache_adapter"}}
    {{.CacheAdapter}}
    {{if eq .CacheAdapter "memory"}} -
    {{.i18n.Tr "admin.config.cache_interval"}}
    -
    {{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.cache_interval"}}
    +
    {{.CacheInterval}} {{.locale.Tr "tool.raw_seconds"}}
    {{end}} {{if .CacheConn}} -
    {{.i18n.Tr "admin.config.cache_conn"}}
    +
    {{.locale.Tr "admin.config.cache_conn"}}
    {{.CacheConn}}
    -
    {{.i18n.Tr "admin.config.cache_item_ttl"}}
    +
    {{.locale.Tr "admin.config.cache_item_ttl"}}
    {{.CacheItemTTL}}
    {{end}}

    - {{.i18n.Tr "admin.config.session_config"}} + {{.locale.Tr "admin.config.session_config"}}

    -
    {{.i18n.Tr "admin.config.session_provider"}}
    +
    {{.locale.Tr "admin.config.session_provider"}}
    {{.SessionConfig.Provider}}
    -
    {{.i18n.Tr "admin.config.provider_config"}}
    +
    {{.locale.Tr "admin.config.provider_config"}}
    {{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}
    -
    {{.i18n.Tr "admin.config.cookie_name"}}
    +
    {{.locale.Tr "admin.config.cookie_name"}}
    {{.SessionConfig.CookieName}}
    -
    {{.i18n.Tr "admin.config.gc_interval_time"}}
    -
    {{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}
    -
    {{.i18n.Tr "admin.config.session_life_time"}}
    -
    {{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}
    -
    {{.i18n.Tr "admin.config.https_only"}}
    +
    {{.locale.Tr "admin.config.gc_interval_time"}}
    +
    {{.SessionConfig.Gclifetime}} {{.locale.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.session_life_time"}}
    +
    {{.SessionConfig.Maxlifetime}} {{.locale.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.https_only"}}
    {{if .SessionConfig.Secure}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}

    - {{.i18n.Tr "admin.config.picture_config"}} + {{.locale.Tr "admin.config.picture_config"}}

    -
    {{.i18n.Tr "admin.config.disable_gravatar"}}
    +
    {{.locale.Tr "admin.config.disable_gravatar"}}
    {{if .DisableGravatar}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.enable_federated_avatar"}}
    +
    {{.locale.Tr "admin.config.enable_federated_avatar"}}
    {{if .EnableFederatedAvatar}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}

    - {{.i18n.Tr "admin.config.git_config"}} + {{.locale.Tr "admin.config.git_config"}}

    -
    {{.i18n.Tr "admin.config.git_disable_diff_highlight"}}
    +
    {{.locale.Tr "admin.config.git_disable_diff_highlight"}}
    {{if .Git.DisableDiffHighlight}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    -
    {{.i18n.Tr "admin.config.git_max_diff_lines"}}
    +
    {{.locale.Tr "admin.config.git_max_diff_lines"}}
    {{.Git.MaxGitDiffLines}}
    -
    {{.i18n.Tr "admin.config.git_max_diff_line_characters"}}
    +
    {{.locale.Tr "admin.config.git_max_diff_line_characters"}}
    {{.Git.MaxGitDiffLineCharacters}}
    -
    {{.i18n.Tr "admin.config.git_max_diff_files"}}
    +
    {{.locale.Tr "admin.config.git_max_diff_files"}}
    {{.Git.MaxGitDiffFiles}}
    -
    {{.i18n.Tr "admin.config.git_gc_args"}}
    +
    {{.locale.Tr "admin.config.git_gc_args"}}
    {{.Git.GCArgs}}
    -
    {{.i18n.Tr "admin.config.git_migrate_timeout"}}
    -
    {{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}
    -
    {{.i18n.Tr "admin.config.git_mirror_timeout"}}
    -
    {{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}
    -
    {{.i18n.Tr "admin.config.git_clone_timeout"}}
    -
    {{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}
    -
    {{.i18n.Tr "admin.config.git_pull_timeout"}}
    -
    {{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}
    -
    {{.i18n.Tr "admin.config.git_gc_timeout"}}
    -
    {{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.git_migrate_timeout"}}
    +
    {{.Git.Timeout.Migrate}} {{.locale.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.git_mirror_timeout"}}
    +
    {{.Git.Timeout.Mirror}} {{.locale.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.git_clone_timeout"}}
    +
    {{.Git.Timeout.Clone}} {{.locale.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.git_pull_timeout"}}
    +
    {{.Git.Timeout.Pull}} {{.locale.Tr "tool.raw_seconds"}}
    +
    {{.locale.Tr "admin.config.git_gc_timeout"}}
    +
    {{.Git.Timeout.GC}} {{.locale.Tr "tool.raw_seconds"}}

    - {{.i18n.Tr "admin.config.log_config"}} + {{.locale.Tr "admin.config.log_config"}}

    {{range .Loggers.default.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{$.locale.Tr "admin.config.log_mode"}}
    {{.Name}} ({{.Provider}})
    -
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{$.locale.Tr "admin.config.log_config"}}
    {{.Config | JsonPrettyPrint}}
    {{end}}
    -
    {{$.i18n.Tr "admin.config.router_log_mode"}}
    +
    {{$.locale.Tr "admin.config.router_log_mode"}}
    {{if .DisableRouterLog}} -
    {{$.i18n.Tr "admin.config.disabled_logger"}}
    +
    {{$.locale.Tr "admin.config.disabled_logger"}}
    {{else}} {{if .Loggers.router.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    +
    {{$.locale.Tr "admin.config.own_named_logger"}}
    {{range .Loggers.router.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{$.locale.Tr "admin.config.log_mode"}}
    {{.Name}} ({{.Provider}})
    -
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{$.locale.Tr "admin.config.log_config"}}
    {{.Config | JsonPrettyPrint}}
    {{end}} {{else}} -
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    +
    {{$.locale.Tr "admin.config.routes_to_default_logger"}}
    {{end}} {{end}}
    -
    {{$.i18n.Tr "admin.config.access_log_mode"}}
    +
    {{$.locale.Tr "admin.config.access_log_mode"}}
    {{if .EnableAccessLog}} {{if .Loggers.access.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    +
    {{$.locale.Tr "admin.config.own_named_logger"}}
    {{range .Loggers.access.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{$.locale.Tr "admin.config.log_mode"}}
    {{.Name}} ({{.Provider}})
    -
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{$.locale.Tr "admin.config.log_config"}}
    {{.Config | JsonPrettyPrint}}
    {{end}} {{else}} -
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    +
    {{$.locale.Tr "admin.config.routes_to_default_logger"}}
    {{end}} -
    {{$.i18n.Tr "admin.config.access_log_template"}}
    +
    {{$.locale.Tr "admin.config.access_log_template"}}
    {{$.AccessLogTemplate}}
    {{else}} -
    {{$.i18n.Tr "admin.config.disabled_logger"}}
    +
    {{$.locale.Tr "admin.config.disabled_logger"}}
    {{end}}
    -
    {{$.i18n.Tr "admin.config.xorm_log_mode"}}
    +
    {{$.locale.Tr "admin.config.xorm_log_mode"}}
    {{if .EnableXORMLog}} {{if .Loggers.xorm.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    +
    {{$.locale.Tr "admin.config.own_named_logger"}}
    {{range .Loggers.xorm.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.log_mode"}}
    +
    {{$.locale.Tr "admin.config.log_mode"}}
    {{.Name}} ({{.Provider}})
    -
    {{$.i18n.Tr "admin.config.log_config"}}
    +
    {{$.locale.Tr "admin.config.log_config"}}
    {{.Config | JsonPrettyPrint}}
    {{end}} {{else}} -
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    +
    {{$.locale.Tr "admin.config.routes_to_default_logger"}}
    {{end}} -
    {{$.i18n.Tr "admin.config.xorm_log_sql"}}
    +
    {{$.locale.Tr "admin.config.xorm_log_sql"}}
    {{if $.LogSQL}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{else}} -
    {{$.i18n.Tr "admin.config.disabled_logger"}}
    +
    {{$.locale.Tr "admin.config.disabled_logger"}}
    {{end}}
    diff --git a/templates/admin/cron.tmpl b/templates/admin/cron.tmpl index cf3532c77d3..b5db356bd85 100644 --- a/templates/admin/cron.tmpl +++ b/templates/admin/cron.tmpl @@ -1,5 +1,5 @@

    - {{.i18n.Tr "admin.monitor.cron"}} + {{.locale.Tr "admin.monitor.cron"}}

    @@ -7,24 +7,24 @@ - {{.i18n.Tr "admin.monitor.name"}} - {{.i18n.Tr "admin.monitor.schedule"}} - {{.i18n.Tr "admin.monitor.next"}} - {{.i18n.Tr "admin.monitor.previous"}} - {{.i18n.Tr "admin.monitor.execute_times"}} - {{.i18n.Tr "admin.monitor.last_execution_result"}} + {{.locale.Tr "admin.monitor.name"}} + {{.locale.Tr "admin.monitor.schedule"}} + {{.locale.Tr "admin.monitor.next"}} + {{.locale.Tr "admin.monitor.previous"}} + {{.locale.Tr "admin.monitor.execute_times"}} + {{.locale.Tr "admin.monitor.last_execution_result"}} {{range .Entries}} - - {{$.i18n.Tr (printf "admin.dashboard.%s" .Name)}} + + {{$.locale.Tr (printf "admin.dashboard.%s" .Name)}} {{.Spec}} {{DateFmtLong .Next}} {{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}} {{.ExecTimes}} - {{if eq .Status "" }}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}} + {{if eq .Status "" }}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}} {{end}} diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 5a4b82f1b96..80eea91210c 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -5,19 +5,19 @@ {{template "base/alert" .}} {{if .NeedUpdate}}
    -

    {{(.i18n.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}

    +

    {{(.locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}

    {{end}}

    - {{.i18n.Tr "admin.dashboard.statistic"}} + {{.locale.Tr "admin.dashboard.statistic"}}

    - {{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.AuthSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}} + {{.locale.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.AuthSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}

    - {{.i18n.Tr "admin.dashboard.operations"}} + {{.locale.Tr "admin.dashboard.operations"}}

    {{.CsrfTokenHtml}} @@ -25,52 +25,52 @@ - - + + - - + + - - + + - - + + {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}} - - + + - - + + {{end}} - - + + - - + + - - + + - - + + - - + +
    {{.i18n.Tr "admin.dashboard.delete_inactive_accounts"}}{{.locale.Tr "admin.dashboard.delete_inactive_accounts"}}
    {{.i18n.Tr "admin.dashboard.delete_repo_archives"}}{{.locale.Tr "admin.dashboard.delete_repo_archives"}}
    {{.i18n.Tr "admin.dashboard.delete_missing_repos"}}{{.locale.Tr "admin.dashboard.delete_missing_repos"}}
    {{.i18n.Tr "admin.dashboard.git_gc_repos"}}{{.locale.Tr "admin.dashboard.git_gc_repos"}}
    {{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}
    - {{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}}
    {{.locale.Tr "admin.dashboard.resync_all_sshkeys"}}
    + {{.locale.Tr "admin.dashboard.resync_all_sshkeys.desc"}}
    {{.i18n.Tr "admin.dashboard.resync_all_sshprincipals"}}
    - {{.i18n.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}
    {{.locale.Tr "admin.dashboard.resync_all_sshprincipals"}}
    + {{.locale.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}
    {{.i18n.Tr "admin.dashboard.resync_all_hooks"}}{{.locale.Tr "admin.dashboard.resync_all_hooks"}}
    {{.i18n.Tr "admin.dashboard.reinit_missing_repos"}}{{.locale.Tr "admin.dashboard.reinit_missing_repos"}}
    {{.i18n.Tr "admin.dashboard.sync_external_users"}}{{.locale.Tr "admin.dashboard.sync_external_users"}}
    {{.i18n.Tr "admin.dashboard.repo_health_check"}}{{.locale.Tr "admin.dashboard.repo_health_check"}}
    {{.i18n.Tr "admin.dashboard.delete_generated_repository_avatars"}}{{.locale.Tr "admin.dashboard.delete_generated_repository_avatars"}}
    @@ -78,69 +78,69 @@

    - {{.i18n.Tr "admin.dashboard.system_status"}} + {{.locale.Tr "admin.dashboard.system_status"}}

    -
    {{.i18n.Tr "admin.dashboard.server_uptime"}}
    +
    {{.locale.Tr "admin.dashboard.server_uptime"}}
    {{.SysStatus.Uptime}}
    -
    {{.i18n.Tr "admin.dashboard.current_goroutine"}}
    +
    {{.locale.Tr "admin.dashboard.current_goroutine"}}
    {{.SysStatus.NumGoroutine}}
    -
    {{.i18n.Tr "admin.dashboard.current_memory_usage"}}
    +
    {{.locale.Tr "admin.dashboard.current_memory_usage"}}
    {{.SysStatus.MemAllocated}}
    -
    {{.i18n.Tr "admin.dashboard.total_memory_allocated"}}
    +
    {{.locale.Tr "admin.dashboard.total_memory_allocated"}}
    {{.SysStatus.MemTotal}}
    -
    {{.i18n.Tr "admin.dashboard.memory_obtained"}}
    +
    {{.locale.Tr "admin.dashboard.memory_obtained"}}
    {{.SysStatus.MemSys}}
    -
    {{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}
    +
    {{.locale.Tr "admin.dashboard.pointer_lookup_times"}}
    {{.SysStatus.Lookups}}
    -
    {{.i18n.Tr "admin.dashboard.memory_allocate_times"}}
    +
    {{.locale.Tr "admin.dashboard.memory_allocate_times"}}
    {{.SysStatus.MemMallocs}}
    -
    {{.i18n.Tr "admin.dashboard.memory_free_times"}}
    +
    {{.locale.Tr "admin.dashboard.memory_free_times"}}
    {{.SysStatus.MemFrees}}
    -
    {{.i18n.Tr "admin.dashboard.current_heap_usage"}}
    +
    {{.locale.Tr "admin.dashboard.current_heap_usage"}}
    {{.SysStatus.HeapAlloc}}
    -
    {{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}
    +
    {{.locale.Tr "admin.dashboard.heap_memory_obtained"}}
    {{.SysStatus.HeapSys}}
    -
    {{.i18n.Tr "admin.dashboard.heap_memory_idle"}}
    +
    {{.locale.Tr "admin.dashboard.heap_memory_idle"}}
    {{.SysStatus.HeapIdle}}
    -
    {{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}
    +
    {{.locale.Tr "admin.dashboard.heap_memory_in_use"}}
    {{.SysStatus.HeapInuse}}
    -
    {{.i18n.Tr "admin.dashboard.heap_memory_released"}}
    +
    {{.locale.Tr "admin.dashboard.heap_memory_released"}}
    {{.SysStatus.HeapReleased}}
    -
    {{.i18n.Tr "admin.dashboard.heap_objects"}}
    +
    {{.locale.Tr "admin.dashboard.heap_objects"}}
    {{.SysStatus.HeapObjects}}
    -
    {{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}
    +
    {{.locale.Tr "admin.dashboard.bootstrap_stack_usage"}}
    {{.SysStatus.StackInuse}}
    -
    {{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}
    +
    {{.locale.Tr "admin.dashboard.stack_memory_obtained"}}
    {{.SysStatus.StackSys}}
    -
    {{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}
    +
    {{.locale.Tr "admin.dashboard.mspan_structures_usage"}}
    {{.SysStatus.MSpanInuse}}
    -
    {{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}
    +
    {{.locale.Tr "admin.dashboard.mspan_structures_obtained"}}
    {{.SysStatus.MSpanSys}}
    -
    {{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}
    +
    {{.locale.Tr "admin.dashboard.mcache_structures_usage"}}
    {{.SysStatus.MCacheInuse}}
    -
    {{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}
    +
    {{.locale.Tr "admin.dashboard.mcache_structures_obtained"}}
    {{.SysStatus.MCacheSys}}
    -
    {{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}
    +
    {{.locale.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}
    {{.SysStatus.BuckHashSys}}
    -
    {{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}
    +
    {{.locale.Tr "admin.dashboard.gc_metadata_obtained"}}
    {{.SysStatus.GCSys}}
    -
    {{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}
    +
    {{.locale.Tr "admin.dashboard.other_system_allocation_obtained"}}
    {{.SysStatus.OtherSys}}
    -
    {{.i18n.Tr "admin.dashboard.next_gc_recycle"}}
    +
    {{.locale.Tr "admin.dashboard.next_gc_recycle"}}
    {{.SysStatus.NextGC}}
    -
    {{.i18n.Tr "admin.dashboard.last_gc_time"}}
    +
    {{.locale.Tr "admin.dashboard.last_gc_time"}}
    {{.SysStatus.LastGC}}
    -
    {{.i18n.Tr "admin.dashboard.total_gc_pause"}}
    +
    {{.locale.Tr "admin.dashboard.total_gc_pause"}}
    {{.SysStatus.PauseTotalNs}}
    -
    {{.i18n.Tr "admin.dashboard.last_gc_pause"}}
    +
    {{.locale.Tr "admin.dashboard.last_gc_pause"}}
    {{.SysStatus.PauseNs}}
    -
    {{.i18n.Tr "admin.dashboard.gc_times"}}
    +
    {{.locale.Tr "admin.dashboard.gc_times"}}
    {{.SysStatus.NumGC}}
    diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 92444efbd8b..adf5b9bef7b 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -4,28 +4,28 @@
    {{template "base/alert" .}}

    - {{.i18n.Tr "admin.emails.email_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) + {{.locale.Tr "admin.emails.email_manage_panel"}} ({{.locale.Tr "admin.total" .Total}})

    @@ -34,16 +34,16 @@ - {{.i18n.Tr "admin.users.name"}} + {{.locale.Tr "admin.users.name"}} {{SortArrow "username" "reverseusername" $.SortType false}} - {{.i18n.Tr "admin.users.full_name"}} + {{.locale.Tr "admin.users.full_name"}} - {{.i18n.Tr "email"}} + {{.locale.Tr "email"}} {{SortArrow "email" "reverseemail" $.SortType true}} - {{.i18n.Tr "admin.emails.primary"}} - {{.i18n.Tr "admin.emails.activated"}} + {{.locale.Tr "admin.emails.primary"}} + {{.locale.Tr "admin.emails.activated"}} @@ -75,10 +75,10 @@ @@ -22,51 +22,51 @@ {{if .Team.Description}} {{.Team.Description}} {{else}} - {{.i18n.Tr "org.teams.no_desc"}} + {{.locale.Tr "org.teams.no_desc"}} {{end}}
    {{if eq .Team.LowerName "owners"}}
    - {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}} + {{.locale.Tr "org.teams.owners_permission_desc" | Str2html}}
    {{else}}
    -

    {{.i18n.Tr "org.team_access_desc"}}

    +

    {{.locale.Tr "org.team_access_desc"}}

      {{if .Team.IncludesAllRepositories}} -
    • {{.i18n.Tr "org.teams.all_repositories" | Str2html}} +
    • {{.locale.Tr "org.teams.all_repositories" | Str2html}} {{else}} -
    • {{.i18n.Tr "org.teams.specific_repositories" | Str2html}} +
    • {{.locale.Tr "org.teams.specific_repositories" | Str2html}} {{end}} {{if .Team.CanCreateOrgRepo}} -
    • {{.i18n.Tr "org.teams.can_create_org_repo"}} +
    • {{.locale.Tr "org.teams.can_create_org_repo"}} {{end}}
    {{if (eq .Team.AccessMode 2)}} -

    {{.i18n.Tr "org.settings.permission"}}

    - {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}} +

    {{.locale.Tr "org.settings.permission"}}

    + {{.locale.Tr "org.teams.write_permission_desc" | Str2html}} {{else if (eq .Team.AccessMode 3)}} -

    {{.i18n.Tr "org.settings.permission"}}

    - {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}} +

    {{.locale.Tr "org.settings.permission"}}

    + {{.locale.Tr "org.teams.admin_permission_desc" | Str2html}} {{else}} - - + + {{range $t, $unit := $.Units}} {{if and (lt $unit.MaxPerm 2) (not $unit.Type.UnitGlobalDisabled)}} - + {{end}} @@ -79,17 +79,17 @@ {{if .IsOrganizationOwner}} {{end}} diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 49407ef194b..465701d96ed 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -5,7 +5,7 @@ {{template "base/alert" .}} {{if .IsOrganizationOwner}}
    {{end}} @@ -20,12 +20,12 @@ + data-name="{{.Name}}">{{$.locale.Tr "org.teams.leave"}} {{else if $.IsOrganizationOwner}} {{$.CsrfTokenHtml}} - + {{end}} @@ -38,7 +38,7 @@ {{end}}
    -

    {{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}

    +

    {{.NumMembers}} {{$.locale.Tr "org.lower_members"}} · {{.NumRepos}} {{$.locale.Tr "org.lower_repositories"}}

    {{end}} @@ -48,10 +48,10 @@ diff --git a/templates/package/content/composer.tmpl b/templates/package/content/composer.tmpl index 29162f97b02..8cc18f8ba8f 100644 --- a/templates/package/content/composer.tmpl +++ b/templates/package/content/composer.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "composer"}} -

    {{.i18n.Tr "packages.installation"}}

    +

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

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

    {{.i18n.Tr "packages.about"}}

    +

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

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

    {{.i18n.Tr "packages.dependencies"}}

    +

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

    - {{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")}}
    {{end}} {{if or .PackageDescriptor.Metadata.Keywords}} -

    {{.i18n.Tr "packages.keywords"}}

    +

    {{.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 1ab644f4174..b55c1b5b88a 100644 --- a/templates/package/content/composer_dependencies.tmpl +++ b/templates/package/content/composer_dependencies.tmpl @@ -3,8 +3,8 @@
    {{.i18n.Tr "units.unit"}}{{.i18n.Tr "org.team_permission_desc"}}{{.locale.Tr "units.unit"}}{{.locale.Tr "org.team_permission_desc"}}
    {{$.i18n.Tr $unit.NameKey}}{{$.locale.Tr $unit.NameKey}} {{if eq ($.Team.UnitAccessMode $unit.Type) 0 -}} - {{$.i18n.Tr "org.teams.none_access"}} + {{$.locale.Tr "org.teams.none_access"}} {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1) -}} - {{$.i18n.Tr "org.teams.read_access"}} + {{$.locale.Tr "org.teams.read_access"}} {{- else if eq ($.Team.UnitAccessMode $unit.Type) 2 -}} - {{$.i18n.Tr "org.teams.write_access"}} + {{$.locale.Tr "org.teams.write_access"}} {{- end}}
    - - + + diff --git a/templates/package/content/conan.tmpl b/templates/package/content/conan.tmpl index 3c1c35c00fa..c496cee55cf 100644 --- a/templates/package/content/conan.tmpl +++ b/templates/package/content/conan.tmpl @@ -1,30 +1,30 @@ {{if eq .PackageDescriptor.Package.Type "conan"}} -

    {{.i18n.Tr "packages.installation"}}

    +

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

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

    {{.i18n.Tr "packages.about"}}

    +

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

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

    {{.i18n.Tr "packages.keywords"}}

    +

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

    {{range .PackageDescriptor.Metadata.Keywords}} {{.}} diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl index 14d4a563985..44a64d13eed 100644 --- a/templates/package/content/container.tmpl +++ b/templates/package/content/container.tmpl @@ -1,9 +1,9 @@ {{if eq .PackageDescriptor.Package.Type "container"}} -

    {{.i18n.Tr "packages.installation"}}

    +

    {{.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,12 +15,12 @@ {{end}}
    - +
    {{if .PackageDescriptor.Metadata.MultiArch}} -

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

    +

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

    {{range $arch, $digest := .PackageDescriptor.Metadata.MultiArch}} @@ -35,13 +35,13 @@
    {{end}} {{if .PackageDescriptor.Metadata.Description}} -

    {{.i18n.Tr "packages.about"}}

    +

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

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

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

    +

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

    {{.root.i18n.Tr "packages.dependency.id"}}{{.root.i18n.Tr "packages.dependency.version"}}{{.root.locale.Tr "packages.dependency.id"}}{{.root.locale.Tr "packages.dependency.version"}}
    @@ -55,13 +55,13 @@ {{end}} {{if .PackageDescriptor.Metadata.Labels}} -

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

    +

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

    - - + + diff --git a/templates/package/content/generic.tmpl b/templates/package/content/generic.tmpl index 05a47b3ef4d..045ff7d08ab 100644 --- a/templates/package/content/generic.tmpl +++ b/templates/package/content/generic.tmpl @@ -1,13 +1,13 @@ {{if eq .PackageDescriptor.Package.Type "generic"}} -

    {{.i18n.Tr "packages.installation"}}

    +

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

    - +
    curl {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/generic/{{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}/{{(index .PackageDescriptor.Files 0).File.Name}}
    - +
    diff --git a/templates/package/content/helm.tmpl b/templates/package/content/helm.tmpl index a85f7c4850f..59cdc157b40 100644 --- a/templates/package/content/helm.tmpl +++ b/templates/package/content/helm.tmpl @@ -1,37 +1,37 @@ {{if eq .PackageDescriptor.Package.Type "helm"}} -

    {{.i18n.Tr "packages.installation"}}

    +

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

    - +
    helm repo add gitea {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/helm
     helm repo update
    - +
    helm install {{.PackageDescriptor.Package.Name}} gitea/{{.PackageDescriptor.Package.Name}}
    - +
    {{if .PackageDescriptor.Metadata.Description}} -

    {{.i18n.Tr "packages.about"}}

    +

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

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

    {{.i18n.Tr "packages.dependencies"}}

    +

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

    {{.i18n.Tr "packages.container.labels.key"}}{{.i18n.Tr "packages.container.labels.value"}}{{.locale.Tr "packages.container.labels.key"}}{{.locale.Tr "packages.container.labels.value"}}
    - - + + @@ -47,7 +47,7 @@ helm repo update {{end}} {{if .PackageDescriptor.Metadata.Keywords}} -

    {{.i18n.Tr "packages.keywords"}}

    +

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

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

    {{.i18n.Tr "packages.installation"}}

    +

    {{.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={{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/maven -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}
    - +
    {{if .PackageDescriptor.Metadata.Description}} -

    {{.i18n.Tr "packages.about"}}

    +

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

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

    {{.i18n.Tr "packages.dependencies"}}

    +

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

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

    {{.i18n.Tr "packages.installation"}}

    +

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

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

    {{.i18n.Tr "packages.about"}}

    +

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

    {{.i18n.Tr "packages.dependencies"}}

    +

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

    - {{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")}}
    {{end}} {{if .PackageDescriptor.Metadata.Keywords}} -

    {{.i18n.Tr "packages.keywords"}}

    +

    {{.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 1ab644f4174..b55c1b5b88a 100644 --- a/templates/package/content/npm_dependencies.tmpl +++ b/templates/package/content/npm_dependencies.tmpl @@ -3,8 +3,8 @@
    {{.i18n.Tr "packages.dependency.id"}}{{.i18n.Tr "packages.dependency.version"}}{{.locale.Tr "packages.dependency.id"}}{{.locale.Tr "packages.dependency.version"}}
    - - + + diff --git a/templates/package/content/nuget.tmpl b/templates/package/content/nuget.tmpl index 879d7d01767..4ea41fa826a 100644 --- a/templates/package/content/nuget.tmpl +++ b/templates/package/content/nuget.tmpl @@ -1,23 +1,23 @@ {{if eq .PackageDescriptor.Package.Type "nuget"}} -

    {{.i18n.Tr "packages.installation"}}

    +

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

    - +
    dotnet nuget add source --name Gitea --username your_username --password your_token {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json
    - +
    dotnet add package --source Gitea --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}
    - +
    {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes}} -

    {{.i18n.Tr "packages.about"}}

    +

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

    {{.i18n.Tr "packages.dependencies"}}

    +

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

    {{.root.i18n.Tr "packages.dependency.id"}}{{.root.i18n.Tr "packages.dependency.version"}}{{.root.locale.Tr "packages.dependency.id"}}{{.root.locale.Tr "packages.dependency.version"}}
    - - - + + + diff --git a/templates/package/content/pypi.tmpl b/templates/package/content/pypi.tmpl index 352f4f617fa..1cce31f537b 100644 --- a/templates/package/content/pypi.tmpl +++ b/templates/package/content/pypi.tmpl @@ -1,18 +1,18 @@ {{if eq .PackageDescriptor.Package.Type "pypi"}} -

    {{.i18n.Tr "packages.installation"}}

    +

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

    - +
    pip install --extra-index-url {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple {{.PackageDescriptor.Package.Name}}
    - +
    {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}} -

    {{.i18n.Tr "packages.about"}}

    +

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

    {{.i18n.Tr "packages.requirements"}}

    +

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

    - {{.i18n.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}} + {{.locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}}
    {{end}} {{end}} diff --git a/templates/package/content/rubygems.tmpl b/templates/package/content/rubygems.tmpl index 6e22d7fbea2..0cb7b670b1d 100644 --- a/templates/package/content/rubygems.tmpl +++ b/templates/package/content/rubygems.tmpl @@ -1,39 +1,39 @@ {{if eq .PackageDescriptor.Package.Type "rubygems"}} -

    {{.i18n.Tr "packages.installation"}}

    +

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

    - +
    gem install {{.PackageDescriptor.Package.Name}} --version "{{.PackageDescriptor.Version.Version}}" --source "{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems"
    - +
    source "{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems" do
     	gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}"
     end
    - +
    {{if .PackageDescriptor.Metadata.Description}} -

    {{.i18n.Tr "packages.about"}}

    +

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

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

    {{.i18n.Tr "packages.requirements"}}

    +

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

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

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

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

    {{.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}}
    {{end}} {{if or .PackageDescriptor.Metadata.RuntimeDependencies .PackageDescriptor.Metadata.DevelopmentDependencies}} -

    {{.i18n.Tr "packages.dependencies"}}

    +

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

    - {{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")}}
    {{end}} diff --git a/templates/package/content/rubygems_dependencies.tmpl b/templates/package/content/rubygems_dependencies.tmpl index 79f66ad3f9d..80febc84f4f 100644 --- a/templates/package/content/rubygems_dependencies.tmpl +++ b/templates/package/content/rubygems_dependencies.tmpl @@ -3,8 +3,8 @@
    {{.i18n.Tr "packages.dependency.id"}}{{.i18n.Tr "packages.dependency.version"}}{{.i18n.Tr "packages.nuget.dependency.framework"}}{{.locale.Tr "packages.dependency.id"}}{{.locale.Tr "packages.dependency.version"}}{{.locale.Tr "packages.nuget.dependency.framework"}}
    - - + + diff --git a/templates/package/metadata/composer.tmpl b/templates/package/metadata/composer.tmpl index 1178d00e0d1..2e76a10dabf 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 "mr-3"}} {{.Name}}
    {{end}} - {{if .PackageDescriptor.Metadata.Homepage}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} - {{range .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "mr-3"}} {{.}}
    {{end}} + {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "mr-3"}} {{.Name}}
    {{end}} + {{if .PackageDescriptor.Metadata.Homepage}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
    {{end}} + {{range .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "mr-3"}} {{.}}
    {{end}} {{end}} diff --git a/templates/package/metadata/conan.tmpl b/templates/package/metadata/conan.tmpl index 1ef82aea4e6..41cb42b692b 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 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} - {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.conan.details.repository"}}
    {{end}} + {{if .PackageDescriptor.Metadata.Author}}
    {{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
    {{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 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.conan.details.repository"}}
    {{end}} {{end}} diff --git a/templates/package/metadata/container.tmpl b/templates/package/metadata/container.tmpl index 117d7e46a29..1b13072c38d 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 "mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}
    - {{if .PackageDescriptor.Metadata.Platform}}
    {{svg "octicon-cpu" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Platform}}
    {{end}} - {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "mr-3"}} {{.}}
    {{end}} +
    {{svg "octicon-package" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Type.Name}}
    + {{if .PackageDescriptor.Metadata.Platform}}
    {{svg "octicon-cpu" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Platform}}
    {{end}} + {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "mr-3"}} {{.}}
    {{end}} {{if .PackageDescriptor.Metadata.Licenses}}
    {{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Licenses}}
    {{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} - {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.container.details.repository_site"}}
    {{end}} - {{if .PackageDescriptor.Metadata.DocumentationURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.container.details.documentation_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.RepositoryURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.container.details.repository_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.DocumentationURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.container.details.documentation_site"}}
    {{end}} {{end}} diff --git a/templates/package/metadata/helm.tmpl b/templates/package/metadata/helm.tmpl index 7c97c6358e9..9f7f5d6ecd1 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 "mr-3"}} {{.Name}}
    {{end}} - {{if .PackageDescriptor.Metadata.Home}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} + {{range .PackageDescriptor.Metadata.Maintainers}}
    {{svg "octicon-person" 16 "mr-3"}} {{.Name}}
    {{end}} + {{if .PackageDescriptor.Metadata.Home}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
    {{end}} {{end}} diff --git a/templates/package/metadata/maven.tmpl b/templates/package/metadata/maven.tmpl index 14a613be475..f6fcdf6da8e 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 "mr-3"}} {{.PackageDescriptor.Metadata.Name}}
    {{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} - {{range .PackageDescriptor.Metadata.Licenses}}
    {{svg "octicon-law" 16 "mr-3"}} {{.}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
    {{end}} + {{range .PackageDescriptor.Metadata.Licenses}}
    {{svg "octicon-law" 16 "mr-3"}} {{.}}
    {{end}} {{end}} diff --git a/templates/package/metadata/npm.tmpl b/templates/package/metadata/npm.tmpl index 3279f9edbf1..765566cadfe 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 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} - {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} + {{if .PackageDescriptor.Metadata.Author}}
    {{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
    {{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 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} {{range .PackageDescriptor.Properties}} - {{if eq .Name "npm.tag"}}
    {{svg "octicon-versions" 16 "mr-3"}} {{.Value}}
    {{end}} + {{if eq .Name "npm.tag"}}
    {{svg "octicon-versions" 16 "mr-3"}} {{.Value}}
    {{end}} {{end}} {{end}} diff --git a/templates/package/metadata/nuget.tmpl b/templates/package/metadata/nuget.tmpl index d5a3e909b95..b4e62b5a08a 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 "mr-3"}} {{.PackageDescriptor.Metadata.Authors}}
    {{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} + {{if .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Authors}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
    {{end}} {{end}} diff --git a/templates/package/metadata/pypi.tmpl b/templates/package/metadata/pypi.tmpl index 5cdfbdfe669..13b53d3591a 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 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
    {{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} - {{if .PackageDescriptor.Metadata.License}}
    {{svg "octicon-law" 16 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} + {{if .PackageDescriptor.Metadata.Author}}
    {{svg "octicon-person" 16 "mr-3"}} {{.PackageDescriptor.Metadata.Author}}
    {{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 "mr-3"}} {{.PackageDescriptor.Metadata.License}}
    {{end}} {{end}} diff --git a/templates/package/metadata/rubygems.tmpl b/templates/package/metadata/rubygems.tmpl index dff6830df37..bddb7b5422e 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 "mr-3"}} {{.}}
    {{end}} - {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.i18n.Tr "packages.details.project_site"}}
    {{end}} - {{range .PackageDescriptor.Metadata.Licenses}}
    {{svg "octicon-law" 16 "mr-3"}} {{.}}
    {{end}} + {{range .PackageDescriptor.Metadata.Authors}}
    {{svg "octicon-person" 16 "mr-3"}} {{.}}
    {{end}} + {{if .PackageDescriptor.Metadata.ProjectURL}}
    {{svg "octicon-link-external" 16 "mr-3"}} {{.locale.Tr "packages.details.project_site"}}
    {{end}} + {{range .PackageDescriptor.Metadata.Licenses}}
    {{svg "octicon-law" 16 "mr-3"}} {{.}}
    {{end}} {{end}} diff --git a/templates/package/settings.tmpl b/templates/package/settings.tmpl index bf2d1d4912d..5f045e98b08 100644 --- a/templates/package/settings.tmpl +++ b/templates/package/settings.tmpl @@ -3,12 +3,12 @@ {{template "user/overview/header" .}}
    {{template "base/alert" .}} -

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

    +

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

    - {{.i18n.Tr "packages.settings.link"}} + {{.locale.Tr "packages.settings.link"}}

    -

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

    +

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

    {{template "base/disable_form_autofill"}} {{.CsrfTokenHtml}} @@ -21,7 +21,7 @@ {{end}} -
    {{.i18n.Tr "packages.settings.link.select"}}
    +
    {{.locale.Tr "packages.settings.link.select"}}
    - +

    - {{.i18n.Tr "repo.settings.danger_zone"}} + {{.locale.Tr "repo.settings.danger_zone"}}

    - +
    -
    {{.i18n.Tr "packages.settings.delete"}}
    -

    {{.i18n.Tr "packages.settings.delete.description"}}

    +
    {{.locale.Tr "packages.settings.delete"}}
    +

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

    @@ -46,11 +46,11 @@ {{if not .HasPackages}}
    {{svg "octicon-package" 32}} -

    {{.i18n.Tr "packages.empty"}}

    -

    {{.i18n.Tr "packages.empty.documentation" | Safe}}

    +

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

    +

    {{.locale.Tr "packages.empty.documentation" | Safe}}

    {{else}} -

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

    +

    {{.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 3d9ae5ef444..02bda3fb8fe 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -1,16 +1,16 @@
    -

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

    +

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

    - + {{if eq .PackageDescriptor.Package.Type "container"}} {{end}} - +
    @@ -21,12 +21,12 @@ {{.Version.LowerVersion}}
    - {{$.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}}
    {{else}} -

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

    +

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

    {{end}} {{template "base/paginate" .}}
    diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl index 9a3157c284d..ba309b6a779 100644 --- a/templates/package/view.tmpl +++ b/templates/package/view.tmpl @@ -9,11 +9,11 @@

    {{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})

    - {{$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}}
    @@ -32,7 +32,7 @@
    - {{.i18n.Tr "packages.details"}} + {{.locale.Tr "packages.details"}}
    {{svg .PackageDescriptor.Package.Type.SVGName 16 "mr-3"}} {{.PackageDescriptor.Package.Type.Name}}
    {{if .HasRepositoryAccess}} @@ -53,7 +53,7 @@
    {{if not (eq .PackageDescriptor.Package.Type "container")}}
    - {{.i18n.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}}) + {{.locale.Tr "packages.assets"}} ({{len .PackageDescriptor.Files}})
    {{range .PackageDescriptor.Files}}
    @@ -65,13 +65,13 @@ {{end}} {{if .LatestVersions}}
    - {{.i18n.Tr "packages.versions"}} ({{.TotalVersionCount}}) - {{.i18n.Tr "packages.versions.view_all"}} + {{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}}) + {{.locale.Tr "packages.versions.view_all"}}
    {{range .LatestVersions}}
    {{.Version}} - {{$.i18n.Tr "packages.versions.on"}} {{.CreatedUnix.FormatDate}} + {{$.locale.Tr "packages.versions.on"}} {{.CreatedUnix.FormatDate}}
    {{end}}
    @@ -80,10 +80,10 @@
    {{if .HasRepositoryAccess}} -
    {{svg "octicon-issue-opened" 16 "mr-3"}} {{.i18n.Tr "repo.issues"}}
    +
    {{svg "octicon-issue-opened" 16 "mr-3"}} {{.locale.Tr "repo.issues"}}
    {{end}} {{if .CanWritePackages}} -
    {{svg "octicon-tools" 16 "mr-3"}} {{.i18n.Tr "repo.settings"}}
    +
    {{svg "octicon-tools" 16 "mr-3"}} {{.locale.Tr "repo.settings"}}
    {{end}}
    {{end}} diff --git a/templates/repo/activity.tmpl b/templates/repo/activity.tmpl index c6fca86774d..37cdf3ef02b 100644 --- a/templates/repo/activity.tmpl +++ b/templates/repo/activity.tmpl @@ -8,18 +8,18 @@
    @@ -27,7 +27,7 @@
    {{if (or (.Permission.CanRead $.UnitTypeIssues) (.Permission.CanRead $.UnitTypePullRequests))}} -

    {{.i18n.Tr "repo.activity.overview"}}

    +

    {{.locale.Tr "repo.activity.overview"}}

    {{if .Permission.CanRead $.UnitTypePullRequests}}
    @@ -41,7 +41,7 @@
    {{end}} - {{.i18n.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount | Safe }} + {{.locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount | Safe }}
    {{end}} {{if .Permission.CanRead $.UnitTypeIssues}} @@ -56,7 +56,7 @@
    {{end}} - {{.i18n.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount | Safe }} + {{.locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount | Safe }}
    {{end}}
    @@ -64,21 +64,21 @@ {{if .Permission.CanRead $.UnitTypePullRequests}} {{svg "octicon-git-pull-request"}} {{.Activity.MergedPRCount}}
    - {{.i18n.TrN .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n"}} + {{.locale.TrN .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n"}}
    {{svg "octicon-git-branch"}} {{.Activity.OpenedPRCount}}
    - {{.i18n.TrN .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n"}} + {{.locale.TrN .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n"}}
    {{end}} {{if .Permission.CanRead $.UnitTypeIssues}} {{svg "octicon-issue-closed"}} {{.Activity.ClosedIssueCount}}
    - {{.i18n.TrN .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n"}} + {{.locale.TrN .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n"}}
    {{svg "octicon-issue-opened"}} {{.Activity.OpenedIssueCount}}
    - {{.i18n.TrN .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n"}} + {{.locale.TrN .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n"}}
    {{end}} @@ -87,26 +87,26 @@ {{if .Permission.CanRead $.UnitTypeCode}} {{if eq .Activity.Code.CommitCountInAllBranches 0}}
    -

    {{.i18n.Tr "repo.activity.no_git_activity" }}

    +

    {{.locale.Tr "repo.activity.no_git_activity" }}

    {{end}} {{if gt .Activity.Code.CommitCountInAllBranches 0}}
    - {{.i18n.Tr "repo.activity.git_stats_exclude_merges" }} - {{.i18n.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}} - {{.i18n.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}} - {{.i18n.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}} - {{.i18n.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch }} - {{.i18n.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}} - {{.i18n.Tr "repo.activity.git_stats_push_to_all_branches" }} - {{.i18n.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch }} - {{.i18n.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}} - {{.i18n.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}} - {{.i18n.Tr "repo.activity.git_stats_additions" }} - {{.i18n.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}} - {{.i18n.Tr "repo.activity.git_stats_and_deletions" }} - {{.i18n.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}. + {{.locale.Tr "repo.activity.git_stats_exclude_merges" }} + {{.locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}} + {{.locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}} + {{.locale.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}} + {{.locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch }} + {{.locale.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}} + {{.locale.Tr "repo.activity.git_stats_push_to_all_branches" }} + {{.locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch }} + {{.locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}} + {{.locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}} + {{.locale.Tr "repo.activity.git_stats_additions" }} + {{.locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}} + {{.locale.Tr "repo.activity.git_stats_and_deletions" }} + {{.locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}.
    @@ -118,20 +118,20 @@ {{if gt .Activity.PublishedReleaseCount 0}}

    {{svg "octicon-tag"}} - {{.i18n.Tr "repo.activity.title.releases_published_by" - (.i18n.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount) - (.i18n.TrN .Activity.PublishedReleaseAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.PublishedReleaseAuthorCount) + {{.locale.Tr "repo.activity.title.releases_published_by" + (.locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount) + (.locale.TrN .Activity.PublishedReleaseAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.PublishedReleaseAuthorCount) }}

    {{range .Activity.PublishedReleases}}

    - {{$.i18n.Tr "repo.activity.published_release_label"}} + {{$.locale.Tr "repo.activity.published_release_label"}} {{.TagName}} {{if not .IsTag}} {{.Title | RenderEmoji}} {{end}} - {{TimeSinceUnix .CreatedUnix $.i18n}} + {{TimeSinceUnix .CreatedUnix $.locale}}

    {{end}}
    @@ -140,17 +140,17 @@ {{if gt .Activity.MergedPRCount 0}}

    {{svg "octicon-git-pull-request"}} - {{.i18n.Tr "repo.activity.title.prs_merged_by" - (.i18n.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount) - (.i18n.TrN .Activity.MergedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.MergedPRAuthorCount) + {{.locale.Tr "repo.activity.title.prs_merged_by" + (.locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount) + (.locale.TrN .Activity.MergedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.MergedPRAuthorCount) }}

    {{range .Activity.MergedPRs}}

    - {{$.i18n.Tr "repo.activity.merged_prs_label"}} + {{$.locale.Tr "repo.activity.merged_prs_label"}} #{{.Index}} {{.Issue.Title | RenderEmoji}} - {{TimeSinceUnix .MergedUnix $.i18n}} + {{TimeSinceUnix .MergedUnix $.locale}}

    {{end}}
    @@ -159,17 +159,17 @@ {{if gt .Activity.OpenedPRCount 0}}

    {{svg "octicon-git-branch"}} - {{.i18n.Tr "repo.activity.title.prs_opened_by" - (.i18n.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount) - (.i18n.TrN .Activity.OpenedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedPRAuthorCount) + {{.locale.Tr "repo.activity.title.prs_opened_by" + (.locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount) + (.locale.TrN .Activity.OpenedPRAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedPRAuthorCount) }}

    {{range .Activity.OpenedPRs}}

    - {{$.i18n.Tr "repo.activity.opened_prs_label"}} + {{$.locale.Tr "repo.activity.opened_prs_label"}} #{{.Index}} {{.Issue.Title | RenderEmoji}} - {{TimeSinceUnix .Issue.CreatedUnix $.i18n}} + {{TimeSinceUnix .Issue.CreatedUnix $.locale}}

    {{end}}
    @@ -178,17 +178,17 @@ {{if gt .Activity.ClosedIssueCount 0}}

    {{svg "octicon-issue-closed"}} - {{.i18n.Tr "repo.activity.title.issues_closed_from" - (.i18n.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount) - (.i18n.TrN .Activity.ClosedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.ClosedIssueAuthorCount) + {{.locale.Tr "repo.activity.title.issues_closed_from" + (.locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount) + (.locale.TrN .Activity.ClosedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.ClosedIssueAuthorCount) }}

    {{range .Activity.ClosedIssues}}

    - {{$.i18n.Tr "repo.activity.closed_issue_label"}} + {{$.locale.Tr "repo.activity.closed_issue_label"}} #{{.Index}} {{.Title | RenderEmoji}} - {{TimeSinceUnix .ClosedUnix $.i18n}} + {{TimeSinceUnix .ClosedUnix $.locale}}

    {{end}}
    @@ -197,17 +197,17 @@ {{if gt .Activity.OpenedIssueCount 0}}

    {{svg "octicon-issue-opened"}} - {{.i18n.Tr "repo.activity.title.issues_created_by" - (.i18n.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount) - (.i18n.TrN .Activity.OpenedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedIssueAuthorCount) + {{.locale.Tr "repo.activity.title.issues_created_by" + (.locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount) + (.locale.TrN .Activity.OpenedIssueAuthorCount "repo.activity.title.user_1" "repo.activity.title.user_n" .Activity.OpenedIssueAuthorCount) }}

    {{range .Activity.OpenedIssues}}

    - {{$.i18n.Tr "repo.activity.new_issue_label"}} + {{$.locale.Tr "repo.activity.new_issue_label"}} #{{.Index}} {{.Title | RenderEmoji}} - {{TimeSinceUnix .CreatedUnix $.i18n}} + {{TimeSinceUnix .CreatedUnix $.locale}}

    {{end}}
    @@ -216,22 +216,22 @@ {{if gt .Activity.UnresolvedIssueCount 0}}

    {{svg "octicon-comment-discussion"}} - {{.i18n.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}} + {{.locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}

    - {{.i18n.Tr "repo.activity.unresolved_conv_desc"}} + {{.locale.Tr "repo.activity.unresolved_conv_desc"}}
    {{range .Activity.UnresolvedIssues}}

    - {{$.i18n.Tr "repo.activity.unresolved_conv_label"}} + {{$.locale.Tr "repo.activity.unresolved_conv_label"}} #{{.Index}} {{if .IsPull}} {{.Title | RenderEmoji}} {{else}} {{.Title | RenderEmoji}} {{end}} - {{TimeSinceUnix .UpdatedUnix $.i18n}} + {{TimeSinceUnix .UpdatedUnix $.locale}}

    {{end}}
    diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl index 3dc3522275b..6b3f3eddd7b 100644 --- a/templates/repo/blame.tmpl +++ b/templates/repo/blame.tmpl @@ -3,21 +3,21 @@
    - {{.NumLines}} {{.i18n.TrN .NumLines "repo.line" "repo.lines"}} + {{.NumLines}} {{.locale.TrN .NumLines "repo.line" "repo.lines"}}
    {{FileSize .FileSize}}
    @@ -46,7 +46,7 @@
    {{if $.EscapeStatus.Escaped}} - + {{end}}
    {{.root.i18n.Tr "packages.dependency.id"}}{{.root.i18n.Tr "packages.dependency.version"}}{{.root.locale.Tr "packages.dependency.id"}}{{.root.locale.Tr "packages.dependency.version"}}
    {{if $row.PreviousSha}} - + {{svg "octicon-versions"}} {{end}} @@ -55,7 +55,7 @@ {{if $row.EscapeStatus.Escaped}}{{end}}{{if $row.EscapeStatus.Escaped}}{{end}} {{$row.Code}} diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index d36a69e5be9..82b88a00ba7 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -6,7 +6,7 @@ {{template "repo/sub_menu" .}} {{if .DefaultBranchBranch}}

    - {{.i18n.Tr "repo.default_branch"}} + {{.locale.Tr "repo.default_branch"}}

    @@ -18,15 +18,15 @@ {{svg "octicon-shield-lock"}} {{end}} {{.DefaultBranch}} -

    {{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .DefaultBranchBranch.Commit.ID.String}} · {{RenderCommitMessage $.Context .DefaultBranchBranch.Commit.CommitMessage .RepoLink .Repository.ComposeMetas}} · {{.i18n.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.Commit.Committer.When .i18n}}

    +

    {{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .DefaultBranchBranch.Commit.ID.String}} · {{RenderCommitMessage $.Context .DefaultBranchBranch.Commit.CommitMessage .RepoLink .Repository.ComposeMetas}} · {{.locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.Commit.Committer.When .locale}}

    {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} -
    +
    {{svg "octicon-git-branch"}}
    {{end}} -