about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-08 18:23:53 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-02-08 18:23:53 +0100
commit692963d43beb5e66a86e15d63b5aa3eeca82f0a1 (patch)
treebc7319ae242a889bb1d05b7afdd365d78a43ac1d /config
parentb1983623aec8e0b066d115736d2151e0c74407fa (diff)
parentb6d7726ecbc833abd00f6a9d36b24d9776cfe623 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'config')
-rw-r--r--config/application.rb13
-rw-r--r--config/locales/en.yml2
2 files changed, 9 insertions, 6 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
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 85aa87c7a..600090e78 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1307,13 +1307,13 @@ en:
         other: "%{count} videos"
     boosted_from_html: Boosted from %{acct_link}
     content_warning: 'Content warning: %{warning}'
+    default_language: Same as interface language
     disallowed_hashtags:
       one: 'contained a disallowed hashtag: %{tags}'
       other: 'contained the disallowed hashtags: %{tags}'
     edited_at: Edited %{date}
     errors:
       in_reply_not_found: The post you are trying to reply to does not appear to exist.
-    language_detection: Automatically detect language
     open_in_web: Open in web
     over_character_limit: character limit of %{max} exceeded
     pin_errors: