mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Fix default translation key (#2844)
This commit is contained in:
parent
b1fd6cb60c
commit
3461749dc6
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CardViewDateItemModel, CardViewItem, CardViewTextItemModel } from '@alfresco/adf-core';
|
||||
import { CardViewDateItemModel, CardViewItem, CardViewTextItemModel, TranslationService } from '@alfresco/adf-core';
|
||||
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { ProcessInstance } from '../models/process-instance.model';
|
||||
|
||||
@ -31,6 +31,9 @@ export class ProcessInstanceHeaderComponent implements OnChanges {
|
||||
|
||||
properties: CardViewItem [];
|
||||
|
||||
constructor(private translationService: TranslationService) {
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
this.refreshData();
|
||||
}
|
||||
@ -50,28 +53,28 @@ export class ProcessInstanceHeaderComponent implements OnChanges {
|
||||
value: this.processInstance.ended,
|
||||
format: 'MMM DD YYYY',
|
||||
key: 'ended',
|
||||
default: 'ADF_PROCESS_LIST.PROPERTIES.END_DATE_DEFAULT'
|
||||
default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.END_DATE_DEFAULT')
|
||||
}),
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_PROCESS_LIST.PROPERTIES.CATEGORY',
|
||||
value: this.processInstance.processDefinitionCategory,
|
||||
key: 'category',
|
||||
default: 'ADF_PROCESS_LIST.PROPERTIES.CATEGORY_DEFAULT'
|
||||
default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.CATEGORY_DEFAULT')
|
||||
}),
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_PROCESS_LIST.PROPERTIES.BUSINESS_KEY',
|
||||
value: this.processInstance.businessKey,
|
||||
key: 'businessKey',
|
||||
default: 'ADF_PROCESS_LIST.PROPERTIES.BUSINESS_KEY_DEFAULT'
|
||||
default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.BUSINESS_KEY_DEFAULT')
|
||||
}),
|
||||
new CardViewTextItemModel(
|
||||
{
|
||||
label: 'ADF_PROCESS_LIST.PROPERTIES.CREATED_BY',
|
||||
value: this.getStartedByFullName(),
|
||||
key: 'assignee',
|
||||
default: 'ADF_PROCESS_LIST.PROPERTIES.CREATED_BY_DEFAULT'
|
||||
default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.CREATED_BY_DEFAULT')
|
||||
}),
|
||||
new CardViewDateItemModel(
|
||||
{
|
||||
@ -89,7 +92,7 @@ export class ProcessInstanceHeaderComponent implements OnChanges {
|
||||
{label: 'ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION',
|
||||
value: this.processInstance.processDefinitionDescription,
|
||||
key: 'description',
|
||||
default: 'ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION_DEFAULT'
|
||||
default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION_DEFAULT')
|
||||
})
|
||||
];
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
|
||||
import { BpmUserService, CardViewDateItemModel, CardViewItem, CardViewMapItemModel, CardViewTextItemModel, LogService } from '@alfresco/adf-core';
|
||||
import { BpmUserService, CardViewDateItemModel, CardViewItem, CardViewMapItemModel, CardViewTextItemModel, LogService, TranslationService } from '@alfresco/adf-core';
|
||||
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
@ -48,6 +48,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
|
||||
constructor(private activitiTaskService: TaskListService,
|
||||
private bpmUserService: BpmUserService,
|
||||
private translationService: TranslationService,
|
||||
private logService: LogService) {
|
||||
}
|
||||
|
||||
@ -71,7 +72,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.ASSIGNEE',
|
||||
value: this.taskDetails.getFullName(),
|
||||
key: 'assignee',
|
||||
default: 'ADF_TASK_LIST.PROPERTIES.ASSIGNEE_DEFAULT',
|
||||
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.ASSIGNEE_DEFAULT'),
|
||||
clickable: !this.isCompleted()
|
||||
}
|
||||
),
|
||||
@ -95,7 +96,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.DUE_DATE',
|
||||
value: this.taskDetails.dueDate,
|
||||
key: 'dueDate',
|
||||
default: 'ADF_TASK_LIST.PROPERTIES.DUE_DATE_DEFAULT',
|
||||
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.DUE_DATE_DEFAULT'),
|
||||
editable: true
|
||||
}
|
||||
),
|
||||
@ -104,7 +105,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.CATEGORY',
|
||||
value: this.taskDetails.category,
|
||||
key: 'category',
|
||||
default: 'ADF_TASK_LIST.PROPERTIES.CATEGORY_DEFAULT'
|
||||
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.CATEGORY_DEFAULT')
|
||||
}
|
||||
),
|
||||
new CardViewMapItemModel(
|
||||
@ -141,7 +142,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.DESCRIPTION',
|
||||
value: this.taskDetails.description,
|
||||
key: 'description',
|
||||
default: 'ADF_TASK_LIST.PROPERTIES.DESCRIPTION_DEFAULT',
|
||||
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.DESCRIPTION_DEFAULT'),
|
||||
multiline: true,
|
||||
editable: true
|
||||
}
|
||||
@ -151,7 +152,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
|
||||
label: 'ADF_TASK_LIST.PROPERTIES.FORM_NAME',
|
||||
value: this.formName,
|
||||
key: 'formName',
|
||||
default: 'ADF_TASK_LIST.PROPERTIES.FORM_NAME_DEFAULT'
|
||||
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.FORM_NAME_DEFAULT')
|
||||
}
|
||||
)
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user