Skip to content

Commit 8117e41

Browse files
authored
Add reply hint to mail text (#22459)
Addition to #22056 This PR adds a hint to mail text if replies are supported. I can't tell if the text structure is supported in every language. Maybe we need to put the whole line in the translation file and use parameters.
1 parent 2cc3a63 commit 8117e41

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

options/locale/locale_en-US.ini

+1
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ password_pwned_err = Could not complete request to HaveIBeenPwned
365365

366366
[mail]
367367
view_it_on = View it on %s
368+
reply = or reply to this email directly
368369
link_not_working_do_paste = Not working? Try copying and pasting it to your browser.
369370
hi_user_x = Hi <b>%s</b>,
370371

services/mailer/mail.go

+1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ func composeIssueCommentMessages(ctx *mailCommentContext, lang string, recipient
274274
"ActionName": actName,
275275
"ReviewComments": reviewComments,
276276
"Language": locale.Language(),
277+
"CanReply": setting.IncomingEmail.Enabled && commentType != issues_model.CommentTypePullRequestPush,
277278
// helper
278279
"locale": locale,
279280
"Str2html": templates.Str2html,

templates/mail/issue/default.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<p>
8585
---
8686
<br>
87-
<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>.
87+
<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>{{if .CanReply}} {{.locale.Tr "mail.reply"}}{{end}}.
8888
</p>
8989
</div>
9090
</body>

0 commit comments

Comments
 (0)