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 10 replies, has 2 voices.

Last updated by biancaD 2 months, 4 weeks ago.

Assigned support staff: Marcos Vinicios Barreto.

Author Posts
July 10, 2019 at 4:16 pm #4182495

biancaD

Hi, I'd like to translate a couple of strings of a plugin named Woocommerce Mailchimp Discount.

The strings are present in the admin area of the plugin.
I tried to let WPML scan the plugin but I cannot find them in the string translation list.
Is there anyway I can "force2 them to show up?
(you helped me with some similar thing in the past and I had to add some code in the "XML custom configuration code" but I cannot really find out what to add)

July 11, 2019 at 1:23 am #4184969

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for contacting WPML Support. I would like to request temporary access (wp-admin and FTP) to your site to take 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. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. 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.

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

Please, let me know if you need any additional details. Have a nice day.

July 11, 2019 at 7:57 pm #4192975

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for the provided details. I took a detailed look in your website and noticed you entered english content for your MailChimp Discount options when your website is setup with italian as the default language, this is not the correct workflow, here is how to proceed:

1 - As you have your website with italian as the default language, please, make sure to enter your WordPress Dashboard > MailChimp Discount options with italian text.

2 - Once you have entered your italian text instead of the current english content you can use the String Translation to translate this content to english, you can proceed this way:

2.1 - In your WordPress Dashboard > WPML > String Translation click to translate the strings under the text domain 'admin_texts_wcmd_options', then you can translate these options keys to english:

  • [wcmd_options]wcmd_btn_text - Button Subscribe Text.
  • [wcmd_options]wcmd_terms_condition_text - Terms and conditions text
  • [wcmd_options]wcmd_terms_condition_error - The Terms and Conditions validation error
  • [wcmd_options]wcmd_email_error - Invalid email error message

In short: You have to enter content for your theme/plugin options in the language your website is using as default, in your case italian, then you can use the String Translation to translate these content to your secondary languages.

See:

https://wpml.org/documentation/getting-started-guide/string-translation/
https://wpml.org/documentation/getting-started-guide/translating-theme-options/

Please, let me know if it helps or if you need any additional assistance and clarifications, have a nice day.

July 12, 2019 at 9:08 am #4196799

biancaD

Hi Marcos,
thanks for your reply.
Actually I've done a lot of test before ticketing you, so this way you are showing me, I've already tested it with no success (you could have tested it by yourself 😀 ) and is not working at all...

Now:
I've set in italian all the thing I need to translate
Entered the En translation in the properi string translation field of the admin_texts_wcmd_options domain.

Not working.
Plus: the admin_texts_wcmd_options is now showing up boceuse at a certain point I've added a code in the xml custom setting and now it shows up but is useless (as you can see) and I cannot get rid of it.

So I think this is not the way 🙂
Any hint?
Thanks!
Bianca

July 12, 2019 at 6:20 pm #4201063

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello Bianca,

Please, take a look at my private reply above, thanks.

July 14, 2019 at 9:09 am #4205299

biancaD

Hi MArco,
thank you so much for this enviroment.
I uploaded the plugin, activated woocommerce, set the shortcode in the "sample-page".
I scanned the plugin and was able to translate "Enter your email" (as I was in my installation)

I need to translate:
1) the SUBSCRIBE text on the button
2) Terms and Conditions Text
3) The Terms and Conditions validation error
4) Invalid email error

In entered them in italian in the plugint settings page (general tab and appearece settings tab just for the "inscriviti" button).

As expected, there is no admin_texts_wcmd_options domain 🙂

Please let mw know if i can help more!
Thanks
Bianca

July 16, 2019 at 12:48 am #4214885

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for the updates and sorry for the bif of waiting here. I am jumping here to let you know I am current working on your issue and I will provide you with a detailed and accurate answer in the next hours. Thank you for your continued patience and unerstanding, have a nice day.

July 16, 2019 at 6:18 pm #4223133

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for your patience while waiting for a reply. I performed some tests in the test environment and the issue is confirmed, I tried several methods to translate your plugin strings but unfortunately it still doesn't work. I forwarded your ticket to our second level support for more details, I will update you here as soon as I have some more details from them. Thank you for your continued patience and understanding. Have a nice day.

July 17, 2019 at 2:05 pm #4231021

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for continued patience while waiting. Your ticket is now escalated to our compatibility team. I will update you here as soon as I have some more details, have a nice day.

July 19, 2019 at 1:32 am #4242853

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for your patience while waiting for a reply. Our compatibility team has provided a temporary solution while the plugin author is contacted and adviced regarding this issue, for now you can try:

1 - Find the 'wcmd.php' file from your wp-content/plugins/woocommerce-mailchimp-discount/inc/ directory.

2 - Around the line 106 find the option method and replace it with the following code version:

IMPORTANT Keep a backup copy of the plugins files when editing its code.

public function option( $option ) {
	$options = $this->options = get_option( 'wcmd_options' );
    if( isset( $options[$option] ) && $options[$option] != '' )
      return $this->options[$option];
    return '';
  }

3 - Save the file and you should be done.

Note: It is a temporary solution that will be lost in case of plugin update, so only update your plugin when a permanent solution is provided by the plugin author.

Please, let me know if it helps, have a nice day.

July 19, 2019 at 8:29 am #4244893

biancaD

Hi Marcos,
I fully undestand this is a temporary solution and will be lost with any plugin updates.
In the meanwhile it works fine!
Thank you so much!
Bianca