From 5038ee684c7a588420be8fdcb14561c24681c114 Mon Sep 17 00:00:00 2001 From: Lava <34743145+CanglongCl@users.noreply.github.com> Date: Sat, 13 Jan 2024 19:18:58 -0800 Subject: [PATCH] renaming TTSService to TTSServiceType and remove EZ prefix of some file --- Easydict.xcodeproj/project.pbxproj | 32 +++++++++---------- .../Feature/Configuration/EZConfiguration.h | 1 + Easydict/NewApp/Model/TTSServiceType.swift | 2 +- ...=> LanguageDetectOptimizeExtensions.swift} | 2 +- ...ensions.swift => LanguageExtensions.swift} | 2 +- ...ift => ShowWindowPositionExtensions.swift} | 2 +- ...sions.swift => WindowTypeExtensions.swift} | 2 +- .../View/SettingView/Tabs/GeneralTab.swift | 2 +- 8 files changed, 23 insertions(+), 22 deletions(-) rename Easydict/NewApp/Utility/Extensions/{EZLanguageDetectOptimizeExtensions.swift => LanguageDetectOptimizeExtensions.swift} (94%) rename Easydict/NewApp/Utility/Extensions/{EZLanguageExtensions.swift => LanguageExtensions.swift} (98%) rename Easydict/NewApp/Utility/Extensions/{EZShowWindowPositionExtensions.swift => ShowWindowPositionExtensions.swift} (95%) rename Easydict/NewApp/Utility/Extensions/{EZWindowTypeExtensions.swift => WindowTypeExtensions.swift} (95%) diff --git a/Easydict.xcodeproj/project.pbxproj b/Easydict.xcodeproj/project.pbxproj index d317f29e3..b3d6daeee 100644 --- a/Easydict.xcodeproj/project.pbxproj +++ b/Easydict.xcodeproj/project.pbxproj @@ -263,10 +263,10 @@ EA3B81F92B5254AA004C0E8B /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA3B81F82B5254AA004C0E8B /* Configuration.swift */; }; EA3B81FC2B52555C004C0E8B /* Defaults in Frameworks */ = {isa = PBXBuildFile; productRef = EA3B81FB2B52555C004C0E8B /* Defaults */; }; EA9943E32B534C3300EE7B97 /* TTSServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943E22B534C3300EE7B97 /* TTSServiceType.swift */; }; - EA9943E82B534D8900EE7B97 /* EZLanguageDetectOptimizeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943E72B534D8900EE7B97 /* EZLanguageDetectOptimizeExtensions.swift */; }; - EA9943EE2B5353AB00EE7B97 /* EZWindowTypeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943ED2B5353AB00EE7B97 /* EZWindowTypeExtensions.swift */; }; - EA9943F02B5354C400EE7B97 /* EZShowWindowPositionExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943EF2B5354C400EE7B97 /* EZShowWindowPositionExtensions.swift */; }; - EA9943F22B5358BF00EE7B97 /* EZLanguageExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943F12B5358BF00EE7B97 /* EZLanguageExtensions.swift */; }; + EA9943E82B534D8900EE7B97 /* LanguageDetectOptimizeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943E72B534D8900EE7B97 /* LanguageDetectOptimizeExtensions.swift */; }; + EA9943EE2B5353AB00EE7B97 /* WindowTypeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943ED2B5353AB00EE7B97 /* WindowTypeExtensions.swift */; }; + EA9943F02B5354C400EE7B97 /* ShowWindowPositionExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943EF2B5354C400EE7B97 /* ShowWindowPositionExtensions.swift */; }; + EA9943F22B5358BF00EE7B97 /* LanguageExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9943F12B5358BF00EE7B97 /* LanguageExtensions.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -746,10 +746,10 @@ DC6D9C882B3969510055EFFC /* Appearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Appearance.swift; sourceTree = ""; }; EA3B81F82B5254AA004C0E8B /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; EA9943E22B534C3300EE7B97 /* TTSServiceType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TTSServiceType.swift; sourceTree = ""; }; - EA9943E72B534D8900EE7B97 /* EZLanguageDetectOptimizeExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EZLanguageDetectOptimizeExtensions.swift; sourceTree = ""; }; - EA9943ED2B5353AB00EE7B97 /* EZWindowTypeExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EZWindowTypeExtensions.swift; sourceTree = ""; }; - EA9943EF2B5354C400EE7B97 /* EZShowWindowPositionExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EZShowWindowPositionExtensions.swift; sourceTree = ""; }; - EA9943F12B5358BF00EE7B97 /* EZLanguageExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EZLanguageExtensions.swift; sourceTree = ""; }; + EA9943E72B534D8900EE7B97 /* LanguageDetectOptimizeExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageDetectOptimizeExtensions.swift; sourceTree = ""; }; + EA9943ED2B5353AB00EE7B97 /* WindowTypeExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowTypeExtensions.swift; sourceTree = ""; }; + EA9943EF2B5354C400EE7B97 /* ShowWindowPositionExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowWindowPositionExtensions.swift; sourceTree = ""; }; + EA9943F12B5358BF00EE7B97 /* LanguageExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageExtensions.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -2187,10 +2187,10 @@ EA9943E62B534D7C00EE7B97 /* Extensions */ = { isa = PBXGroup; children = ( - EA9943E72B534D8900EE7B97 /* EZLanguageDetectOptimizeExtensions.swift */, - EA9943ED2B5353AB00EE7B97 /* EZWindowTypeExtensions.swift */, - EA9943EF2B5354C400EE7B97 /* EZShowWindowPositionExtensions.swift */, - EA9943F12B5358BF00EE7B97 /* EZLanguageExtensions.swift */, + EA9943E72B534D8900EE7B97 /* LanguageDetectOptimizeExtensions.swift */, + EA9943ED2B5353AB00EE7B97 /* WindowTypeExtensions.swift */, + EA9943EF2B5354C400EE7B97 /* ShowWindowPositionExtensions.swift */, + EA9943F12B5358BF00EE7B97 /* LanguageExtensions.swift */, ); path = Extensions; sourceTree = ""; @@ -2547,7 +2547,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - EA9943EE2B5353AB00EE7B97 /* EZWindowTypeExtensions.swift in Sources */, + EA9943EE2B5353AB00EE7B97 /* WindowTypeExtensions.swift in Sources */, 030570E22ADB919900C9905E /* EZAppleScriptManager.m in Sources */, 03991158292927E000E1B06D /* EZTitlebar.m in Sources */, 03D8A65C2A433B4100D9A968 /* EZConfiguration+EZUserData.m in Sources */, @@ -2683,7 +2683,7 @@ 0333FDA62A035D5700891515 /* NSString+EZChineseText.m in Sources */, 03E02A222924E77100A10260 /* EZMenuItemManager.m in Sources */, 039D119929D5E26300C93F46 /* EZAudioUtils.m in Sources */, - EA9943F22B5358BF00EE7B97 /* EZLanguageExtensions.swift in Sources */, + EA9943F22B5358BF00EE7B97 /* LanguageExtensions.swift in Sources */, 03B0231729231FA6001C7E63 /* Snip.m in Sources */, 03BFFC6E295FE59C004E033E /* EZQueryResult+EZYoudaoDictModel.m in Sources */, DC3C643F2B187119008EEDD8 /* ChangeFontSizeView.swift in Sources */, @@ -2701,7 +2701,7 @@ 0320C5872B29F35700861B3D /* QueryServiceRecord.swift in Sources */, 03FC699A2B39D13A0035D2DA /* EZOpenAIChatResponse.m in Sources */, 03B022FA29231FA6001C7E63 /* EZServiceTypes.m in Sources */, - EA9943F02B5354C400EE7B97 /* EZShowWindowPositionExtensions.swift in Sources */, + EA9943F02B5354C400EE7B97 /* ShowWindowPositionExtensions.swift in Sources */, 03B0233129231FA6001C7E63 /* MMCrash.m in Sources */, 03B0232629231FA6001C7E63 /* NSAttributedString+MM.m in Sources */, 03542A402937B3C900C34C33 /* EZOCRResult.m in Sources */, @@ -2742,7 +2742,7 @@ DC6D9C872B352EBC0055EFFC /* FontSizeHintView.swift in Sources */, 03B0232429231FA6001C7E63 /* NSUserDefaults+MM.m in Sources */, 03542A5E2938F05B00C34C33 /* EZLanguageModel.m in Sources */, - EA9943E82B534D8900EE7B97 /* EZLanguageDetectOptimizeExtensions.swift in Sources */, + EA9943E82B534D8900EE7B97 /* LanguageDetectOptimizeExtensions.swift in Sources */, 03F639952AA6CFBB009B9914 /* EZBingConfig.m in Sources */, 03D2A3E329F4C6F50035CED4 /* EZNetworkManager.m in Sources */, 0309E1ED292B439A00AFB76A /* EZTextView.m in Sources */, diff --git a/Easydict/Feature/Configuration/EZConfiguration.h b/Easydict/Feature/Configuration/EZConfiguration.h index bc07911ee..310f47031 100644 --- a/Easydict/Feature/Configuration/EZConfiguration.h +++ b/Easydict/Feature/Configuration/EZConfiguration.h @@ -23,6 +23,7 @@ static NSString *const EZFontSizeUpdateNotification = @"EZFontSizeUpdateNotifica static NSString *const EZIntelligentQueryModeKey = @"IntelligentQueryMode"; + typedef NS_ENUM(NSUInteger, EZLanguageDetectOptimize) { EZLanguageDetectOptimizeNone = 0, EZLanguageDetectOptimizeBaidu = 1, diff --git a/Easydict/NewApp/Model/TTSServiceType.swift b/Easydict/NewApp/Model/TTSServiceType.swift index fc734cea4..6eda5cf16 100644 --- a/Easydict/NewApp/Model/TTSServiceType.swift +++ b/Easydict/NewApp/Model/TTSServiceType.swift @@ -1,5 +1,5 @@ // -// TTSService.swift +// TTSServiceType.swift // Easydict // // Created by 戴藏龙 on 2024/1/13. diff --git a/Easydict/NewApp/Utility/Extensions/EZLanguageDetectOptimizeExtensions.swift b/Easydict/NewApp/Utility/Extensions/LanguageDetectOptimizeExtensions.swift similarity index 94% rename from Easydict/NewApp/Utility/Extensions/EZLanguageDetectOptimizeExtensions.swift rename to Easydict/NewApp/Utility/Extensions/LanguageDetectOptimizeExtensions.swift index f6021d276..82ec281a1 100644 --- a/Easydict/NewApp/Utility/Extensions/EZLanguageDetectOptimizeExtensions.swift +++ b/Easydict/NewApp/Utility/Extensions/LanguageDetectOptimizeExtensions.swift @@ -1,5 +1,5 @@ // -// EZLanguageDetectOptimizeExtensions.swift +// LanguageDetectOptimizeExtensions.swift // Easydict // // Created by 戴藏龙 on 2024/1/13. diff --git a/Easydict/NewApp/Utility/Extensions/EZLanguageExtensions.swift b/Easydict/NewApp/Utility/Extensions/LanguageExtensions.swift similarity index 98% rename from Easydict/NewApp/Utility/Extensions/EZLanguageExtensions.swift rename to Easydict/NewApp/Utility/Extensions/LanguageExtensions.swift index 5e18082dc..7dc6f5e5c 100644 --- a/Easydict/NewApp/Utility/Extensions/EZLanguageExtensions.swift +++ b/Easydict/NewApp/Utility/Extensions/LanguageExtensions.swift @@ -1,5 +1,5 @@ // -// EZLanguageExtensions.swift +// LanguageExtensions.swift // Easydict // // Created by 戴藏龙 on 2024/1/13. diff --git a/Easydict/NewApp/Utility/Extensions/EZShowWindowPositionExtensions.swift b/Easydict/NewApp/Utility/Extensions/ShowWindowPositionExtensions.swift similarity index 95% rename from Easydict/NewApp/Utility/Extensions/EZShowWindowPositionExtensions.swift rename to Easydict/NewApp/Utility/Extensions/ShowWindowPositionExtensions.swift index 402ce9be7..e531d64c1 100644 --- a/Easydict/NewApp/Utility/Extensions/EZShowWindowPositionExtensions.swift +++ b/Easydict/NewApp/Utility/Extensions/ShowWindowPositionExtensions.swift @@ -1,5 +1,5 @@ // -// EZShowWindowPositionExtensions.swift +// ShowWindowPositionExtensions.swift // Easydict // // Created by 戴藏龙 on 2024/1/13. diff --git a/Easydict/NewApp/Utility/Extensions/EZWindowTypeExtensions.swift b/Easydict/NewApp/Utility/Extensions/WindowTypeExtensions.swift similarity index 95% rename from Easydict/NewApp/Utility/Extensions/EZWindowTypeExtensions.swift rename to Easydict/NewApp/Utility/Extensions/WindowTypeExtensions.swift index e5e8fe091..34b60c049 100644 --- a/Easydict/NewApp/Utility/Extensions/EZWindowTypeExtensions.swift +++ b/Easydict/NewApp/Utility/Extensions/WindowTypeExtensions.swift @@ -1,5 +1,5 @@ // -// EZWindowTypeExtensions.swift +// WindowTypeExtensions.swift // Easydict // // Created by 戴藏龙 on 2024/1/13. diff --git a/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift b/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift index d633c0f54..962bad4da 100644 --- a/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift +++ b/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift @@ -142,7 +142,7 @@ struct GeneralTab: View { Section { Picker("setting.general.advance.default_tts_service", selection: $defaultTTSServiceType) { - ForEach(TTSService.allCases, id: \.rawValue) { option in + ForEach(TTSServiceType.allCases, id: \.rawValue) { option in Text(option.localizedStringResource) .tag(option) }