diff --git a/Easydict/NewApp/Utility/Extensions/LanguageExtensions.swift b/Easydict/NewApp/Utility/Extensions/LanguageExtensions.swift index 0f9668bda..b7cc84eae 100644 --- a/Easydict/NewApp/Utility/Extensions/LanguageExtensions.swift +++ b/Easydict/NewApp/Utility/Extensions/LanguageExtensions.swift @@ -16,8 +16,8 @@ extension Language: CaseIterable { Language(rawValue: rawValue as String) } - public static let allCasesWithoutAuto: [Language] = allCases.filter { language in - language != .auto + public static let allAvailableOptions: [Language] = allCases.filter { language in + language != .auto && language != .classicalChinese } } diff --git a/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift b/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift index 962bad4da..852631707 100644 --- a/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift +++ b/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift @@ -207,13 +207,13 @@ private struct FirstAndSecondLanguageSettingView: View { var body: some View { Group { Picker("setting.general.language.first_language", selection: $firstLanguage) { - ForEach(Language.allCasesWithoutAuto, id: \.rawValue) { option in + ForEach(Language.allAvailableOptions, id: \.rawValue) { option in Text(verbatim: "\(option.flagEmoji) \(option.localizedName)") .tag(option) } } Picker("setting.general.language.second_language", selection: $secondLanguage) { - ForEach(Language.allCasesWithoutAuto, id: \.rawValue) { option in + ForEach(Language.allAvailableOptions, id: \.rawValue) { option in Text(verbatim: "\(option.flagEmoji) \(option.localizedName)") .tag(option) }