forked from External/greenlight
HOT-FIX: Issue with changes with the language file name (#466)
* HOT-FIX: Issue with changes with the language file name * Rubocop!
This commit is contained in:
@ -45,7 +45,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
def update_locale(user)
|
||||
I18n.locale = if user && user.language != 'default'
|
||||
user.language
|
||||
user.language.tr('-', '_')
|
||||
else
|
||||
http_accept_language.language_region_compatible_from(I18n.available_locales)
|
||||
end
|
||||
|
@ -64,7 +64,7 @@ module SessionsHelper
|
||||
end
|
||||
|
||||
def parse_user_domain(hostname)
|
||||
return hostname.split('.').first unless Rails.configuration.url_host
|
||||
return hostname.split('.').first if Rails.configuration.url_host.empty?
|
||||
Rails.configuration.url_host.split(',').each do |url_host|
|
||||
if hostname.include?(url_host)
|
||||
return hostname.chomp(url_host).chomp('.')
|
||||
|
Reference in New Issue
Block a user