mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-31 05:02:14 +02:00
Merge pull request #41 from Retrospring/locale-hotfix
Rename locale cookie
This commit is contained in:
commit
6ad9dc4a26
1 changed files with 3 additions and 3 deletions
|
@ -14,8 +14,8 @@ class ApplicationController < ActionController::Base
|
||||||
if params[:hl].nil?
|
if params[:hl].nil?
|
||||||
if current_user.present?
|
if current_user.present?
|
||||||
I18n.locale = current_user.locale
|
I18n.locale = current_user.locale
|
||||||
elsif not cookies[:hl].nil?
|
elsif not cookies[:lang].nil?
|
||||||
I18n.locale = cookies[:hl]
|
I18n.locale = cookies[:lang]
|
||||||
else
|
else
|
||||||
I18n.locale = 'en'
|
I18n.locale = 'en'
|
||||||
end
|
end
|
||||||
|
@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
cookies[:hl] = I18n.locale #unless cookies[:allow_cookies].nil? # some EU cookie bullsh-
|
cookies[:lang] = I18n.locale #unless cookies[:allow_cookies].nil? # some EU cookie bullsh-
|
||||||
end
|
end
|
||||||
|
|
||||||
# check if user got hit by the banhammer of doom
|
# check if user got hit by the banhammer of doom
|
||||||
|
|
Loading…
Reference in a new issue