[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

@@ -16,7 +16,7 @@
*/
import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
import { AlfrescoTranslationService, LogService } from 'ng2-alfresco-core';
import { LogService } from 'ng2-alfresco-core';
import { FormService } from './../services/form.service';
import { WidgetVisibilityService } from './../services/widget-visibility.service';
import { FormComponent } from './form.component';
@@ -72,16 +72,10 @@ export class StartFormComponent extends FormComponent implements OnChanges, OnIn
@ViewChild('outcomesContainer', {})
outcomesContainer: ElementRef = null;
constructor(private translate: AlfrescoTranslationService,
formService: FormService,
constructor(formService: FormService,
visibilityService: WidgetVisibilityService,
logService: LogService) {
super(formService, visibilityService, null, null);
if (this.translate) {
this.translate.addTranslationFolder('ng2-activiti-form', 'assets/ng2-activiti-form');
}
this.showTitle = false;
}

View File

@@ -16,7 +16,7 @@
*/
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';
import { AlfrescoTranslationService, ContentService, LogService } from 'ng2-alfresco-core';
import { ContentService, LogService } from 'ng2-alfresco-core';
import { Observable } from 'rxjs/Rx';
import { ContentLinkModel } from '../core/content-link.model';
import { FormService } from './../../../services/form.service';
@@ -49,13 +49,9 @@ export class ContentWidgetComponent implements OnChanges {
content: ContentLinkModel;
constructor(private translate: AlfrescoTranslationService,
protected formService: FormService,
constructor(protected formService: FormService,
private logService: LogService,
private contentService: ContentService) {
if (this.translate) {
this.translate.addTranslationFolder('ng2-activiti-form', 'assets/ng2-activiti-form');
}
}
ngOnChanges(changes: SimpleChanges) {