Revert "FIX: Notifications shouldn't use user locale unless allow_user_locale is enabled"
This reverts commit c788737eed
.
This commit is contained in:
parent
f4956f79a5
commit
9d35240620
|
@ -20,15 +20,10 @@ class UserNotifications < ActionMailer::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def signup_after_approval(user, opts = {})
|
def signup_after_approval(user, opts = {})
|
||||||
locale = user_locale(user)
|
|
||||||
tips = I18n.t('system_messages.usage_tips.text_body_template',
|
|
||||||
base_url: Discourse.base_url,
|
|
||||||
locale: locale)
|
|
||||||
|
|
||||||
build_email(user.email,
|
build_email(user.email,
|
||||||
template: 'user_notifications.signup_after_approval',
|
template: 'user_notifications.signup_after_approval',
|
||||||
locale: locale,
|
locale: user_locale(user),
|
||||||
new_user_tips: tips)
|
new_user_tips: I18n.t('system_messages.usage_tips.text_body_template', base_url: Discourse.base_url, locale: locale))
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_old_email(user, opts = {})
|
def notify_old_email(user, opts = {})
|
||||||
|
@ -325,7 +320,7 @@ class UserNotifications < ActionMailer::Base
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def user_locale(user)
|
def user_locale(user)
|
||||||
user.effective_locale
|
(user.locale.present? && I18n.available_locales.include?(user.locale.to_sym)) ? user.locale : nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def email_post_markdown(post, add_posted_by = false)
|
def email_post_markdown(post, add_posted_by = false)
|
||||||
|
|
Loading…
Reference in New Issue