intellism / vscode-comment-translate

vscode 注释翻译插件, 不干扰正常代码,方便快速阅读源码。
https://marketplace.visualstudio.com/items?itemName=intellsmi.comment-translate
MIT License
509 stars 82 forks source link

百度翻译失效 #110

Closed ghost closed 1 month ago

ghost commented 2 years ago

输出报

Try again later or change translate source.{"errno":999,"errmsg":"未知错误","query":"this method is called when your extension is activated\nyour extension is activated the very first ti me the command is executed","from":"en","to":"","error":999}
kiccer commented 2 years ago
[Start translate]: Use 'Baidu' translate source
[Start translate]: Use 'Baidu' translate source
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}
[Start translate]: Use 'Baidu' translate source
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}
[Start translate]: Use 'Baidu' translate source
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}
[Start translate]: Use 'Baidu' translate source
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}
[Start translate]: Use 'Baidu' translate source
[Start translate]: Use 'Baidu' translate source
[Start translate]: Use 'Baidu' translate source
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":998,"errmsg":"未知错误","query":"使用方式:","from":"zh","to":"zh","error":998}{"errno":998,"errmsg":"未知错误","query":"使用方式:","from":"zh","to":"zh","error":998}
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}
[Start translate]: Use 'Baidu' translate source
[Start translate]: Use 'Baidu' translate source
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}
[Start translate]: Use 'Baidu' translate source
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":998,"errmsg":"未知错误","query":"使用方式:","from":"zh","to":"zh","error":998}

遇到相同的问题。

PeyFon commented 2 years ago

+1

intellism commented 2 years ago

我也复现了,感觉是百度升级了API, 周末研究下如何更新。

1226085293 commented 2 years ago

我也复现了,感觉是百度升级了API, 周末研究下如何更新。

啥时候更新阿,我申请了百度的APP ID和密钥都不能用,百度可以自动中转英,英转中,是最方便的一个了

intellism commented 2 years ago

我也复现了,感觉是百度升级了API, 周末研究下如何更新。

啥时候更新阿,我申请了百度的APP ID和密钥都不能用,百度可以自动中转英,英转中,是最方便的一个了

近期比较忙,目前插件支持翻译源扩展,欢迎直接贡献一个百度版本。 可以参考 https://github.com/intellism/deepl-translate

bfrontend commented 1 year ago

仿制deepl 实现了一个简单的百度翻译, 需要提供appid appkey https://github.com/webxmsj/baidu-translate

1226085293 commented 1 year ago

仿制deepl 实现了一个简单的百度翻译,需要提供appid appkey https://github.com/webxmsj/baidu-translate

大哥牛逼

ghost commented 1 year ago

我也复现了,感觉是百度升级了API, 周末研究下如何更新。

啥时候更新阿,我申请了百度的APP ID和密钥都不能用,百度可以自动中转英,英转中,是最方便的一个了

我自己做了一个有道 (https://github.com/DarkCWK/youdao) 的版本, 但是发现好像目标语言在没有选择 (设置中是空白) 的时候, API 中 ITranslateOptions.to 是根据显示语言返回的, 考虑添加 AUTO 选项? 将判断交由 api 处理, 避免出现中翻中等类似的情况

1226085293 commented 1 year ago

仿制deepl 实现了一个简单的百度翻译, 需要提供appid appkey https://github.com/webxmsj/baidu-translate

你这不行阿,不能自动英转中,中转英,之前的百度是可以的

itheochan commented 11 months ago

+1:

[Start translate]: Use 'Baidu' translate source
[Baidu]: request error:
 [object Object] 
 Try again later or change translate source.{"errno":1022,"errmsg":"访问出现异常,请刷新后重试!","logid":2801534896,"error":1022,"errShowMsg":"访问出现异常,请刷新后重试!"}

Update: 安装 https://github.com/webxmsj/baidu-translate 并更改翻译源为webxmsj:baidu-translate-baidu可用👍👻

a15218378694 commented 7 months ago

仿制deepl 实现了一个简单的百度翻译, 需要提供appid appkey https://github.com/webxmsj/baidu-translate

现在好像出错了