diff --git a/Resources/views/macros.html.twig b/Resources/views/macros.html.twig index 7894965..1516b5d 100644 --- a/Resources/views/macros.html.twig +++ b/Resources/views/macros.html.twig @@ -53,7 +53,7 @@ {% if name %} - {% if value is iterable %} + {% if value is iterable and '.' not in title %} {{ (title ~ '.title')|trans }} {% else %} {{ title|trans }} @@ -75,7 +75,7 @@ {% else %} {% endif %} @@ -118,7 +118,7 @@ {%- if name -%} - {%- if value is iterable -%} + {%- if value is iterable and '.' not in title -%} {{- (title ~ '.title')|trans -}} {%- else -%} {{- title|trans -}} @@ -148,7 +148,7 @@ {%- for item_name, item_value in value -%} - {{- that.plain_property(item_name, title ~ '.item.' ~ item_name, item_value, trans_domain) -}} + {{- that.plain_property(item_name, '.' in item_name ? item_name : (title ~ '.item.' ~ item_name), item_value, trans_domain) -}} {%- if not loop.last -%} {{- ', ' -}} @@ -182,7 +182,7 @@ {% if name %} - {% if value is iterable %} + {% if value is iterable and '.' not in title %} {{ (title ~ '.title')|trans }} {% else %} {{ title|trans }} @@ -201,7 +201,7 @@ {% endfor %} {% else %} {% for item_name, item_value in value %} - {{ that.table_property(item_name, title ~ '.item.' ~ item_name, item_value, trans_domain) }} + {{ that.table_property(item_name, '.' in item_name ? item_name : (title ~ '.item.' ~ item_name), item_value, trans_domain) }} {% endfor %} {% endif %}