JMSTranslationBundle
JMSTranslationBundle copied to clipboard
Trailing whitespaces in twig
Hi,
Here is my issue. I have a twig template with translations. My IDE (phpstorm) indents my template like this :
class="fos_comment_comment_reply_show_form">{% trans from 'FOSCommentBundle' %}
fos_comment_comment_show_reply{% endtrans %}</button>
As you can sse there are lots of trailing whitespaces in the trans tag. The translation system removes the trailing spaces and consider the translation tag "fos_comment_comment_show_reply" but the bundle parse this file a create a tag with whitespaces, like this :
<trans-unit id="bd06b49f4a656b9032c3c0caa79c942c72757a3a" resname=" fos_comment_comment_show_reply">
<source> fos_comment_comment_show_reply</source>
<target state="new"> fos_comment_comment_show_reply</target>
</trans-unit>
I think the bundle should remove trailing whitespaces from twig tags.
Regards.
I know it was a long time ago you posted this issue. Do you still experiencing this? Or is it fixed in the latest version of the bundle?