-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Hi,
I have been working on creating an extractor for routes defined in annotations. (Migrating from JMSI18nRoutingBundle with JMSTranslationBundle) to using this bundle for the translation part.
I'm missing an option to specify a value for the translation from the extractor.
My suggestion would be to either add an extra optional parameter to SourceLocation defaulting to null or allow to set the translation in the context array.
Then in the Symfony Importer service change line 118 from
$catalogue->set($key, null, $domain);
to
$catalogue->set($key, $sourceLocation->getTranslation(), $domain);
or
$catalogue->set($key, isset($context["translation"]) ? $context["translation"] : null, $domain);
The problem atm. is that because all the route values are set as null, all my routes defaults to '/' until I provide a translation.