-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Not translated "Please enter a valid email address (Ex: [email protected])." #4883
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
Comments
if you have a look at Magento/Ui/view/base/web/js/lib/validation/rules.js
that means that error message is translated, but probably you don't have the right translation in your translation file, so it's not a Magento 2 issue, more of who's maintaining your language pack |
@pareshe were you able to resolve this issue by translating this string in your language pack? If so please close the issue or provide more details |
Please check this screen-shot: |
I am facing the same issue in Magneto 2.1.0. I have the following line in sl_SI.csv: "Please enter a valid email address (Ex: [email protected]).","Prosimo vnesite veljaven elektronski naslov (Primer: [email protected]).",module,Magento_Ui Magento is still not translating the string, despite I removed pub/static, var/cache, var/generation, var/page_cache, var/view_preprocessed folders and ran bin/magento setup:static-content:deploy sl_SI command and refreshed the cache. |
Same issue here in Magento 2.1 |
Same issue in M2.1 :-( Hope this fix is included in >= 2.1.1 |
Same here in M2.1 |
Hi :) The solution for most of this not translated errors in validation is the following library "mage/validation". Most of the returned messages do not call the mage translation method. You can override the file with your own file by using a module with a requirejs-config:
You can translate every validation hint after surronding it with a $.mage.__('') method call:
|
@shockwavemk |
Some additional hint: some errors are still not translateable by default even if you surround all values in validation.js. For example: passwords have to be same. To solve this issue just add an override of the method "equalTo" (jquery.validate.js) into the validation.js
|
still present in 2.1.1... |
Thank you. That took you 4 month ... |
appreciated, @SerhiyShkolyarenko |
Can confirm that translation for strings in Refs:
|
Remains unsolved in 2.1.2. |
@PieterCappelle: Yes, no change with that patch. We're trying hard on our end to technically raise and escalate the issue. However it looks like that Magento (the vendor) is (currently) blocked by the load in it's queue. I wish the vendor have taken more care about translation (everything not in en_US) from the very beginning. |
They should take some time to clear their queue before the next release. |
As it turns out, we are. Expect a lot of fixes up to and especially including 2.2. |
@benmarks: Just by chance, any list at hand? |
@tkn98 the "solution" has already been provided by @shockwavemk |
I did as @shockwavemk proposed but the messages are still not translated even though it picks up that file (I tried by changing error messages) and those messages are translated in my translation files... Any suggestion for this? Of course I rebuild static content and so on. |
This issue still persists in 2.1.7... EDIT: the fix by @gemscng works perfectly fine, thanks! |
@maksek Doesn't work for me in 2.1.7 too... |
This problem still persists in Magento 2.1.7. I had to uses @gemscng 's solution to solve it. But doesn't seem very neat. |
You guys can check my message above if it is about translation in js file. |
@kanduvisla : @gemscng solution is not neat. Directly overwrite the core is a very bad practice. So instead of overwrite this file, I'd rather override this file, as if the solution from @shockwavemk . Actually in Magento Stack Exchange, there are a method to teach you the whole steps to override the validation.js |
@pyyick Mine is same concept as the link you posted. Instead of creating a module. Just put the validation.js in your own theme. No need to modify the core. |
This issue still persists in 2.1.7CE. Put to file and, reflect with the following command.
|
@shockwavemk What is file path and line for this translate fix? "Please enter the same value again." |
@steros and anyone else struggling with this... have you tried switching to production mode? I nuked every aspect of the cache and everything was 100% in order so that translations from .js strings, which I could see were being run through the
Then compiled assets for the locale and themes I was working with and then all my strings from my .csv dictionary were translated. Maybe there was some area of the cache I failed to nuke? It seems ridiculous that you must go into production mode and recompile to see translation strings/changes. Here is my cache nuke 1-liner:
What am I missing? |
Internal ticket to track issue progress: MAGETWO-72250 |
Fix for the issue is already delivered to |
Ok guys, here's what worked for me: function () { return $.mage.__('Please enter a valid email address (Ex: [email protected]).'); } |
In checkout with guest customer when enter invalid email address in "Email" field that time display this error and that is not translated.
The text was updated successfully, but these errors were encountered: