diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index 86555068f..f97c2fa9f 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressAuthenticator" - s.version = "1.18.0-beta.2" + s.version = "1.18.0-beta.3" s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps." s.description = <<-DESC diff --git a/WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift b/WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift index 0fa5e7b4e..f2faf0a77 100644 --- a/WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift +++ b/WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift @@ -12,19 +12,34 @@ public struct WordPressAuthenticatorDisplayStrings { public let siteLoginInstructions: String + /// Strings: primary call-to-action button titles. + /// + public let continueButtonTitle: String + /// Designated initializer. /// - public init(emailLoginInstructions: String, jetpackLoginInstructions: String, siteLoginInstructions: String) { + public init(emailLoginInstructions: String, + jetpackLoginInstructions: String, + siteLoginInstructions: String, + continueButtonTitle: String) { self.emailLoginInstructions = emailLoginInstructions self.jetpackLoginInstructions = jetpackLoginInstructions self.siteLoginInstructions = siteLoginInstructions + self.continueButtonTitle = continueButtonTitle } } public extension WordPressAuthenticatorDisplayStrings { static var defaultStrings: WordPressAuthenticatorDisplayStrings { - return WordPressAuthenticatorDisplayStrings(emailLoginInstructions: NSLocalizedString("Log in to your WordPress.com account with your email address.", comment: "Instruction text on the login's email address screen."), - jetpackLoginInstructions: NSLocalizedString("Log in to the WordPress.com account you used to connect Jetpack.", comment: "Instruction text on the login's email address screen."), - siteLoginInstructions: NSLocalizedString("Enter the address of the WordPress site you'd like to connect.", comment: "Instruction text on the login's site addresss screen.")) + return WordPressAuthenticatorDisplayStrings( + emailLoginInstructions: NSLocalizedString("Log in to your WordPress.com account with your email address.", + comment: "Instruction text on the login's email address screen."), + jetpackLoginInstructions: NSLocalizedString("Log in to the WordPress.com account you used to connect Jetpack.", + comment: "Instruction text on the login's email address screen."), + siteLoginInstructions: NSLocalizedString("Enter the address of the WordPress site you'd like to connect.", + comment: "Instruction text on the login's site addresss screen."), + continueButtonTitle: NSLocalizedString("Continue", + comment: "The button title text when there is a next step for logging in or signing up.") + ) } } diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard index 83cb64dab..da94d0b36 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddress.storyboard @@ -16,17 +16,39 @@ - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift index d37d43cce..f106a6d16 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift +++ b/WordPressAuthenticator/Unified Auth/View Related/SiteAddressViewController.swift @@ -3,9 +3,41 @@ import UIKit /// SiteAddressViewController: log in by Site Address. /// -class SiteAddressViewController: UIViewController { +final class SiteAddressViewController: LoginViewController { + + @IBOutlet private weak var tableView: UITableView! + + var displayStrings: WordPressAuthenticatorDisplayStrings { + return WordPressAuthenticator.shared.displayStrings + } override func viewDidLoad() { super.viewDidLoad() + + localizePrimaryButton() + } + + func localizePrimaryButton() { + let primaryTitle = displayStrings.continueButtonTitle + submitButton?.setTitle(primaryTitle, for: .normal) + submitButton?.setTitle(primaryTitle, for: .highlighted) + } +} + + +// MARK: - UITableViewDataSource +extension SiteAddressViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return UITableViewCell() } } + + +// MARK: - UITableViewDelegate conformance +extension SiteAddressViewController: UITableViewDelegate { + +}