The first output the string not translated:
{{ chart.name~'.short'|trans({}, "charts") }}
This one works (is the same text that chart.name~'.short' should output):
{{ 'charts.region.area.short'|trans({}, "charts") }}
Am i missing something? It seems it’s impossible to translating dynamic text in Twig?
EDIT: working setting a variable (why?):
{% set name = chart.name ~ '.short' %}
{{ name|trans({}, "charts") }}
Symfony/Twig is trying to translate
.shortand concatenate it with contents ofchart.name. Use parentheses to get the expected output: