Skip to content

Commit 4c7a70b

Browse files
authored
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
1 parent 5a73153 commit 4c7a70b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/mail/issue/default.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
{{end -}}
6363
{{- range .ReviewComments}}
6464
<hr>
65-
{{.i18n.Tr "mail.issue.in_tree_path" .TreePath}}
65+
{{$.i18n.Tr "mail.issue.in_tree_path" .TreePath}}
6666
<div class="review">
6767
<pre>{{.Patch}}</pre>
6868
<div>{{.RenderedContent | Safe}}</div>

0 commit comments

Comments
 (0)