about summary refs log tree commit diff
path: root/config/application.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-08 19:43:59 +0100
committerGitHub <noreply@github.com>2022-02-08 19:43:59 +0100
commit2fd1db7c9d0fe8c1cca159b9b0818c72e7c318aa (patch)
treebc7319ae242a889bb1d05b7afdd365d78a43ac1d /config/application.rb
parentb1983623aec8e0b066d115736d2151e0c74407fa (diff)
parent692963d43beb5e66a86e15d63b5aa3eeca82f0a1 (diff)
Merge pull request #1680 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/application.rb')
-rw-r--r--config/application.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/config/application.rb b/config/application.rb
index 561722884..c6f775162 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -149,10 +149,14 @@ module Mastodon
       :'zh-TW',
     ]
 
-    config.i18n.default_locale = ENV['DEFAULT_LOCALE']&.to_sym
-
-    unless config.i18n.available_locales.include?(config.i18n.default_locale)
-      config.i18n.default_locale = :en
+    config.i18n.default_locale = begin
+      custom_default_locale = ENV['DEFAULT_LOCALE']&.to_sym
+
+      if config.i18n.available_locales.include?(custom_default_locale)
+        custom_default_locale
+      else
+        :en
+      end
     end
 
     # config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
@@ -169,7 +173,6 @@ module Mastodon
       Doorkeeper::Application.send :include, ApplicationExtension
       Doorkeeper::AccessToken.send :include, AccessTokenExtension
       Devise::FailureApp.send :include, AbstractController::Callbacks
-      Devise::FailureApp.send :include, HttpAcceptLanguage::EasyAccess
       Devise::FailureApp.send :include, Localized
     end
   end