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

🚀 功能建议:希望增加腾讯翻译 #182

Closed
3 of 4 tasks
catch6 opened this issue Oct 11, 2023 · 15 comments
Closed
3 of 4 tasks

🚀 功能建议:希望增加腾讯翻译 #182

catch6 opened this issue Oct 11, 2023 · 15 comments
Assignees
Labels
enhancement New feature or request fixed in next release The issue will be closed once next release is available

Comments

@catch6
Copy link

catch6 commented Oct 11, 2023

请先确认以下事项

  • 已仔细阅读了 README
  • issues 页面搜索过(包括已关闭的 issue),未发现类似功能建议
  • Easydict 已升级到最新版本

功能描述

之前使用 Bob 的时候对翻译对比了一遍,腾讯翻译准确度最出色,尤其是特点的英语简称,所以一直用的腾讯翻译,希望作者考虑增加一下

使用场景(可选)

No response

实现方案(可选)

No response

是否愿意提交 PR 实现该功能

  • 我愿意提交 PR!
@catch6 catch6 added the enhancement New feature or request label Oct 11, 2023
@github-actions
Copy link

Hello catch6, Thank you for your first issue contribution 🎉

@tisfeng
Copy link
Owner

tisfeng commented Oct 11, 2023

这个可以,腾讯翻译效果确实不错,而且官方 API 每月有 500 万字符的免费额度,很友好。

@tisfeng tisfeng added the todo label Oct 11, 2023
@tisfeng
Copy link
Owner

tisfeng commented Oct 11, 2023

最近我打算发个新版本,但测试了一番后发现了好几个问题,不知道是不是升级了 macOS 14 导致,这会正忙着修 bug。

各位,有兴趣来做这个功能吗? 也不急,这次发版就不加了,抽空做就行。

@catch6
Copy link
Author

catch6 commented Oct 13, 2023

看了一下,不会这个语言

@tisfeng
Copy link
Owner

tisfeng commented Oct 14, 2023

确实,相比其他主流的跨平台语言,objc 太小众了 😓

@Jerry23011 @choykarl @rainzm 有空加一下腾讯翻译吗?

这项目最初版是用 objc 写的,而我 Swift 不太熟练,担心混编会导致一些麻烦,图省事才沿用了 objc。

如果你们 Swift 更熟练,用 Swift 写一些模块也行。

@choykarl
Copy link
Collaborator

@tisfeng Swift我还在3.0的时候写过公司项目,后来也就没用过了,这几年一直在写Flutter。我后面可以尝试用Swift写写试试。
其他人如果有时间可以把腾讯翻译接进来。如果都没空的话我可以尝试弄,不过我最近挺忙的,时间不是很多,我弄的话可能要比较晚才能搞,上次的微软词典还一直todo着呢。。。

@Jerry23011
Copy link
Collaborator

我试了一下把 Bing 翻译里面一个很小很小的组件迁移到了 Swift,能正常跑起来,功能目前看也没什么问题

就是感觉迁移的时候 objc 和 Swift 混用需要注意的东西挺多,既要加@objc有要 import Xcode 给 Swift 自动生成的 header

代码在这个 branch,如果大家跑起来都没问题也许我可以在最新版本发了之后再提一个 PR.

我纯业余,只是对这方面感兴趣,production use 的代码是写不出的😔

@tisfeng
Copy link
Owner

tisfeng commented Oct 16, 2023

@Jerry23011 可以,看起来不错,那这个功能就麻烦你了,你尝试用 Swift 写就可以。

@tisfeng
Copy link
Owner

tisfeng commented Oct 16, 2023

其实我一直想写 Swift,objc 相比 Swift 太原始、太古板了,只是之前的工作都是 objc,我只用 Swift 写过一些简单 demo,没能在实际项目中写过,希望这次能借这个项目,好好学习一下写 Swift。

后续新的模块都可以尝试用 Swift 写,甚至有必要的话,有些功能可以用 Swift 重写。比如设置页,我对目前使用的 MASPreferences 这个第三方库效果不是很满意,它不维护了,我自己改了点代码,但现在它每次运行都会有警告,很烦。之前尝试找类似的 objc 库,但没找到,或许找 Swift 会好点。

image

@tisfeng
Copy link
Owner

tisfeng commented Oct 16, 2023

@choykarl 那你还是先做微软词典,也可以用 Swift 写,我先观摩一下你们的代码 👀

@Jerry23011
Copy link
Collaborator

@Jerry23011 可以,看起来不错,那这个功能就麻烦你了,你尝试用 Swift 写就可以。

我试试,不能保证成功,大多数东西都要现学👀

@tisfeng
Copy link
Owner

tisfeng commented Nov 12, 2023

彩云小译快完成了,@Jerry23011 你可以参考这个 PR #218 写腾讯翻译了。

@tisfeng
Copy link
Owner

tisfeng commented Nov 23, 2023

@Jerry23011 你好,小牛翻译已经合并了 #239 ,稍后准备发布一个新版本,请问这个 PR 怎么样了?

如果已经做了一部份,可以先把代码推上来,如果有遇到问题,我也可以一起来看看,写一写。

@Jerry23011
Copy link
Collaborator

如果已经做了一部份,可以先把代码推上来,如果有遇到问题,我也可以一起来看看,写一写。

这周末看看

@tisfeng tisfeng added fixed in next release The issue will be closed once next release is available and removed todo labels Dec 11, 2023
@tisfeng
Copy link
Owner

tisfeng commented Dec 18, 2023

2.4.0 版本已添加腾讯翻译。

@tisfeng tisfeng closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed in next release The issue will be closed once next release is available
Projects
None yet
Development

No branches or pull requests

4 participants