Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google translation stopped! #3209

Closed
ghost opened this issue Nov 29, 2018 · 151 comments

Comments

Projects
None yet
@ghost
Copy link

commented Nov 29, 2018

Google translation stopped working. I traced the code, and found that the returned text from google doesn't contaim "<span id=result_box".
Seems that google changed something in the page format. I coppied the request url from code and pasted it in the browser , and I got the translated text in the browser page !
Hope you find what has changed.
Thanks

@ghost

This comment has been minimized.

Copy link
Author

commented Nov 29, 2018

I'm affraid this is becuase #3200 . If there is a problem in the fix and loop keeps requesting the same translation 5 times regardless the success of the translation, Google will conseder this as some attack or undesired load. I think the break condition is not placed in all if statement branches. I hope you use my original suggested code, after you find what is changed in google translation format.

@ghost

This comment has been minimized.

Copy link
Author

commented Nov 29, 2018

I think it is better to use Google translate cloud service:
https://cloud.google.com/translate/docs/quickstart-client-libraries

@Ormendahl

This comment has been minimized.

Copy link

commented Nov 29, 2018

It's not translating a single line of any subtitle. This was a very useful tool, can it be fixed?

@bluekar

This comment has been minimized.

Copy link

commented Nov 29, 2018

It's not translating a single line of any subtitle. This was a very useful tool, can it be fixed?

yeah I got same sisuation too ...

@svenverslype

This comment has been minimized.

Copy link

commented Nov 29, 2018

it does not work here either

@cgkelei

This comment has been minimized.

Copy link

commented Nov 29, 2018

Unable to translate,

This was referenced Nov 29, 2018

@ghost

This comment has been minimized.

Copy link
Author

commented Nov 29, 2018

I think google sendback some java script functions to excute the translation in the browser. If you don't have a solution, I suggest to use the Webbrowser cintrol to view the returned html and execute java script functions, then read the result from the control.

niksedk added a commit that referenced this issue Nov 29, 2018

@niksedk

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

@MohammadHamdyGhanem: Please do give it a try...

In the meantime, I've added support for Google Clould API keys: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.7/SubtitleEditBeta.zip
Check here for how to create an API key: https://support.google.com/googleapi/answer/6158862?hl=en

Also, you can do translate here: https://www.nikse.dk/SubtitleEdit/Online

@ghost

This comment has been minimized.

Copy link
Author

commented Nov 29, 2018

OK. I'm trying it now, but the API key will be hard for most users. Try the WebControl solution. I don't have time now to write it myself.
And don't forget to fix the break condition of the retrial loop.
Thanks.

@ghost

This comment has been minimized.

Copy link
Author

commented Nov 29, 2018

I couldn't create the key. I don't think this is a practical solution!

@Alket69

This comment has been minimized.

Copy link

commented Nov 29, 2018

I created the api key and when i try to translate is says: "System: The remote server returned an error: (400) Bad Request."

@ghost

This comment has been minimized.

Copy link
Author

commented Nov 29, 2018

@niksedk
What about Microsoft translate? I see it in code but not in auto-translate menu?.. How to use it?

@OmrSi

This comment has been minimized.

Copy link

commented Nov 29, 2018

The website's design changed a lot: https://translate.google.com/
I'm guessing it's not just the design and that's what caused the problem.

This is a hard blow for SE.
I don't use google translate because of the inaccuracy in my language, but I imagine many people do.

@mm9919

This comment has been minimized.

Copy link

commented Nov 29, 2018

