Skip to content

js validation messages translation not working in customer account #5820

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

Closed
bjoern-quast opened this issue Jul 26, 2016 · 19 comments
Closed
Labels
bug report Component: Translation Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@bjoern-quast
Copy link

Preconditions

  1. Magento CE 2.1.0 without sample data is installed.
  2. Splendit Internet's mage2-locale-de-de is installed
  3. A custom language pack is installed for de_DE

Steps to reproduce

  1. Add translation to custom language pack:

Minimum length of this field must be equal or greater than %1 symbols. Leading and trailing spaces will be ignored.,Mindestlänge dieses Feldes muss größer oder gleich %1 Zeichen sein. Führende oder nachfolgende Leerzeichen werden ignoriert.

  1. Log in as customer in the German store
  2. Under "change password", enter fewer than the required symbols

Expected result

  1. Message that appears:

Mindestlänge dieses Feldes muss größer oder gleich 8 Zeichen sein. Führende oder nachfolgende Leerzeichen werden ignoriert.

Actual result

  1. Message that appears:

Minimum length of this field must be equal or greater than 8 symbols. Leading and trailing spaces will be ignored.

Also true for many other validation messages in the customer account, as well as the register new customer page.

@jernejh
Copy link

jernejh commented Sep 14, 2016

Having the same problem in 2.1.1.

1 similar comment
@mv-developer
Copy link

Having the same problem in 2.1.1.

@cuiyang000
Copy link

Having the same problem in 2.1.1.
It's also in registration page.

@gabs77
Copy link

gabs77 commented Oct 21, 2016

Having the same problem in 2.1.2.

@OktarinTentakel
Copy link

Also see #7363

Seems to be a timing problem with the init code in translation.phtml.

@tlygnersjo
Copy link

I'm having the same problem on 2.1.2

@ulftietze
Copy link
Member

Issue still persist.

@davidverholen
Copy link
Member

The problem seems to be that the original string in lib/web/mage/validation.js and vendor/magento/module-ui/view/base/web/js/lib/validation/rules.js is divided into two parts.

https://github.com/magento/magento2/blob/2.1/lib/web/mage/validation.js#L549

This way, the translation cannot be found during the static content deploy and the translation is not added to the js-translation.json file

The Problem is already solved in the develop branch: https://github.com/magento/magento2/blob/develop/lib/web/mage/validation.js#L549

@tsauerwein
Copy link

See #5509

Fix will be delivered in 2.1.7, 2.0.15 and 2.2.0

#5509 (comment)

@marcosdsdba
Copy link

marcosdsdba commented Mar 24, 2017

I have this problem in Magento 2.1.5. Problem persists !!!!

@kanduvisla
Copy link
Contributor

Still persists in 2.1.7

@dmitriyprime
Copy link
Contributor

Hi, @bjoern-quast . Thanks for reporting this issue. An internal ticked MAGETWO-55900 was created based on Your issue. You'll be informed as the issue is fixed.

@veloraven veloraven added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jun 29, 2017
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-71380

@magento-team magento-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Component: Translation labels Aug 18, 2017
@simomBlack
Copy link

  1. remove js-translation.json file ({Project}/pub/static/frontend/{theme}/default/{store_language}/js-translation.json)

  2. in your browser go to Local Storage and delete mage-translation-file-version

  3. go to {Project}/lib/web/mage/validation.js, copy file and create new directory in {Project}/app/design/frontend/{theme}/default as web/mage/ and paste the file
    ( your new file would be {Project}/app/design/frontend/{theme}/default/web/mage/validation.js )

  4. do not use the + to concatenate strings in $.mage.__( ... ), if found one => delete and don't concatenate

  5. add your translations in your .csv files

  6. try and feed me results

@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-72250

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report develop Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Component: Translation labels Sep 11, 2017
@magento-engcom-team
Copy link
Contributor

@bjoern-quast, thank you for your report.
The issue is already fixed in develop branch
But we will consider to backport the fix to patch releases

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Sep 20, 2017
@magento-engcom-team
Copy link
Contributor

Hi @bjoern-quast the issue already fixed in 2.1.10 and will be available soon.

@magento-engcom-team magento-engcom-team added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Oct 6, 2017
@exdiogene
Copy link

Now it is May 2020 and version 2.3.4 still have the same exact issue!

"Minimum length of this field must be equal or greater than 8 symbols. Leading and trailing spaces will be ignored." cannot be translated. Neither other similar messages...

Is it normal to have issues like this dating from 4 years ago and still not resolved?

@koushikch7
Copy link

Issue persistent with Magento 2.3.0 as well
The registration page and customer login page validation messages are not translating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Translation Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests