[ADF-3561] Fix form action buttons translation (#3920)

* [ADF-3561] Fix form action buttons translation

* [ADF-3561] Fix unit test

* [ADF-3561] Change Key to complete form button in translation file
This commit is contained in:
davidcanonieto
2018-10-26 14:45:05 +01:00
committed by Eugenio Romano
parent 38f4916e06
commit b630869f6c
15 changed files with 19 additions and 19 deletions

View File

@@ -79,7 +79,7 @@ describe('FormComponent', () => {
}); });
it('should return primary color for complete button', () => { it('should return primary color for complete button', () => {
expect(formComponent.getColorForOutcome('Complete')).toBe('primary'); expect(formComponent.getColorForOutcome('COMPLETE')).toBe('primary');
}); });
it('should not enable outcome button when model missing', () => { it('should not enable outcome button when model missing', () => {

View File

@@ -48,7 +48,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
static START_PROCESS_OUTCOME_ID: string = '$startProcess'; static START_PROCESS_OUTCOME_ID: string = '$startProcess';
static CUSTOM_OUTCOME_ID: string = '$custom'; static CUSTOM_OUTCOME_ID: string = '$custom';
static COMPLETE_BUTTON_COLOR: string = 'primary'; static COMPLETE_BUTTON_COLOR: string = 'primary';
static COMPLETE_OUTCOME_NAME: string = 'Complete' static COMPLETE_OUTCOME_NAME: string = 'COMPLETE';
/** Underlying form model instance. */ /** Underlying form model instance. */
@Input() @Input()

View File

@@ -22,9 +22,9 @@ import { FormModel } from './form.model';
export class FormOutcomeModel extends FormWidgetModel { export class FormOutcomeModel extends FormWidgetModel {
static SAVE_ACTION: string = 'Save'; // Activiti 'Save' action name static SAVE_ACTION: string = 'SAVE'; // Activiti 'Save' action name
static COMPLETE_ACTION: string = 'Complete'; // Activiti 'Complete' action name static COMPLETE_ACTION: string = 'COMPLETE'; // Activiti 'Complete' action name
static START_PROCESS_ACTION: string = 'Start Process'; // Activiti 'Start Process' action name static START_PROCESS_ACTION: string = 'START PROCESS'; // Activiti 'Start Process' action name
isSystem: boolean = false; isSystem: boolean = false;
isSelected: boolean = false; isSelected: boolean = false;

View File

@@ -124,17 +124,17 @@ export class FormModel {
if (json.fields) { if (json.fields) {
let saveOutcome = new FormOutcomeModel(this, { let saveOutcome = new FormOutcomeModel(this, {
id: FormModel.SAVE_OUTCOME, id: FormModel.SAVE_OUTCOME,
name: 'Save', name: 'SAVE',
isSystem: true isSystem: true
}); });
let completeOutcome = new FormOutcomeModel(this, { let completeOutcome = new FormOutcomeModel(this, {
id: FormModel.COMPLETE_OUTCOME, id: FormModel.COMPLETE_OUTCOME,
name: 'Complete', name: 'COMPLETE',
isSystem: true isSystem: true
}); });
let startProcessOutcome = new FormOutcomeModel(this, { let startProcessOutcome = new FormOutcomeModel(this, {
id: FormModel.START_PROCESS_OUTCOME, id: FormModel.START_PROCESS_OUTCOME,
name: 'Start Process', name: 'START PROCESS',
isSystem: true isSystem: true
}); });

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "Speichern", "SAVE": "Speichern",
"START": "Abschließen", "COMPLETE": "Abschließen",
"START PROCESS": "Prozess starten", "START PROCESS": "Prozess starten",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "SAVE", "SAVE": "SAVE",
"START": "COMPLETE", "COMPLETE": "COMPLETE",
"START PROCESS": "START PROCESS", "START PROCESS": "START PROCESS",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "Guardar", "SAVE": "Guardar",
"START": "Completar", "COMPLETE": "Completar",
"START PROCESS": "Iniciar proceso", "START PROCESS": "Iniciar proceso",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "Enregistrer", "SAVE": "Enregistrer",
"START": "Terminer", "COMPLETE": "Terminer",
"START PROCESS": "Démarrer le processus", "START PROCESS": "Démarrer le processus",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "Salva", "SAVE": "Salva",
"START": "Completa", "COMPLETE": "Completa",
"START PROCESS": "Avvia processo", "START PROCESS": "Avvia processo",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "保存", "SAVE": "保存",
"START": "完了", "COMPLETE": "完了",
"START PROCESS": "プロセスの開始", "START PROCESS": "プロセスの開始",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "Lagre", "SAVE": "Lagre",
"START": "Fullfør", "COMPLETE": "Fullfør",
"START PROCESS": "Start prosess", "START PROCESS": "Start prosess",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "Opslaan", "SAVE": "Opslaan",
"START": "Voltooid", "COMPLETE": "Voltooid",
"START PROCESS": "Proces starten", "START PROCESS": "Proces starten",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "Salvar", "SAVE": "Salvar",
"START": "Completar", "COMPLETE": "Completar",
"START PROCESS": "Iniciar processo", "START PROCESS": "Iniciar processo",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "Сохранить", "SAVE": "Сохранить",
"START": "Завершить", "COMPLETE": "Завершить",
"START PROCESS": "Запустить процесс", "START PROCESS": "Запустить процесс",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {

View File

@@ -1,6 +1,6 @@
{ {
"SAVE": "保存", "SAVE": "保存",
"START": "完成", "COMPLETE": "完成",
"START PROCESS": "启动流程", "START PROCESS": "启动流程",
"FORM": { "FORM": {
"START_FORM": { "START_FORM": {