Translation issue with phone number validation

Hi,
I am working on translation in ERPNext and API.

I find that in respective User Form, i can change the language. By which entire text in the ERP core doctype is changed.

But the Custom Doctype fields is not reflected. So we used the Translation doctype to change the text to french language.

Now,

Only this text is not converting,

‘Phone Number +225-0556 set in field telephone is not valid.’

Usually when i change the language the exception message from api also return in french only. But for the above exception it is returning in english in both api and erpnext

I can’t use translation doc type for this, because it is case sensitive it seem, even space or caps also is not recognizing. This exception error message also dynamic.

Phone Number {phone_number} set in field {telephone} is not valid.

How to achieve this exception text in french? Thank you in advance

I am using erpnext 15 version.

I’m currently working on translations in ERPNext and the API, and I’ve come across an issue I’m hoping someone here can help with.

In the User Form, I can change the language settings, which translates the text in the ERP core Doctype just fine. However, the custom Doctype fields don’t reflect this translation. To address this, I used the Translation Doctype to manually change the text into French.

Everything seems to be working well, except for one thing: the exception message “Phone Number +225-0556 set in field telephone is not valid.” Usually, when I change the language settings, exception messages from the API also return in French, but in this case, it remains in English, both in ERPNext and via the API.

I can’t use the Translation Doctype for this message, as it appears to be case-sensitive, and even spaces or capitalization seem to cause issues. Plus, the error message itself is dynamic:

“Phone Number {phone_number} set in field {telephone} is not valid.”

Does anyone have suggestions for how to translate this exception message into French while keeping the dynamic parts intact? I’m working with ERPNext version 15.

Hi @Ariyan ,

Sry for the late reply, Hope this will help for you.

Invalid value for {0}. Only alphanumeric characters are allowed.

Valeur invalide pour {0}. Seuls les caractères alphanumériques sont autorisés.

For the dynamic filter we can translate like this.