pass translation parameters to the trans filter

This commit is contained in:
Christian Flothmann 2019-08-07 13:18:23 +02:00
parent 36466a3ab5
commit daac024057
3 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@
{%- endif -%}
{%- endif -%}
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
{{- widget|raw }} {{ label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
{{- widget|raw }} {{ label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain)) -}}
</label>
{%- endif -%}
{%- endblock checkbox_radio_label %}

View File

@ -266,7 +266,7 @@
{{ widget|raw }}
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
{{- label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
{{- label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain)) -}}
{{- form_errors(form) -}}
</label>
{%- endif -%}

View File

@ -266,7 +266,7 @@
{% endif %}
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
{{ widget|raw }}
{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}
{{ translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain) }}
</label>
{%- endblock checkbox_radio_label %}