Explorar el Código

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 hace 4 días
padre
commit
708578ab63
Se han modificado 1 ficheros con 3 adiciones y 10 borrados
  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
             if let index = Self.supportedLanguages.firstIndex(where: { $0.code == saved }) {
322
             if let index = Self.supportedLanguages.firstIndex(where: { $0.code == saved }) {
323
                 langPopUp.selectItem(at: index)
323
                 langPopUp.selectItem(at: index)
324
             }
324
             }
325
+            langPopUp.isEnabled = !Self.supportedLanguages.isEmpty
325
         }
326
         }
326
         cvMakerPageView.applyCurrentAppearance()
327
         cvMakerPageView.applyCurrentAppearance()
327
         profilesListPageView.applyCurrentAppearance()
328
         profilesListPageView.applyCurrentAppearance()
@@ -1843,16 +1844,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
1843
     private static let languageUserDefaultsKey = "com.appforindeed.preferredLanguage"
1844
     private static let languageUserDefaultsKey = "com.appforindeed.preferredLanguage"
1844
 
1845
 
1845
     private static let supportedLanguages: [(code: String, title: String)] = [
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
     private func makeLanguagePopUp() -> NSPopUpButton {
1850
     private func makeLanguagePopUp() -> NSPopUpButton {
@@ -1872,6 +1864,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
1872
 
1864
 
1873
         popup.target = self
1865
         popup.target = self
1874
         popup.action = #selector(languageChanged(_:))
1866
         popup.action = #selector(languageChanged(_:))
1867
+        popup.isEnabled = !Self.supportedLanguages.isEmpty
1875
         popup.setContentHuggingPriority(.required, for: .horizontal)
1868
         popup.setContentHuggingPriority(.required, for: .horizontal)
1876
         popup.setContentCompressionResistancePriority(.required, for: .horizontal)
1869
         popup.setContentCompressionResistancePriority(.required, for: .horizontal)
1877
         return popup
1870
         return popup