mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 16:41:08 +08:00
add user locale
This commit is contained in:
@ -28,7 +28,7 @@ module Email
|
||||
}.merge!(@opts)
|
||||
|
||||
if @template_args[:url].present?
|
||||
@template_args[:header_instructions] = I18n.t('user_notifications.header_instructions')
|
||||
@template_args[:header_instructions] = I18n.t('user_notifications.header_instructions', locale: @opts[:locale])
|
||||
|
||||
if @opts[:include_respond_instructions] == false
|
||||
@template_args[:respond_instructions] = ''
|
||||
@ -67,7 +67,7 @@ module Email
|
||||
html_override.gsub!("%{unsubscribe_link}", unsubscribe_link)
|
||||
|
||||
if SiteSetting.unsubscribe_via_email_footer && @opts[:add_unsubscribe_via_email_link]
|
||||
unsubscribe_via_email_link = PrettyText.cook(I18n.t('unsubscribe_via_email_link', hostname: Discourse.current_hostname), sanitize: false).html_safe
|
||||
unsubscribe_via_email_link = PrettyText.cook(I18n.t('unsubscribe_via_email_link', hostname: Discourse.current_hostname, locale: @opts[:locale]), sanitize: false).html_safe
|
||||
html_override.gsub!("%{unsubscribe_via_email_link}", unsubscribe_via_email_link)
|
||||
else
|
||||
html_override.gsub!("%{unsubscribe_via_email_link}", "")
|
||||
@ -114,7 +114,7 @@ module Email
|
||||
body << "\n"
|
||||
body << I18n.t('unsubscribe_link', template_args)
|
||||
if SiteSetting.unsubscribe_via_email_footer && @opts[:add_unsubscribe_via_email_link]
|
||||
body << I18n.t('unsubscribe_via_email_link', hostname: Discourse.current_hostname)
|
||||
body << I18n.t('unsubscribe_via_email_link', hostname: Discourse.current_hostname, locale: @opts[:locale])
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user