|
@@ -322,6 +322,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
|
if let index = Self.supportedLanguages.firstIndex(where: { $0.code == saved }) {
|
|
if let index = Self.supportedLanguages.firstIndex(where: { $0.code == saved }) {
|
|
|
langPopUp.selectItem(at: index)
|
|
langPopUp.selectItem(at: index)
|
|
|
}
|
|
}
|
|
|
|
|
+ langPopUp.isEnabled = !Self.supportedLanguages.isEmpty
|
|
|
}
|
|
}
|
|
|
cvMakerPageView.applyCurrentAppearance()
|
|
cvMakerPageView.applyCurrentAppearance()
|
|
|
profilesListPageView.applyCurrentAppearance()
|
|
profilesListPageView.applyCurrentAppearance()
|
|
@@ -1843,16 +1844,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
|
private static let languageUserDefaultsKey = "com.appforindeed.preferredLanguage"
|
|
private static let languageUserDefaultsKey = "com.appforindeed.preferredLanguage"
|
|
|
|
|
|
|
|
private static let supportedLanguages: [(code: String, title: String)] = [
|
|
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 {
|
|
private func makeLanguagePopUp() -> NSPopUpButton {
|
|
@@ -1872,6 +1864,7 @@ final class DashboardView: NSView, NSTextFieldDelegate, NSSharingServicePickerDe
|
|
|
|
|
|
|
|
popup.target = self
|
|
popup.target = self
|
|
|
popup.action = #selector(languageChanged(_:))
|
|
popup.action = #selector(languageChanged(_:))
|
|
|
|
|
+ popup.isEnabled = !Self.supportedLanguages.isEmpty
|
|
|
popup.setContentHuggingPriority(.required, for: .horizontal)
|
|
popup.setContentHuggingPriority(.required, for: .horizontal)
|
|
|
popup.setContentCompressionResistancePriority(.required, for: .horizontal)
|
|
popup.setContentCompressionResistancePriority(.required, for: .horizontal)
|
|
|
return popup
|
|
return popup
|