Open jschaedl opened 8 years ago
Hi @jschaedl
translation:extract command creates translations both for routes and translation in twig, that don't have translation in file. So 742 is routes + twig translations
Hi @Leprechaunz
sorry, but that's not true. I'm using the custom extractor --enable-extractor=jms_i18n_routing
as you can see in the command above which only extracts routes. So no twig translations inside the routes translation file.
Hi @jschaedl
Even if you use --enable-extractor=jms_i18n_routing
anyway it creates translations from twig, but in messages.*.yml
file.
You can test it by removing 'messages' translation files and running this command. It will create new 'messages' files from your twig template.
@Leprechaunz :-) you are right there is also a messages.*.yml
. But it still creates translation for all the application routes inside the routes.*.yml
even when I add --bundle=TestShopBundle
. So the bundle option had no effect. Any ideas how to resolve this?
@jschaedl Yes, you are right. It creates route translation for all bundles. Only way you can prevent route from translating is http://jmsyst.com/bundles/JMSI18nRoutingBundle/master/usage#leaving-routes-untranslated But it's not a solution if you want to restrict by bundle.
Sorry, I don't have any better idea for your issue.
I also have the problem that routes translation per bundle are filled with all routes, instead of the bundle only routes. Would be nice if this works te same as for messages translations. Respect the --bundle=MyBundle
option here.
Hi,
I tried to extract routes for one bundle only, but the extractor always extracted all the routes from the application. Here is the command I used:
php app/console translation:extract de --enable-extractor=jms_i18n_routing --bundle=TestShopBundle --output-dir=./app/Resources/translations --keep
and here is the output:
Added Messages: 742 but I have much less routes in this bundle...
Am I doing something wrong?
Thanks a lot!