JMSTranslationBundle icon indicating copy to clipboard operation
JMSTranslationBundle copied to clipboard

ValidationExtractor dont respect --bundle parameter

Open umpirsky opened this issue 11 years ago • 2 comments

I was trying this command on Sylius:

./app/console translation:extract en --bundle SyliusCoreBundle --domain validators

And it extracted messages from other bundles then SyliusCoreBundle:

<trans-unit id="208830cde0e30a97e31cae31d1815c35" resname="fos_user.password.short">
        <source>fos_user.password.short</source>
        <target>fos_user.password.short</target>
      </trans-unit>
      <trans-unit id="717412185b61194420c7def0b42418f1" resname="fos_user.username.already_used">
        <source>fos_user.username.already_used</source>
        <target>fos_user.username.already_used</target>
      </trans-unit>
      <trans-unit id="e6b436802106350f126526dff34d889c" resname="fos_user.username.blank">
        <source>fos_user.username.blank</source>
        <target>fos_user.username.blank</target>
      </trans-unit>
      <trans-unit id="8eb91da705aa09b820f19e5a4e06d1fe" resname="fos_user.username.long">
        <source>fos_user.username.long</source>
        <target>fos_user.username.long</target>
      </trans-unit>

Because ValidationExtractor always gets all constraints from metadata, instead filtering it by bundle given in --bundle option.

umpirsky avatar Jun 14 '13 12:06 umpirsky

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?

Nyholm avatar Aug 04 '16 15:08 Nyholm

@Nyholm Hi, not sure, I don't use the bundle any more. Maybe someone from Sylius can answer. /cc @pamil

umpirsky avatar Aug 04 '16 20:08 umpirsky