about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-05-13 22:11:49 +0200
committerThibaut Girka <thib@sitedethib.com>2020-05-13 22:11:49 +0200
commit3baacf6993581ba91e3e3ae0071b25a645d71115 (patch)
treeec1dbae77aef8bd43e6f5cfef41dfbc72f133ca3 /app/controllers
parent559214c33fc0c5b5ee621eb2719fa1a15ac9da95 (diff)
parent92f85bea528c5eca97a2f075c53f7dcafdf5cb41 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/localized.rb14
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