diff --git a/Authorization/Authorization/SwiftGen/Strings.swift b/Authorization/Authorization/SwiftGen/Strings.swift index c72255aa0..99fddd18f 100644 --- a/Authorization/Authorization/SwiftGen/Strings.swift +++ b/Authorization/Authorization/SwiftGen/Strings.swift @@ -91,14 +91,14 @@ public enum AuthLocalization { } /// Create account public static let createAccountBtn = AuthLocalization.tr("Localizable", "SIGN_UP.CREATE_ACCOUNT_BTN", fallback: "Create account") - /// Hide optional Fields - public static let hideFields = AuthLocalization.tr("Localizable", "SIGN_UP.HIDE_FIELDS", fallback: "Hide optional Fields") + /// Hide optional fields + public static let hideFields = AuthLocalization.tr("Localizable", "SIGN_UP.HIDE_FIELDS", fallback: "Hide optional fields") /// I agree that %@ may send me marketing messages. public static func marketingEmailTitle(_ p1: Any) -> String { return AuthLocalization.tr("Localizable", "SIGN_UP.MARKETING_EMAIL_TITLE", String(describing: p1), fallback: "I agree that %@ may send me marketing messages.") } - /// Show optional Fields - public static let showFields = AuthLocalization.tr("Localizable", "SIGN_UP.SHOW_FIELDS", fallback: "Show optional Fields") + /// Show optional fields + public static let showFields = AuthLocalization.tr("Localizable", "SIGN_UP.SHOW_FIELDS", fallback: "Show optional fields") /// Create an account to start learning today! public static let subtitle = AuthLocalization.tr("Localizable", "SIGN_UP.SUBTITLE", fallback: "Create an account to start learning today!") /// You've successfully signed in. diff --git a/Authorization/Authorization/en.lproj/Localizable.strings b/Authorization/Authorization/en.lproj/Localizable.strings index de9e0dd5f..380bf41e6 100644 --- a/Authorization/Authorization/en.lproj/Localizable.strings +++ b/Authorization/Authorization/en.lproj/Localizable.strings @@ -27,8 +27,8 @@ accordance with the [Privacy Policy.](%@)"; "SIGN_UP.SUBTITLE" = "Create an account to start learning today!"; "SIGN_UP.CREATE_ACCOUNT_BTN" = "Create account"; -"SIGN_UP.HIDE_FIELDS" = "Hide optional Fields"; -"SIGN_UP.SHOW_FIELDS" = "Show optional Fields"; +"SIGN_UP.HIDE_FIELDS" = "Hide optional fields"; +"SIGN_UP.SHOW_FIELDS" = "Show optional fields"; "SIGN_UP.SUCCESS_SIGNIN_LABEL" = "You've successfully signed in."; "SIGN_UP.SUCCESS_SIGNIN_SUBLABEL" = "We just need a little more information before you start learning."; "SIGN_UP.AGREEMENT" = "By creating an account, you agree to the [%@ End User License Agreement](%@) and [%@ Terms of Service and Honor Code](%@) and you acknowledge that %@ and each Member process your personal data inaccordance with the [Privacy Policy.](%@)"; diff --git a/Core/Core/View/Base/PickerView.swift b/Core/Core/View/Base/PickerView.swift index 9cac4f0e4..fd1ea2751 100644 --- a/Core/Core/View/Base/PickerView.swift +++ b/Core/Core/View/Base/PickerView.swift @@ -47,7 +47,10 @@ public struct PickerView: View { } } }, label: { - Text(config.selectedItem?.value ?? "") + Text(config.selectedItem?.value ?? config.field.label) + .foregroundColor(config.selectedItem == nil + ? Theme.Colors.textInputPlaceholderColor + : Theme.Colors.textInputTextColor) Spacer() Image(systemName: "chevron.down") }) diff --git a/Core/Core/View/Base/RegistrationTextField.swift b/Core/Core/View/Base/RegistrationTextField.swift index ffec300fd..e1ab476e3 100644 --- a/Core/Core/View/Base/RegistrationTextField.swift +++ b/Core/Core/View/Base/RegistrationTextField.swift @@ -10,7 +10,6 @@ import Theme public struct RegistrationTextField: View { - @State public var placeholder: String = "" public var keyboardType: UIKeyboardType public var textContentType: UITextContentType private var isTextArea: Bool @@ -65,7 +64,7 @@ public struct RegistrationTextField: View { .accessibilityIdentifier("\(config.field.name)_textarea") } else { if textContentType == .password { - SecureInputView($config.text) + SecureInputView($config.text, placeholder: config.field.label) .keyboardType(keyboardType) .textContentType(textContentType) .autocapitalization(.none) @@ -87,7 +86,7 @@ public struct RegistrationTextField: View { .shake($config.shake) .accessibilityIdentifier("\(config.field.name)_textfield") } else { - TextField(placeholder, text: $config.text) + TextField(config.field.label, text: $config.text) .font(Theme.Fonts.bodyLarge) .foregroundColor(Theme.Colors.textInputTextColor) .keyboardType(keyboardType) diff --git a/Core/Core/View/Base/SecureInputView.swift b/Core/Core/View/Base/SecureInputView.swift index 7d68fa23c..2dd8c3b8f 100644 --- a/Core/Core/View/Base/SecureInputView.swift +++ b/Core/Core/View/Base/SecureInputView.swift @@ -12,18 +12,20 @@ public struct SecureInputView: View { @Binding private var text: String @State private var isSecured: Bool = true + private let placeholder: String - public init(_ text: Binding) { + public init(_ text: Binding, placeholder: String = "") { self._text = text + self.placeholder = placeholder } public var body: some View { ZStack(alignment: .trailing) { Group { if isSecured { - SecureField("", text: $text) + SecureField(placeholder, text: $text) } else { - TextField("", text: $text) + TextField(placeholder, text: $text) .autocapitalization(.none) } }.padding(.trailing, 32)