Skip to content

Commit

Permalink
Extract missing VPN strings
Browse files Browse the repository at this point in the history
  • Loading branch information
miasma13 committed Dec 2, 2024
1 parent 3cbdff4 commit 51437d6
Show file tree
Hide file tree
Showing 7 changed files with 216 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,31 @@ final class UserText {
static let networkProtectionSubscriptionExpiredSubtitle = NSLocalizedString("network.protection.subscription.expired.subtitle", bundle: Bundle.module, value: "Subscribe to Privacy Pro to reconnect DuckDuckGo VPN.", comment: "Subtitle for the prompt that tells the user their subscription expired.")
static let networkProtectionSubscriptionExpiredResubscribeButton = NSLocalizedString("network.protection.subscription.expired.resubscribe.button", bundle: Bundle.module, value: "Subscribe to Privacy Pro", comment: "Button for the prompt that takes the user to the page to resubscribe.")
static let networkProtectionSubscriptionExpiredUninstallButton = NSLocalizedString("network.protection.subscription.expired.uninstall.button", bundle: Bundle.module, value: "Uninstall DuckDuckGo VPN", comment: "Button for the prompt that uninstalls the VPN.")

// MARK: Tool tips

static let networkProtectionGeoswitchingTipTitle = NSLocalizedString("network.protection.geoswitching.tip.title", bundle: Bundle.module, value: "Change Your Location", comment: "Title for tooltip about geoswitching")
static let networkProtectionGeoswitchingTipMessage = NSLocalizedString("network.protection.geoswitching.tip.message", bundle: Bundle.module, value: "Connect to any of our servers worldwide to customize the VPN location.", comment: "Message for tooltip about geoswitching")

static let networkProtectionAutoconnectTipTitle = NSLocalizedString("network.protection.autoconnect.tip.title", bundle: Bundle.module, value: "Connect Automatically", comment: "Title for tooltip about auto-connect")
static let networkProtectionAutoconnectTipMessage = NSLocalizedString("network.protection.autoconnect.tip.message", bundle: Bundle.module, value: "The VPN can connect on its own when you log in to your computer.", comment: "Message for tooltip about auto-connect")
static let networkProtectionAutoconnectTipEnableAction = NSLocalizedString("network.protection.autoconnect.tip.enable", bundle: Bundle.module, value: "Enable", comment: "Action to enable auto-connect")

static let networkProtectionDomainExclusionsTipTitle = NSLocalizedString("network.protection.domain.exclusion.tip.title", bundle: Bundle.module, value: "Website not working?", comment: "Title for tooltip about domain exclusion")
static let networkProtectionDomainExclusionsTipMessage = NSLocalizedString("network.protection.domain.exclusion.tip.message", bundle: Bundle.module, value: "Exclude websites that block VPN traffic so you can use them without turning the VPN off.", comment: "Message for tooltip about domain exclusion")

// MARK: Report site issues

static let networkProtectionReportSiteIssuesViewTitle = NSLocalizedString("network.protection.report.site.issues.title", bundle: Bundle.module, value: "Report an issue with %@?", comment: "Title for report site issues view for website “%@”")
static let networkProtectionReportSiteIssuesViewDescription = NSLocalizedString("network.protection.report.site.issues.description", bundle: Bundle.module, value: "Please let us know if you excluded %@ from the VPN because you experienced issues.", comment: "Description for report site issues view for website “%@”")
static let networkProtectionReportSiteIssuesViewFooter = NSLocalizedString("network.protection.report.site.issues.footer", bundle: Bundle.module, value: "Reports only include the domain of the affected website.", comment: "Footer for report site issues view")

static let networkProtectionReportSiteIssuesViewButtonCancel = NSLocalizedString("network.protection.report.site.issues.button.cancel", bundle: Bundle.module, value: "Not Now", comment: "Report site issues view cancel button")
static let networkProtectionReportSiteIssuesViewButtonReport = NSLocalizedString("network.protection.report.site.issues.button.report", bundle: Bundle.module, value: "Report", comment: "Report site issues confirmation button to send report")
static let networkProtectionReportSiteIssuesViewButtonDontAsk = NSLocalizedString("network.protection.report.site.issues.button.dontask", bundle: Bundle.module, value: "Don't Ask Again", comment: "Report site issues view button not to ask again")

// MARK: Site troubleshooting

static let networkProtectionSiteTroubleShootingViewTitle = NSLocalizedString("network.protection.site.troubleshooting.title", bundle: Bundle.module, value: "Website Preferences", comment: "Title for VPN website preferences view")
static let networkProtectionSiteTroubleShootingViewExcludeWebsite = NSLocalizedString("network.protection.site.troubleshooting.exclude", bundle: Bundle.module, value: "Exclude %@ from VPN", comment: "Option to exclude a “%@” website from the VPN")
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,89 @@
"" : {

},
"Change Your Location" : {

"network.protection.autoconnect.tip.enable" : {
"comment" : "Action to enable auto-connect",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Enable"
}
}
}
},
"Connect Automatically" : {

"network.protection.autoconnect.tip.message" : {
"comment" : "Message for tooltip about auto-connect",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "The VPN can connect on its own when you log in to your computer."
}
}
}
},
"Connect to any of our servers worldwide to customize the VPN location." : {

"network.protection.autoconnect.tip.title" : {
"comment" : "Title for tooltip about auto-connect",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Connect Automatically"
}
}
}
},
"Enable" : {

"network.protection.domain.exclusion.tip.message" : {
"comment" : "Message for tooltip about domain exclusion",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Exclude websites that block VPN traffic so you can use them without turning the VPN off."
}
}
}
},
"Exclude %@ from VPN" : {

"network.protection.domain.exclusion.tip.title" : {
"comment" : "Title for tooltip about domain exclusion",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Website not working?"
}
}
}
},
"Exclude websites that block VPN traffic so you can use them without turning the VPN off." : {

"network.protection.geoswitching.tip.message" : {
"comment" : "Message for tooltip about geoswitching",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Connect to any of our servers worldwide to customize the VPN location."
}
}
}
},
"network.protection.geoswitching.tip.title" : {
"comment" : "Title for tooltip about geoswitching",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Change Your Location"
}
}
}
},
"network.protection.interrupted" : {
"comment" : "The warning message shown in NetP's status view when the connection is interrupted.",
Expand Down Expand Up @@ -250,6 +316,78 @@
}
}
},
"network.protection.report.site.issues.button.cancel" : {
"comment" : "Report site issues view cancel button",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Not Now"
}
}
}
},
"network.protection.report.site.issues.button.dontask" : {
"comment" : "Report site issues view button not to ask again",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Don't Ask Again"
}
}
}
},
"network.protection.report.site.issues.button.report" : {
"comment" : "Report site issues confirmation button to send report",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Report"
}
}
}
},
"network.protection.report.site.issues.description" : {
"comment" : "Description for report site issues view for website “%@”",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Please let us know if you excluded %@ from the VPN because you experienced issues."
}
}
}
},
"network.protection.report.site.issues.footer" : {
"comment" : "Footer for report site issues view",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Reports only include the domain of the affected website."
}
}
}
},
"network.protection.report.site.issues.title" : {
"comment" : "Title for report site issues view for website “%@”",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Report an issue with %@?"
}
}
}
},
"network.protection.server.address.unknown" : {
"comment" : "When we can't tell the user the IP of the NetP server is",
"extractionState" : "extracted_with_value",
Expand Down Expand Up @@ -286,6 +424,30 @@
}
}
},
"network.protection.site.troubleshooting.exclude" : {
"comment" : "Option to exclude a “%@” website from the VPN",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Exclude %@ from VPN"
}
}
}
},
"network.protection.site.troubleshooting.title" : {
"comment" : "Title for VPN website preferences view",
"extractionState" : "extracted_with_value",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Website Preferences"
}
}
}
},
"network.protection.status.connected" : {
"comment" : "The label for the NetP VPN when connected\nThe label for the NetP VPN when connecting",
"extractionState" : "extracted_with_value",
Expand Down Expand Up @@ -561,24 +723,6 @@
}
}
}
},
"Please let us know if you excluded %@ from the VPN because you experienced issues." : {

},
"Report an issue with %@?" : {

},
"Reports only include the domain of the affected website." : {

},
"The VPN can connect on its own when you log in to your computer." : {

},
"Website not working?" : {

},
"Website Preferences" : {

}
},
"version" : "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ import VPNPixels
struct ReportSiteIssuesView: ModalView {

let domain: String
private let title = "Report"
@Environment(\.dismiss) private var dismiss

private let cancelActionTitle = "Not Now"
private let defaultActionTitle = "Report"
private let dontAskAgainTitle = "Don't Ask Again"

let defaultAction: @MainActor (_ dismiss: () -> Void) -> Void
let cancelAction: @MainActor (_ dismiss: () -> Void) -> Void
let dontAskAgainAction: @MainActor (_ dismiss: () -> Void) -> Void
Expand All @@ -40,36 +35,36 @@ struct ReportSiteIssuesView: ModalView {
Dialog {
Image(.siteBreakage128)

Text("Report an issue with \(domain)?")
Text(String(format: UserText.networkProtectionReportSiteIssuesViewTitle, domain))
.font(Font.custom("SF Pro", size: 17)
.weight(.bold))
.multilineText()

Text("Please let us know if you excluded \(domain) from the VPN because you experienced issues.")
Text(String(format: UserText.networkProtectionReportSiteIssuesViewDescription, domain))
.font(Font.custom("SF Pro", size: 13))
.fixedSize(horizontal: false, vertical: true)
.lineLimit(2)
.multilineTextAlignment(.center)
.multilineText()

Text("Reports only include the domain of the affected website.")
Text(UserText.networkProtectionReportSiteIssuesViewFooter)
.font(Font.custom("SF Pro", size: 11))
.fixedSize(horizontal: false, vertical: true)
.lineLimit(2)
.multilineTextAlignment(.center)
.multilineText()
} buttons: {
Button(dontAskAgainTitle) {
Button(UserText.networkProtectionReportSiteIssuesViewButtonDontAsk) {
dontAskAgainAction(dismiss)
}

Spacer()

Button(cancelActionTitle) {
Button(UserText.networkProtectionReportSiteIssuesViewButtonCancel) {
cancelAction(dismiss)
}

Button(defaultActionTitle) {
Button(UserText.networkProtectionReportSiteIssuesViewButtonReport) {
defaultAction(dismiss)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public struct SiteTroubleshootingView: View {
.padding(EdgeInsets(top: 5, leading: 9, bottom: 5, trailing: 9))

VStack(alignment: .leading) {
Text("Website Preferences")
Text(UserText.networkProtectionSiteTroubleShootingViewTitle)
.applySectionHeaderAttributes(colorScheme: colorScheme)
.padding(.vertical, 3)
.padding(.horizontal, 9)
Expand All @@ -67,7 +67,7 @@ public struct SiteTroubleshootingView: View {
.frame(width: Self.iconSize, height: Self.iconSize)
}

Text("Exclude \(siteInfo.domain) from VPN")
Text(String(format: UserText.networkProtectionSiteTroubleShootingViewExcludeWebsite, siteInfo.domain))
.applyLabelAttributes(colorScheme: colorScheme)

Spacer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ extension VPNAutoconnectTip: Tip {
}

var title: Text {
Text("Connect Automatically")
Text(UserText.networkProtectionAutoconnectTipTitle)
}

var message: Text? {
Text("The VPN can connect on its own when you log in to your computer.")
Text(UserText.networkProtectionAutoconnectTipMessage)
}

var image: Image? {
Expand All @@ -59,7 +59,7 @@ extension VPNAutoconnectTip: Tip {

var actions: [Action] {
[Action(id: ActionIdentifiers.enable.rawValue) {
Text("Enable")
Text(UserText.networkProtectionAutoconnectTipEnableAction)
}]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ extension VPNDomainExclusionsTip: Tip {
}

var title: Text {
Text("Website not working?")
Text(UserText.networkProtectionDomainExclusionsTipTitle)
}

var message: Text? {
Text("Exclude websites that block VPN traffic so you can use them without turning the VPN off.")
Text(UserText.networkProtectionDomainExclusionsTipMessage)
}

var image: Image? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ extension VPNGeoswitchingTip: Tip {
}

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

var message: Text? {
Text("Connect to any of our servers worldwide to customize the VPN location.")
Text(UserText.networkProtectionGeoswitchingTipMessage)
}

var image: Image? {
Expand Down

0 comments on commit 51437d6

Please sign in to comment.