François Lefebvre François Lefebvre - 8 months ago 81
HTML Question

How to parse Timber (twig) templates with poedit and detect quoted strings to translate

I want to parse twig templates for Timber with poedit and I need to translate quoted contents. The problem is that I can't find a parser that does not skip quoted content.


<htmltag attribute="{{ __('value','textdomain') }}" />

Does someone know of a parser for poedit that detects quoted content, like html attribute content?


The workaround I found is to set a variable and use it as my attribute value.

{% set attr_value = __('value', 'textdomain') %}
<a href='{{ attr_string }}'>link</a>