-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Double error translation #162
Comments
Related to #145 ping @vlastavesely |
I prepared test to test it but no translation duplicity found on tested case. @2bad2furious could you prepare failing test? |
I am not exactly sure how to do that. I triggered error everytime i couldnt find a translation for a message and found the bug when i couldnt get a translation for already translated message. It happened to me with backend form checking using (probably) anonymous function. I can try to find exactly the point, where it gets translated for the first time. |
@vlastavesely Found the first translation. It is called at Forms/Validator::formatMessage() at line 63. |
I think it is not a problem of the |
I get that. But I still don't think it should be happening. It should be translated in one class or another, not both. |
I thought about it a little bit. The only reason for the translation being in the $message = $translator->translate($message, is_int($rule->arg) ? $rule->arg : null); But this seems to me to be wrong. Assume that you would like to validate whether a number is smaller than 5. Then the @dg what do you think? |
It is used for validators like MIN_LENGTH, ie. |
Fixed this way 1888029 |
Description
I have noticed, that erros from inputs are translated twice. When they arrive to DeafultFormRenderer::renderErrors, they are already translated. However, they are translated again.
The text was updated successfully, but these errors were encountered: