• Resolved Sean Barton

    (@seanbarton)


    Hi, I am working on a website for a charity. The site went live a couple of weeks ago and for the most part GTranslate is working very well (thanks for that!). Today the client noticed that a certain page when viewed in French repeats a sentence up to three times.

    If you look at the link you’ll see in the third main paragraph a sentence starting “Of note there is evidence to suggest that…”. Use the selector in the top right and swap to French/Francais and the equivalent sentence repeats. A simple test is to look for the word P450 on the page in English (1 occurrence) then translate into French and there will either be 2 or 3 (it seems random as to how many to show).

    I note from the markup that <font style="vertical-align: inherit;"> tags are added everywhere. I don’t know if this is something that is intended or a bug but I wanted to let you know.

    If you can have a look at the site and let me know how we might try to debug/fix that would be great.

    Note the site is written in Divi so the markup itself isn’t something we have written and mostly won’t be able to change as it is generated by the page builder.

    thanks
    Sean

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    When I check the source code of the website I see that you have 2 language selectors. To begin with, please make sure that you have only one language selector or at least the javascript code does not repeat and only HTML part is used for the 2nd selector.

    Thanks! ??

    Thread Starter Sean Barton

    (@seanbarton)

    @edo888 thanks for the reply. sorry for the late response but Christmas happened ??

    I’ve removed the second reference to the selector but am still experiencing the same issue I’m afraid. The span tags are being added all over the place too.. I’m more concerned by the repetition though at the moment.

    Any idea what might be causing it?

    thanks
    Sean

    Plugin Author edo888

    (@edo888)

    Hi,

    I can see the issue. It seems that there is a bug in Google Translate JavaScript library we are using related to dividing long texts into chunks before translation. In your case for some reason divided chunks intersect which should not happen, that is why you see repeated texts after translation. At first sight it does not look like we can do anything on our end to fix it and we have to wait for a library update.

    However you can divide the text yourself by wrapping each sentence into <span> tags like this:

    <span>Sentence 1.</span> <span>Sentence 2.</span> etc.

    In that case it will not have to do that and it will be fine, I have tried that by modifying the HTML in developer console before translation and it worked.

    Alternatively you can use our paid version, which does not depend on JavaScript library and has no such issues present: https://gtranslate.io/#pricing

    Thanks! ??

    • This reply was modified 4 years, 2 months ago by edo888.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Some translations repeating in French’ is closed to new replies.