R.I.P Subtitle Edit ;-(

@OmrSi

This comment has been minimized.

Copy link

commented Nov 29, 2018

@mm9919 Come on, now. If you only use subtitle edit to use google translate, then that's a problem for you.
Many, many translators don't even use google translate...

Plus, SE isn't Google Translate, it's so, so much more.

@Hanzeeo

This comment has been minimized.

Copy link

commented Nov 29, 2018

I do agree with @OmrSi ! It is agood program, i started many translations thru auto translation first... lol guess i have to start learning to quick type than first! @niksedk : All respect to you! Still believe in SE!

@oneilboy

This comment has been minimized.

Copy link

commented Nov 29, 2018

SE is the best program I have ever seen, I used it already voor many translates, now it's not working anymore and that's a big problem, let's hope you can fix it

@darnn

This comment has been minimized.

Copy link

commented Nov 29, 2018

A temporary workaround for those interested: You can export just the text from a subtitle file (file, export, plain text), and translate it through Google Translate itself in chunks, replacing each chunk in the text file with the translated text. Then you can import the text file (file, import plain text), and then add to it the time codes from the original subtitle (file, import time codes).

@OmrSi

This comment has been minimized.

Copy link

commented Nov 29, 2018

@darnn Using the online version as Nikolaj said would be easier.

@mm9919

This comment has been minimized.

Copy link

commented Nov 29, 2018

Why the online version only translates small part of the subtitles?

@svenverslype

This comment has been minimized.

Copy link

commented Nov 29, 2018

@mm9919 the same problem here

@darnn

This comment has been minimized.

Copy link

commented Nov 29, 2018

@OmrSi Oh, I hadn't noticed that link! That does certainly seem like it would be easier! But, I am noticing that translating the text in Google Translate itself and doing it through the online SE version actually produces different results (and in Hebrew, for instance, the difference is substantial, and the translation SE produces is far less coherent).

@Ormendahl

This comment has been minimized.

Copy link

commented Nov 29, 2018

@OmrSi Oh, I hadn't noticed that link! That does certainly seem like it would be easier! But, I am noticing that translating the text in Google Translate itself and doing it through the online SE version actually produces different results (and in Hebrew, for instance, the difference is substantial, and the translation SE produces is far less coherent).

I'm noticing that in my case, translating through the SE program itself would produce a more coherent and accurate translation than through the site given above for some reason.

@darnn

This comment has been minimized.

Copy link

commented Nov 29, 2018

Weird!

@marb99

This comment has been minimized.

Copy link

commented Nov 30, 2018

api key paying only???

@glowxixi

This comment has been minimized.

Copy link

commented Nov 30, 2018

No wonder. I thought I was the only one so I had to uninstall and downloaded new SE version.
Should have seen this topic earlier!

@marb99

This comment has been minimized.

Copy link

commented Nov 30, 2018

The problem is not the SE, google tanslator now need a api key v2 and its pay.

the free api key v1 its over, I guess.

@OmrSi

This comment has been minimized.

Copy link

commented Dec 10, 2018

@orbittwz Try 1 or 2, see what happens.

@orbittwz

This comment has been minimized.

Copy link

commented Dec 10, 2018

@OmrSi , you mean 1 or 2 bulk max bytes?? that's way too slow...
with 50 still the same results....

@OmrSi

This comment has been minimized.

Copy link

commented Dec 10, 2018

Yeah, slow but accurate. :\

@orbittwz

This comment has been minimized.

Copy link

commented Dec 11, 2018

well it doesn't work well, and it's merging lines...
the normal GT works great, doesn't skips lines, and doesn't merge them...
if there was only a way to prevent from going 503, it will be awesome...

@NikitaT

This comment has been minimized.

Copy link

commented Dec 11, 2018

https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.7/SubtitleEditBeta.zip

@niksedk thank you for this link, Google Translate works great with API Key, translation even better somehow. Thank you!

@NikitaT

This comment has been minimized.

Copy link

commented Dec 11, 2018

The GT plugin does have success but it's missing some lines...

@orbittwz I can confirm @OmrSi words - lines are not skipped, they just merged for better translation.

@OmrSi

This comment has been minimized.

Copy link

commented Dec 12, 2018

@orbittwz The plugin has a new version, try updating and testing...

@orbittwz

This comment has been minimized.

Copy link

commented Dec 12, 2018

@OmrSi , i'm checking, will feedback here...

image
still merging lines...
image
still skips lines by merging them... seems to be worse on quoted lines...

the max bytes was on 200 (which is bearable i guess)
again... thank you very much for helping us.

@svenverslype

This comment has been minimized.

Copy link

commented Dec 12, 2018

works perfectly with me without api key with vpn 😉👍

@niksedk

This comment has been minimized.

Copy link
Member

commented Dec 12, 2018

@orbittwz: What version of the plugin are you using? (File -> Plugins...)
Please attach a non working subtitle.

@OmrSi

This comment has been minimized.

Copy link

commented Dec 12, 2018

I just tested again with a bulk of 1000 and it translated a whole file with no problems at all...

@orbittwz

This comment has been minimized.

Copy link

commented Dec 12, 2018

Checking with the newest version again....
Well, seems working this time.
Thank you very much!
Set to max bytes 1000 as @OmrSi .
@svenverslype , you mean the VPN is replacing your GT token right?

so maybe there could be Batch GT scraping / normal translation option, just like @MohammadHamdyGhanem did implemented?

@OmrSi

This comment has been minimized.

Copy link

commented Dec 12, 2018

@orbittwz Some of Google's services are blocked in some countries, like mine.
That's probably why he's using a VPN.

Well, I think the Batch thing could be a separate feature request.
@niksedk I think this is closed. No one has any issues with both ways now.

@marb99 By the way, @niksedk added Portuguese to DeepL, you can find the commit in the plugins section. But now you can use the scrapper plugin, as it is working fine...

@orbittwz

This comment has been minimized.

Copy link

commented Dec 12, 2018

Well yeah, sure, i can request this as a feature.
Thank you for all your support so far @OmrSi and @niksedk

@marb99

This comment has been minimized.

Copy link

commented Dec 13, 2018

@OmrSi thanks,, but I got the error too many requests on DeepL

scrapper plugin need Edge, I'm under windows 7 I don't have the Edge

@codered21

This comment has been minimized.

Copy link

commented Dec 18, 2018

any solution for auto translate by google ?

@niksedk

This comment has been minimized.

Copy link
Member

commented Dec 18, 2018

Latest beta now works again (but with limited amount of data or an API key): https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.7/SubtitleEditBeta.zip

You can also try the plugin "GT screen-scraper" - see File -> Plugins... (requires .net framework 4.6.2 or later + Win10 with April update)

Or you can use Subtitle Edit Online to translate: https://www.nikse.dk/SubtitleEdit/Online (in the translate window, scroll down to see all text before pressing OK or not all text might not be translated)

@codered21

This comment has been minimized.

Copy link

commented Dec 18, 2018

thanks bro

@heiyutian

This comment has been minimized.

Copy link

commented Dec 19, 2018

最新测试版现在再次运行(但数据量有限或API密钥有限):https//github.com/SubtitleEdit/subtitleedit/releases/download/3.5.7/SubtitleEditBeta.zip

您也可以尝试插件“GT screen-scraper” - 请参阅文件 - >插件...(需要.net框架4.6.2或更高版本+ Win10与4月更新)

或者您可以使用Subtitle Edit Online进行翻译:https//www.nikse.dk/SubtitleEdit/Online (在翻译窗口中,向下滚动以查看所有文本,然后按OK或不是所有文本都可能无法翻译)

@MohammadHamdyGhanem:请试一试......

与此同时,我添加了对Google Clould API密钥的支持:https//github.com/SubtitleEdit/subtitleedit/releases/download/3.5.7/SubtitleEditBeta.zip
在此处查看如何创建API密钥:https: //support.google.com/googleapi/answer/6158862?hl=en

此外,你可以在这里翻译:https//www.nikse.dk/SubtitleEdit/Online
\\\\\\\\\\\\\\\\

API After getting it, the translation prompt 403

@Dinodo

This comment has been minimized.

Copy link

commented Jan 5, 2019

Sorry for my bad English. I would like to present an alternative. would it be possible to use the translator embedded in Ecxel to assist in the translation of subtitles?

@MESWEB

This comment has been minimized.

Copy link

commented Jan 6, 2019

I confirm. English -> Polish, showing empty cells.

@niksedk

This comment has been minimized.

Copy link
Member

commented Jan 11, 2019

@MESWEB: Be sure that you have latest version of SE: https://github.com/SubtitleEdit/subtitleedit/releases

@heiyutian: Make sure you have enabled billing and the "Cloud translation API" (also check the link below)

Just to repeat myself... get latest version of SE and you'll have limited free translation via Google Translate (you'll get 2 info messages in SE).
Do read this carefully: https://www.nikse.dk/SubtitleEdit/Help#translation

