koishijs / translator

在 Koishi 中使用翻译服务
https://translator.koishi.chat
MIT License
2 stars 2 forks source link

Bug(translator-baidu): 应该返回序列化后的多行文本,而不是第一个。 #7

Closed Lipraty closed 1 year ago

Lipraty commented 1 year ago

如果是多行文本(例如 help 的内容),百度会将每一行单独返回,而不是数组的第一项,这是 debug 得到的堆栈:

image

https://github.com/koishijs/translator/blob/716108a400ae79989b32117d61858a5843f3b579/packages/baidu/src/index.ts#L39

MaikoTan commented 1 year ago

Is it a baidu-specific problem or every each?

Lipraty commented 1 year ago

Is it a baidu-specific problem or every each?

只用了百度,youdao 没有注册 token,不知道(