symfony-bundle
symfony-bundle copied to clipboard
[Suggestion] A command to set <target> the same as <source> if <target> is empty on the default locale
On a whole new project, if you use the extract command, all the <target>
tags are empty, even on the default locale.
Wouldnt it be nice to have a command that fills the <target>
if it is empty, so your project is not complety blank.
Example
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="en">
<file id="menu.en">
<unit id="rvfeKNU" name="Server">
<notes>
<note category="file-source" priority="1">src/Menu/Builder.php:83</note>
<note category="state" priority="1">new</note>
</notes>
<segment>
<source>Server</source>
<target></target>
</segment>
</unit>
<unit id="SE0_pCi" name="Ip Address">
<notes>
<note category="file-source" priority="1">src/Menu/Builder.php:89</note>
<note category="state" priority="1">new</note>
</notes>
<segment>
<source>Ip Address</source>
<target></target>
</segment>
</unit>
</file>
</xliff>
Hi, I am searching something similar. When executing translation:extract new translations target created with source. ¿Have you found the way?
Probably an additional argument to the command might help here, e.g. bin/console translation:extract --no-empty-target
, something like this?