mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
UX: change 'Visit Topic' to 'Visit Message' for message notification email
This commit is contained in:
parent
3df2ee3431
commit
82a75c00c0
4 changed files with 11 additions and 3 deletions
|
@ -1984,6 +1984,8 @@ en:
|
|||
header_instructions: ''
|
||||
reply_by_email: "[Visit Topic](%{base_url}%{url}) or reply to this email to respond"
|
||||
visit_link_to_respond: "[Visit Topic](%{base_url}%{url}) to respond"
|
||||
reply_by_email_pm: "[Visit Message](%{base_url}%{url}) or reply to this email to respond"
|
||||
visit_link_to_respond_pm: "[Visit Message](%{base_url}%{url}) to respond"
|
||||
|
||||
posted_by: "Posted by %{username} on %{post_date}"
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@ module Email
|
|||
@template_args[:respond_instructions] = ''
|
||||
else
|
||||
@template_args[:respond_instructions] = if allow_reply_by_email?
|
||||
I18n.t('user_notifications.reply_by_email', @template_args)
|
||||
@opts[:private_reply] ? I18n.t('user_notifications.reply_by_email_pm', @template_args) : I18n.t('user_notifications.reply_by_email', @template_args)
|
||||
else
|
||||
I18n.t('user_notifications.visit_link_to_respond', @template_args)
|
||||
@opts[:private_reply] ? I18n.t('user_notifications.visit_link_to_respond_pm', @template_args) : I18n.t('user_notifications.visit_link_to_respond', @template_args)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -194,7 +194,7 @@ describe Email::MessageBuilder do
|
|||
end
|
||||
|
||||
it "does not add unsubscribe via email link without site setting set" do
|
||||
expect(message_with_unsubscribe_via_email.body).to_not match(/mailto:reply@#{Discourse.current_hostname}\?subject=unsubscribe/)
|
||||
expect(message_with_unsubscribe_via_email.body).to_not match(/mailto:reply@#{Discourse.current_hostname}\?subject=unsubscribe/)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -111,6 +111,9 @@ describe UserNotifications do
|
|||
# subject should include category name
|
||||
expect(mail.subject).to match(/India/)
|
||||
|
||||
# 2 "visit topic" link
|
||||
expect(mail.html_part.to_s.scan(/Visit Topic/).count).to eq(2)
|
||||
|
||||
# 2 respond to links cause we have 1 context post
|
||||
expect(mail.html_part.to_s.scan(/to respond/).count).to eq(2)
|
||||
|
||||
|
@ -181,6 +184,9 @@ describe UserNotifications do
|
|||
# subject should include "[PM]"
|
||||
expect(mail.subject).to match("[PM]")
|
||||
|
||||
# 1 "visit message" link
|
||||
expect(mail.html_part.to_s.scan(/Visit Message/).count).to eq(1)
|
||||
|
||||
# 1 respond to link
|
||||
expect(mail.html_part.to_s.scan(/to respond/).count).to eq(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue