Skip to content

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

@Nils-1st-retail

Description

@Nils-1st-retail

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions