Pular para o conteúdo Pular para a barra lateral

Open

Reported for: WPML Multilingual CMS 4.7.6

Topic Tags: Bug, Compatibility

Overview of the issue

When translating a page created by Divi 5 and having a button with a dynamic link, you might encounter issues and it may break your page layout.

Workaround

At present you have two options:
– Convert the links to not dynamic links and they should work
Or
– Bypass their translation and use this wpml-config that you can place in WPML > Settings > Custom XML configuration:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="divi/button" translate="1">
            <key name="button">
                <key name="innerContent">
                    <key name="*">
                        <key name="value">
                            <key name="text" />
                        </key>
                    </key>
                    <key name="tablet">
                        <key name="value">
                            <key name="text" />
                        </key>
                    </key>
                    <key name="phone">
                        <key name="value">
                            <key name="text" />
                        </key>
                    </key>
                </key>
            </key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

5 respostas para “Divi 5 - Dynamic links added to a button may lead to improper translation”

  1. Thank you very much for your prompt response!

    I applied the configuration, but unfortunately, it didn’t help. And if we choose to convert the links to non-dynamic, it will greatly complicate our future work and increase the time it takes to maintain the site, since the dynamic links are linked to the date, 60 quantitative fields, and so on.

    Are there no other solutions to this problem? Is there a planned solution?

    • Hello,
      Sorry to hear you’re still experiencing issues.
      When you add the custom XML, it overrides the default configuration, and prevents the links from being translatable. Internal links should still be translated automatically by WPML, but external links won’t be translatable. Did you try making a minor change to the original page (like adding a space) and then revalidating the translation?

      That said, yes we do have a permanent fix planned for WPML 4.9, which is expected to be released by the end of this month (I don’t have aa exact ETA yet).

      • Nicolas, hello!

        Yes, we tried a lot, and nothing worked.

        Nicolas, please note that my ticket wasn’t about the link, but about the text on the button (in Divi 5, this text can be dynamic). It’s precisely this dynamic text that isn’t translated, resulting in the translation I provided in this ticket: https://wpml.org/forums/topic/divi-buttons-arent-translating

        Now we have no choice but to issue a refund. I’ve already submitted the refund request.

  2. The problem was that WPML couldn’t find the string we needed to translate, and when it did, the translation didn’t produce any results. Through trial and error, we figured it out and now understand what needs to be done to get WPML to translate the dynamic text. All we needed from support was to share the solution (or possible solutions). The solution is fairly simple, but due to the complexity of the WPML plugin, all the dependencies aren’t immediately clear. It would be great if these dependencies were described somewhere, but we couldn’t find any information on the WPML website about how to translate when these errors occur.

    In short, we’ve found a solution, but due to the specifics of Divi, there are limitations to using WPML. It would be great if WPML could seamlessly translate dynamic text throughout the entire site, including blocks created off-page in the Theme Builder section. Currently, you can translate the footer created in Theme Builder, but when using dynamic text (such as a date), it doesn’t translate, and searching for the code yields no results.

    • Helo there,

      Thanks for the detailed feedback, and I’m glad to hear you found a solution! Divi 5 is still in Beta, but our developers are already working on a better integration, and should be included WPML 4.9.

Deixe uma resposta

Por favor mantenha-se no assunto e seja respeitoso com os outros. Se precisar de ajuda com problemas não relacionados a este post, use nosso Fórum de Suporte para iniciar um chat ou enviar um ticket.

Você pode usar estas tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>