Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for help_translation_parameters and label_translation_parameters #6206

Merged
merged 16 commits into from
Jul 22, 2020
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Resources/views/Form/form_admin_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ file that was distributed with this source code.
{% if translation_domain is same as(false) %}
{{- label -}}
{% elseif not sonata_admin.admin %}
{{- label|trans({}, translation_domain) -}}
{{- label|trans(label_translation_parameters, translation_domain) -}}
{% else %}
{{ label|trans({}, sonata_admin.field_description.translationDomain ?: admin.translationDomain) }}
{{ label|trans(label_translation_parameters, sonata_admin.field_description.translationDomain ?: admin.translationDomain) }}
{% endif %}
</label>
{% endif %}
Expand Down Expand Up @@ -195,7 +195,7 @@ file that was distributed with this source code.
{% if translation_domain is same as(false) %}
{{- label -}}
{% else %}
{{- label|trans({}, translation_domain) -}}
{{- label|trans(label_translation_parameters, translation_domain) -}}
{%- endif -%}
</span>
{%- endif -%}
Expand Down Expand Up @@ -401,7 +401,7 @@ file that was distributed with this source code.
{% endif %}

{% if sonata_admin is defined and sonata_admin_enabled and sonata_admin.field_description.help|default(false) %}
<span class="help-block sonata-ba-field-help">{{ sonata_admin.field_description.help|trans({}, sonata_admin.field_description.translationDomain ?: admin.translationDomain)|raw }}</span>
<span class="help-block sonata-ba-field-help">{{ sonata_admin.field_description.help|trans(help_translation_parameters, sonata_admin.field_description.translationDomain ?: admin.translationDomain)|raw }}</span>
{% endif %}

{{ form_help(form) }}
Expand Down