diff options
author | ThibG <thib@sitedethib.com> | 2020-05-11 01:09:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 01:09:21 +0200 |
commit | 4bcef12bad8f554f3b0fc2fc34b7d4ca4cc567db (patch) | |
tree | 2bf5fb2eb81f92549ae2ca5a925a559260463f3c /app/controllers | |
parent | 4b2d9b8a558190f8ccc51cfe67f5e151f2c3342b (diff) |
Fix sr locale being selected over sr-Latn (#13693)
* Fix sr locale being selected over sr-Latn * Update tests
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/concerns/localized.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/app/controllers/concerns/localized.rb b/app/controllers/concerns/localized.rb index b43859d9d..d1384ed56 100644 --- a/app/controllers/concerns/localized.rb +++ b/app/controllers/concerns/localized.rb @@ -28,18 +28,6 @@ module Localized end def request_locale - preferred_locale || compatible_locale - end - - def preferred_locale - http_accept_language.preferred_language_from(available_locales) - end - - def compatible_locale - http_accept_language.compatible_language_from(available_locales) - end - - def available_locales - I18n.available_locales.reverse + http_accept_language.language_region_compatible_from(I18n.available_locales) end end |