[ADF-3785] Move all translated strings used in Process Services Cloud to its own translation file (#4051)

This commit is contained in:
davidcanonieto
2018-12-05 19:16:14 +00:00
committed by Eugenio Romano
parent 7340fce205
commit 474f2e6e5e
13 changed files with 76 additions and 37 deletions

View File

@@ -24,7 +24,7 @@
</ng-content> </ng-content>
<ng-template #defaultEmptyTemplate> <ng-template #defaultEmptyTemplate>
<adf-empty-content icon="apps" [title]="'ADF_TASK_LIST.APPS.TITLE' | translate" [subtitle]="'ADF_TASK_LIST.APPS.SUBTITLE' | translate"> <adf-empty-content icon="apps" [title]="'ADF_CLOUD_TASK_LIST.APPS.TITLE' | translate" [subtitle]="'ADF_CLOUD_TASK_LIST.APPS.SUBTITLE' | translate">
</adf-empty-content> </adf-empty-content>
</ng-template> </ng-template>
</div> </div>

View File

@@ -86,8 +86,8 @@ describe('AppListCloudComponent', () => {
expect(defaultEmptyTemplate).toBeDefined(); expect(defaultEmptyTemplate).toBeDefined();
expect(defaultEmptyTemplate).not.toBeNull(); expect(defaultEmptyTemplate).not.toBeNull();
expect(emptyContent).not.toBeNull(); expect(emptyContent).not.toBeNull();
expect(emptyTitle.innerText).toBe('ADF_TASK_LIST.APPS.TITLE'); expect(emptyTitle.innerText).toBe('ADF_CLOUD_TASK_LIST.APPS.TITLE');
expect(emptySubtitle.innerText).toBe('ADF_TASK_LIST.APPS.SUBTITLE'); expect(emptySubtitle.innerText).toBe('ADF_CLOUD_TASK_LIST.APPS.SUBTITLE');
expect(getAppsSpy).toHaveBeenCalled(); expect(getAppsSpy).toHaveBeenCalled();
}); });

View File

