From 30708d9ffed497128d879821ff1a0357bcb06e18 Mon Sep 17 00:00:00 2001 From: Prasad Katti Date: Mon, 6 Sep 2021 19:06:59 -0700 Subject: [PATCH] Fix issue with issue default mail template (#16956) (#16975) Backport #16956 The mail template rendering was failing with the error - `...vices/mailer/mail.go:301:composeIssueCommentMessages() [E] ExecuteTemplate [issue/default/body]: template: issue/default:65:10: executing "issue/default" at <.i18n.Tr>: can't evaluate field i18n in type *models.Comment` The issue was the template variable i18n is available in the outer scope. Fix #16877 Co-authored-by: 6543 <6543@obermui.de> --- templates/mail/issue/default.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index 071acdcbcf..40d69839b0 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -62,7 +62,7 @@ {{end -}} {{- range .ReviewComments}}
- {{.i18n.Tr "mail.issue.in_tree_path" .TreePath}} + {{$.i18n.Tr "mail.issue.in_tree_path" .TreePath}}
{{.Patch}}
{{.RenderedContent | Safe}}