diff --git a/Easydict/Feature/Service/Apple/EZAppleService.m b/Easydict/Feature/Service/Apple/EZAppleService.m index 404f887c7..ca52b6d3e 100644 --- a/Easydict/Feature/Service/Apple/EZAppleService.m +++ b/Easydict/Feature/Service/Apple/EZAppleService.m @@ -579,7 +579,7 @@ - (EZLanguage)appleDetectTextLanguage:(NSString *)text printLog:(BOOL)logFlag { // !!!: Numbers will be return empty dict @{}: 729 if (languageProbabilityDict.count == 0) { - EZLanguage firstLanguage = [self.languageManager userFirstLanguage]; + EZLanguage firstLanguage = EZConfiguration.shared.firstLanguage; dominantLanguage = [self appleLanguageFromLanguageEnum:firstLanguage]; languageProbabilityDict = @{dominantLanguage : @(0)}; } diff --git a/Easydict/Feature/Service/Language/EZLanguageManager.h b/Easydict/Feature/Service/Language/EZLanguageManager.h index a33e86e45..16f9ad9b7 100644 --- a/Easydict/Feature/Service/Language/EZLanguageManager.h +++ b/Easydict/Feature/Service/Language/EZLanguageManager.h @@ -24,9 +24,6 @@ NS_ASSUME_NONNULL_BEGIN /// preferredLanguages = userPreferredTwoLanguages + systemPreferredLanguages, remove the same language @property (nonatomic, copy, readonly) NSArray *preferredLanguages; -@property (nonatomic, copy, readonly) EZLanguage userFirstLanguage; -@property (nonatomic, copy, readonly) EZLanguage userSecondLanguage; - @property (nonatomic, copy, readonly) NSArray *allLanguages; /// diff --git a/Easydict/Feature/Service/OpenAI/EZOpenAIService.m b/Easydict/Feature/Service/OpenAI/EZOpenAIService.m index 14b8f89b0..efd179ffe 100644 --- a/Easydict/Feature/Service/OpenAI/EZOpenAIService.m +++ b/Easydict/Feature/Service/OpenAI/EZOpenAIService.m @@ -785,7 +785,7 @@ - (NSArray *)translatioMessages:(NSString *)text from:(EZLanguage)sourceLanguage /// Sentence messages. - (NSArray *)sentenceMessages:(NSString *)sentence from:(EZLanguage)sourceLanguage to:(EZLanguage)targetLanguage { - NSString *answerLanguage = [EZLanguageManager.shared userFirstLanguage]; + NSString *answerLanguage = EZConfiguration.shared.firstLanguage; self.result.to = answerLanguage; NSString *prompt = @""; @@ -955,7 +955,7 @@ - (NSArray *)translatioMessages:(NSString *)text from:(EZLanguage)sourceLanguage // V5. prompt NSString *prompt = @""; - NSString *answerLanguage = [EZLanguageManager.shared userFirstLanguage]; + NSString *answerLanguage = EZConfiguration.shared.firstLanguage; self.result.to = answerLanguage; NSString *pronunciation = @"Pronunciation"; @@ -1413,7 +1413,7 @@ - (NSString *)getChineseLanguageType:(NSString *)language accordingToLanguage:(N - (NSArray *)jsonDictPromptMessages:(NSString *)word from:(EZLanguage)sourceLanguage to:(EZLanguage)targetLanguage { NSString *prompt = @""; - NSString *answerLanguage = [EZLanguageManager.shared userFirstLanguage]; + NSString *answerLanguage = EZConfiguration.shared.firstLanguage; NSString *translationLanguageTitle = targetLanguage; BOOL isEnglishWord = NO; diff --git a/Easydict/Feature/Utility/AppleScript/EZAppleScriptManager.m b/Easydict/Feature/Utility/AppleScript/EZAppleScriptManager.m index cb2dee2d6..aec695931 100644 --- a/Easydict/Feature/Utility/AppleScript/EZAppleScriptManager.m +++ b/Easydict/Feature/Utility/AppleScript/EZAppleScriptManager.m @@ -7,7 +7,7 @@ // #import "EZAppleScriptManager.h" -#import "EZLanguageManager.h" +#import "EZConfiguration.h" @interface EZAppleScriptManager () @@ -225,7 +225,7 @@ - (void)checkApplicationSupportCopyAction:(NSString *)appBundleID completion:(vo NSString *edit; if (!appLanguage) { - appLanguage = [EZLanguageManager.shared userFirstLanguage]; + appLanguage = EZConfiguration.shared.firstLanguage; } if ([appLanguage isEqualToString:EZLanguageEnglish]) {