• Resolved Andrea Scarfo’

    (@andreascarfo)


    I always used this plugin on all projects that needed translation.
    Now I am working on a new project, website is still not visible.
    What I get is a lot of [object window] instead of the translated text.

    Or sometime I can have “random lyrics text” or text taken from other areas of the same page.

    At my eyes it seemed that translation miss some html tag and fails to take objects to translate.

    I have a fresh WordPress 5.9 installation.

    Does anyone have any suggestions?

Viewing 14 replies - 31 through 44 (of 44 total)
  • Hi guys!

    I had a similar issue and spent the last couple of hours trying to figure out a solution. Fortunately I did ??

    Here is my solution:

    1. Open /wp-content/plugins/transposh-translation-filter-for-wordpress/transposh.php.

    2. Somewhere around line 1920 you will see tp_logger($jsonarr);

    3. Replace the if{}else{} after the tp_logger($jsonarr) with this code:

    if (is_array($jsonarr)) {
    if (is_array($jsonarr[0])) {
    foreach ($jsonarr as $val) {
    // need to drill
    while (is_array($val)) {
    $val = $val[0];
    }
    $result[] = $val;
    // tp_logger(‘$here’);
    }
    } else {
    foreach($jsonarr as $k=>$v){
    $result[] = $v;
    }
    }
    } else {
    $result[] = $jsonarr;
    }

    For me, the issue seemed to be with parsing the response from Google.

    Hope this works for you as well ??

    • This reply was modified 2 years, 9 months ago by metodi.
    Plugin Author oferwald

    (@oferwald)

    Hi @metodi , nice work!

    Had you mailed me at [email protected] I would have sent you this correction as well. Although This is a correct solution, however it is partial.

    Google changed the way they deliver responses from their API, now it makes more sense. However, the full fix includes the ability to eliminate similar errors if Google changes stuff around again ??

    There is a pre-release version available, and I hope it will be out in the coming days, it is now served on a personal basis to whomever contacts me and sends inputs after testing.

    @metodi It works for me.
    I really appreciate it.

    Thank you very much metody!!

    Yes this is currently not working, its also not yet fit for php8. but beside it is also not downloadable in the official repository, so i think there will be soon a better updated version available.

    Greetings to all, I join this thread because I am experiencing the same problem, I did not think it necessary to open a new thread. In relation to the solution proposed by @metodi (thanks for the suggestion) I have implemented it correctly, however when publishing or translating it does absolutely nothing, enable debugging in the plugin (with the possible solution applied) and this is what it says:
    2022-02-17T01:27:28+00:00 transposh_plugin::get_google_translation 1804__________: Google method 4, 1645059815
    2022-02-17T01:27:28+00:00 transposh_plugin::get_google_translation 1813__________: Google proxy initiated
    2022-02-17T01:27:28+00:00 transposh_plugin::get_google_translation 1876__________: out of options, die for the day!

    The suggestion is appreciated, but it hasn’t worked for me… when I use Bing as a priority it starts translating a language and stops and the console shows this:
    GET https://www.bing.com/widget/metrics.js net::ERR_ABORTED 404

    I will contact @oferwald to have the pre-release version and see if I can at least post something on my blog.

    Plugin Author oferwald

    (@oferwald)

    New version should be out tomorrow (1.0.8 here, 1.0.8.1 on our site), it fixes the problems listed in this thread so I am marking it resolved.

    @oferwald thank you so much.

    • This reply was modified 2 years, 9 months ago by szimbol.
    • This reply was modified 2 years, 9 months ago by szimbol.
    Plugin Author oferwald

    (@oferwald)

    @szimbol Thank you, let me know if you have any insights using the new version

    @oferwald unfortunately it still doesn’t work
    i’m using the plugins’s 1.0.8.1 version from your website

    screenshot from the error: https://www.luxusapartmanok.eu/wp-content/uploads/2022/02/translate.jpg

    the page: https://www.luxusapartmanok.eu/

    ??

    @szimbol Try:
    Transposh > Utilities > Remove duplicates translations and originals

    If it will not help delete all automatic translations and recrawl your pages to get them translated again.

    • This reply was modified 2 years, 9 months ago by pluginpress.
    • This reply was modified 2 years, 9 months ago by pluginpress.

    @pluginpress wow, it’s helped, thank you so much

    Thread Starter Andrea Scarfo’

    (@andreascarfo)

    I want to thank @oferwald for the update.

    Hi,

    the problem is not solved, the plugin still not translating.

    I tried Remove duplicates translations and originals and delete all automatic translations as suggested but the translation is still blocking.

    I tried as well to switch from google to bing and yandex and i have the same problem.

Viewing 14 replies - 31 through 44 (of 44 total)
  • The topic ‘[object window], “random lyrics text” and other failed translations’ is closed to new replies.