You can also try the translate plugins (File -> Plugins). E.g. "GT screen-scraper" or "BT screen-scraper" (requires .net framework 4.6.2 or later + Win10 with April update).
Also, the copy-paste translate plugin should work with most translation pages - see #3246 (comment)

Or you can use Subtitle Edit Online to translate: https://www.nikse.dk/SubtitleEdit/Online (in the translate window, scroll down to see all text before pressing OK or not all text might not be translated)

@Paupertino

This comment has been minimized.

Copy link

commented Jan 15, 2019

The translation function of this wonderful software ( the best) is gone forever. It is the true. This "plugin" put ALL lines in ONE LOOONG line. Not working at all. Sorry. Thanks for your efforts. The translation function is go away... irreversible. Because of the greed of these greedy mfuck...es (google an Microsuft) . SAD.

@Paupertino

This comment has been minimized.

Copy link

commented Jan 15, 2019

@MESWEB: Be sure that you have latest version of SE: https://github.com/SubtitleEdit/subtitleedit/releases

@heiyutian: Make sure you have enabled billing and the "Cloud translation API" (also check the link below)

Just to repeat myself... get latest version of SE and you'll have limited free translation via Google Translate (you'll get 2 info messages in SE).
Do read this carefully: https://www.nikse.dk/SubtitleEdit/Help#translation

You can also try the translate plugins (File -> Plugins). E.g. "GT screen-scraper" or "BT screen-scraper" (requires .net framework 4.6.2 or later + Win10 with April update).
Also, the copy-paste translate plugin should work with most translation pages - see #3246 (comment)

Or you can use Subtitle Edit Online to translate: https://www.nikse.dk/SubtitleEdit/Online (in the translate window, scroll down to see all text before pressing OK or not all text might not be translated)

Thank you for this wonderful software. No one is ungrateful.

@niksedk

This comment has been minimized.

Copy link
Member

commented Jan 15, 2019

@Paupertino: Did you try both the "GT screen-scraper" and the "BT screen-scraper" ?
Could you attach a screenshot of the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.