Commit 6f85b67f authored by Jose Blaya's avatar Jose Blaya
Browse files

Refactor

parent 2e585267
...@@ -37,3 +37,14 @@ ...@@ -37,3 +37,14 @@
"purchase.uncredited.alert.button.cancel" = "Cancel"; "purchase.uncredited.alert.button.cancel" = "Cancel";
"purchase.uncredited.alert.button.recover" = "Recover account"; "purchase.uncredited.alert.button.recover" = "Recover account";
"purchase.trials.intro" = "Try free for 7 days!";
"purchase.trials.price.after" = "Only %@ after";
"purchase.trials.money.back" = "7 day money back guarantee";
"purchase.trials.1year.protection" = "1 year of privacy and identity protection";
"purchase.trials.anonymous" = "Browse anonymously and hide your ip.";
"purchase.trials.devices" = "Support 10 devices at once";
"purchase.trials.devices.description" = "Protect yourself on up to 10 devices at a time.";
"purchase.trials.region" = "Connect to any region easily";
"purchase.trials.servers" = "More than 3300 servers in 32 countries";
"purchase.trials.start" = "Start subscription";
"purchase.trials.all.plans" = "See all available plans";
...@@ -53,6 +53,42 @@ internal enum L10n { ...@@ -53,6 +53,42 @@ internal enum L10n {
} }
} }
internal enum Purchase { internal enum Purchase {
internal enum Trials {
/// Browse anonymously and hide your ip.
internal static let anonymous = L10n.tr("Signup", "purchase.trials.anonymous")
/// Support 10 devices at once
internal static let devices = L10n.tr("Signup", "purchase.trials.devices")
/// Try free for 7 days!
internal static let intro = L10n.tr("Signup", "purchase.trials.intro")
/// Connect to any region easily
internal static let region = L10n.tr("Signup", "purchase.trials.region")
/// More than 3300 servers in 32 countries
internal static let servers = L10n.tr("Signup", "purchase.trials.servers")
/// Start subscription
internal static let start = L10n.tr("Signup", "purchase.trials.start")
internal enum _1year {
/// 1 year of privacy and identity protection
internal static let protection = L10n.tr("Signup", "purchase.trials.1year.protection")
}
internal enum All {
/// See all available plans
internal static let plans = L10n.tr("Signup", "purchase.trials.all.plans")
}
internal enum Devices {
/// Protect yourself on up to 10 devices at a time.
internal static let description = L10n.tr("Signup", "purchase.trials.devices.description")
}
internal enum Money {
/// 7 day money back guarantee
internal static let back = L10n.tr("Signup", "purchase.trials.money.back")
}
internal enum Price {
/// Only %@ after
internal static func after(_ p1: String) -> String {
return L10n.tr("Signup", "purchase.trials.price.after", p1)
}
}
}
internal enum Uncredited { internal enum Uncredited {
internal enum Alert { internal enum Alert {
/// You have uncredited transactions. Do you want to recover your account details? /// You have uncredited transactions. Do you want to recover your account details?
......
...@@ -61,20 +61,20 @@ class PurchaseTrialViewController: AutolayoutViewController, BrandableNavigation ...@@ -61,20 +61,20 @@ class PurchaseTrialViewController: AutolayoutViewController, BrandableNavigation
) )
self.navigationItem.leftBarButtonItem?.accessibilityLabel = L10n.Welcome.Redeem.Accessibility.back self.navigationItem.leftBarButtonItem?.accessibilityLabel = L10n.Welcome.Redeem.Accessibility.back
headerTitleLabel.text = "Try free for 7 days!" headerTitleLabel.text = L10n.Signup.Purchase.Trials.intro
subtitleLabel.text = "Only $ per year after" subtitleLabel.text = L10n.Signup.Purchase.Trials.Price.after("")
smallTitleLabel.text = "7 day money back guarantee" smallTitleLabel.text = L10n.Signup.Purchase.Trials.Money.back
protectionTitleLabel.text = "1 year of privacy and identity protection" protectionTitleLabel.text = L10n.Signup.Purchase.Trials._1year.protection
protectionSubtitleLabel.text = "Browse anonymously and hide your ip." protectionSubtitleLabel.text = L10n.Signup.Purchase.Trials.anonymous
protectionImageView.image = Asset.shieldIcon.image.withRenderingMode(.alwaysTemplate) protectionImageView.image = Asset.shieldIcon.image.withRenderingMode(.alwaysTemplate)
devicesTitleLabel.text = "Support 10 devices at once" devicesTitleLabel.text = L10n.Signup.Purchase.Trials.devices
devicesSubtitleLabel.text = "Protect yourself on up to 10 devices at a time." devicesSubtitleLabel.text = L10n.Signup.Purchase.Trials.Devices.description
devicesImageView.image = Asset.computerIcon.image.withRenderingMode(.alwaysTemplate) devicesImageView.image = Asset.computerIcon.image.withRenderingMode(.alwaysTemplate)
serversTitleLabel.text = "Connect to any region easily" serversTitleLabel.text = L10n.Signup.Purchase.Trials.region
serversSubtitleLabel.text = "More than 3300 servers in 32 countries" serversSubtitleLabel.text = L10n.Signup.Purchase.Trials.servers
serversImageView.image = Asset.globeIcon.image.withRenderingMode(.alwaysTemplate) serversImageView.image = Asset.globeIcon.image.withRenderingMode(.alwaysTemplate)
textAgreement.attributedText = Theme.current.agreementText( textAgreement.attributedText = Theme.current.agreementText(
...@@ -142,7 +142,7 @@ class PurchaseTrialViewController: AutolayoutViewController, BrandableNavigation ...@@ -142,7 +142,7 @@ class PurchaseTrialViewController: AutolayoutViewController, BrandableNavigation
purchase.detail = L10n.Welcome.Plan.Yearly.detailFormat(currencySymbol, purchase.product.price.description) purchase.detail = L10n.Welcome.Plan.Yearly.detailFormat(currencySymbol, purchase.product.price.description)
purchase.bestValue = true purchase.bestValue = true
let price = L10n.Welcome.Plan.Yearly.detailFormat(currencySymbol, purchase.product.price.description) let price = L10n.Welcome.Plan.Yearly.detailFormat(currencySymbol, purchase.product.price.description)
subtitleLabel.text = "Only \(price) after" subtitleLabel.text = L10n.Signup.Purchase.Trials.Price.after(price)
Theme.current.makeSmallLabelToStandOut(subtitleLabel, Theme.current.makeSmallLabelToStandOut(subtitleLabel,
withTextToStandOut: price) withTextToStandOut: price)
allPlans[0] = purchase allPlans[0] = purchase
...@@ -213,9 +213,9 @@ class PurchaseTrialViewController: AutolayoutViewController, BrandableNavigation ...@@ -213,9 +213,9 @@ class PurchaseTrialViewController: AutolayoutViewController, BrandableNavigation
buttonPurchase.style(style: TextStyle.Buttons.piaGreenButton) buttonPurchase.style(style: TextStyle.Buttons.piaGreenButton)
buttonMorePlans.style(style: TextStyle.Buttons.piaPlainTextButton) buttonMorePlans.style(style: TextStyle.Buttons.piaPlainTextButton)
buttonTrialTerms.style(style: TextStyle.Buttons.piaSmallPlainTextButton) buttonTrialTerms.style(style: TextStyle.Buttons.piaSmallPlainTextButton)
buttonPurchase.setTitle("Start subscription".uppercased(), buttonPurchase.setTitle(L10n.Signup.Purchase.Trials.start.uppercased(),
for: []) for: [])
buttonMorePlans.setTitle("See all available plans", buttonMorePlans.setTitle(L10n.Signup.Purchase.Trials.All.plans,
for: []) for: [])
buttonTrialTerms.setTitle(L10n.Welcome.Agreement.Trials.title, buttonTrialTerms.setTitle(L10n.Welcome.Agreement.Trials.title,
for: []) for: [])
......
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