bump http_accept_language

This commit is contained in:
Jonne Haß 2014-08-25 21:52:54 +02:00
parent 5ffbafa56a
commit ef214d7681
3 changed files with 4 additions and 5 deletions

View file

@ -81,7 +81,7 @@ gem 'jquery-rails', '3.0.4'
# Localization
gem 'http_accept_language', '1.0.2'
gem 'http_accept_language', '2.0.2'
gem 'i18n-inflector-rails', '1.0.7'
gem 'rails-i18n', '4.0.2'

View file

@ -214,7 +214,7 @@ GEM
tilt
hashie (2.1.2)
hike (1.2.3)
http_accept_language (1.0.2)
http_accept_language (2.0.2)
i18n (0.6.11)
i18n-inflector (2.6.7)
i18n (>= 0.4.1)
@ -522,7 +522,7 @@ DEPENDENCIES
guard-spork (= 1.5.1)
haml (= 4.0.5)
handlebars_assets (= 0.12.0)
http_accept_language (= 1.0.2)
http_accept_language (= 2.0.2)
i18n-inflector-rails (= 1.0.7)
jasmine (= 2.0.2)
jasmine-jquery-rails (= 2.0.3)

View file

@ -80,8 +80,7 @@ class ApplicationController < ActionController::Base
if user_signed_in?
I18n.locale = current_user.language
else
locale = request.preferred_language_from AVAILABLE_LANGUAGE_CODES
locale ||= request.compatible_language_from AVAILABLE_LANGUAGE_CODES
locale = http_accept_language.language_region_compatible_from AVAILABLE_LANGUAGE_CODES
locale ||= DEFAULT_LANGUAGE
I18n.locale = locale
end