-
Notifications
You must be signed in to change notification settings - Fork 125
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
Can't add translation_domain to form field #720
Comments
You should set it in params:
model: Acme\DemoBundle\Entity\Note
namespace_prefix: Acme
bundle_name: DemoBundle
i18n_catalog: DemoNote |
@loostro That's right, but i18n_catalog is for the complete form. In my case I want the translation domain for only one field. In the documentation from Symfony it's possible. |
@fadoe i see your need. to answer your question: it was intentional. We assumed that if i18n_catalog is not specified, use Admin catalog. But it should be possible to overwrite that.. why it is not? Probably some bad code. |
@fadoe Eg. see here Resources/templates/CommonAdmin/title.php.twig#L4 - the "translation_domain" is not even used. It's either i18n_catalog or default. Come to think of it, at the time Admingenerator was created (symfony 2.0 times) I don't think all forms had "translation_domain" inherited property. I think they introduced that later, sometime between 2.1 and 2.2. And that might be why this code looks like this. |
@loostro I see. The question is: Does it make sense to add this feature to the generator.yml? I see no BC break and the admin generator uses Symfony 2.2 and up. |
@fadoe if you have time to fix all the |
@loostro I note this issue. I will see when I have a few minutes time ;-) |
@fadoe Waiting for a fix, you can use the |
I try to add the translation domain to a form field:
But the generated form type add always 'translation_domain' => 'Admin'. Is this a bug or is that intentional?
The text was updated successfully, but these errors were encountered: