소스 검색

Updated translation to use the translator provided by the admin

jorns 12 년 전
부모
커밋
63dc452bd8
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      Resources/views/Form/form_admin_fields.html.twig

+ 3 - 3
Resources/views/Form/form_admin_fields.html.twig

@@ -29,7 +29,7 @@ file that was distributed with this source code.
         <label{% for attrname,attrvalue in attr %} {{attrname}}="{{attrvalue}}"{% endfor %}>
             {{ widget|raw }}
             <span>
-                {% if not sonata_admin.admin%}
+                {% if not sonata_admin.admin %}
                     {{- label|trans({}, translation_domain) -}}
                 {% else %}
                     {{- label|trans({}, sonata_admin.admin.translationDomain) -}}
@@ -41,8 +41,8 @@ file that was distributed with this source code.
             {% if not sonata_admin.admin%}
                 {{- label|trans({}, translation_domain) -}}
             {% else %}
-                {{- label|trans({}, sonata_admin.admin.translationDomain) -}}
-            {% endif%}
+                {{ sonata_admin.admin.trans(label) }}
+            {% endif %}
             {{ required ? '*' : '' }}
         </label>
     {% endif %}