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 Traditional Chinese to TencentTranslateType dev #368

Merged
merged 4 commits into from
Jan 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Easydict/Feature/Service/Tencent/TencentTranslateType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ struct TencentTranslateType: Equatable {

static let unsupported = TencentTranslateType(sourceLanguage: "unsupported", targetLanguage: "unsupported")

// This docs missed traditionalChinese as target language if target languages contains simplifiedChinese. https://cloud.tencent.com/document/api/551/15619
// https://cloud.tencent.com/document/api/551/15619
static let supportedTypes: [Language: [Language]] = [
.simplifiedChinese: [.english, .japanese, .korean, .french, .spanish, .italian, .german, .turkish, .russian, .portuguese, .vietnamese, .indonesian, .thai, .malay],
.traditionalChinese: [.english, .japanese, .korean, .french, .spanish, .italian, .german, .turkish, .russian, .portuguese, .vietnamese, .indonesian, .thai, .malay],
.english: [.simplifiedChinese, .japanese, .korean, .french, .spanish, .italian, .german, .turkish, .russian, .portuguese, .vietnamese, .indonesian, .thai, .malay, .arabic, .hindi],
.japanese: [.simplifiedChinese, .english, .korean],
.korean: [.simplifiedChinese, .english, .japanese],
.french: [.simplifiedChinese, .english, .spanish, .italian, .german, .turkish, .russian, .portuguese],
.spanish: [.simplifiedChinese, .english, .french, .italian, .german, .turkish, .russian, .portuguese],
.italian: [.simplifiedChinese, .english, .french, .spanish, .german, .turkish, .russian, .portuguese],
.german: [.simplifiedChinese, .english, .french, .spanish, .italian, .turkish, .russian, .portuguese],
.turkish: [.simplifiedChinese, .english, .french, .spanish, .italian, .german, .russian, .portuguese],
.russian: [.simplifiedChinese, .english, .french, .spanish, .italian, .german, .turkish, .portuguese],
.portuguese: [.simplifiedChinese, .english, .french, .spanish, .italian, .german, .turkish, .russian],
.vietnamese: [.simplifiedChinese, .english],
.indonesian: [.simplifiedChinese, .english],
.thai: [.simplifiedChinese, .english],
.malay: [.simplifiedChinese, .english],
.english: [.simplifiedChinese, .traditionalChinese, .japanese, .korean, .french, .spanish, .italian, .german, .turkish, .russian, .portuguese, .vietnamese, .indonesian, .thai, .malay, .arabic, .hindi],
.japanese: [.simplifiedChinese, .traditionalChinese, .english, .korean],
.korean: [.simplifiedChinese, .traditionalChinese, .english, .japanese],
.french: [.simplifiedChinese, .traditionalChinese, .english, .spanish, .italian, .german, .turkish, .russian, .portuguese],
.spanish: [.simplifiedChinese, .traditionalChinese, .english, .french, .italian, .german, .turkish, .russian, .portuguese],
.italian: [.simplifiedChinese, .traditionalChinese, .english, .french, .spanish, .german, .turkish, .russian, .portuguese],
.german: [.simplifiedChinese, .traditionalChinese, .english, .french, .spanish, .italian, .turkish, .russian, .portuguese],
.turkish: [.simplifiedChinese, .traditionalChinese, .english, .french, .spanish, .italian, .german, .russian, .portuguese],
.russian: [.simplifiedChinese, .traditionalChinese, .english, .french, .spanish, .italian, .german, .turkish, .portuguese],
.portuguese: [.simplifiedChinese, .traditionalChinese, .english, .french, .spanish, .italian, .german, .turkish, .russian],
.vietnamese: [.simplifiedChinese, .traditionalChinese, .english],
.indonesian: [.simplifiedChinese, .traditionalChinese, .english],
.thai: [.simplifiedChinese, .traditionalChinese, .english],
.malay: [.simplifiedChinese, .traditionalChinese, .english],
.arabic: [.english],
.hindi: [.english],
]
Expand Down