-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type #28635
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
[Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type #28635
Conversation
that's the point of the PR, ensuring components are still compatible with each others versions listed in composer.json files. This should be fixed. |
At some point i'd really like to see a A single value could simplify things a lot: 'label' => 'text',
'other_label' => new Translation('text', 'domain', ['param' => 'value'], 'nl_NL'),
'other_other_label' => new IdentityTranslation('text'), |
@nicolas-grekas, travis CI is actually green when On the other hand with |
Hi @ro0NL. There is always a way to acheive desired result in Symfony, that's why we love it :) 'other_label' => new Translation('text', 'domain', ['param' => 'value'], $request->getLocale()), |
Those would be all nullable (except $text), as its purpose would be to override defaults |
@webnet-fr Those tests ensure that Symfony 4.1 components will work with dependencies in version 4.2. This is a bit hard for the form theme tests though as they almost do 1:1 comparisons of the generated HTML. We also struggle with that in #27043 for example. So we need to look how we can relax assertions in 4.1 a bit to reduce the pain here. |
Well even if I'm sure of my review, I'm less sure @carsonbot should listen to me. 😉 |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me.
@webnet-fr Can you add an entry to the changelog file of the Form component to mention the new options?
@xabbuh I've updated changelog. I will correct documentation PR shortly. |
Documentation is updted. symfony/symfony-docs#10065 |
…and attr_translation_parameters options to base form type
Thank you @webnet-fr. |
…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
…dyslav Riabchenko) This PR was merged into the master branch. Discussion ---------- [Form] New translation_parameters option Documenting symfony/symfony#28635 Commits ------- 20c6f5a correct arrays short syntax 70f36ad correct bug d7e7b0b correct attr link in entity type doc 71fc7ce typo in form_translation_parameters docs a655106 confirm with 28635 32e79e1 correct link error c57d30a new translation_parameters form option
How can I make this raw? Does not seem to be such an option. the html_help => true does not help in this situation. Thanks.
|
Hi, this is an alternative to #27775.
translation_parameters
is separated tolabel_translation_parameters
,help_translation_parameters
,attr_translation_parameters
.