]> cat aescling's git repositories - mastodon.git/commitdiff
Change global `locale` param to `lang` to avoid conflicts (#17592)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 19 Feb 2022 02:12:28 +0000 (03:12 +0100)
committerGitHub <noreply@github.com>
Sat, 19 Feb 2022 02:12:28 +0000 (03:12 +0100)
app/controllers/concerns/localized.rb

index f7b62f09c14154ffee41db8ab18699392047ad23..173316800facd343ebf0fe28c55265c4765be7a3 100644 (file)
@@ -14,7 +14,7 @@ module Localized
   private
 
   def requested_locale
-    requested_locale_name   = available_locale_or_nil(params[:locale])
+    requested_locale_name   = available_locale_or_nil(params[:lang])
     requested_locale_name ||= available_locale_or_nil(current_user.locale) if respond_to?(:user_signed_in?) && user_signed_in?
     requested_locale_name ||= http_accept_language if ENV['DEFAULT_LOCALE'].blank?
     requested_locale_name