Skip to content
Extraits de code Groupes Projets
Valider ef214d76 rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

bump http_accept_language

parent 5ffbafa5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -81,7 +81,7 @@ gem 'jquery-rails', '3.0.4' ...@@ -81,7 +81,7 @@ gem 'jquery-rails', '3.0.4'
# Localization # Localization
gem 'http_accept_language', '1.0.2' gem 'http_accept_language', '2.0.2'
gem 'i18n-inflector-rails', '1.0.7' gem 'i18n-inflector-rails', '1.0.7'
gem 'rails-i18n', '4.0.2' gem 'rails-i18n', '4.0.2'
......
...@@ -214,7 +214,7 @@ GEM ...@@ -214,7 +214,7 @@ GEM
tilt tilt
hashie (2.1.2) hashie (2.1.2)
hike (1.2.3) hike (1.2.3)
http_accept_language (1.0.2) http_accept_language (2.0.2)
i18n (0.6.11) i18n (0.6.11)
i18n-inflector (2.6.7) i18n-inflector (2.6.7)
i18n (>= 0.4.1) i18n (>= 0.4.1)
...@@ -522,7 +522,7 @@ DEPENDENCIES ...@@ -522,7 +522,7 @@ DEPENDENCIES
guard-spork (= 1.5.1) guard-spork (= 1.5.1)
haml (= 4.0.5) haml (= 4.0.5)
handlebars_assets (= 0.12.0) handlebars_assets (= 0.12.0)
http_accept_language (= 1.0.2) http_accept_language (= 2.0.2)
i18n-inflector-rails (= 1.0.7) i18n-inflector-rails (= 1.0.7)
jasmine (= 2.0.2) jasmine (= 2.0.2)
jasmine-jquery-rails (= 2.0.3) jasmine-jquery-rails (= 2.0.3)
......
...@@ -80,8 +80,7 @@ class ApplicationController < ActionController::Base ...@@ -80,8 +80,7 @@ class ApplicationController < ActionController::Base
if user_signed_in? if user_signed_in?
I18n.locale = current_user.language I18n.locale = current_user.language
else else
locale = request.preferred_language_from AVAILABLE_LANGUAGE_CODES locale = http_accept_language.language_region_compatible_from AVAILABLE_LANGUAGE_CODES
locale ||= request.compatible_language_from AVAILABLE_LANGUAGE_CODES
locale ||= DEFAULT_LANGUAGE locale ||= DEFAULT_LANGUAGE
I18n.locale = locale I18n.locale = locale
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter