mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user