Skip to content

js-translation.json bugs | Issues when translating validation js messages #5217

Closed
@Pigau

Description

@Pigau

Hello,

I am on a Magento 2.0.2. My locale is french (fr_FR).

I have a custom theme which have its js-translation.json file.

I noticed two distinct errors.

  • First, a sentence which exists in the file is not translated on the front. But others sentences in this file are translated.
    Sentence not translated : "Please enter a valid email address (Ex: johndoe@domain.com)."
    Sentence translated : "This is a required field."
  • Second error : I have another JS validation sentence which is "Please select one of the options." and I don't know why but it is not in the js-translation.json file.

I created a language package (which is working) and I added in this those lines :
"Please select one of the options.","Veuillez choisir une des options.",module,Magento_Translation
"Please select one of the options.","Veuillez choisir une des options.",component,Magento2_Base
"Please select one of the options.","Veuillez choisir une des options.",lib,lib/web/mage/validation.js

I tried reploying static content, even after removing the js-translation.json in app/design/mynamespace/mytheme/js-translation.json. This file is regenerated but unchanged.

So I read this ticket :#2056
And then I followed this page : http://www.vanderboon.net/wiki/Install_Test_Magento_2_Translation
But now, after I did the symlink, my file is not regenerating in app/design/mynamespace/mytheme/.
But the files in pub/static are regenerated, but they are still wrong.

Do you guys have any idea ?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions