about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-09-28 01:02:15 +0200
committerGitHub <noreply@github.com>2022-09-28 01:02:15 +0200
commit0d0f3c15d3b510b7e6bd975f3725aaf63b52d971 (patch)
tree90cc241cabf5675638eb78de8069e7e5eb77c138
parent55a2e9b5beb1fc923c42257edee3df738e208b38 (diff)
Fix language dropdown sometimes not appearing in web UI (#19246)
When user has no locale preference saved (such as never changing it
from the default), the preferred posting language is nil, and
the dropdown is not visible
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 342f5e6cc..4767189a0 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -282,7 +282,7 @@ class User < ApplicationRecord
   end
 
   def preferred_posting_language
-    valid_locale_cascade(settings.default_language, locale)
+    valid_locale_cascade(settings.default_language, locale, I18n.locale)
   end
 
   def setting_default_privacy