Skip to content

Commit

Permalink
[i18n] 401 sur history button
Browse files Browse the repository at this point in the history
  • Loading branch information
t8g committed Sep 28, 2017
1 parent c01b3df commit 75aba0c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions client/src/app/isari-logs/isari-logs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ export class IsariLogsComponent implements OnInit {
.getHistory(this.feature, this.options, lang)
.catch(err => {
if (err.status === 401) {
this.toasterService.pop('error', '', 'Unauthoried feature');
this.router.navigate(['/', this.feature], { preserveQueryParams: true });
this.translate.get('unauthoried feature').subscribe(translated => {
this.toasterService.pop('error', '', translated);
this.router.navigate(['/', this.feature], { preserveQueryParams: true });
});
}
return Observable.throw(err);
})
Expand Down
1 change: 1 addition & 0 deletions client/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,5 @@
"after": "Value after",
"details": "Details"
},
"unauthoried feature": "Unauthorized feature"
}
3 changes: 2 additions & 1 deletion client/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,6 @@
"after": "Valeurs après",
"details": "Détails"
},
"no result": "Aucun résultat"
"no result": "Aucun résultat",
"unauthoried feature": "Vous n'êtes pas autorisée à accèder à cette fonctionalité"
}

0 comments on commit 75aba0c

Please sign in to comment.