aboutsummaryrefslogtreecommitdiffstats
path: root/services/mailer
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-01-02 11:33:57 +0800
committerGitHub <noreply@github.com>2022-01-02 04:33:57 +0100
commite61b390d545919244141b699b28e3fbc42adc66f (patch)
treede17418a260234e1043a6d3a130c2b4a8c27640a /services/mailer
parent88da7a7174f9c1568cc2d8d084d6b05a8d268690 (diff)
downloadgitea-e61b390d545919244141b699b28e3fbc42adc66f.tar.gz
gitea-e61b390d545919244141b699b28e3fbc42adc66f.zip
Unify and simplify TrN for i18n (#18141)
Refer: https://github.com/go-gitea/gitea/pull/18135#issuecomment-1003246099 Now we have a unique and simple `TrN`, and make the fix of PR #18135 also use the better `TrN` logic.
Diffstat (limited to 'services/mailer')
-rw-r--r--services/mailer/mail.go5
-rw-r--r--services/mailer/mail_release.go1
-rw-r--r--services/mailer/mail_repo.go1
3 files changed, 0 insertions, 7 deletions
diff --git a/services/mailer/mail.go b/services/mailer/mail.go
index 0a55737073..20552be584 100644
--- a/services/mailer/mail.go
+++ b/services/mailer/mail.go
@@ -78,7 +78,6 @@ func sendUserMail(language string, u *user_model.User, tpl base.TplName, code, s
// helper
"i18n": locale,
"Str2html": templates.Str2html,
- "TrN": templates.TrN,
}
var content bytes.Buffer
@@ -129,7 +128,6 @@ func SendActivateEmailMail(u *user_model.User, email *user_model.EmailAddress) {
// helper
"i18n": locale,
"Str2html": templates.Str2html,
- "TrN": templates.TrN,
}
var content bytes.Buffer
@@ -160,7 +158,6 @@ func SendRegisterNotifyMail(u *user_model.User) {
// helper
"i18n": locale,
"Str2html": templates.Str2html,
- "TrN": templates.TrN,
}
var content bytes.Buffer
@@ -194,7 +191,6 @@ func SendCollaboratorMail(u, doer *user_model.User, repo *repo_model.Repository)
// helper
"i18n": locale,
"Str2html": templates.Str2html,
- "TrN": templates.TrN,
}
var content bytes.Buffer
@@ -278,7 +274,6 @@ func composeIssueCommentMessages(ctx *mailCommentContext, lang string, recipient
// helper
"i18n": locale,
"Str2html": templates.Str2html,
- "TrN": templates.TrN,
}
var mailSubject bytes.Buffer
diff --git a/services/mailer/mail_release.go b/services/mailer/mail_release.go
index 02aa0f312e..ee4c6f3a59 100644
--- a/services/mailer/mail_release.go
+++ b/services/mailer/mail_release.go
@@ -76,7 +76,6 @@ func mailNewRelease(lang string, tos []string, rel *models.Release) {
// helper
"i18n": locale,
"Str2html": templates.Str2html,
- "TrN": templates.TrN,
}
var mailBody bytes.Buffer
diff --git a/services/mailer/mail_repo.go b/services/mailer/mail_repo.go
index 51b16aa7e2..a5343f8128 100644
--- a/services/mailer/mail_repo.go
+++ b/services/mailer/mail_repo.go
@@ -71,7 +71,6 @@ func sendRepoTransferNotifyMailPerLang(lang string, newOwner, doer *user_model.U
// helper
"i18n": locale,
"Str2html": templates.Str2html,
- "TrN": templates.TrN,
}
if err := bodyTemplates.ExecuteTemplate(&content, string(mailRepoTransferNotify), data); err != nil {