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

谷歌封了以后,怎么在控件窗口挂上代理? #30

Open
ajjfael opened this issue Oct 11, 2022 · 3 comments
Open

谷歌封了以后,怎么在控件窗口挂上代理? #30

ajjfael opened this issue Oct 11, 2022 · 3 comments

Comments

@ajjfael
Copy link

ajjfael commented Oct 11, 2022

No description provided.

@ajjfael
Copy link
Author

ajjfael commented Oct 14, 2022

image

@mkdir700

This comment was marked as outdated.

@mkdir700
Copy link

mkdir700 commented Jan 8, 2023

在正常代理的情况下,不能使用谷歌翻译。

我又排查了下,貌似和 token 的生成时间有关。

排查发现,并没有执行这部分代码,导致 token 是空的,从而导致谷歌翻译无法使用。

https://github.com/ryanker/dream_translate/blob/14adfe744358fe796114aab928418f3fad0557b5/src/js/translate/google.js#L334-L336

在我 fork 的仓库中,我将以上代码替换为了:

await this.getTokenNew().catch(err => console.warn(err))

也就是说,使用谷歌翻译时将不再判断上一次 token 的生成时间,我认为这并不是一个优雅的做法,所以目前没有提 PR。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants