Bläddra i källkod

Added "trans" Twig filters to labels in the "widget_choice_options" block

cyrillej 14 år sedan
förälder
incheckning
4e7b16f769

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

@@ -21,11 +21,11 @@
         {% if _form_is_choice_group(label) %}
             <optgroup label="{{ choice }}">
                 {% for nestedChoice, nestedLabel in label %}
-                    <option value="{{ nestedChoice }}"{% if _form_is_choice_selected(form, nestedChoice) %} selected="selected"{% endif %}>{{ nestedLabel }}</option>
+                    <option value="{{ nestedChoice }}"{% if _form_is_choice_selected(form, nestedChoice) %} selected="selected"{% endif %}>{{ nestedLabel|trans }}</option>
                 {% endfor %}
             </optgroup>
         {% else %}
-            <option value="{{ choice }}"{% if _form_is_choice_selected(form, choice) %} selected="selected"{% endif %}>{{ label }}</option>
+            <option value="{{ choice }}"{% if _form_is_choice_selected(form, choice) %} selected="selected"{% endif %}>{{ label|trans }}</option>
         {% endif %}
     {% endfor %}
 {% endspaceless %}