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

Created on 20 Feb 2019  路  19Comments  路  Source: magento/magento2


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.

Format is valid non-issue

All 19 comments

Hi @verdde. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@verdde do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • _Next steps are available in case you are a member of Community Maintainers._

  • [ ] 6. Add label Issue: Confirmed once verification is complete.

  • [ ] 7. Make sure that automatic system confirms that report has been added to the backlog.

Hi @verdde thank you for your report, sorry for delay, can you add translation to this file vendorthemei18nen_Us.csv or in your case ro_RO.csv
"This is a required field.", "This is a required field translated"

@verdde i'm closing this as this is non issue.
image

Hi @engcom-backlog-nazar, that is like the first option i've tried and the most easiest that will actually not work at all since you will also have to mention the 4 columns data.

@verdde please verify again
app/design/frontend/Magento/luma/i18n/en_US.csv
"This is a required field.","This is required field translated 2 times" and dont forget for static-content:deploy

@engcom-backlog-nazar @magento-engcom-team

I just tested again just because you asked, still doesn't work, you keep closing the tickets but this is not working as it is not working even for Magento Enterprise customers. You also closed their ticket.

I just installed new Magento 2.3 stable on another server made the translation and nothing. And i did the upgrade, deploy, clean and flush.

@verdde But why i'm able to translate and you not ?

@verdde your version magento is enterprise version ?
deepin-screen-recorder_select area_20190222122349

Hello,
We have exactly the same issue on polish translation.
Updated to Magento 2.3 no issues on 2.2.6
3 shops affected + one fresh Magento installation.
I think you have been unsuccessful to reproduce as you used one of thous languages - de_de es_es fr_fr nl_nl pt_br zh_hans_cn.
Opera Snapshot_2019-03-13_100554l
Opera Snapshot_2019-03-13_100639l
Opera Snapshot_2019-03-13_100413l

Yes, the issue still exists. I personally abandoned it and left those strings in english. Didn't had the time to search for a fix. (too many bugs in 2.3).

I have same problem, did you find a solution please ?

Magento 2.3.0 - same issue. Any solution?
image

Same issue

Yes, this problem existed in Magento 2.3.0 but was fixed again in 2.3.1, see this duplicated issue: https://github.com/magento/magento2/issues/21204

how can I fix the issue in a 2.3.0 store?

By upgrading to Magento 2.3.1 or 2.3.2? 馃槈

Unfortunately the commit which fixed this wasn't found yet, so if you want to spend the time and effort for finding that commit, feel free to do so, but you can also spend this time in looking at upgrading to a newer version of Magento.

Thank you @hostep. I've upgraded at 2.3.1 and the issue is disappeared :-)
I've also spent some hours to looking into the files but didn't get a clue on where is the fix...

Was this page helpful?
0 / 5 - 0 ratings