Add `header_instructions` overridable translation for email headers.
This commit is contained in:
parent
a3ba564b03
commit
b781b6aea3
|
@ -1,5 +1,7 @@
|
||||||
<div id='main' class=<%= classes %>>
|
<div id='main' class=<%= classes %>>
|
||||||
|
|
||||||
|
<div class='header-instructions'>%{header_instructions}</div>
|
||||||
|
|
||||||
<%= render partial: 'email/post', locals: { post: post } %>
|
<%= render partial: 'email/post', locals: { post: post } %>
|
||||||
|
|
||||||
<% if context_posts.present? %>
|
<% if context_posts.present? %>
|
||||||
|
|
|
@ -1894,6 +1894,7 @@ en:
|
||||||
title: "Unsubscribe"
|
title: "Unsubscribe"
|
||||||
description: "Not interested in getting these emails? No problem! Click below to unsubscribe instantly:"
|
description: "Not interested in getting these emails? No problem! Click below to unsubscribe instantly:"
|
||||||
|
|
||||||
|
header_instructions: ''
|
||||||
reply_by_email: "To respond, reply to this email or [visit the topic](%{base_url}%{url}) in your browser."
|
reply_by_email: "To respond, reply to this email or [visit the topic](%{base_url}%{url}) in your browser."
|
||||||
visit_link_to_respond: "To respond, [visit the topic](%{base_url}%{url}) in your browser."
|
visit_link_to_respond: "To respond, [visit the topic](%{base_url}%{url}) in your browser."
|
||||||
|
|
||||||
|
@ -1934,6 +1935,8 @@ en:
|
||||||
user_replied:
|
user_replied:
|
||||||
subject_template: "[%{site_name}] %{topic_title}"
|
subject_template: "[%{site_name}] %{topic_title}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
|
%{header_instructions}
|
||||||
|
|
||||||
%{message}
|
%{message}
|
||||||
|
|
||||||
%{context}
|
%{context}
|
||||||
|
@ -1944,6 +1947,8 @@ en:
|
||||||
user_quoted:
|
user_quoted:
|
||||||
subject_template: "[%{site_name}] %{topic_title}"
|
subject_template: "[%{site_name}] %{topic_title}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
|
%{header_instructions}
|
||||||
|
|
||||||
%{message}
|
%{message}
|
||||||
|
|
||||||
%{context}
|
%{context}
|
||||||
|
@ -1954,6 +1959,8 @@ en:
|
||||||
user_mentioned:
|
user_mentioned:
|
||||||
subject_template: "[%{site_name}] %{topic_title}"
|
subject_template: "[%{site_name}] %{topic_title}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
|
%{header_instructions}
|
||||||
|
|
||||||
%{message}
|
%{message}
|
||||||
|
|
||||||
%{context}
|
%{context}
|
||||||
|
@ -1964,6 +1971,8 @@ en:
|
||||||
user_group_mentioned:
|
user_group_mentioned:
|
||||||
subject_template: "[%{site_name}] %{topic_title}"
|
subject_template: "[%{site_name}] %{topic_title}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
|
%{header_instructions}
|
||||||
|
|
||||||
%{message}
|
%{message}
|
||||||
|
|
||||||
%{context}
|
%{context}
|
||||||
|
@ -1974,6 +1983,8 @@ en:
|
||||||
user_posted:
|
user_posted:
|
||||||
subject_template: "[%{site_name}] %{topic_title}"
|
subject_template: "[%{site_name}] %{topic_title}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
|
%{header_instructions}
|
||||||
|
|
||||||
%{message}
|
%{message}
|
||||||
|
|
||||||
%{context}
|
%{context}
|
||||||
|
@ -1984,6 +1995,8 @@ en:
|
||||||
user_posted_pm:
|
user_posted_pm:
|
||||||
subject_template: "[%{site_name}] [PM] %{topic_title}"
|
subject_template: "[%{site_name}] [PM] %{topic_title}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
|
%{header_instructions}
|
||||||
|
|
||||||
%{message}
|
%{message}
|
||||||
|
|
||||||
%{context}
|
%{context}
|
||||||
|
|
|
@ -28,6 +28,8 @@ module Email
|
||||||
}.merge!(@opts)
|
}.merge!(@opts)
|
||||||
|
|
||||||
if @template_args[:url].present?
|
if @template_args[:url].present?
|
||||||
|
@template_args[:header_instructions] = I18n.t('user_notifications.header_instructions')
|
||||||
|
|
||||||
if @opts[:include_respond_instructions] == false
|
if @opts[:include_respond_instructions] == false
|
||||||
@template_args[:respond_instructions] = ''
|
@template_args[:respond_instructions] = ''
|
||||||
else
|
else
|
||||||
|
@ -65,6 +67,14 @@ module Email
|
||||||
html_override.gsub!("%{unsubscribe_link}", "")
|
html_override.gsub!("%{unsubscribe_link}", "")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
header_instructions = @template_args[:header_instructions]
|
||||||
|
if header_instructions.present?
|
||||||
|
header_instructions = PrettyText.cook(header_instructions).html_safe
|
||||||
|
html_override.gsub!("%{header_instructions}", header_instructions)
|
||||||
|
else
|
||||||
|
html_override.gsub!("%{header_instructions}", "")
|
||||||
|
end
|
||||||
|
|
||||||
if response_instructions = @template_args[:respond_instructions]
|
if response_instructions = @template_args[:respond_instructions]
|
||||||
respond_instructions = PrettyText.cook(response_instructions).html_safe
|
respond_instructions = PrettyText.cook(response_instructions).html_safe
|
||||||
html_override.gsub!("%{respond_instructions}", respond_instructions)
|
html_override.gsub!("%{respond_instructions}", respond_instructions)
|
||||||
|
|
Loading…
Reference in New Issue