Failed to translate menu item sonata_user

I am having difficulty translating the default user menu that comes with SonataUserBundle

. You can see the dropdown menu in the screenshot below.

screenshot of menu

admin_monogodb.yml

contains:

<parameters>
    <parameter key="sonata.user.admin.groupname">sonata_user</parameter>
</parameters>

      

And <services>

contains a tag (shorthand):

<tag 
    name="sonata.admin" 
    manager_type="doctrine_mongodb"
    group="%sonata.user.admin.groupname%" 
    label="users" 
    label_translator_strategy="sonata.admin.label.strategy.underscore"
/>

      

As with any other translation, I just add an entry in SonataUserBundle.nl.xliff

:

<trans-unit id="sonata_user">
    <source>sonata_user</source>
    <target>Gebruikers111</target>
</trans-unit>

      

But it still shows sonata_user

.

I was debugging a directory in Translator

and in fact contained the correct translation.

What's happening?

+3


source to share


1 answer


After deep debugging the component, Translator

I was surprised to see that it is looking for a translation sonata_user

in the domain SonataAdminBundle

. I moved the translation from SonataUserBundle

to SonataAdminBundle

and now it works.



+4


source







All Articles