Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OHR Support
Manage
Activity
Members
Labels
Plan
Issues
97
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
OHR Support
Commits
c2c0c103
Commit
c2c0c103
authored
10 years ago
by
Francisco de Juan
Browse files
Options
Downloads
Patches
Plain Diff
force english as uniq locale
parent
dddda143
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/application_controller.rb
+1
-12
1 addition, 12 deletions
app/controllers/application_controller.rb
with
1 addition
and
12 deletions
app/controllers/application_controller.rb
+
1
−
12
View file @
c2c0c103
...
...
@@ -127,18 +127,7 @@ class ApplicationController < ActionController::Base
end
def
set_localization
lang
=
nil
if
User
.
current
.
logged?
lang
=
find_language
(
User
.
current
.
language
)
end
if
lang
.
nil?
&&
request
.
env
[
'HTTP_ACCEPT_LANGUAGE'
]
accept_lang
=
parse_qvalues
(
request
.
env
[
'HTTP_ACCEPT_LANGUAGE'
]).
first
if
!
accept_lang
.
blank?
accept_lang
=
accept_lang
.
downcase
lang
=
find_language
(
accept_lang
)
||
find_language
(
accept_lang
.
split
(
'-'
).
first
)
end
end
lang
||=
Setting
.
default_language
lang
=
Setting
.
default_language
set_language_if_valid
(
lang
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment