Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Privacy Pro translations #3681

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DuckDuckGo/SettingsSubscriptionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct SettingsSubscriptionView: View {
let subtitleText = {
switch subscriptionManager.storePurchaseManager().currentStorefrontRegion {
case .usa:
UserText.settingsPProDescription
UserText.settingsPProUSDescription
case .restOfWorld:
UserText.settingsPProROWDescription
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ extension HeadlessWebViewCoordinator: WKNavigationDelegate {
return
}

let alertController = UIAlertController(title: UserText.subscriptionAlertTitle, message: message, preferredStyle: .alert)
let alertController = UIAlertController(title: "", message: message, preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: UserText.actionOK, style: .default, handler: { _ in completionHandler() }))
presenter.present(alertController, animated: true, completion: nil)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ final class SubscriptionSettingsViewModel: ObservableObject {

private var dateFormatter: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "MMMM dd, yyyy"
formatter.dateStyle = .long
formatter.timeStyle = .none
return formatter
}()

Expand Down Expand Up @@ -211,7 +212,6 @@ final class SubscriptionSettingsViewModel: ObservableObject {

@MainActor
private func updateSubscriptionsStatusMessage(status: Subscription.Status, date: Date, product: String, billingPeriod: Subscription.BillingPeriod) {
let billingPeriod = billingPeriod == .monthly ? UserText.subscriptionMonthlyBillingPeriod : UserText.subscriptionAnnualBillingPeriod
let date = dateFormatter.string(from: date)

switch status {
Expand Down
84 changes: 61 additions & 23 deletions DuckDuckGo/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


import Core
import Subscription

public struct UserText {

Expand Down Expand Up @@ -634,6 +635,19 @@ public struct UserText {
static let vpnAccessRevokedAlertActionSubscribe = NSLocalizedString("vpn.access-revoked.alert.action.subscribe", value: "Subscribe", comment: "Primary action for the alert when the subscription expires")
static let vpnAccessRevokedAlertActionCancel = NSLocalizedString("vpn.access-revoked.alert.action.cancel", value: "Dismiss", comment: "Cancel action for the alert when the subscription expires")

// MARK: Tool tips

static let networkProtectionAddWidgetTipTitle = NSLocalizedString("network.protection.addwidget.tip.title", value: "Add VPN Widget", comment: "Title for tooltip about adding VPN widget")
static let networkProtectionAddWidgetTipMessage = NSLocalizedString("network.protection.addwidget.tip.message", value: "Turn the VPN on and off right from the Home Screen.", comment: "Message for tooltip about adding VPN widget")
static let networkProtectionAddWidgetTipAction = NSLocalizedString("network.protection.addwidget.tip.action", value: "Add widget", comment: "Button title for tooltip about adding VPN widget")

static let networkProtectionGeoswitchingTipTitle = NSLocalizedString("network.protection.geoswitching.tip.title", value: "Change Your Location", comment: "Title for tooltip about geoswitching")
static let networkProtectionGeoswitchingTipMessage = NSLocalizedString("network.protection.geoswitching.tip.message", value: "You can customize your VPN location by connecting to any of our servers worldwide.", comment: "Message for tooltip about geoswitching")

static let networkProtectionSnoozeTipTitle = NSLocalizedString("network.protection.snooze.tip.title", value: "Avoid VPN Conflicts", comment: "Title for tooltip about VPN snooze mode")
static let networkProtectionSnoozeTipMessage = NSLocalizedString("network.protection.snooze.tip.message", value: "You can use sites or apps that block VPN traffic by snoozing the VPN connection.", comment: "Message for tooltip about VPN snooze mode")
static let networkProtectionSnoozeTipAction = NSLocalizedString("network.protection.snooze.tip.action", value: "Learn more", comment: "Button title for tooltip about VPN snooze mode")

// MARK: Unified Feedback Form
static let browserFeedbackReportProblem = NSLocalizedString("send.browser.feedback.report-problem", value: "Report a problem", comment: "Name of the option the user can chose to give browser feedback about a problem they enountered")
static let browserFeedbackRequestFeature = NSLocalizedString("send.browser.feedback.request-feature", value: "Request a feature", comment: "Name of the option the user can chose to give browser feedback about a feature they would like")
Expand Down Expand Up @@ -978,26 +992,26 @@ But if you *do* want a peek under the hood, you can find more information about

// MARK: VPN

static let networkProtectionNotificationsTitle = NSLocalizedString("network.protection.notification.title", value: "DuckDuckGo", comment: "The title of the notifications shown from Network Protection")
static let networkProtectionConnectionSuccessNotificationBody = NSLocalizedString("network.protection.success.notification.body", value: "Network Protection is On. Your location and online activity are protected.", comment: "The body of the notification shown when Network Protection reconnects successfully")
static let networkProtectionNotificationsTitle = NSLocalizedString("network.protection.notification.title", value: "DuckDuckGo", comment: "The title of the notifications shown from VPN")
static let networkProtectionConnectionSuccessNotificationBody = NSLocalizedString("network.protection.success.notification.body", value: "DuckDuckGo VPN is On. Your location and online activity are protected.", comment: "The body of the notification shown when VPN reconnects successfully")
static func networkProtectionConnectionSuccessNotificationBody(serverLocation: String) -> String {
let localized = NSLocalizedString(
"network.protection.success.notification.subtitle.including.serverLocation",
value: "Routing device traffic through %@.",
comment: "The body of the notification shown when Network Protection connects successfully with the city + state/country as formatted parameter"
comment: "The body of the notification shown when VPN connects successfully with the city + state/country as formatted parameter"
)
return String(format: localized, serverLocation)
}
static func networkProtectionSnoozeEndedConnectionSuccessNotificationBody(serverLocation: String) -> String {
let localized = NSLocalizedString(
"network.protection.success.notification.subtitle.snooze.ended.including.serverLocation",
value: "VPN snooze has ended. Routing device traffic through %@.",
comment: "The body of the notification shown when Network Protection connects successfully with the city + state/country as formatted parameter"
comment: "The body of the notification shown when VPN connects successfully with the city + state/country as formatted parameter"
)
return String(format: localized, serverLocation)
}
static let networkProtectionConnectionInterruptedNotificationBody = NSLocalizedString("network.protection.interrupted.notification.body", value: "Network Protection was interrupted. Attempting to reconnect now...", comment: "The body of the notification shown when Network Protection's connection is interrupted")
static let networkProtectionConnectionFailureNotificationBody = NSLocalizedString("network.protection.failure.notification.body", value: "Network Protection failed to connect. Please try again later.", comment: "The body of the notification shown when Network Protection fails to reconnect")
static let networkProtectionConnectionInterruptedNotificationBody = NSLocalizedString("network.protection.interrupted.notification.body", value: "DuckDuckGo VPN was interrupted. Attempting to reconnect now...", comment: "The body of the notification shown when VPN connection is interrupted")
static let networkProtectionConnectionFailureNotificationBody = NSLocalizedString("network.protection.failure.notification.body", value: "DuckDuckGo VPN failed to connect. Please try again later.", comment: "The body of the notification shown when VPN fails to reconnect")
static let networkProtectionEntitlementExpiredNotificationBody = NSLocalizedString("network.protection.entitlement.expired.notification.body", value: "VPN disconnected due to expired subscription. Subscribe to Privacy Pro to reconnect DuckDuckGo VPN.", comment: "The body of the notification when Privacy Pro subscription expired")

static func networkProtectionSnoozedNotificationBody(duration: String) -> String {
Expand Down Expand Up @@ -1086,7 +1100,7 @@ But if you *do* want a peek under the hood, you can find more information about
public static let settingsPProSection = NSLocalizedString("settings.ppro", value: "Privacy Pro", comment: "Product name for the subscription bundle")
public static let settingsPProSectionFooter = NSLocalizedString("settings.ppro.footer", value: "Privacy Policy and Terms of Service", comment: "Title for Link in the Footer of Privacy Pro section")
public static let settingsPProSubscribe = NSLocalizedString("settings.subscription.subscribe", value: "Protect your connection and identity with Privacy Pro", comment: "Call to action title for Privacy Pro settings")
public static let settingsPProDescription = NSLocalizedString("settings.subscription.description", value:"Includes our VPN, Personal Information Removal, and Identity Theft Restoration.", comment: "Privacy pro description subtitle in settings")
public static let settingsPProUSDescription = NSLocalizedString("settings.subscription.us.description", value:"Includes our VPN, Personal Information Removal, and Identity Theft Restoration.", comment: "Privacy pro description subtitle in settings")
public static let settingsPProROWDescription = NSLocalizedString("settings.subscription.row.description", value:"Includes our VPN and Identity Theft Restoration.", comment: "Privacy Pro description subtitle in settings")
public static let settingsPProActivating = NSLocalizedString("settings.subscription.activating", value:"Activating", comment: "Privacy pro description subtitle in settings when the is activating")

Expand Down Expand Up @@ -1152,19 +1166,47 @@ But if you *do* want a peek under the hood, you can find more information about
public static let subscriptionTitle = NSLocalizedString("subscription.title", value: "Privacy Pro", comment: "Navigation bar Title for subscriptions")
public static let subscriptionSubscribed = NSLocalizedString("subscription.subscribed", value: "Subscribed", comment: "Subtitle in header when subscribed")
public static let subscriptionCloseButton = NSLocalizedString("subscription.close", value: "Close", comment: "Navigation Button for closing subscription view")

static func renewingSubscriptionInfo(billingPeriod: String, renewalDate: String) -> String {
let localized = NSLocalizedString("subscription.subscription.renewing.caption",
value: "Your %@ subscription renews on %@.",
comment: "Subscription renewal info. This reads as 'Your (monthly or annual) subscription renews on (date)'")
return String(format: localized, billingPeriod, renewalDate)

static func renewingSubscriptionInfo(billingPeriod: Subscription.BillingPeriod, renewalDate: String) -> String {
let localized: String

switch billingPeriod {
case .monthly:
localized = NSLocalizedString("subscription.subscription.renewing.monthly.caption",
value: "Your monthly subscription renews on %@.",
comment: "Monthly subscription renewal info where parameter is renewal date. This reads as 'Your monthly subscription renews on (date)'")
case .yearly:
localized = NSLocalizedString("subscription.subscription.renewing.yearly.caption",
value: "Your annual subscription renews on %@.",
comment: "Annual subscription renewal info where parameter is renewal date. This reads as 'Your annual subscription renews on (date)'")
case .unknown:
localized = NSLocalizedString("subscription.subscription.renewing.unknown.caption",
value: "Your subscription renews on %@.",
comment: "Unknown period subscription renewal info where parameter is renewal date. This reads as 'Your subscription renews on (date)'")
}

return String(format: localized, renewalDate)
}

static func expiringSubscriptionInfo(billingPeriod: String, expiryDate: String) -> String {
let localized = NSLocalizedString("subscription.subscription.expiring.caption",
value: "Your %@ subscription expires on %@.",
comment: "Subscription expiration info. This reads as 'Your (monthly or annual) subscription expires on (date)'")
return String(format: localized, billingPeriod, expiryDate)
static func expiringSubscriptionInfo(billingPeriod: Subscription.BillingPeriod, expiryDate: String) -> String {
let localized: String

switch billingPeriod {
case .monthly:
localized = NSLocalizedString("subscription.subscription.expiring.monthly.caption",
value: "Your monthly subscription expires on %@.",
comment: "Monthly subscription expiration info where parameter is expiration date. This reads as 'Your monthly subscription expires on (date)'")
case .yearly:
localized = NSLocalizedString("subscription.subscription.expiring.yearly.caption",
value: "Your annual subscription expires on %@.",
comment: "Annual subscription expiration info where parameter is expiration date. This reads as 'Your annual subscription expires on (date)'")
case .unknown:
localized = NSLocalizedString("subscription.subscription.expiring.unknown.caption",
value: "Your subscription expires on %@.",
comment: "Unknown period subscription expiration info where parameter is expiration date. This reads as 'Your subscription expires on (date)'")
}

return String(format: localized, expiryDate)
}

static func expiredSubscriptionInfo(expiration: String) -> String {
Expand All @@ -1173,9 +1215,6 @@ But if you *do* want a peek under the hood, you can find more information about
comment: "Subscription Expired Data. This reads as 'Your subscription expired on (date)'")
return String(format: localized, expiration)
}

public static let subscriptionMonthlyBillingPeriod = NSLocalizedString("subscription.billing.period.monthly", value: "monthly", comment: "Subscription monthly billing period type")
public static let subscriptionAnnualBillingPeriod = NSLocalizedString("subscription.billing.period.annual", value: "annual", comment: "Subscription annual billing period type")

public static let subscriptionDevicesSectionHeader = NSLocalizedString("subscription.devices.header", value: "Activate on Other Devices", comment: "Header for section for activating subscription on other devices")
public static let subscriptionDevicesSectionNoEmailFooter = NSLocalizedString("subscription.devices.no.email.footer", value: "Add an optional email to your subscription to access Privacy Pro on other devices. **[Learn more](https://duckduckgo.com/duckduckgo-help-pages/privacy-pro/adding-email/)**", comment: "Footer for section for activating subscription on other devices when email was not yet added")
Expand Down Expand Up @@ -1216,8 +1255,7 @@ But if you *do* want a peek under the hood, you can find more information about
public static let subscriptionManageEmailResendInstructions = NSLocalizedString("subscription.add.device.resend.instructions", value: "Resend Instructions", comment: "Resend activation instructions button")

public static let subscriptionConfirmTitle = NSLocalizedString("subscription.confirm.title", value: "Are you sure?", comment: "Title for Confirm messages")
public static let subscriptionAlertTitle = NSLocalizedString("subscription.alert.title", value: "", comment: "Title for Alert messages")


// Add Email To subscription
public static let subscriptionAddEmail = NSLocalizedString("subscription.add.email", value: "Add an email address to activate your subscription on your other devices. We’ll only use this address to verify your subscription.", comment: "Add email to an existing subscription")
public static let subscriptionRestoreAddEmailTitle = NSLocalizedString("subscription.add.email.title", value: "Add Email", comment: "View title for adding email to subscription")
Expand Down
6 changes: 3 additions & 3 deletions DuckDuckGo/VPNAddWidgetTip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ extension VPNAddWidgetTip: Tip {
}

var title: Text {
Text("Add VPN Widget")
Text(UserText.networkProtectionAddWidgetTipTitle)
}

var message: Text? {
Text("Turn the VPN on and off right from the Home Screen.")
Text(UserText.networkProtectionAddWidgetTipMessage)
}

var image: Image? {
Expand All @@ -64,7 +64,7 @@ extension VPNAddWidgetTip: Tip {

var actions: [Action] {
[Action(id: ActionIdentifiers.addWidget.rawValue) {
Text("Add widget")
Text(UserText.networkProtectionAddWidgetTipAction)
.foregroundStyle(Color(designSystemColor: .accent))
}]
}
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo/VPNGeoswitchingTip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ extension VPNGeoswitchingTip: Tip {
}

var title: Text {
Text("Change Your Location")
Text(UserText.networkProtectionGeoswitchingTipTitle)
}

var message: Text? {
Text("You can customize your VPN location by connecting to any of our servers worldwide.")
Text(UserText.networkProtectionGeoswitchingTipMessage)
}

var image: Image? {
Expand Down
6 changes: 3 additions & 3 deletions DuckDuckGo/VPNSnoozeTip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ extension VPNSnoozeTip: Tip {
}

var title: Text {
Text("Avoid VPN Conflicts")
Text(UserText.networkProtectionSnoozeTipTitle)
}

var message: Text? {
Text("You can use sites or apps that block VPN traffic by snoozing the VPN connection.")
Text(UserText.networkProtectionSnoozeTipMessage)
}

var image: Image? {
Expand All @@ -62,7 +62,7 @@ extension VPNSnoozeTip: Tip {

var actions: [Action] {
[Action(id: ActionIdentifiers.learnMore.rawValue) {
Text("Learn more")
Text(UserText.networkProtectionSnoozeTipAction)
.foregroundStyle(Color(designSystemColor: .accent))
}]
}
Expand Down
6 changes: 0 additions & 6 deletions DuckDuckGo/bg.lproj/DaxOnboarding.strings
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
/* Class = "UIButton"; normalTitle = "Hide"; ObjectID = "hgy-75-OvJ"; */
"hgy-75-OvJ.normalTitle" = "Скрий";

/* Class = "UILabel"; text = "Welcome to\nDuckDuckGo!"; ObjectID = "Lvy-9G-3gr"; */
"Lvy-9G-3gr.text" = "Добре дошли в\nDuckDuckGo!";

/* Class = "UIButton"; normalTitle = "Let’s Do It!"; ObjectID = "oAv-Zt-uIt"; */
"oAv-Zt-uIt.normalTitle" = "Да го направим!";

/* Class = "UIButton"; normalTitle = "Button"; ObjectID = "zJt-F9-L48"; */
"zJt-F9-L48.normalTitle" = "Бутон";

Loading
Loading