From 295366dc577b780b0f480e112968345e76e9cadf Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Sun, 15 Jan 2023 15:03:35 +0000 Subject: [PATCH] Add reply hint to mail text. --- options/locale/locale_en-US.ini | 1 + services/mailer/mail.go | 1 + templates/mail/issue/default.tmpl | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 771e76a783b65..089c793ea0c0e 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -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 %s, diff --git a/services/mailer/mail.go b/services/mailer/mail.go index 6af4ed249c5bc..7c7ad54714ceb 100644 --- a/services/mailer/mail.go +++ b/services/mailer/mail.go @@ -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, diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index d9f7aff4cce39..64dbb3df681e4 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -84,7 +84,7 @@

---
- {{.locale.Tr "mail.view_it_on" AppName}}. + {{.locale.Tr "mail.view_it_on" AppName}}{{if .CanReply}} {{.locale.Tr "mail.reply"}}{{end}}.