Closed
Description
Symfony version(s) affected
6.1.x
Description
When you run the following command to extract the strings to be translated:
symfony console translation:extract --force --clean --domain validators en
...your translationfile 'validators.en.xlf' is updated with a translation unit like the following - even though you haven't used it in your project:
<trans-unit id="VKDowX6" resname="Error">
<source>Error</source>
<target>Error</target>
</trans-unit>
This is because the following line is used in bootstrap_4_layout.html.twig
- which references the string Error
to be translated:
<span class="form-error-icon badge badge-danger text-uppercase">{{ 'Error'|trans({}, 'validators') }}</span> <span class="form-error-message">{{ error.message }}</span>
How to reproduce
Just run the above command on your project and it should generate the entries mentioned.
Possible Solution
Remove the Part of the layout which requires translation - the error message itself should be enough.
Additional Context
No response