Quellcode durchsuchen

Trim Settings language picker to English only.

Remove placeholder locale options so languages can be added intentionally one at a time.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 vor 1 Monat
Ursprung
Commit
708578ab63
1 geänderte Dateien mit 3 neuen und 10 gelöschten Zeilen
  1. 3 10
      App for Indeed/Views/DashboardView.swift

+ 3 - 10
App for Indeed/Views/DashboardView.swift

@@ -322,6 +322,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
             if let index = Self.supportedLanguages.firstIndex(where: { $0.code == saved }) {
                 langPopUp.selectItem(at: index)
             }
+            langPopUp.isEnabled = !Self.supportedLanguages.isEmpty
         }
         cvMakerPageView.applyCurrentAppearance()
         profilesListPageView.applyCurrentAppearance()
@@ -1843,16 +1844,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
     private static let languageUserDefaultsKey = "com.appforindeed.preferredLanguage"
 
     private static let supportedLanguages: [(code: String, title: String)] = [
-        ("en", "English"),
-        ("es", "Español"),
-        ("fr", "Français"),
-        ("de", "Deutsch"),
-        ("pt", "Português"),
-        ("zh", "中文"),
-        ("ja", "日本語"),
-        ("ko", "한국어"),
-        ("ar", "العربية"),
-        ("hi", "हिन्दी")
+        ("en", "English")
     ]
 
     private func makeLanguagePopUp() -> NSPopUpButton {
@@ -1872,6 +1864,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
 
         popup.target = self
         popup.action = #selector(languageChanged(_:))
+        popup.isEnabled = !Self.supportedLanguages.isEmpty
         popup.setContentHuggingPriority(.required, for: .horizontal)
         popup.setContentCompressionResistancePriority(.required, for: .horizontal)
         return popup