Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Added support for using the "{{ label }}" placeholder in constraint messages#35338
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There is no support for |
src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedJan 17, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I think this would need some examples - via tests maybe. Reviewing I'm wondering e.g. why doesn't the message go through translation? Why do we use str_replace instead of "label" as a translation variable? Should translating the label be done before or after humanize() by form? etc. All these may become more obvious with examples. |
6c0421b
to8b1f111
Comparea-menshchikov commentedJan 17, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Message into violation object already translated.
Since the message has already been translated, it makes no sense to translate it one more time with
There I've repeated translation logic from |
Maybe placeholder should be |
@nicolas-grekas what can I do to bring the review closer? |
8b1f111
to99c153f
CompareAny news on this pull request? |
01b14fd
to47b92d4
Compare@nicolas-grekas@xabbuh PR rebased on master and ready for review. |
Uh oh!
There was an error while loading.Please reload this page.
32267a1
toff9bc3f
Compare@xabbuh Could you review this PR? |
src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
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.
Just one minor comment. Apart from that the PR looks very good. 👍
src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationMapper.phpShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
de52f9d
toe8bedf6
CompareThank you@a-menshchikov. |
@a-menshchikov Can you submit a PR for the docs? |
… constraint messages (a-menshchikov)This PR was squashed before being merged into the master branch.Discussion----------Added support for using the "{{ label }}" placeholder in constraint messagesDocs forsymfony/symfony#35338Commits-------e298929 Added support for using the "{{ label }}" placeholder in constraint messages
Uh oh!
There was an error while loading.Please reload this page.