summaryrefslogtreecommitdiffstats
path: root/ui/src/services
diff options
context:
space:
mode:
authorDessalines <dessalines@users.noreply.github.com>2019-08-09 17:14:43 -0700
committerGitHub <noreply@github.com>2019-08-09 17:14:43 -0700
commit536c3f491546b4546f43a46e7a1a699ca9ac2934 (patch)
treef080c86e51b9660560ac493cb7f6d9676ea12fbe /ui/src/services
parent5a1e8aa645c9f0898e765b45c2f362308292db26 (diff)
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.
Diffstat (limited to 'ui/src/services')
-rw-r--r--ui/src/services/WebSocketService.ts3
1 files changed, 2 insertions, 1 deletions
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";
}
}