-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Validator] Add "Translatable Objects" example #19054
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
First of all, congrats on your first doc contribution! I think we can make this even simpler. Just after "You may need to clear your cache (even in the dev environment) after creating this file for the first time.", we could add something like: You can also use :class:`Ns\\TranslatableMessage` to build your violation message::
// Your PHP example
You can learn more about translatable messages in :ref:`the dedicated section <translatable-objects>`. If you can, try not to get further than 80 chars lines 🙂 |
Sure 👍 I still have the code blocks error about an undefined class. |
I think it's safe to ignore the error of the codeblocks as we're importing a "folder" here (and the parser is surely looking for some class or something) |
Good to go then 🤔 |
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 a little nitpick, otherwise it's fine to me! 🙂
8d6d89d
to
3b18682
Compare
Nice update! Florian, thanks for adding this and for your patience during the review process (thanks to Alex for reviewing it too). And congrats on your first Symfony Docs contribution 🎉 |
Hey, not sure about this - stumbled on the docs and for v7 and at least v6 I'm using atm. https://github.com/symfony/validator/tree/7.0/Context#L157 this seems not working and triggers an error now as it's typed to string and has translation built-in ✌🏻 |
@SebTM Please open a new issue if you think that you discovered a bug. Comments on merged PRs are likely to get lost. |
Resolve #19049