Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
23e65090
authored
Feb 08, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
translate button fixed
parent
108bffc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
sails/src/assets/scripts/modules/login/controllers/login.js
sails/src/assets/scripts/modules/login/controllers/login.js
View file @
23e65090
...
@@ -53,13 +53,18 @@ function LoginCtrl(
...
@@ -53,13 +53,18 @@ function LoginCtrl(
$window
.
sessionStorage
.
token
=
data
.
token
;
$window
.
sessionStorage
.
token
=
data
.
token
;
//
Adapt language en-us to en-gb (the latter is the one supported for 'en')
//
User data correct
if
(
data
.
user
)
{
if
(
data
.
user
)
{
// Adapt language en-us to en-gb (the latter is the one supported for 'en')
if
(
data
.
user
.
lang
===
'en-us'
)
{
if
(
data
.
user
.
lang
===
'en-us'
)
{
data
.
user
.
lang
=
'en-gb'
;
data
.
user
.
lang
=
'en-gb'
;
}
}
//Update $scope
$scope
.
lang
=
data
.
user
.
lang
;
$scope
.
lang
=
data
.
user
.
lang
;
//Update $translate
$translate
.
use
(
$scope
.
lang
);
}
else
{
}
else
{
//No user data, use default lang
$translate
.
use
(
$scope
.
lang
);
$translate
.
use
(
$scope
.
lang
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment