extractor icon indicating copy to clipboard operation
extractor copied to clipboard

Default translation of translator->trans not working as described in #56

Open Nils-1st-retail opened this issue 7 years ago • 0 comments

Hi From what I have been able to read we were supposed to be able to define a default translation for the default language for a translator->trans call as

$translator ->trans( /** @Desc("We have changed the permalink because the post '{slug}' already exists.") */ 'post.form.permalink.error.exists', array('{slug}' => $slug), 'FooBundle');

This doesn't work, since the "Desc" object is connected to the translation argument, and the BaseVisitor only looks for comments of the translator element.

This setup works though /** @Desc("We have changed the permalink because the post '{slug}' already exists.") */ $this->translator ->trans( 'post.form.permalink.error.exists', array('{slug}' => $slug), 'FooBundle');

But if the object was to match the setup from JMSTransaltorBundle as described in #56 it needs to be the other way around.

Nils-1st-retail avatar Jul 30 '18 06:07 Nils-1st-retail