Jquery-validation: Pattern return english error message. Other language set

Created on 12 Sep 2017  路  7Comments  路  Source: jquery-validation/jquery-validation

Pattern return "Invalid format" in English even if you have chose another language

Additional Methods Localization (i18n)

Most helpful comment

The format is: methodName: "translation". In this case, you just need to add one line:

pattern: "the translation in danish"

Thanks!

All 7 comments

Not all languages files have the translation for pattern error message. We will need to get people to contribute the needed translations.

If someone is interested in adding a translation for pattern error message, I will be happy to merge their PR.

Thanks!

well I can do it for the Danish(da-dk) version

That would be good. Thanks!

what to write inside the messages_da.js to change the error messages for pattern?

The format is: methodName: "translation". In this case, you just need to add one line:

pattern: "the translation in danish"

Thanks!

Oh there is a error in the franch version at line 53 missing $.validator.format()

I think you mean line 46. Yes, that's definitely a bug in translation. Please open a PR to fix that to.

Just for your information, we follow a convention for the commit message. See point 5 of Contributing code in CONTRIBUTING.md:

5. Describe the change in your commit message and reference the ticket, like
   this: "Demos: Fixed delegate bug for dynamic-totals demo. Fixes #51".
   If you're adding a new localization file, use something like this:
   "Localization: Added croatian (HR) localization"

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davesierra picture davesierra  路  7Comments

lucasgonze picture lucasgonze  路  7Comments

mapeveri picture mapeveri  路  4Comments

collabital picture collabital  路  5Comments

rattana picture rattana  路  9Comments