From 536c3f491546b4546f43a46e7a1a699ca9ac2934 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 9 Aug 2019 17:14:43 -0700 Subject: Adding support for internationalization / i18n (#189) * Still not working * Starting to work on internationalization * Main done. * i18n translations first pass. * Localization testing mostly done. * Second front end pass. * Added a few more translations. * Adding back end translations. --- ui/src/services/WebSocketService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/src/services') diff --git a/ui/src/services/WebSocketService.ts b/ui/src/services/WebSocketService.ts index 986855a3..c192c2b7 100644 --- a/ui/src/services/WebSocketService.ts +++ b/ui/src/services/WebSocketService.ts @@ -4,6 +4,7 @@ import { webSocket } from 'rxjs/webSocket'; import { Subject } from 'rxjs'; import { retryWhen, delay, take } from 'rxjs/operators'; import { UserService } from './'; +import { i18n } from '../i18next'; export class WebSocketService { private static _instance: WebSocketService; @@ -192,7 +193,7 @@ export class WebSocketService { private setAuth(obj: any, throwErr: boolean = true) { obj.auth = UserService.Instance.auth; if (obj.auth == null && throwErr) { - alert("Not logged in."); + alert(i18n.t('not_logged_in')); throw "Not logged in"; } } -- cgit v1.2.3