-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Add translation_parameters option to base form type #27775
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
Conversation
Having just one |
@xabbuh that's a good point but I'd rather limit the proliferation of options. There is a very little chance that there would be the same translation parameter in |
Translation parameters were injected to labels and helps. Tests were added. Should we inject translation parameters into buttons, attributes and choice options as well? It would be nice, isn’t it? As for the comment of @xabbuh I would suggest a single |
I still think that different parameters for label and help is the way to go. The message id that is passed to the translator is already different (i.e. the label or the help message) and so we should separate the parameters. Apart from that I like this feature. |
Thanks for opening #28635. I think we can close here in favour of your other PR. |
…ion_parameters and attr_translation_parameters options to base form type (webnet-fr) This PR was squashed before being merged into the 4.3-dev branch (closes #28635). Discussion ---------- [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes. Travis-ci isn't green because it tests the components separately. Fabbot.io requires license headers in files where they were not present before. | Fixed tickets | #27698 | License | MIT | Doc PR | symfony/symfony-docs#10065 Hi, this is an alternative to #27775. `translation_parameters` is separated to `label_translation_parameters`, `help_translation_parameters`, `attr_translation_parameters`. Commits ------- b3f3c53 [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type
In forms it would be very nice if there is a way to provide translation parameters for
label
andhelp
optons. Consider this example :Here is a result with translation parameters :

and without them :
