Skip to content
Snippets Groups Projects
Commit 287f137b authored by Diego Rodríguez's avatar Diego Rodríguez
Browse files

fix changing language

parent f00c4248
No related branches found
No related tags found
1 merge request!14Dja subgroups
...@@ -93,14 +93,12 @@ export class SettingsComponent { ...@@ -93,14 +93,12 @@ export class SettingsComponent {
this.translate.use(lang.code); this.translate.use(lang.code);
const currentUser = JSON.parse(localStorage.getItem("currentUser")); const currentUser = JSON.parse(localStorage.getItem("currentUser"));
this.userService.updateUser(currentUser.id, lang.code).subscribe( this.userService.updateUser(currentUser.id, lang.code).subscribe({
(data) => { next: (data) => {
// Update language in localStorage localStorage.setItem("currentUser", JSON.stringify(data.body.user));
const usuario = this.userService.userToUsuario(data["user"]);
localStorage.setItem("currentUser", JSON.stringify(usuario));
}, },
(data) => {} error: (data) => {},
); });
} }
onSubmitPasswordChange = () => { onSubmitPasswordChange = () => {
......
...@@ -190,6 +190,9 @@ ...@@ -190,6 +190,9 @@
"focusInterpreter": "Focus on Interpreter" "focusInterpreter": "Focus on Interpreter"
}, },
"settings": { "settings": {
"language": {
"title": "Choose language"
},
"changePassword": { "changePassword": {
"title": "Change password", "title": "Change password",
"oldPassword": "Current password", "oldPassword": "Current password",
......
...@@ -190,6 +190,9 @@ ...@@ -190,6 +190,9 @@
"focusInterpreter": "Foco en Interprete" "focusInterpreter": "Foco en Interprete"
}, },
"settings": { "settings": {
"language": {
"title": "Elegir lenguaje"
},
"changePassword": { "changePassword": {
"title": "Cambiar contraseña", "title": "Cambiar contraseña",
"oldPassword": "Contraseña actual", "oldPassword": "Contraseña actual",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment