aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2021-07-28 11:51:23 +0530
committerRoopesh Chander <roop@roopc.net>2021-07-28 11:52:54 +0530
commit1bd6dcb7e7d090dc34d51cce52b9f226dc72e98f (patch)
treecd13b09b041f856c750fa0edb7198085f9ac0333
parentUI: When setting on-demand, enable the tunnel if required (diff)
downloadwireguard-apple-1bd6dcb7e7d090dc34d51cce52b9f226dc72e98f.tar.xz
wireguard-apple-1bd6dcb7e7d090dc34d51cce52b9f226dc72e98f.zip
UI: Remove addendum on on-demand from error on tunnel activation
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r--Sources/WireGuardApp/Base.lproj/Localizable.strings2
-rw-r--r--Sources/WireGuardApp/Tunnel/TunnelErrors.swift8
2 files changed, 4 insertions, 6 deletions
diff --git a/Sources/WireGuardApp/Base.lproj/Localizable.strings b/Sources/WireGuardApp/Base.lproj/Localizable.strings
index 8127fe5..2974ba7 100644
--- a/Sources/WireGuardApp/Base.lproj/Localizable.strings
+++ b/Sources/WireGuardApp/Base.lproj/Localizable.strings
@@ -260,8 +260,6 @@
"alertTunnelActivationFileDescriptorFailureMessage" = "Unable to determine TUN device file descriptor.";
"alertTunnelActivationSetNetworkSettingsMessage" = "Unable to apply network settings to tunnel object.";
-"alertTunnelActivationFailureOnDemandAddendum" = " This tunnel has Activate On Demand enabled, so this tunnel might be re-activated automatically by the OS. You may turn off Activate On Demand in this app by editing the tunnel configuration.";
-
"alertTunnelDNSFailureTitle" = "DNS resolution failure";
"alertTunnelDNSFailureMessage" = "One or more endpoint domains could not be resolved.";
diff --git a/Sources/WireGuardApp/Tunnel/TunnelErrors.swift b/Sources/WireGuardApp/Tunnel/TunnelErrors.swift
index 99c90d0..7031646 100644
--- a/Sources/WireGuardApp/Tunnel/TunnelErrors.swift
+++ b/Sources/WireGuardApp/Tunnel/TunnelErrors.swift
@@ -56,10 +56,10 @@ enum TunnelsManagerActivationError: WireGuardAppError {
var alertText: AlertText {
switch self {
- case .activationFailed(let wasOnDemandEnabled):
- return (tr("alertTunnelActivationFailureTitle"), tr("alertTunnelActivationFailureMessage") + (wasOnDemandEnabled ? tr("alertTunnelActivationFailureOnDemandAddendum") : ""))
- case .activationFailedWithExtensionError(let title, let message, let wasOnDemandEnabled):
- return (title, message + (wasOnDemandEnabled ? tr("alertTunnelActivationFailureOnDemandAddendum") : ""))
+ case .activationFailed:
+ return (tr("alertTunnelActivationFailureTitle"), tr("alertTunnelActivationFailureMessage"))
+ case .activationFailedWithExtensionError(let title, let message, _):
+ return (title, message)
}
}
}