Commit 37956906 authored by Jose Blaya's avatar Jose Blaya
Browse files

translations and text alignment

parent c115fe13
......@@ -18,6 +18,8 @@
"login.receipt.button" = "Login using purchase receipt";
"login.magic.link.title" = "Login using magic email link";
"login.magic.link.response" = "Please check your e-mail for a login link.";
"login.magic.link.send" = "Send Link";
"login.magic.link.invalid.email" = "Invalid email. Please try again.";
"purchase.title" = "Select a VPN plan";
"purchase.subtitle" = "30-day money back guarantee";
......
......@@ -286,8 +286,14 @@ internal enum L10n {
internal enum Link {
/// Please check your e-mail for a login link.
internal static let response = L10n.tr("Welcome", "login.magic.link.response")
/// Send Link
internal static let send = L10n.tr("Welcome", "login.magic.link.send")
/// Login using magic email link
internal static let title = L10n.tr("Welcome", "login.magic.link.title")
internal enum Invalid {
/// Invalid email. Please try again.
internal static let email = L10n.tr("Welcome", "login.magic.link.invalid.email")
}
}
}
internal enum Password {
......
......@@ -113,12 +113,12 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
if let magicLinkLoginViewController = storyboard.instantiateViewController(withIdentifier: "MagicLinkLoginViewController") as? MagicLinkLoginViewController {
let alert = Macros.alert(magicLinkLoginViewController)
alert.addCancelAction(L10n.Signup.Purchase.Uncredited.Alert.Button.cancel)
alert.addActionWithTitle("Send Link".uppercased(), handler: {
alert.addActionWithTitle(L10n.Welcome.Login.Magic.Link.send.uppercased(), handler: {
let email = magicLinkLoginViewController.email()
guard Validator.validate(email: email) else {
Macros.displayImageNote(withImage: Asset.iconWarning.image,
message: "Invalid email. Please try again.")
message: L10n.Welcome.Login.Magic.Link.Invalid.email)
return
}
......@@ -318,12 +318,21 @@ class LoginViewController: AutolayoutViewController, WelcomeChild {
buttonLogin.setTitle(L10n.Welcome.Login.submit.uppercased(),
for: [])
buttonLogin.accessibilityIdentifier = "uitests.login.submit"
couldNotGetPlanButton.setTitle(L10n.Welcome.Login.Restore.button,
for: [])
couldNotGetPlanButton.titleLabel?.numberOfLines = 0
couldNotGetPlanButton.titleLabel?.textAlignment = .center
loginWithReceipt.setTitle(L10n.Welcome.Login.Receipt.button,
for: [])
loginWithReceipt.titleLabel?.numberOfLines = 0
loginWithReceipt.titleLabel?.textAlignment = .center
loginWithLink.setTitle(L10n.Welcome.Login.Magic.Link.title,
for: [])
loginWithLink.titleLabel?.numberOfLines = 0
loginWithLink.titleLabel?.textAlignment = .center
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment