瀏覽代碼

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

cyrillej 14 年之前
父節點
當前提交
4e7b16f769
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

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

@@ -21,11 +21,11 @@
         {% if _form_is_choice_group(label) %}
         {% if _form_is_choice_group(label) %}
             <optgroup label="{{ choice }}">
             <optgroup label="{{ choice }}">
                 {% for nestedChoice, nestedLabel in label %}
                 {% 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 %}
                 {% endfor %}
             </optgroup>
             </optgroup>
         {% else %}
         {% 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 %}
         {% endif %}
     {% endfor %}
     {% endfor %}
 {% endspaceless %}
 {% endspaceless %}