Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Nils-1st-retail opened this issue Jul 30, 2018 · 0 comments

Comments

@Nils-1st-retail
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant