Skip to content

Commit

Permalink
PIA-1873: Remove duplicated strings (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
kp-said-rehouni authored May 29, 2024
1 parent ad65e55 commit 6b12119
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion PIA VPN-tvOS/Signup/Presentation/SignupViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import PIALibrary

class SignupViewModel: ObservableObject {
let title: String = L10n.Localizable.Tvos.Signup.Subscription.Paywall.title
let title: String = L10n.Signup.Purchase.Trials.region
let optionButtons: [OnboardingComponentButton]
let subscribeButtonTitle = L10n.Localizable.Tvos.Signup.Subscription.Paywall.Button.subscribe
@Published var subtitle: String = L10n.Localizable.Tvos.Signup.Subscription.Paywall.subtitle("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SubscriptionOptionViewModelMapper {
let rawPrice = product.product.price.stringValue + currency
let price = rawPrice + " "
+ (isYearlyPlan ? L10n.Localizable.Tvos.Signup.Subscription.Paywall.Price.year
: L10n.Localizable.Tvos.Signup.Subscription.Paywall.Price.month)
: L10n.Welcome.Plan.Accessibility.perMonth)
let monthlyPrice = (monthlyPrice(price: product.product.price.doubleValue) ?? "") + currency + L10n.Localizable.Tvos.Signup.Subscription.Paywall.Price.Month.simplified

return SubscriptionOptionViewModel(productId: product.product.identifier,
Expand Down
2 changes: 1 addition & 1 deletion PIA VPN-tvOS/Signup/UI/SignupView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct SignupView: View {

Image.onboarding_pia_brand

Text(L10n.Localizable.Tvos.Signup.Subscription.title)
Text(L10n.Localizable.Tvos.Welcome.Button.signup)
.font(.system(size: 76))
.foregroundColor(.piaOnBackground)

Expand Down
4 changes: 2 additions & 2 deletions PIA VPN-tvOS/SignupCredentials/UI/SignupCredentialsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ struct SignupCredentialsView: View {
}

VStack(alignment: .leading, spacing: 40) {
SignupCredentialsFieldView(title: L10n.Localizable.Tvos.Signup.Credentials.Details.username,
SignupCredentialsFieldView(title: L10n.Signup.Success.Username.caption,
subtitle: credentials.username)

SignupCredentialsFieldView(title: L10n.Localizable.Tvos.Signup.Credentials.Details.password,
SignupCredentialsFieldView(title: L10n.Signup.Success.Password.caption,
subtitle: credentials.password)
}
.frame(height: 250)
Expand Down
12 changes: 0 additions & 12 deletions PIA VPN/SwiftGen+Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1648,14 +1648,10 @@ internal enum L10n {
internal enum Details {
/// Get Started
internal static let button = L10n.tr("Localizable", "tvos.signup.credentials.details.button", fallback: "Get Started")
/// Password
internal static let password = L10n.tr("Localizable", "tvos.signup.credentials.details.password", fallback: "Password")
/// You will also receive an email shortly with your username and password.
internal static let subtitle = L10n.tr("Localizable", "tvos.signup.credentials.details.subtitle", fallback: "You will also receive an email shortly with your username and password.")
/// Card redeemed sucessfully
internal static let title = L10n.tr("Localizable", "tvos.signup.credentials.details.title", fallback: "Card redeemed sucessfully")
/// Username
internal static let username = L10n.tr("Localizable", "tvos.signup.credentials.details.username", fallback: "Username")
}
}
internal enum Email {
Expand All @@ -1667,11 +1663,7 @@ internal enum L10n {
}
}
internal enum Subscription {
/// Sign Up
internal static let title = L10n.tr("Localizable", "tvos.signup.subscription.title", fallback: "Sign Up")
internal enum Error {
/// Error
internal static let title = L10n.tr("Localizable", "tvos.signup.subscription.error.title", fallback: "Error")
internal enum Message {
/// Something went wrong. Please try again.
internal static let generic = L10n.tr("Localizable", "tvos.signup.subscription.error.message.generic", fallback: "Something went wrong. Please try again.")
Expand All @@ -1684,15 +1676,11 @@ internal enum L10n {
internal static func subtitle(_ p1: Any) -> String {
return L10n.tr("Localizable", "tvos.signup.subscription.paywall.subtitle", String(describing: p1), fallback: "Start your 7 days free trial then %@ per year.")
}
/// Connect to any region easily
internal static let title = L10n.tr("Localizable", "tvos.signup.subscription.paywall.title", fallback: "Connect to any region easily")
internal enum Button {
/// Subscribe Now
internal static let subscribe = L10n.tr("Localizable", "tvos.signup.subscription.paywall.button.subscribe", fallback: "Subscribe Now")
}
internal enum Price {
/// per month
internal static let month = L10n.tr("Localizable", "tvos.signup.subscription.paywall.price.month", fallback: "per month")
/// BEST VALUE - FREE TRIAL
internal static let trial = L10n.tr("Localizable", "tvos.signup.subscription.paywall.price.trial", fallback: "BEST VALUE - FREE TRIAL")
/// per year
Expand Down
7 changes: 1 addition & 6 deletions PIA VPN/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -577,16 +577,12 @@
"tvos.signin.expired.trial.subtitle" = "If you enjoyed premium VPN protection, subscribe to PIA!";

//SignUp with subscription (tvOS)
"tvos.signup.subscription.title" = "Sign Up";
"tvos.signup.subscription.paywall.title" = "Connect to any region easily";
"tvos.signup.subscription.paywall.subtitle" = "Start your 7 days free trial then %@ per year.";
"tvos.signup.subscription.paywall.price.year" = "per year";
"tvos.signup.subscription.paywall.price.trial" = "BEST VALUE - FREE TRIAL";
"tvos.signup.subscription.paywall.price.month" = "per month";
"tvos.signup.subscription.paywall.price.month.simplified" = "/mo";
"tvos.signup.subscription.paywall.button.subscribe" = "Subscribe Now";

"tvos.signup.subscription.error.title" = "Error";
"tvos.signup.subscription.error.message.generic" = "Something went wrong. Please try again.";
"tvos.signup.subscription.error.message.paymentCancelled" = "Payment was cancelled. Please try again.";

Expand All @@ -595,8 +591,7 @@
"tvos.signup.credentials.title" = "Success!";
"tvos.signup.credentials.details.title" = "Card redeemed sucessfully";
"tvos.signup.credentials.details.subtitle" = "You will also receive an email shortly with your username and password.";
"tvos.signup.credentials.details.username" = "Username";
"tvos.signup.credentials.details.password" = "Password";

"tvos.signup.credentials.details.button" = "Get Started";

"tvos.signup.terms_conditions.title" = "Terms and Conditions";
Expand Down

0 comments on commit 6b12119

Please sign in to comment.