remove i18n workaround

This commit is contained in:
Denys Vuika
2018-10-02 16:17:40 +01:00
parent acb6f06e68
commit d5755ad804

View File

@@ -29,8 +29,7 @@ import {
AuthenticationService, AuthenticationService,
FileUploadErrorEvent, FileUploadErrorEvent,
PageTitleService, PageTitleService,
UploadService, UploadService
TranslationService
} from '@alfresco/adf-core'; } from '@alfresco/adf-core';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
@@ -69,17 +68,11 @@ export class AppComponent implements OnInit {
private authenticationService: AuthenticationService, private authenticationService: AuthenticationService,
private uploadService: UploadService, private uploadService: UploadService,
private extensions: AppExtensionService, private extensions: AppExtensionService,
private translationService: TranslationService,
private contentApi: ContentApiService, private contentApi: ContentApiService,
private appService: AppService private appService: AppService
) {} ) {}
ngOnInit() { ngOnInit() {
// workaround for https://github.com/ngx-translate/core/issues/575
this.translationService.translate.getTranslation('en').subscribe(() => {
this.translationService.translate.setDefaultLang('en');
});
this.alfrescoApiService.getInstance().on('error', error => { this.alfrescoApiService.getInstance().on('error', error => {
if (error.status === 401) { if (error.status === 401) {
if (!this.authenticationService.isLoggedIn()) { if (!this.authenticationService.isLoggedIn()) {