-
Notifications
You must be signed in to change notification settings - Fork 94
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
New extractor for constraints #450
Comments
Hello @welcoMattic, you could inject the translator into the Form / Controller but when using If you open the profiler toolbar you would see that the "ABC" string is in the validators domain, without the need to call the |
I updated the pull request with more features and a small test suite. |
@lukepass what @welcoMattic might mean is whether translating should be a responsibility of the form or of the view. IMHO the best practice would be that the view is responsible for translating, as otherwise any class that processes text to appear on a view could eventually need a dependency on the translator. Does not mean this wouldn't be a useful feature for the bundle though! |
@rvanlaak I'm not sure I understand your point. Every time you use a It's the same as the constraint annotations (a feature already supported in this bundle). What this bundle isn't supporting right now is a constraint added with the Thanks. |
Hello, since the bundle doesn't automatically do this I created an extractor which should be able to get all the transactions from all the constraints:
php-translation/extractor#160
In the following example the extracted string would be
Inserisci la nuova password.
.The text was updated successfully, but these errors were encountered: