Skip Navigation

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.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Noman 1 year, 1 month ago.

Assisted by: Noman.

Author Posts
October 10, 2023 at 8:38 am

pamelaW

Hi,
This site is in Finnish and Swedish: hidden link
I have a problem with one of the blocks. I have translated it (ATE), but the translation is not visible.

October 10, 2023 at 10:00 am
October 10, 2023 at 10:07 am #14548313

pamelaW

Hi Noman,
are you working on this. The chat disappeared.

Pamela

October 10, 2023 at 11:16 am #14549083

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Yes, I'm working on your test site and will get back to you with an update soon.

Thank you for your cooperation and patience

October 10, 2023 at 2:27 pm #14551313

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

1. I have added the below XML in WPML >> settings > Custom XML Configuration section:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="kadence/infobox" translate="1">
      <xpath>//div/a/@href</xpath>
      <xpath>//*[@class="kt-blocks-info-box-title"]</xpath>
      <xpath>//*[@class="kt-blocks-info-box-text"]</xpath>
      <xpath>//div[@class="kt-infobox-textcontent"]</xpath>
      <xpath>//span[@class="kt-blocks-info-box-learnmore"]</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

2. Made a small change in the default language page and opened the translated page in Advanced Translation Editor and just pressed the Complete button and it works correctly now:
hidden link

Could you please check and confirm?

Thank you

October 10, 2023 at 3:40 pm #14552173

pamelaW

Hi,
thank you for the code. It worked, but it has two strings i ATE. Is something conflicting with the old code:

<wpml-config>
<gutenberg-blocks>
<gutenberg-block type="kadence/infobox" translate="1">
<xpath>//div/a/@href</xpath>
<xpath>//*[@class="kt-blocks-info-box-title"]</xpath>
<xpath>//*[@class="kt-blocks-info-box-text"]</xpath>
<xpath>//div[@class="kt-infobox-textcontent"]</xpath>
<xpath>//span[@class="kt-blocks-info-box-learnmore"]</xpath>
</gutenberg-block>
<gutenberg-block type="kadence/form" translate="1">
<xpath>//label</xpath>
<xpath>//button</xpath>
<xpath>//span</xpath>
<xpath>//textarea/@placeholder</xpath>
</gutenberg-block>
<gutenberg-block type="core/search" translate="1">
<key name="label" />
<key name="buttonText" />
</gutenberg-block>
<gutenberg-block type="kadence/advancedgallery" translate="1">
<key name="imagesDynamic">
<key name="*">
<key name="caption" />
<key name="customLink" />
</key>
</key>
</gutenberg-block>
<gutenberg-block type="kadence/postgrid" translate="1">
<key name="readMoreText" />
</gutenberg-block>
</gutenberg-blocks>
</wpml-config>

Pamela

wpml_corrected.jpg
October 11, 2023 at 3:19 pm #14560483

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I have updated the XML to as follows:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="kadence/infobox" translate="1">
      <xpath>//div/a/@href</xpath>
      <xpath>//*[@class="kt-blocks-info-box-title"]</xpath>
      <xpath>//*[@class="kt-blocks-info-box-text"]</xpath>
      <xpath>//span[@class="kt-blocks-info-box-learnmore"]</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

And now it seems to be shows only one instance of sting in ATE and also the translation works correctly. Could you please take another look and let me know it goes.

Thank you for your cooperation and patience

infobox instance.png
October 15, 2023 at 6:44 pm #14580439

pamelaW

Thank you Noman for excellent work!
Your update in the code fixed it!