APY/APYDataGridBundle

allow false for Column Translation Domain

Hanmac opened this issue · 0 comments

Hanmac commented

change this template to check for false as Translation Domain
to disable the translation in case the column name is generated

{% set translation_domain = column.translationDomain %}
{% if column.visible(grid.isReadyForExport) %}
<th class="{% if column.align != 'left'%}align-{{ column.align }}{% endif %}{% if column.class %} {{ column.class }}{% endif %}{% if loop.last %} last-column{% endif %}"{% if(column.size > -1) %} style="width:{{ column.size }}px;"{% endif %}>
{% apply spaceless %}
{% if column.type == 'massaction' %}
<input type="checkbox" class="grid-mass-selector" onclick="{{ grid.hash }}_markVisible(this.checked);"/>
{% else %}
{% set columnTitle = column.title %}
{% if column.usePrefixTitle == true %}
{% set columnTitle = grid.prefixTitle ~ columnTitle ~ '__abbr' %}
{% if columnTitle|trans({}, translation_domain) == columnTitle %}
{% set columnTitle = grid.prefixTitle ~ column.title %}
{% endif %}
{% endif %}
{% set columnTitle = columnTitle|trans({}, translation_domain) %}