@@ -4,6 +4,45 @@
"TITLE": "No Processes Found", "TITLE": "No Processes Found",
"SUBTITLE":"Create a new process that you want to easily find later", "SUBTITLE":"Create a new process that you want to easily find later",
"NONE": "No process instance filter selected." "NONE": "No process instance filter selected."
},
"PROPERTIES": {
"NAME": "Name",
"CREATED": "Created"
}
},
"ADF_CLOUD_TASK_LIST": {
"APPS": {
"TITLE": "No Applications Found",
"SUBTITLE":"Create a new application that you want to easily find later"
},
"START_TASK": {
"FORM": {
"TITLE": "Start Task",
"LABEL": {
"NAME": "Name",
"DESCRIPTION": "Description",
"ATTACHFORM": "Attach Form",
"ASSIGNEE": "Assignee",
"FORM": "Form",
"DATE": "Choose Date"
},
"ACTION": {
"START": "Start",
"CANCEL": "Cancel"
}
}
},
"PROPERTIES": {
"NAME": "Name",
"ASSIGNEE": "Assignee",
"CREATED": "Created"
},
"LIST": {
"MESSAGES": {
"TITLE": "No Tasks Found",
"SUBTITLE":"Create a new task that you want to easily find later",
"NONE": "No task lists found"
}
} }
}, },
"ADF_CLOUD_TASK_FILTERS": { "ADF_CLOUD_TASK_FILTERS": {

View File

@@ -30,9 +30,9 @@ import { ProcessListCloudModule } from '../process-list-cloud.module';
template: ` template: `
<adf-cloud-process-list #processListCloud> <adf-cloud-process-list #processListCloud>
<data-columns> <data-columns>
<data-column key="name" title="ADF_TASK_LIST.PROPERTIES.NAME" class="adf-full-width adf-name-column"></data-column> <data-column key="name" title="ADF_CLOUD_TASK_LIST.PROPERTIES.NAME" class="adf-full-width adf-name-column"></data-column>
<data-column key="created" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="adf-hidden"></data-column> <data-column key="created" title="ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED" class="adf-hidden"></data-column>
<data-column key="startedBy" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="adf-desktop-only dw-dt-col-3 adf-ellipsis-cell"> <data-column key="startedBy" title="ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED" class="adf-desktop-only dw-dt-col-3 adf-ellipsis-cell">
<ng-template let-entry="$implicit"> <ng-template let-entry="$implicit">
<div>{{getFullName(entry.row.obj.startedBy)}}</div> <div>{{getFullName(entry.row.obj.startedBy)}}</div>
</ng-template> </ng-template>
@@ -83,13 +83,13 @@ describe('ProcessListCloudComponent', () => {
{ {
'key': 'fakeName', 'key': 'fakeName',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.FAKE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.FAKE',
'sortable': true 'sortable': true
}, },
{ {
'key': 'fakeTaskName', 'key': 'fakeTaskName',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.TASK_FAKE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
'sortable': true 'sortable': true
} }
] ]
@@ -244,8 +244,8 @@ describe('ProcessListCloudComponent', () => {
it('should fetch custom schemaColumn from html', () => { it('should fetch custom schemaColumn from html', () => {
fixture.detectChanges(); fixture.detectChanges();
expect(componentCustom.processListCloud.columnList).toBeDefined(); expect(componentCustom.processListCloud.columnList).toBeDefined();
expect(componentCustom.processListCloud.columns[0]['title']).toEqual('ADF_TASK_LIST.PROPERTIES.NAME'); expect(componentCustom.processListCloud.columns[0]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.NAME');
expect(componentCustom.processListCloud.columns[1]['title']).toEqual('ADF_TASK_LIST.PROPERTIES.CREATED'); expect(componentCustom.processListCloud.columns[1]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED');
expect(componentCustom.processListCloud.columns.length).toEqual(3); expect(componentCustom.processListCloud.columns.length).toEqual(3);
}); });
}); });

View File

@@ -102,13 +102,13 @@ export let fakeCustomSchema =
new ObjectDataColumn({ new ObjectDataColumn({
'key': 'fakeName', 'key': 'fakeName',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.FAKE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.FAKE',
'sortable': true 'sortable': true
}), }),
new ObjectDataColumn({ new ObjectDataColumn({
'key': 'fakeTaskName', 'key': 'fakeTaskName',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.TASK_FAKE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
'sortable': true 'sortable': true
}) })
]; ];

View File

