Description
Description
Hello Symfony Team. I'm working on a Symfony project where we manage our translations using the translation:extract
command, and our team uses Weblate to handle the actual translation process. However, we’ve encountered an issue when extracting translation strings. The command currently pre-fills the <target>
tags with the source message, and this slows down our translation workflow.
When the translation:extract
command is executed, the <target>
tags are automatically populated with the same values as the <source>
tags. For example:
<trans-unit id="haoBXCQ" resname="inventory.item_status.missing">
<source>inventory.item_status.missing</source>
<target>inventory.item_status.missing</target>
</trans-unit>
This behavior causes Weblate to consider the string is already translated, which slows down our translation team workflow. Ideally, the <target>
tags should be empty when the translation file is updated, so Weblate can identify that the strings still require translation.
Example
It would be incredibly helpful if the translation:extract
command could offer an additional option (e.g., --no-fill
or --empty-target
). This option would prevent the command from automatically filling the <target>
, leaving them empty by default. For example:
bin/console translation:extract --force --prefix="" --no-fill fr
<trans-unit id="haoBXCQ" resname="inventory.item_status.missing">
<source>inventory.item_status.missing</source>
<target></target>
</trans-unit>
This would help us better integrate Symfony's translation system with Weblate (and potentially other translation management tools) that rely on empty tags to detect untranslated strings.
Thank you for considering this feature request :)