8000 [TwigBridge] Added the translation domain · echavez/symfony@3aa7582 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3aa7582

Browse files
committed
[TwigBridge] Added the translation domain
1 parent 6e4269f commit 3aa7582

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
{% spaceless %}
2929
{% for choice, label in options %}
3030
{% if _form_is_choice_group(label) %}
31-
<optgroup label="{{ choice|trans }}">
31+
<optgroup label="{{ choice|trans({}, translation_domain) }}">
3232
{% for nestedChoice, nestedLabel in label %}
33-
<option value="{{ nestedChoice }}"{% if _form_is_choice_selected(form, nestedChoice) %} selected="selected"{% endif %}>{{ nestedLabel|trans }}</option>
33+
<option value="{{ nestedChoice }}"{% if _form_is_choice_selected(form, nestedChoice) %} selected="selected"{% endif %}>{{ nestedLabel|trans({}, translation_domain) }}</option>
3434
{% endfor %}
3535
</optgroup>
3636
{% else %}
37-
<option value="{{ choice }}"{% if _form_is_choice_selected(form, choice) %} selected="selected"{% endif %}>{{ label|trans }}</option>
37+
<option value="{{ choice }}"{% if _form_is_choice_selected(form, choice) %} selected="selected"{% endif %}>{{ label|trans({}, translation_domain) }}</option>
3838
{% endif %}
3939
{% endfor %}
4040
{% endspaceless %}
@@ -52,7 +52,7 @@
5252
{% else %}
5353
<select {{ block('widget_attributes') }}{% if multiple %} multiple="multiple"{% endif %}>
5454
{% if empty_value is not none %}
55-
<option value="">{{ empty_value|trans }}</option>
55+
<option value="">{{ empty_value|trans({}, translation_domain) }}</option>
5656
{% endif %}
5757
{% if preferred_choices|length > 0 %}
5858
{% set options = preferred_choices %}
@@ -198,7 +198,7 @@
198198
{% if required %}
199199
{% set attr = attr|merge({'class': attr.class|default('') ~ ' required'}) %}
200200
{% endif %}
201-
<label{% for attrname,attrvalue in attr %} {{attrname}}="{{attrvalue}}"{% endfor %}>{{ label|trans }}</label>
201+
<label{% for attrname,attrvalue in attr %} {{attrname}}="{{attrvalue}}"{% endfor %}>{{ label|trans({}, translation_domain) }}</label>
202202
{% endspaceless %}
203203
{% endblock %}
204204

0 commit comments

Comments
 (0)
0