Skip to content

Commit 30708d9

Browse files
prasadkatti6543
andauthored
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 <[email protected]>
1 parent 1b08dfe commit 30708d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/mail/issue/default.tmpl

Lines changed: 1 addition & 1 deletion
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)