[ADF-1695] Comment component - Fix the header key (#2462)

* Fix the comment header key

* Fix unit test

* Fix process comment
This commit is contained in:
Maurizio Vitale 2017-10-16 12:21:13 +01:00 committed by Eugenio Romano
parent fcb292c849
commit 793432d89f
4 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ describe('ActivitiProcessInstanceComments', () => {
fixture.whenStable().then(() => {
fixture.detectChanges();
let element = fixture.nativeElement.querySelector('#comment-header');
expect(element.innerText).toContain('(3)');
expect(element.innerText).toBe('TASK_DETAILS.COMMENTS.HEADER');
});
});

View File

@ -1,6 +1,6 @@
<div class="adf-comments-container">
<div id="comment-header" class="adf-comments-header">
{{'TASK_DETAILS.COMMENTS.HEADER' | translate}}({{comments?.length}})
{{'TASK_DETAILS.COMMENTS.HEADER' | translate: { count: comments?.length} }}
</div>
<div class="adf-comments-input-container" *ngIf="!isReadOnly()">
<mat-form-field class="adf-full-width">

View File

@ -122,7 +122,7 @@ describe('CommentsComponent', () => {
fixture.whenStable().then(() => {
fixture.detectChanges();
let element = fixture.nativeElement.querySelector('#comment-header');
expect(element.innerText).toContain('(3)');
expect(element.innerText).toBe('TASK_DETAILS.COMMENTS.HEADER');
});
});

View File

@ -49,7 +49,7 @@
"COMMENTS": {
"NONE": "No comments",
"ADD": "Add a comment",
"HEADER": "Comments",
"HEADER": "Comments ({{ count }})",
"CREATED_BY_HEADER": "Created by",
"MESSAGE_HEADER": "Message",
"DIALOG": {