Translate datetime object with icu: split date and time

Translate datetime within icu format
This commit is contained in:
Julie Lenaerts 2024-08-28 16:27:04 +02:00 committed by Julien Fastré
parent cc8214d52c
commit ce781a5b58
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
4 changed files with 5 additions and 2 deletions

View File

@ -387,6 +387,7 @@ class WorkflowController extends AbstractController
'notice', 'notice',
$this->translator->trans('workflow.signature_zone.already_signed_alert') $this->translator->trans('workflow.signature_zone.already_signed_alert')
); );
return $this->redirectToRoute('chill_main_workflow_show', ['id' => $signature->getStep()->getEntityWorkflow()->getId()]); return $this->redirectToRoute('chill_main_workflow_show', ['id' => $signature->getStep()->getEntityWorkflow()->getId()]);
} }

View File

@ -7,7 +7,7 @@
<div class="col-sm-12 col-md-4"> <div class="col-sm-12 col-md-4">
<ul class="record_actions"> <ul class="record_actions">
{% if s.isSigned %} {% if s.isSigned %}
<p>{{ 'workflow.signature_zone.has_signed_statement'|trans( { '%datetime%' : s.stateDate|date('j M Y à H:i:s') } ) }}</p> <p>{{ 'workflow.signature_zone.has_signed_statement'|trans({ 'datetime' : s.stateDate }) }}</p>
{% else %} {% else %}
<li> <li>
<a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_main_workflow_signature_metadata', { 'signature_id': s.id}) }}"><i class="fa fa-pencil-square-o"></i> {{ 'workflow.signature_zone.button_sign'|trans }}</a> <a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_main_workflow_signature_metadata', { 'signature_id': s.id}) }}"><i class="fa fa-pencil-square-o"></i> {{ 'workflow.signature_zone.button_sign'|trans }}</a>

View File

@ -45,6 +45,9 @@ workflow:
few {# workflows} few {# workflows}
other {# workflows} other {# workflows}
} }
signature_zone:
has_signed_statement: 'A signé le {datetime, date, short} à {datetime, time, short}'
duration: duration:
minute: >- minute: >-

View File

@ -531,7 +531,6 @@ workflow:
signature_zone: signature_zone:
title: Appliquer les signatures électroniques title: Appliquer les signatures électroniques
button_sign: Signer button_sign: Signer
has_signed_statement: 'À signé le %datetime%'
metadata: metadata:
sign_by: 'Signature pour %name%' sign_by: 'Signature pour %name%'
docType: Type de document docType: Type de document