summaryrefslogtreecommitdiffstats
path: root/services/mailer
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-07-14 15:06:09 +0200
committerGitHub <noreply@github.com>2021-07-14 15:06:09 +0200
commit8798e3a09884521157d75869543263e2e6a7ec78 (patch)
treea4470b6c5278e76419ba75d47678d66e8b734d46 /services/mailer
parent8464fa15d066162554a62ec40fc5e1c1a0563277 (diff)
downloadgitea-8798e3a09884521157d75869543263e2e6a7ec78.tar.gz
gitea-8798e3a09884521157d75869543263e2e6a7ec78.zip
Use TrN helper for email templates (#16425)
* Add TrN helper * use TrN * a nit
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, 7 insertions, 0 deletions
diff --git a/services/mailer/mail.go b/services/mailer/mail.go
index 7494d04f2b..14512d7d65 100644
--- a/services/mailer/mail.go
+++ b/services/mailer/mail.go
@@ -72,6 +72,7 @@ func sendUserMail(language string, u *models.User, tpl base.TplName, code, subje
// helper
"i18n": locale,
"Str2html": templates.Str2html,
+ "TrN": templates.TrN,
}
var content bytes.Buffer
@@ -110,6 +111,7 @@ func SendActivateEmailMail(u *models.User, email *models.EmailAddress) {
// helper
"i18n": locale,
"Str2html": templates.Str2html,
+ "TrN": templates.TrN,
}
var content bytes.Buffer
@@ -136,6 +138,7 @@ func SendRegisterNotifyMail(u *models.User) {
// helper
"i18n": locale,
"Str2html": templates.Str2html,
+ "TrN": templates.TrN,
}
var content bytes.Buffer
@@ -165,6 +168,7 @@ func SendCollaboratorMail(u, doer *models.User, repo *models.Repository) {
// helper
"i18n": locale,
"Str2html": templates.Str2html,
+ "TrN": templates.TrN,
}
var content bytes.Buffer
@@ -248,6 +252,7 @@ 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 ff008be1d8..f92d3a78fa 100644
--- a/services/mailer/mail_release.go
+++ b/services/mailer/mail_release.go
@@ -68,6 +68,7 @@ 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 5ef67b7c65..4e629ee5c7 100644
--- a/services/mailer/mail_repo.go
+++ b/services/mailer/mail_repo.go
@@ -63,6 +63,7 @@ func sendRepoTransferNotifyMailPerLang(lang string, newOwner, doer *models.User,
// helper
"i18n": locale,
"Str2html": templates.Str2html,
+ "TrN": templates.TrN,
}
if err := bodyTemplates.ExecuteTemplate(&content, string(mailRepoTransferNotify), data); err != nil {