diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-08 19:43:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 19:43:59 +0100 |
commit | 2fd1db7c9d0fe8c1cca159b9b0818c72e7c318aa (patch) | |
tree | bc7319ae242a889bb1d05b7afdd365d78a43ac1d /config | |
parent | b1983623aec8e0b066d115736d2151e0c74407fa (diff) | |
parent | 692963d43beb5e66a86e15d63b5aa3eeca82f0a1 (diff) |
Merge pull request #1680 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 13 | ||||
-rw-r--r-- | config/locales/en.yml | 2 |
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: |