From 2ea8a03698acd29047fe3454e006a7e6aa092855 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 27 Aug 2025 15:58:48 +0200 Subject: [PATCH] Use correct key for workflow labels --- src/Bundle/ChillMainBundle/Form/WorkflowStepType.php | 4 ++-- .../Resources/views/Workflow/_decision.html.twig | 2 +- .../Resources/views/Workflow/_history.html.twig | 4 ++-- .../Resources/views/Workflow/macro_breadcrumb.html.twig | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php index 7f423b4a1..ba943ddd3 100644 --- a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php +++ b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php @@ -96,8 +96,8 @@ class WorkflowStepType extends AbstractType 'choice_label' => function (Transition $transition) use ($workflow) { $meta = $workflow->getMetadataStore()->getTransitionMetadata($transition); - if (\array_key_exists('label', $meta)) { - return $this->translatableStringHelper->localize($meta['label']); + if (\array_key_exists('translated_labels', $meta)) { + return $this->translatableStringHelper->localize($meta['translated_labels']); } return $transition->getName(); diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig index aedee6587..c0ba56fbc 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig @@ -6,7 +6,7 @@ {{ form_errors(transition_form) }} {% set step = entity_workflow.currentStepChained %} - {% set labels = workflow_metadata(entity_workflow, 'label', step.currentStep, entity_workflow.workflowName) %} + {% set labels = workflow_metadata(entity_workflow, 'translated_labels', step.currentStep, entity_workflow.workflowName) %} {% set label = labels is null ? step.currentStep : labels|localize_translatable_string %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig index 4ce53a845..36000f37a 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig @@ -2,7 +2,7 @@
{% for step in entity_workflow.stepsChained %} - {% set place_labels = workflow_metadata(entity_workflow, 'label', step.currentStep, entity_workflow.workflowName) %} + {% set place_labels = workflow_metadata(entity_workflow, 'translated_labels', step.currentStep, entity_workflow.workflowName) %} {% set place_label = place_labels is null ? step.currentStep : place_labels|localize_translatable_string %}
@@ -35,7 +35,7 @@
{% if step.next is not null %} {% set transition = chill_workflow_transition_by_string(step.entityWorkflow, step.transitionAfter) %} - {% set transition_labels = workflow_metadata(step.entityWorkflow, 'label', transition, step.entityWorkflow.workflowName) %} + {% set transition_labels = workflow_metadata(step.entityWorkflow, 'translated_labels', transition, step.entityWorkflow.workflowName) %} {% set transition_label = transition_labels is null ? step.transitionAfter : transition_labels|localize_translatable_string %} {% set forward = workflow_metadata(step.entityWorkflow, 'isForward', transition, step.entityWorkflow.workflowName) %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig index b0141aae7..16e316aef 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/macro_breadcrumb.html.twig @@ -46,7 +46,7 @@ {% endif %} {% if step.previous is not null %} {% set transition = chill_workflow_transition_by_string(step.entityWorkflow, step.previous.transitionAfter) %} - {% set labels = workflow_metadata(step.entityWorkflow, 'label', transition, step.entityWorkflow.workflowName) %} + {% set labels = workflow_metadata(step.entityWorkflow, 'translated_labels', transition, step.entityWorkflow.workflowName) %} {% set label = labels is null ? step.previous.transitionAfter : labels|localize_translatable_string %} {{ label }} {% endif %} @@ -55,7 +55,7 @@ {% macro breadcrumb(entity_workflow) %}