diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-06-09 12:09:37 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-06-09 18:09:37 +0200 |
commit | 022008a2a6fb5fe872b04009e1029e2a904bafcc (patch) | |
tree | b660e05c42166a38eb48b0daf095eb37fb79cf4c /app/lib | |
parent | a3715598cc888db462205d74a8b83e57e885dec8 (diff) |
Language detection defaults to nil (#3666)
* Default to nil for statuses.language * Language detection defaults to nil instead of instance UI default
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/language_detector.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/language_detector.rb b/app/lib/language_detector.rb index 0d087f8d1..6d6ae2fb3 100644 --- a/app/lib/language_detector.rb +++ b/app/lib/language_detector.rb @@ -10,7 +10,7 @@ class LanguageDetector end def to_iso_s - detected_language_code || default_locale.to_sym + detected_language_code || default_locale end def prepared_text @@ -43,6 +43,6 @@ class LanguageDetector end def default_locale - account&.user_locale || I18n.default_locale + account&.user_locale&.to_sym || nil end end |