[ADF-1356] Single configuration of i18n service per project (#2199)

* rework i18n layer init

* fix unit tests

* fix tests

* test fixes

* remove obsolete tests
This commit is contained in:
Denys Vuika
2017-08-11 10:55:52 +01:00
committed by Mario Romano
parent bb53844f92
commit 003b0c133b
85 changed files with 333 additions and 431 deletions

View File

@@ -42,10 +42,6 @@ export class AppComponent {
private storage: StorageService,
private logService: LogService) {
this.setProvider();
if (translateService) {
translateService.addTranslationFolder('app', 'resources');
}
}
isAPageWithHeaderBar(): boolean {

View File

@@ -23,7 +23,7 @@ import { DiagramsModule } from 'ng2-activiti-diagrams';
import { ActivitiFormModule } from 'ng2-activiti-form';
import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
import { AppConfigService, CoreModule } from 'ng2-alfresco-core';
import { AppConfigService, CoreModule, TRANSLATION_PROVIDER } from 'ng2-alfresco-core';
import { DataTableModule } from 'ng2-alfresco-datatable';
import { DocumentListModule } from 'ng2-alfresco-documentlist';
import { LoginModule } from 'ng2-alfresco-login';
@@ -128,7 +128,15 @@ if (process.env.ENV === 'production') {
FormListDemoComponent
],
providers: [
{ provide: AppConfigService, useClass: DebugAppConfigService }
{ provide: AppConfigService, useClass: DebugAppConfigService },
{
provide: TRANSLATION_PROVIDER,
multi: true,
useValue: {
name: 'app',
source: 'resources'
}
}
],
bootstrap: [ AppComponent ],
entryComponents: [