From 9aaa435af82089853bf616573cad4264a2083b54 Mon Sep 17 00:00:00 2001 From: Prasad Katti Date: Sat, 4 Sep 2021 17:13:32 -0700 Subject: [PATCH] Fix issue with issue default mail template 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. --- 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 6c74f34c2961..0c09c6d043ac 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}}