Support » Plugin: Translate Multilingual sites - TranslatePress » Custom HTML title translation bug

  • Resolved bonanzagroove

    (@bonanzagroove)


    Hello,

    I have added a “Custom HTML” widget to my Sidebar and when I visit the “Translate Page” page, this is what is shown for the “Title” field of that widget:

    data-trp-translate-id=”679″ data-trp-node-group=”String List”>

    That text is also shown to be translated when I click its blue pencil icon.

    No matter what I put in the “To” translation field, it is not shown as translation (the original text keeps showing).

    How can I work around that issue?

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Cristian Draghia

    (@cristiandraghia)

    Hello there,

    Can you provide the URL to where this is happening? Taking a live look at it will be useful. No need for login data, the page’s URL is enough.

    Can you tell me what code did you install in the Custom HTML widget and what theme you are using?

    I’ll try to reproduce the problem.

    Best regards,
    Cristian

    Thread Starter bonanzagroove

    (@bonanzagroove)

    Thanks, Cristian, but I am reluctant to show URLs with issues in a public forum.

    Let me try to add details to what I’ve got in that Custome HTML widget (replaced actual text with placeholders, and left in all meta elements):

    For the “Title”, a simple text of a few words, then in the body, the structure is as follows:

    <i>    “text1a”</i><br><div style=”text-align:right”>text1b</div>
    <hr>
    <i>    “text2a”</i><br><div style=”text-align:right”>text2b</div>
    <hr>
    <i>    “text3a1<b>text3a2</b>text3a3″</i><br><div style=”text-align:right”>
    text3b</div>
    <hr>
    <i>    “text4a”</i><br><div style=”text-align:right”>
    text4b
    </div>
    <hr>

    By the way, the same issue shows in a AddToAny plugin widget, so you may try to reproduce the issue with that.

    Right beneath the above Custom HTML, the header of the AddToAny widget shows the following (in Translate Page mode):

    data-trp-translate-id=”82″ data-trp-node-group=”String List”>Share on

    and also a “Recently viewed products” widget header shows similar, which widget is placed in between the two above:

    data-trp-translate-id=”193″ data-trp-node-group=”String List”>

    The site is running WooCommerce, with the Storefront/Bookstore theme.

    Cristian Draghia

    (@cristiandraghia)

    Hello there,

    I have tried to reproduce the problem, but it either works fine for me, or I didn’t reproduce it properly.

    I also used the Storefront theme and WooCommerce is running.

    I also tried the AddToAny widget, but I can only translate the title for that one.

    Let me know if I did something wrong.

    https://drive.google.com/file/d/1gcDRBf4K8GpNCLb6if8L3kKGmLLa8bEi/view?usp=sharing

    https://drive.google.com/file/d/1v8XroRTw-XGPxrAd7YkeEsAXk4Gygzwz/view?usp=sharing

    Best regards.
    Cristian

    Thread Starter bonanzagroove

    (@bonanzagroove)

    Thanks for your efforts, Cristian.

    I have removed the Custom HTML module to see if that improves the situation but it hasn’t. The headers of both the Recently viewed items and the AddToAny are still showing the HTML lingo.

    I have uploaded two screenshots showing the issue, can you see them?

    https://imgur.com/a/PmOe4N4

    If I could, I would send you further details privately.

    Thread Starter bonanzagroove

    (@bonanzagroove)

    I have done some local investigations for you in Inspect mode. This is what I’ve found (if it helps):

    https://imgur.com/vaJ5IBA

    Let me know what else I can do to move this further.
    Thanks.

    PS: the issue is there on both Chrome and Safari. Have not checked other browsers.

    Thread Starter bonanzagroove

    (@bonanzagroove)

    Adding more details in the hope that they will help you guys troubleshoot.

    A few screenshots of the original/default language page where TranslatePress errors and the relevant part of the page source:

    https://imgur.com/a/2TEoRiG

    I am wild-guessing that your plugin may not be able to handle the

    <span class=”gamma widget-title”>

    correctly, as in, maybe with the space in the class value?

    Cristian Draghia

    (@cristiandraghia)

    Hello,

    I’m sorry for the late reply.
    I still wasn’t able to reproduce this problem on my side.

    What you can try is the following:
    Go to: Settings -> TranslatePress -> Advanced

    Then, enable these features 1 by 1 in this order and try to see if it makes a difference. Disable them back if it makes no difference. Also, please disable or clear the cache if you have any.

    1. Disable post container tags for post title.
    2. Disable post container tags for post content.

    If that doesn’t help, then it could be a conflict between TP and another plugin.

    ​​*Briefly* disable all other plugins and enable the default Twenty Twenty theme. Please also disable all add-ons. If this fixes the problem, as it probably will, enable everything one by one, checking each time to see when the problem returns.

    Please let us know when you find the conflict so that we can take a look and see what we can do about it.

    Best regards,
    Cristian

    Thread Starter bonanzagroove

    (@bonanzagroove)

    Hi Cristian, thanks for getting back to me on this.

    I have tried those two settings and also further settings on the same page above those, clearing cache after every set (and save), unfortunately, to no avail.

    This is a live site and so, disabling plugins and switching to a different theme is a no-go.
    I am thinking of a way to duplicate the site into a separate staging/testing environment so I can toggle those…

    Thread Starter bonanzagroove

    (@bonanzagroove)

    I have tried setting up a staging environment with the WP Staging plugin, but your TranslatePress plugin breaks it and it renders WP Staging unusable.

    (TranslatePress rewrites the staging URL so the staging server is inaccessible):

    URL/staging/ -> URL/en_gb/staging/en_gb/

    Any thoughts on that?
    Thanks.

    Thread Starter bonanzagroove

    (@bonanzagroove)

    Just a thought, maybe if the plugin could have a behaviour toggle setting and had an option to use query parameter like (?lang=en) instead of rewriting the URL (/en_us/), probably that would work in the staging area, too.

    Cristian Draghia

    (@cristiandraghia)

    Hello again,

    There is actually an add-on that does exactly what you said (?lang=en). https://translatepress.com/docs/addons/language-get-parameter/

    Maybe you can try it and see if that works for you.

    Best regards,

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom HTML title translation bug’ is closed to new replies.