@@ -20,13 +20,13 @@ export let processCloudPresetsDefaultModel = {
{ {
'key': 'name', 'key': 'name',
'type': 'text', 'type': 'text',
'title': 'ADF_PROCESS_LIST.PROPERTIES.NAME', 'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.NAME',
'sortable': true 'sortable': true
}, },
{ {
'key': 'created', 'key': 'created',
'type': 'text', 'type': 'text',
'title': 'ADF_PROCESS_LIST.PROPERTIES.CREATED', 'title': 'ADF_CLOUD_PROCESS_LIST.PROPERTIES.CREATED',
'cssClass': 'hidden', 'cssClass': 'hidden',
'sortable': true 'sortable': true
} }

View File

@@ -1,6 +1,6 @@
<form> <form>
<mat-form-field class="adf-people-cloud"> <mat-form-field class="adf-people-cloud">
<mat-label id="assignee-id">{{'ADF_TASK_LIST.START_TASK.FORM.LABEL.ASSIGNEE' | translate}}</mat-label> <mat-label id="assignee-id">{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.ASSIGNEE' | translate}}</mat-label>
<input #inputValue <input #inputValue
matInput matInput
class="adf-cloud-input" class="adf-cloud-input"

View File

@@ -1,13 +1,13 @@
<mat-card> <mat-card>
<mat-card-header fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="10px" class="adf-cloud-start-task-heading"> <mat-card-header fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="10px" class="adf-cloud-start-task-heading">
<mat-card-title>{{'ADF_TASK_LIST.START_TASK.FORM.TITLE' | translate}}</mat-card-title> <mat-card-title>{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.TITLE' | translate}}</mat-card-title>
</mat-card-header> </mat-card-header>
<form [formGroup]="taskForm" fxLayout="column" (ngSubmit)="saveTask()"> <form [formGroup]="taskForm" fxLayout="column" (ngSubmit)="saveTask()">
<mat-card-content> <mat-card-content>
<div class="adf-task-name"> <div class="adf-task-name">
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-label>{{'ADF_TASK_LIST.START_TASK.FORM.LABEL.NAME' | translate }}</mat-label> <mat-label>{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.NAME' | translate }}</mat-label>
<input <input
matInput matInput
id="name_id" id="name_id"
@@ -23,7 +23,7 @@
</div> </div>
<div class="input-row" fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px"> <div class="input-row" fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px">
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-label>{{'ADF_TASK_LIST.START_TASK.FORM.LABEL.DESCRIPTION' | translate}}</mat-label> <mat-label>{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.DESCRIPTION' | translate}}</mat-label>
<textarea <textarea
matInput matInput
class="form-control" class="form-control"
@@ -44,7 +44,7 @@
[matDatepicker]="taskDatePicker" [matDatepicker]="taskDatePicker"
(keydown)="true" (keydown)="true"
(focusout)="onDateChanged($event.srcElement.value)" (focusout)="onDateChanged($event.srcElement.value)"
placeholder="{{'ADF_TASK_LIST.START_TASK.FORM.LABEL.DATE'|translate}}" placeholder="{{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.LABEL.DATE'|translate}}"
[(ngModel)]="dueDate" [(ngModel)]="dueDate"
[ngModelOptions]="{standalone: true}" [ngModelOptions]="{standalone: true}"
id="date_id"> id="date_id">
@@ -74,14 +74,14 @@
type="button" type="button"
(click)="onCancel()" (click)="onCancel()"
id="button-cancel"> id="button-cancel">
{{'ADF_TASK_LIST.START_TASK.FORM.ACTION.CANCEL'|translate}} {{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.ACTION.CANCEL'|translate}}
</button> </button>
<button <button
color="primary" color="primary"
type="submit" [disabled]="dateError || !taskForm.valid || submitted" type="submit" [disabled]="dateError || !taskForm.valid || submitted"
mat-button mat-button
id="button-start"> id="button-start">
{{'ADF_TASK_LIST.START_TASK.FORM.ACTION.START'|translate}} {{'ADF_CLOUD_TASK_LIST.START_TASK.FORM.ACTION.START'|translate}}
</button> </button>
</div> </div>
</mat-card-actions> </mat-card-actions>

View File

@@ -178,7 +178,7 @@ describe('StartTaskCloudComponent', () => {
fixture.detectChanges(); fixture.detectChanges();
expect(element.querySelector('#button-start')).toBeDefined(); expect(element.querySelector('#button-start')).toBeDefined();
expect(element.querySelector('#button-start')).not.toBeNull(); expect(element.querySelector('#button-start')).not.toBeNull();
expect(element.querySelector('#button-start').textContent).toContain('ADF_TASK_LIST.START_TASK.FORM.ACTION.START'); expect(element.querySelector('#button-start').textContent).toContain('ADF_CLOUD_TASK_LIST.START_TASK.FORM.ACTION.START');
}); });
it('should disable start button if name is empty', () => { it('should disable start button if name is empty', () => {

View File

@@ -1,4 +1,4 @@
<div *ngIf="!rows">{{ 'ADF_TASK_LIST.FILTERS.MESSAGES.NONE' | translate }}</div> <div *ngIf="!rows">{{ 'ADF_CLOUD_TASK_LIST.FILTERS.MESSAGES.NONE' | translate }}</div>
<ng-container *ngIf="rows"> <ng-container *ngIf="rows">
<adf-datatable <adf-datatable
[rows]="rows" [rows]="rows"
@@ -23,8 +23,8 @@
<ng-template> <ng-template>
<adf-empty-content *ngIf="!emptyCustomContent" <adf-empty-content *ngIf="!emptyCustomContent"
icon="assignment" icon="assignment"
[title]="'ADF_TASK_LIST.LIST.MESSAGES.TITLE' | translate" [title]="'ADF_CLOUD_TASK_LIST.LIST.MESSAGES.TITLE' | translate"
[subtitle]="'ADF_TASK_LIST.LIST.MESSAGES.SUBTITLE' | translate"> [subtitle]="'ADF_CLOUD_TASK_LIST.LIST.MESSAGES.SUBTITLE' | translate">
</adf-empty-content> </adf-empty-content>
<ng-content select="adf-empty-custom-content"></ng-content> <ng-content select="adf-empty-custom-content"></ng-content>
</ng-template> </ng-template>

View File

@@ -30,9 +30,9 @@ import { TaskListCloudModule } from '../task-list-cloud.module';
template: ` template: `
<adf-cloud-task-list #taskListCloud> <adf-cloud-task-list #taskListCloud>
<data-columns> <data-columns>
<data-column key="name" title="ADF_TASK_LIST.PROPERTIES.NAME" class="adf-full-width adf-name-column"></data-column> <data-column key="name" title="ADF_CLOUD_TASK_LIST.PROPERTIES.NAME" class="adf-full-width adf-name-column"></data-column>
<data-column key="created" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="adf-hidden"></data-column> <data-column key="created" title="ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED" class="adf-hidden"></data-column>
<data-column key="startedBy" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="adf-desktop-only dw-dt-col-3 adf-ellipsis-cell"> <data-column key="startedBy" title="ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED" class="adf-desktop-only dw-dt-col-3 adf-ellipsis-cell">
<ng-template let-entry="$implicit"> <ng-template let-entry="$implicit">
<div>{{getFullName(entry.row.obj.startedBy)}}</div> <div>{{getFullName(entry.row.obj.startedBy)}}</div>
</ng-template> </ng-template>
@@ -80,13 +80,13 @@ describe('TaskListCloudComponent', () => {
{ {
'key': 'fakeName', 'key': 'fakeName',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.FAKE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.FAKE',
'sortable': true 'sortable': true
}, },
{ {
'key': 'fakeTaskName', 'key': 'fakeTaskName',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.TASK_FAKE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
'sortable': true 'sortable': true
} }
] ]
@@ -276,8 +276,8 @@ describe('TaskListCloudComponent', () => {
it('should fetch custom schemaColumn from html', () => { it('should fetch custom schemaColumn from html', () => {
fixture.detectChanges(); fixture.detectChanges();
expect(componentCustom.taskList.columnList).toBeDefined(); expect(componentCustom.taskList.columnList).toBeDefined();
expect(componentCustom.taskList.columns[0]['title']).toEqual('ADF_TASK_LIST.PROPERTIES.NAME'); expect(componentCustom.taskList.columns[0]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.NAME');
expect(componentCustom.taskList.columns[1]['title']).toEqual('ADF_TASK_LIST.PROPERTIES.CREATED'); expect(componentCustom.taskList.columns[1]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED');
expect(componentCustom.taskList.columns.length).toEqual(3); expect(componentCustom.taskList.columns.length).toEqual(3);
}); });

View File

@@ -134,13 +134,13 @@ export let fakeCustomSchema =
new ObjectDataColumn({ new ObjectDataColumn({
'key': 'fakeName', 'key': 'fakeName',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.FAKE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.FAKE',
'sortable': true 'sortable': true
}), }),
new ObjectDataColumn({ new ObjectDataColumn({
'key': 'fakeTaskName', 'key': 'fakeTaskName',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.TASK_FAKE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
'sortable': true 'sortable': true
}) })
]; ];

View File

@@ -20,20 +20,20 @@ export let taskPresetsCloudDefaultModel = {
{ {
'key': 'name', 'key': 'name',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.NAME', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.NAME',
'sortable': true 'sortable': true
}, },
{ {
'key': 'created', 'key': 'created',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.CREATED', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED',
'cssClass': 'hidden', 'cssClass': 'hidden',
'sortable': true 'sortable': true
}, },
{ {
'key': 'assignee', 'key': 'assignee',
'type': 'text', 'type': 'text',
'title': 'ADF_TASK_LIST.PROPERTIES.ASSIGNEE', 'title': 'ADF_CLOUD_TASK_LIST.PROPERTIES.ASSIGNEE',
'cssClass': 'hidden', 'cssClass': 'hidden',
'sortable': true 'sortable': true
} }