瀏覽代碼

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 4 天之前
父節點
當前提交
708578ab63
共有 1 個文件被更改,包括 3 次插入10 次删除
  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
322 322
             if let index = Self.supportedLanguages.firstIndex(where: { $0.code == saved }) {
323 323
                 langPopUp.selectItem(at: index)
324 324
             }
325
+            langPopUp.isEnabled = !Self.supportedLanguages.isEmpty
325 326
         }
326 327
         cvMakerPageView.applyCurrentAppearance()
327 328
         profilesListPageView.applyCurrentAppearance()
@@ -1843,16 +1844,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
1843 1844
     private static let languageUserDefaultsKey = "com.appforindeed.preferredLanguage"
1844 1845
 
1845 1846
     private static let supportedLanguages: [(code: String, title: String)] = [
1846
-        ("en", "English"),
1847
-        ("es", "Español"),
1848
-        ("fr", "Français"),
1849
-        ("de", "Deutsch"),
1850
-        ("pt", "Português"),
1851
-        ("zh", "中文"),
1852
-        ("ja", "日本語"),
1853
-        ("ko", "한국어"),
1854
-        ("ar", "العربية"),
1855
-        ("hi", "हिन्दी")
1847
+        ("en", "English")
1856 1848
     ]
1857 1849
 
1858 1850
     private func makeLanguagePopUp() -> NSPopUpButton {
@@ -1872,6 +1864,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
1872 1864
 
1873 1865
         popup.target = self
1874 1866
         popup.action = #selector(languageChanged(_:))
1867
+        popup.isEnabled = !Self.supportedLanguages.isEmpty
1875 1868
         popup.setContentHuggingPriority(.required, for: .horizontal)
1876 1869
         popup.setContentCompressionResistancePriority(.required, for: .horizontal)
1877 1870
         return popup