lmc-eu / spirit-web-twig-bundle

[READ-ONLY] Spirit Design System Web Twig components
0 stars 0 forks source link

Variable translations do not work in component attributes #12

Open literat opened 2 months ago

literat commented 2 months ago

When changing the password length, I noticed that it is not possible to add a translation with a variable directly to the component attribute. I had to work around this by creating a helper variable in twig.

I've used this "bend" for the time being with other templates.

I looked at it. The problem is because of {{ }} in the translation. If there was a different character, it works fine, this way it breaks on the regular in twigx. The solution is to either pass it in like Milos did, use another character or escaping it



{'\{\{ limit \}\}': passwordMinLength }
) }}"```

Or somehow improve the regular.