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

Add CaiyunService Support #218

Merged
merged 16 commits into from
Nov 27, 2023
Merged

Add CaiyunService Support #218

merged 16 commits into from
Nov 27, 2023

Conversation

Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Nov 10, 2023

Close #206

@Kyle-Ye Kyle-Ye changed the base branch from main to dev November 10, 2023 17:07
Copy link

gitguardian bot commented Nov 10, 2023

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@Kyle-Ye
Copy link
Collaborator Author

Kyle-Ye commented Nov 10, 2023

抽空弄了下初步支持上了,这周还有其他事情不一定有时间能完全弄完 cc @tisfeng
如果这个需求阻塞到你后续其他需求的接入的话看下能否其他同学后续在这个分支上继续开发支持下

TODO:

  • 默认没有展开需要手动点击
  • Token 配置支持
  • 正确传递语言参数
image

@tisfeng
Copy link
Owner

tisfeng commented Nov 11, 2023

试了一下,看起来不错。 没事,我这边可以自己先做,你稍后抽空完善一下就好。

@tisfeng
Copy link
Owner

tisfeng commented Nov 11, 2023

你好,这个文件好像是你用 SPM 新增的,我这边提示没有被跟踪, Easydict.xcworkspace/xcshareddata/swiftpm/ 文件是否需要纳入 git 管理?

image image

@Kyle-Ye Kyle-Ye marked this pull request as ready for review November 12, 2023 08:44
@Kyle-Ye Kyle-Ye requested a review from tisfeng November 12, 2023 08:44
Easydict-debug.xcconfig Outdated Show resolved Hide resolved
@tisfeng
Copy link
Owner

tisfeng commented Nov 12, 2023

我看到 GitGuardian Security Checks 这个警告还在,以为是 token 切割不彻底,但看起来不是,而是因为泄漏 token 的提交记录已经推送了。。

看了一下文档 https://blog.gitguardian.com/rewriting-git-history-cheatsheet/ ,要想消除警告有点麻烦,这只是一个测试 token,问题不大,还是算了吧 😔

@tisfeng
Copy link
Owner

tisfeng commented Nov 23, 2023

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

Add basic implementation for Caiyun Service

Fix CR suggestion

Add caiyun service transtype support

perf: split caiyun test token to more parts

perf: improve caiyun supported langauges dict

Update Easydict/Feature/Service/Caiyun/CaiyunService.swift

Co-authored-by: Kyle <[email protected]>
@Kyle-Ye Kyle-Ye requested a review from tisfeng November 26, 2023 09:09
@Kyle-Ye Kyle-Ye disabled auto-merge November 26, 2023 09:09
@Kyle-Ye
Copy link
Collaborator Author

Kyle-Ye commented Nov 26, 2023

剩下的两个 PR #212#204 你有空时看一下

当然,会找个时间把它们完善到可以合入并推动merge的

遇到问题再向你请教,尽量不占用你太多时间。

好的,任何关于 Swift 的问题都欢迎交流呀

@tisfeng
Copy link
Owner

tisfeng commented Nov 27, 2023

@Kyle-Ye 完善了一下代码,你看看还有没有什么要改的

Copy link
Collaborator Author

@Kyle-Ye Kyle-Ye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the help

@tisfeng tisfeng enabled auto-merge (squash) November 27, 2023 14:59
@tisfeng tisfeng disabled auto-merge November 27, 2023 14:59
@tisfeng tisfeng enabled auto-merge (squash) November 27, 2023 14:59
@tisfeng tisfeng merged commit c89f086 into tisfeng:dev Nov 27, 2023
2 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/caiyun branch November 27, 2023 15:01
Jerry23011 pushed a commit to Jerry23011/Easydict that referenced this pull request Dec 3, 2023
* Fix header issue

* Add basic support for CaiyunService

Add basic implementation for Caiyun Service

Fix CR suggestion

Add caiyun service transtype support

perf: split caiyun test token to more parts

perf: improve caiyun supported langauges dict

Update Easydict/Feature/Service/Caiyun/CaiyunService.swift

Co-authored-by: Kyle <[email protected]>

* perf: improve multiple texts translation

* chore: add swiftpm/Package.resolved

* perf: add more supported languages

* perf: rename EZCaiyunAPIKey to EZCaiyunToken

* perf: set auto convert Chinese text to true

* perf: support traditional Chinese as target language

* refactor: auto convert to traditional Chinese texts if need

* perf: localize LingoCloud as English name

* perf: update Localizable.xcstrings

* perf: localize unsupported_translation_type

* perf: improve transType()

* fix: only auto convert to traditional Chinese when matching query target language

* perf: improve supportLanguagesDictionary()

---------

Co-authored-by: tisfeng <[email protected]>
tisfeng added a commit that referenced this pull request Dec 3, 2023
* Fix header issue

* Add basic support for CaiyunService

Add basic implementation for Caiyun Service

Fix CR suggestion

Add caiyun service transtype support

perf: split caiyun test token to more parts

perf: improve caiyun supported langauges dict

Update Easydict/Feature/Service/Caiyun/CaiyunService.swift

Co-authored-by: Kyle <[email protected]>

* perf: improve multiple texts translation

* chore: add swiftpm/Package.resolved

* perf: add more supported languages

* perf: rename EZCaiyunAPIKey to EZCaiyunToken

* perf: set auto convert Chinese text to true

* perf: support traditional Chinese as target language

* refactor: auto convert to traditional Chinese texts if need

* perf: localize LingoCloud as English name

* perf: update Localizable.xcstrings

* perf: localize unsupported_translation_type

* perf: improve transType()

* fix: only auto convert to traditional Chinese when matching query target language

* perf: improve supportLanguagesDictionary()

---------

Co-authored-by: tisfeng <[email protected]>
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

Successfully merging this pull request may close these issues.

🚀 功能建议:支持彩云小译
2 participants