mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-26 02:01:36 +01:00
Fix rails mailer preview not honouring locale (#28418)
This commit is contained in:
parent
476d1237d4
commit
7cfc078198
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ class ApplicationMailer < ActionMailer::Base
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def locale_for_account(account, &block)
|
def locale_for_account(account, &block)
|
||||||
I18n.with_locale(account.user_locale || I18n.default_locale, &block)
|
I18n.with_locale(account.user_locale || I18n.locale || I18n.default_locale, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_autoreply_headers!
|
def set_autoreply_headers!
|
||||||
|
|
|
@ -202,6 +202,6 @@ class UserMailer < Devise::Mailer
|
||||||
end
|
end
|
||||||
|
|
||||||
def locale
|
def locale
|
||||||
@resource.locale.presence || I18n.default_locale
|
@resource.locale.presence || I18n.locale || I18n.default_locale
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue