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

NetP: Fix server location formatting #2099

Merged
merged 1 commit into from
Oct 17, 2023
Merged
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
8 changes: 7 additions & 1 deletion PacketTunnelProvider/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ final class UserText {

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 func networkProtectionConnectionSuccessNotificationBody(serverLocation: String) -> String { NSLocalizedString("network.protection.success.notification.subtitle.including.serverLocation", value: "Routing device traffic through \(serverLocation).", comment: "The body of the notification shown when Network Protection connects successfully with the city + state/country as formatted parameter")
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"
)
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")
Expand Down
2 changes: 1 addition & 1 deletion PacketTunnelProvider/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"network.protection.success.notification.body" = "Network Protection is On. Your location and online activity are protected.";

/* The body of the notification shown when Network Protection connects successfully with the city + state/country as formatted parameter */
"network.protection.success.notification.subtitle.including.serverLocation" = "Routing device traffic through \(serverLocation).";
"network.protection.success.notification.subtitle.including.serverLocation" = "Routing device traffic through %@.";