From 86a4c043c87d8cadc714ddca879f13da9b9d1cc1 Mon Sep 17 00:00:00 2001 From: Melissa Ashley Lord Date: Wed, 30 Nov 2016 11:50:44 -0500 Subject: [PATCH] No more error when browser is set to any lagnuage otherthan en (#56) --- src/main/webapp/ts/app.component.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/ts/app.component.ts b/src/main/webapp/ts/app.component.ts index f302fdd..40b259a 100644 --- a/src/main/webapp/ts/app.component.ts +++ b/src/main/webapp/ts/app.component.ts @@ -100,7 +100,17 @@ export class AppComponent { this.langData.Description, false, null, null)); }, - error => alert (JSON.stringify (error))); + error => { + let lang_url = 'locale/en.json'; + this.http.get(lang_url).map(res => res.json()).subscribe( + data => { + this.langData = data; + this.segments.push (new DialogResponse ( + this.langData.Description, + false, null, null)); + }, + error => alert (JSON.stringify (error))); + }); } private ngAfterViewInit (_dialogService : DialogService) { this.checkSetup(_dialogService);