Skip to content

Translate "This is a required field" and validation errors on 2.3 - REGISTRATION PAGE #21204 #21367

@verdde

Description

@verdde

Reopening ticket 21204 which has been closed without any resolution, and the bug is still there without anyone fixing it, being caused by lib/web/mage/validation.js

Preconditions (*)

Magento 2.3 vanilla with 2 store views

I've installed multiple language packs, currently using this one
https://github.com/EaDesgin/magento2-romanian-language-pack

Everything is translated except the JS validation errors.

Steps to reproduce (*)

For example :

  1. Go to register
  2. Don't fill any forms
  3. Press register

"This is a required field." ON CUSTOMER ACCOUNT CREATING - Not translated.
But We can find the translation in mage_translation via cache.
Static deploy is ok generating static files correctly.

Checked validations.js and entire project and seems string is defined correctly:
$.mage.__('This is a required field.')

Expected result (*)

Translation should display instead of original string "This is a required field."

Behaviour existing on Magento 2.3 vanilla.

Same behaviour found on 2.2.6

Actual result (*)

Translation should be loaded normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions