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