You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Translations do not apply for validation messages.
Although I see translations from this bundle are added to the admin, e.g. "members.validation.email.already_used" it's not applied during form validation.
For example registration form has IsUniqueEmail constraint which has default message email_already_used instead of members.validation.email.already_used.
But even if I update it to be "members.validation.email.already_used" it still won't translate because pimcore is only using "messages" translation domain for translations and symfony sets "validators" translation domain for constrain violations.
I managed to solve it by forcing pimcore use "messages" domain always:
Hey @geekdevs, thanks for your investigation. Actually, we need to set the validator translation domain by ourself, since symfony requires an explicit translation domain for validation messages. So your solution is perfectly ok. Thanks!
Translations do not apply for validation messages.
Although I see translations from this bundle are added to the admin, e.g. "members.validation.email.already_used" it's not applied during form validation.
For example registration form has IsUniqueEmail constraint which has default message
email_already_used
instead ofmembers.validation.email.already_used
.But even if I update it to be "members.validation.email.already_used" it still won't translate because pimcore is only using "messages" translation domain for translations and symfony sets "validators" translation domain for constrain violations.
I managed to solve it by forcing pimcore use "messages" domain always:
But I was wondering if you had better solution in mind and that's just a minor issue?
The text was updated successfully, but these errors were encountered: