Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2022-02-19 11:33:18 +01:00
215 changed files with 3330 additions and 1634 deletions

View File

@ -3,7 +3,7 @@
module Authorization
extend ActiveSupport::Concern
include Pundit
include Pundit::Authorization
def pundit_user
current_account

View File

@ -14,7 +14,7 @@ module Localized
private
def requested_locale
requested_locale_name = available_locale_or_nil(params[:locale])
requested_locale_name = available_locale_or_nil(params[:lang])
requested_locale_name ||= available_locale_or_nil(current_user.locale) if respond_to?(:user_signed_in?) && user_signed_in?
requested_locale_name ||= http_accept_language if ENV['DEFAULT_LOCALE'].blank?
requested_locale_name