From d55a0b723809f5b94acd948b924c8518014445e0 Mon Sep 17 00:00:00 2001 From: Gusted Date: Mon, 27 Jun 2022 22:58:46 +0200 Subject: Refactor `i18n` to `locale` (#20153) * Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go --- templates/mail/notify/collaborator.tmpl | 4 ++-- templates/mail/notify/repo_transfer.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'templates/mail/notify') diff --git a/templates/mail/notify/collaborator.tmpl b/templates/mail/notify/collaborator.tmpl index baa46bafda..fcae84733e 100644 --- a/templates/mail/notify/collaborator.tmpl +++ b/templates/mail/notify/collaborator.tmpl @@ -9,12 +9,12 @@ -

{{.i18n.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}

+

{{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}

diff --git a/templates/mail/notify/repo_transfer.tmpl b/templates/mail/notify/repo_transfer.tmpl index 6250ff7c20..85ed96f3f7 100644 --- a/templates/mail/notify/repo_transfer.tmpl +++ b/templates/mail/notify/repo_transfer.tmpl @@ -8,11 +8,11 @@ {{$url := printf "%[2]s" (Escape .Link) (Escape .Repo)}}

{{.Subject}}. - {{.i18n.Tr "mail.repo.transfer.body" $url | Str2html}} + {{.locale.Tr "mail.repo.transfer.body" $url | Str2html}}

---
- {{.i18n.Tr "mail.view_it_on" AppName}}. + {{.locale.Tr "mail.view_it_on" AppName}}.

-- cgit v1.2.3