{{.i18n.Tr "admin.auths.delete_auth_desc"}}
+{{.locale.Tr "admin.auths.delete_auth_desc"}}
diff --git a/modules/context/context.go b/modules/context/context.go index dcc43973c..68f8a1b40 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 bf95cae1c..27c3509fd 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 e77081afe..32829ede9 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 5f817c77c..c7ade55a6 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 52011ce35..b8d79bd81 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 b6bddeac0..dd9f78612 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 7f856f2d4..6fe9df092 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 6e491d6cf..af3f381c8 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -4,7 +4,7 @@
{{.i18n.Tr "admin.auths.delete_auth_desc"}}
+{{.locale.Tr "admin.auths.delete_auth_desc"}}
Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true
-{{.i18n.Tr "admin.auths.tips.oauth2.general.tip"}}
+{{.locale.Tr "admin.auths.tips.oauth2.general.tip"}}
-{{.i18n.Tr "admin.auths.restricted_filter_helper"}}
+{{.locale.Tr "admin.auths.restricted_filter_helper"}}
{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}
+{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}
{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}
+{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}
{{.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"}}
{{.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"}}
{{.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"}}
{{.CacheConn}}
{{.CacheItemTTL}}
{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}
{{.Git.GCArgs}}
{{.Config | JsonPrettyPrint}}
{{.Config | JsonPrettyPrint}}
{{.Config | JsonPrettyPrint}}
{{$.AccessLogTemplate}}
{{.Config | JsonPrettyPrint}}
{{.i18n.Tr "admin.emails.change_email_text"}}
+{{.locale.Tr "admin.emails.change_email_text"}}
diff --git a/templates/admin/hook_new.tmpl b/templates/admin/hook_new.tmpl index 049e54ef8..c5196fce4 100644 --- a/templates/admin/hook_new.tmpl +++ b/templates/admin/hook_new.tmpl @@ -5,13 +5,13 @@ {{template "base/alert" .}}{{.i18n.Tr "admin.monitor.queue.name"}} | -{{.i18n.Tr "admin.monitor.queue.type"}} | -{{.i18n.Tr "admin.monitor.queue.exemplar"}} | -{{.i18n.Tr "admin.monitor.queue.numberworkers"}} | -{{.i18n.Tr "admin.monitor.queue.numberinqueue"}} | +{{.locale.Tr "admin.monitor.queue.name"}} | +{{.locale.Tr "admin.monitor.queue.type"}} | +{{.locale.Tr "admin.monitor.queue.exemplar"}} | +{{.locale.Tr "admin.monitor.queue.numberworkers"}} | +{{.locale.Tr "admin.monitor.queue.numberinqueue"}} | {{.ExemplarType}} | {{$sum := .NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} | {{$sum := .NumberInQueue}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}} | -{{if lt $sum 0}}{{$.i18n.Tr "admin.monitor.queue.review"}}{{else}}{{$.i18n.Tr "admin.monitor.queue.review_add"}}{{end}} + | {{if lt $sum 0}}{{$.locale.Tr "admin.monitor.queue.review"}}{{else}}{{$.locale.Tr "admin.monitor.queue.review_add"}}{{end}}
{{end}}
@@ -40,11 +40,11 @@
{{svg "octicon-x" 16 "close inside"}}
- {{.i18n.Tr "admin.monitor.process.cancel"}}
+ {{.locale.Tr "admin.monitor.process.cancel"}}
-
{{template "base/delete_modal_actions" .}}
{{$.i18n.Tr "admin.monitor.process.cancel_notices" `` | Safe}} -{{$.i18n.Tr "admin.monitor.process.cancel_desc"}} +{{$.locale.Tr "admin.monitor.process.cancel_notices" `` | Safe}} +{{$.locale.Tr "admin.monitor.process.cancel_desc"}}
{{template "base/alert" .}}
- {{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}}) + {{.locale.Tr "admin.notices.system_notice_list"}} ({{.locale.Tr "admin.total" .Total}})
|
---|