[1.0.4] mChat Google Translate

Allows translating mChat messages.
miri4ever
Posts: 57
Joined: 16 Aug 2020, 00:33
Location: Germany

Re: [1.0.4] mChat Google Translate

Post by miri4ever »

Thank you so much that really helped me and all members using multi language chatting again with any kind of browsers.
miri4ever
Posts: 57
Joined: 16 Aug 2020, 00:33
Location: Germany

Re: [1.0.4] mChat Google Translate

Post by miri4ever »

I have a huge problem because since yesterday the translation button just disappeared and did not display anymore. No changes made, or anything others installed. I have tried to reset extension and browser cache several times, but it doesn't seem to translate button appear back.

It always resulted in an error inside the browser console, but now it's quiet and no error messages at all. Did Google changed some links or can anyone explain what happen?
Fonzi
Posts: 28
Joined: 25 Feb 2017, 09:28

Re: [1.0.4] mChat Google Translate

Post by Fonzi »

You probably won't be able to find a solution here
Kasimi is no longer active :(
Thank you Kasimi, is a great developer!
I weigh his work and devoted time. 8-)
User avatar
Neverlands
Posts: 4
Joined: 09 Feb 2023, 00:51

Re: [1.0.4] mChat Google Translate

Post by Neverlands »

miri4ever wrote: 01 Feb 2023, 14:07 I have a huge problem because since yesterday the translation button just disappeared and did not display anymore. No changes made, or anything others installed. I have tried to reset extension and browser cache several times, but it doesn't seem to translate button appear back.

It always resulted in an error inside the browser console, but now it's quiet and no error messages at all. Did Google changed some links or can anyone explain what happen?
Hello miri4ever,
did you get the console error Uncaught TypeError: google.translate.SectionalElement is not a constructor?
I have this issue for some days now. I posted in the phpBB forums but there is no solution yet.
I hope that someone can help.
miri4ever
Posts: 57
Joined: 16 Aug 2020, 00:33
Location: Germany

Re: [1.0.4] mChat Google Translate

Post by miri4ever »

I got some console errors before, but there the translator was working. Since the translation button disappear, there is no more error display at all. It does not show anything. If I try to open this translation link: //translate.google.com/translate_a/element.js I just will see a text file the JavaScript. It seems the JavaScript is not working properly when it displays just the code. The //translate.google.com will still work, but it opens a text translation window instead of translate the text.

So, I am uncertain if the Google link has change or as there is something wrong with the JS Code. I tried to copy this code directly to my page, but also no success in making it work. I just read a few pages, and a JS should never display as plain text if try to open with a browser. And as the file not loaded any more error message inside the console to see.
User avatar
Neverlands
Posts: 4
Joined: 09 Feb 2023, 00:51

Re: [1.0.4] mChat Google Translate

Post by Neverlands »

It is really strange, because I get different console errors with the mChat Google Translate plugin in different browsers, on mydomain.com/mchat.

MS Edge & Google Chrome:
https://mydomain.com/_/translate_http/_/js/k=translate_http.tr.de.JWUtH8pqQ9A.O/d=1/rs=AN8SPfpDso_yX6cdmpX4VehPzARPtV6waw/m=el_conf

Code: Select all

m=el_conf:5 Uncaught TypeError: google.translate.SectionalElement is not a constructor
    at mChatGoogleTranslateInit (mchat:2224:4)
    at e (m=el_main:495:468)
    at m=el_main:495:497
    at m=el_main:495:502
    at m=el_main:498:4
Firefox:

Code: Select all

Uncaught TypeError: google.translate.SectionalElement is not a constructor
    mChatGoogleTranslateInit https://mydomain.com/mchat:2223
    e https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.de.JWUtH8pqQ9A.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpDso_yX6cdmpX4VehPzARPtV6waw/m=el_main:495
    <anonymous> https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.de.JWUtH8pqQ9A.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpDso_yX6cdmpX4VehPzARPtV6waw/m=el_main:495
    <anonymous> https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.de.JWUtH8pqQ9A.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpDso_yX6cdmpX4VehPzARPtV6waw/m=el_main:495
    <anonymous> https://translate.googleapis.com/_/translate_http/_/js/k=translate_http.tr.de.JWUtH8pqQ9A.O/d=1/exm=el_conf/ed=1/rs=AN8SPfpDso_yX6cdmpX4VehPzARPtV6waw/m=el_main:498
or

Code: Select all

The resource of "https://translate.googleapis.com/translate_a/l?client=te&display_language=en&key=AIzaSyBWDj0QJvVIx8XOhRegXX5_SrRWxhT5Hs4&callback=callback" was blocked because of a MIME type conflict ("application/json") (X-Content-Type-Options: nosniff).
Overall I tend to say, that Google must have changed something, but sadly I don't know a workaround.

Btw. JS will always display as text when you directly open the URL in the browser, because that is what it is.
miri4ever
Posts: 57
Joined: 16 Aug 2020, 00:33
Location: Germany

Re: [1.0.4] mChat Google Translate

Post by miri4ever »

Have you added this patch published a longer while ago? I just can remember there was a cookie permission error inside last logs the day before it failed.
User avatar
Neverlands
Posts: 4
Joined: 09 Feb 2023, 00:51

Re: [1.0.4] mChat Google Translate

Post by Neverlands »

miri4ever wrote: 13 Feb 2023, 16:34 Have you added this patch published a longer while ago? I just can remember there was a cookie permission error inside last logs the day before it failed.
Yes, I did. I never had a cookie permission error.
User avatar
kasimi
mChat developer
Posts: 1173
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: [1.0.4] mChat Google Translate

Post by kasimi »

I looked into this error google.translate.SectionalElement is not a constructor. The google.translate object that is available in the global scope after the file https://translate.google.com/translate_a/element.js is loaded doesn't have the SectionalElement anymore. This is what it offers:

google.translate.png

There's only TranslateElement (2nd line) which translates the entire page. For the use-case of this extension, only specific parts of the page need to be translated. So it seems Google removed the feature that this extension relies on. What a pity.
You do not have the required permissions to view the files attached to this post.
User avatar
Neverlands
Posts: 4
Joined: 09 Feb 2023, 00:51

Re: [1.0.4] mChat Google Translate

Post by Neverlands »

kasimi wrote: 16 Feb 2023, 19:00So it seems Google removed the feature that this extension relies on. What a pity.
Hello kasimi,
thanks for the reply. So there is no workaround?

Who is online

Users browsing this forum: CCBot [Bot] and 0 guests