-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Translation for validate messages #7593
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
Added phrase function to validator message.
Added phrase function to validate messages.
Update form.phtml
This is a must-to-merge pull request! |
Hi @redelschaap, Thanks for your PR! |
Hi @redelschaap, If you want you can create a seperate PR with the form.phtml so that this can be merged already until we find a solution for the jquery.validate.js. |
@avoelkl I noticed the jquery.validate project has a localization folder which isn't included in Magento. See https://github.com/jquery-validation/jquery-validation/tree/master/src/localization. The solution would be to include all language files and pick the right file when deploying the theme for a specific language. But I guess that sort of behaviour isn't yet included in Magento 2? And at this moment I have no idea how that process works, so I can't provide any help here. Until that time, can my PR be a temporary soluation, optionally with a todo mention? |
I almost fixed this issue, but still struggle with extending objects (variables scope stuff probably). |
@Igloczek Looks good, does it work when you extend the
|
I tried different options and as long as I'm not extending |
When looking at the lib/web/jquery folder, I see two forms of adding functionality to jQuery:
and
I guess the second example can be usefull here when you say you have to use the actual variable instead of getting jQuery from |
It's against AMD rules, I can't assume that something is already loaded somewhere. But at all, I tried it too now and it doesn't work. There is also one more issue - how to get data from translations pack. |
I did not know that, I'm not that into AMD. I use the |
There is also related issue #5278. |
I find out that this issue is already fixed and merged to develop branch (#5725 - |
Thank you @avoelkl , @Igloczek and @redelschaap for collaboration. |
[Amigos] Community Contributions - 2.4-develop
Added phrase functions to validate messages.