From 4c7a70b348426a66290f2b227693fc32049651b0 Mon Sep 17 00:00:00 2001 From: Prasad Katti Date: Sun, 5 Sep 2021 01:06:20 -0700 Subject: [PATCH] Fix issue with issue default mail template (#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 --- 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 6c74f34c29..0c09c6d043 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}}