Skip to content

Commit

Permalink
Add reply hint to mail text (#22459)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
KN4CK3R authored Jan 16, 2023
1 parent 2cc3a63 commit 8117e41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ password_pwned_err = Could not complete request to HaveIBeenPwned

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

Expand Down
1 change: 1 addition & 0 deletions services/mailer/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ func composeIssueCommentMessages(ctx *mailCommentContext, lang string, recipient
"ActionName": actName,
"ReviewComments": reviewComments,
"Language": locale.Language(),
"CanReply": setting.IncomingEmail.Enabled && commentType != issues_model.CommentTypePullRequestPush,
// helper
"locale": locale,
"Str2html": templates.Str2html,
Expand Down
2 changes: 1 addition & 1 deletion templates/mail/issue/default.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<p>
---
<br>
<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>.
<a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>{{if .CanReply}} {{.locale.Tr "mail.reply"}}{{end}}.
</p>
</div>
</body>
Expand Down

0 comments on commit 8117e41

Please sign in to comment.