Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 19 replies, has 3 voices.

Last updated by Sumit 2 years, 4 months ago.

Assigned support staff: Sumit.

Author Posts
August 2, 2017 at 10:19 am #1333074

Nohemi

Hi,

I am trying to:
Translate Gravity Forms field error message

I expected to see:
One line per error message for this field in string translation add-on (Field required, email invalid, entry duplicated...) or better : use of Gravity forms default translations (in po/mo files)

Instead, I got:
Only one line for only one error message for the field whereas there are several possible errors (like empty error or duplicate error).
Moreover if the error message contains a dynamic value like a mail address, this address will always be displayed even if user enters another address. The problem is described here too : https://wpml.org/forums/topic/duplicate-entry-error-validation-message-does-not-update-with-new-email/

The problem should be corrected by use the translations of gravity forms po files instead of string translation add-on.

(Sorry for my approximate english)

August 2, 2017 at 10:55 am #1333104

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hello.

Thank you for contacting the WPML support forum.

By looking in at the debug information that you have attached I think the option 'Don't use String Translation to translate the theme and plugins' is chosen.
This option is from WPML -> Theme and plugins localization.
Can you, please use the 'Translate the theme and plugins using WPML's String Translation and load .mo files as backup' and see if it helps to solve the problem?
You can learn more about it in our documentations here.
https://wpml.org/documentation/getting-started-guide/theme-localization/

Thanks,
Itamar.

August 2, 2017 at 11:38 am #1333152

Nohemi

No difference but anyway i don't want use WPML to translate themes/plugins

August 2, 2017 at 8:08 pm #1333646

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

So maybe the following tutorial from Gravity Forms is what you are looking for?
hidden link

August 3, 2017 at 6:43 am #1333832

Nohemi

Not at all.

Gravity forms is already correctly translated but when WPML is used, this translation is not used for default error messages.

August 3, 2017 at 7:12 am #1333845

Nohemi

I have create a demo of the problem at hidden link
Extensions installed are : Gravity Forms, Gravity Forms Multilinguale, WPML, WPML Translation Management, WPML String Translation.
I didn't modify any default setting.

As you can see, it does not matter what your enter (empty, not valid mail or other email like duplicate@example.com) you have always the same error message (the first error message displayed). And it is not translated whereas it translated inside Gravity forms .po/.mo file. The text "There was a problem with your submission. Errors have been highlighted below" is well translated because of .po/mo file of the plugin, why not the error message ?

August 3, 2017 at 6:10 pm #1334487

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Can you, please let me have access to this demo site so I can check this problem?

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved.
Please, allow me to disable/enable plugins and change the theme if needed.
In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
For this, I'll need to install the Duplicator plugin on your site.
https://wordpress.org/plugins/duplicator/
Maybe I'll also install the ARI Adminer plugin (https://wordpress.org/plugins/ari-adminer/) to check the DB of your site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Thanks,
Itamar.

August 7, 2017 at 11:49 am #1336369

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, and thank you for the access details.

I've found that in the Strings Translation section under the gravity_form-1 domain you had this string translated.
Please see attached screenshot gravity_form-1.jpg
I then deleted this string and translated the other string from the gravityforms domain.
Please see attached screenshot gravityforms.jpg
Now it is translated alright on the front-end.
Please see attached screenshot message-in-french.jpg

Can you, please confirm that it is OK now?

Thanks,
Itamar.

August 7, 2017 at 11:59 am #1336381

Nohemi

It does not change anything. Now the french message is displayed on english page. And it is always the same message even if i use another email ou send an empty field.

August 8, 2017 at 8:16 pm #1337904

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, Nohemi and sorry for the late response.

I've searched for the following string in the Strings Translation and found it there.
Ce champ nécessite une entrée unique et 'duplicate@example.com' a déjà été utilisé
Please see attached screenshot duplicate_example.jpg
Then I've deleted by selecting it and pressing the 'Delete selected string' and now it seems that this problem does not occur anymore.
Although that now it seems that Gravity Forms does not seem to recognize 'duplicate@example.com' as a valid email address. It gives the message 'This field is required.' when you try it with an already used email address.
When I try it on my local server, I do not get this behavior. I can send the same email address more than one time.
Can you confirm that the initial problem is solved now and tell me if the new problem also happens on your live site and if you want me to look into that problem.

Thanks,
Itamar.

August 9, 2017 at 6:28 am #1338080

Nohemi

Hi,

Sorry but no, the problem is not resolved. The error message is always the same.

There are 3 different error messagess for this field :
- Field required
- Valid email
- Duplicate email (you must check the case "No Duplicates" for this field in GF to see it on your local server)

First problem : once one error message is displayed (and saved in string translations), it will be always displayed even if the error is not the same. (currently if i enter a not valid email, i should not see "field required" message but the "valid email" message)

Second problem : All this error messages are already translated by GF. So i would to avoid to translate them again for each form.

I hope it is clearer.

August 9, 2017 at 7:08 pm #1338808

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Yes, I can see now the problem that is happening on your test site.
Even if I delete all the strings with the domain gravity_form-1 from the Strings Translation, each time that I try the form again the same error message always shows. It will always be the first error the was generated at the first form submission trail.
It is not clear to me what is causing this problem.
On my local server, it is not happening.
Here are the things that I've checked.
- When WPML and its add-ons are deactivated, this problem is not happening.
- In WPML -> Theme and plugins localization I set the option not to use the .mo files of the themes and plugins.
- Through FTP I raised the WP Memory Limit.
- And also enabled PHP debug.log - there are no errors.
The only thing that I haven't tried so far is the "No Duplicates" option.
Maybe this options is causing this problem.
The thing is that I can not find this option from the description that you give.
you must check the case "No Duplicates" for this field in GF to see it on your local server
Could you, please tell me where it is? I can't find it.
Sometimes screenshots illustrating what you mean may go a long way to clarify what words fail to transmit, so if you like, make use of “upload an image” below the comment area.

Thanks,
Itamar.

August 10, 2017 at 7:03 am #1339035

Nohemi

No problem, i have attached an image.

I have tried to deactivate this option : no difference :/

Strange that the problem doesn't occur on you local server. Do you have same WP and plugins versions ? The error message is saved in string translations on your server ?

August 10, 2017 at 8:33 pm #1339720

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Thank you for attaching this image.
It helped me understand where to change this setting.

I do think that the problem is caused by 'No duplicates' option.
The same is happening on my local server when this option is checked.
Moreover, when I uncheck it on your site, it does not occur anymore.
I know that you have tried before, but can you, please try it one more time now that it is not checked and see it for your self?
If you can confirm this, I'll escalate this issue to our developers.

Thanks,
Itamar.

August 11, 2017 at 7:23 am #1339958

Nohemi

Yes, if you remove all settings which create different error messages, it works x)

You have removed duplicate option and required option so it remains only one error message (valid email). "At least one field must be filled out" is a generic form message and it is not linked to the field.

I think the problem is not because of a field option specifically but because of there are multiple error messages (added by options) for one field.

Moreover, even like that, the message still not translated.