Преглед на файлове

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