Skip to content

Commit

Permalink
feature: allow to disable column title translation (#1095)
Browse files Browse the repository at this point in the history
  • Loading branch information
deguif committed Dec 14, 2023
1 parent 1ace342 commit e81c18e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Resources/views/blocks.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,19 @@
{% 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 %}
{% if translation_domain is same as(false) %}
{%- set columnTitle = grid.prefixTitle ~ column.title -%}
{% else %}
{%- set columnTitle = grid.prefixTitle ~ columnTitle ~ '__abbr' -%}
{% if columnTitle|trans({}, translation_domain) == columnTitle %}
{%- set columnTitle = grid.prefixTitle ~ column.title -%}
{% endif %}
{% endif %}
{% endif %}

{% set columnTitle = columnTitle|trans({}, translation_domain) %}
{% if translation_domain is not same as(false) %}
{%- set columnTitle = columnTitle|trans({}, translation_domain) -%}
{% endif %}

{% if (column.sortable) %}
<a class="order" href="{{ grid_url('order', grid, column) }}" title="{{ 'Order by'|trans }} {{ columnTitle }}">{{ columnTitle }}</a>
Expand Down

0 comments on commit e81c18e

Please sign in to comment.