Skip to content

Commit

Permalink
perf(UI): add localization for TTS services
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry23011 committed Oct 6, 2023
1 parent f9fee2c commit b9cc0f5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
33 changes: 33 additions & 0 deletions Easydict/App/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@
}
}
},
"Apple" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "苹果"
}
}
}
},
"apple_dictionary" : {
"localizations" : {
"en" : {
Expand Down Expand Up @@ -347,6 +358,17 @@
}
}
},
"Baidu" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "百度"
}
}
}
},
"baidu_translate" : {
"localizations" : {
"en" : {
Expand Down Expand Up @@ -2027,6 +2049,17 @@
}
}
},
"Youdao" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "有道"
}
}
}
},
"youdao_dict" : {
"localizations" : {
"en" : {
Expand Down
10 changes: 5 additions & 5 deletions Easydict/Feature/PerferenceWindow/EZSettingViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ - (void)setupUI {

// Note: Bing API has frequency limit
NSArray *enabledTTSServiceTypes = @[
EZServiceTypeYoudao,
EZServiceTypeBing,
EZServiceTypeGoogle,
EZServiceTypeBaidu,
EZServiceTypeApple,
NSLocalizedString(EZServiceTypeYoudao,nil),
NSLocalizedString(EZServiceTypeBing,nil),
NSLocalizedString(EZServiceTypeGoogle,nil),
NSLocalizedString(EZServiceTypeBaidu,nil),
NSLocalizedString(EZServiceTypeApple,nil),
];
[self.defaultTTSServicePopUpButton addItemsWithTitles:enabledTTSServiceTypes];
self.defaultTTSServicePopUpButton.target = self;
Expand Down

0 comments on commit b9cc0f5

Please sign in to comment.