aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-11-03 02:55:19 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-11-03 03:43:09 +0100
commit9439e00047764b82c6693259d7c9700e084505c5 (patch)
tree6ffcaa2922e0ee8aae99c0d138ca53ee1c6daef9
parentImport: rework addMultiple logic (diff)
downloadwireguard-apple-9439e00047764b82c6693259d7c9700e084505c5.tar.xz
wireguard-apple-9439e00047764b82c6693259d7c9700e084505c5.zip
Global: no periods at the end of error messages
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift4
-rw-r--r--WireGuard/WireGuard/UI/iOS/QRScanViewController.swift6
-rw-r--r--WireGuard/WireGuard/VPN/TunnelsManager.swift10
-rw-r--r--WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift4
4 files changed, 12 insertions, 12 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
index 676e918..cb63867 100644
--- a/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
+++ b/WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
@@ -10,7 +10,7 @@ class ErrorPresenter {
// TunnelManagementError
case TunnelManagementError.tunnelAlreadyExistsWithThatName:
- return ("Name already exists", "A tunnel with that name already exists. Please choose a different name.")
+ return ("Name already exists", "A tunnel with that name already exists")
case TunnelManagementError.vpnSystemErrorOnAddTunnel:
return ("Unable to create tunnel", "Internal error")
case TunnelManagementError.vpnSystemErrorOnModifyTunnel:
@@ -41,7 +41,7 @@ class ErrorPresenter {
fatalError()
}
}()
- return ("Activation failure", "Another tunnel is currently \(statusString). Only one tunnel may be in operation at a time.")
+ return ("Activation failure", "Another tunnel is currently \(statusString)")
default:
os_log("ErrorPresenter: Error not presented: %{public}@", log: OSLog.default, type: .error, "\(error)")
diff --git a/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift b/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift
index a65c712..9dd298a 100644
--- a/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/QRScanViewController.swift
@@ -40,7 +40,7 @@ class QRScanViewController: UIViewController {
let captureSession = captureSession,
captureSession.canAddInput(videoInput),
captureSession.canAddOutput(metadataOutput) else {
- scanDidEncounterError(title: "Camera Unsupported", message: "This device is not able to scan QR codes.")
+ scanDidEncounterError(title: "Camera Unsupported", message: "This device is not able to scan QR codes")
return
}
@@ -108,7 +108,7 @@ class QRScanViewController: UIViewController {
func scanDidComplete(withCode code: String) {
let scannedTunnelConfiguration = try? WgQuickConfigFileParser.parse(code, name: "Scanned")
guard let tunnelConfiguration = scannedTunnelConfiguration else {
- scanDidEncounterError(title: "Invalid QR Code", message: "The scanned QR code is not a valid WireGuard configuration.")
+ scanDidEncounterError(title: "Invalid QR Code", message: "The scanned QR code is not a valid WireGuard configuration")
return
}
@@ -149,7 +149,7 @@ extension QRScanViewController: AVCaptureMetadataOutputObjectsDelegate {
guard let metadataObject = metadataObjects.first,
let readableObject = metadataObject as? AVMetadataMachineReadableCodeObject,
let stringValue = readableObject.stringValue else {
- scanDidEncounterError(title: "Invalid Code", message: "The scanned code could not be read.")
+ scanDidEncounterError(title: "Invalid Code", message: "The scanned code could not be read")
return
}
diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift
index 5015be0..4a43755 100644
--- a/WireGuard/WireGuard/VPN/TunnelsManager.swift
+++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift
@@ -364,7 +364,7 @@ class TunnelContainer: NSObject {
resolvedEndpoints: [Endpoint?],
completionHandler: @escaping (Error?) -> Void) {
if (recursionCount >= 8) {
- os_log("startActivation: Failed after 8 attempts. Giving up with %{public}@.", log: OSLog.default, type: .error, "\(lastError!)")
+ os_log("startActivation: Failed after 8 attempts. Giving up with %{public}@", log: OSLog.default, type: .error, "\(lastError!)")
completionHandler(TunnelActivationError.tunnelActivationFailed)
return
}
@@ -384,7 +384,7 @@ class TunnelContainer: NSObject {
guard (tunnelProvider.isEnabled) else {
// In case the tunnel had gotten disabled, re-enable and save it,
// then call this function again.
- os_log("startActivation: Tunnel is disabled. Re-enabling and saving.", log: OSLog.default, type: .info)
+ os_log("startActivation: Tunnel is disabled. Re-enabling and saving", log: OSLog.default, type: .info)
tunnelProvider.isEnabled = true
tunnelProvider.saveToPreferences { [weak self] (error) in
if (error != nil) {
@@ -392,7 +392,7 @@ class TunnelContainer: NSObject {
completionHandler(error)
return
}
- os_log("startActivation: Tunnel saved after re-enabling.", log: OSLog.default, type: .info)
+ os_log("startActivation: Tunnel saved after re-enabling", log: OSLog.default, type: .info)
os_log("startActivation: Invoking startActivation", log: OSLog.default, type: .debug)
self?.startActivation(recursionCount: recursionCount + 1, lastError: NEVPNError(NEVPNError.configurationUnknown), tunnelConfiguration: tunnelConfiguration, resolvedEndpoints: resolvedEndpoints, completionHandler: completionHandler)
}
@@ -411,7 +411,7 @@ class TunnelContainer: NSObject {
os_log("startActivation: Success", log: OSLog.default, type: .debug)
completionHandler(nil)
} catch (let error) {
- os_log("startActivation: Error starting tunnel. Examining error.", log: OSLog.default, type: .debug)
+ os_log("startActivation: Error starting tunnel. Examining error", log: OSLog.default, type: .debug)
guard let vpnError = error as? NEVPNError else {
os_log("Failed to activate tunnel: %{public}@", log: OSLog.default, type: .debug, "\(error)")
status = .inactive
@@ -435,7 +435,7 @@ class TunnelContainer: NSObject {
completionHandler(error)
return
}
- os_log("startActivation: Tunnel reloaded.", log: OSLog.default, type: .info)
+ os_log("startActivation: Tunnel reloaded", log: OSLog.default, type: .info)
os_log("startActivation: Invoking startActivation", log: OSLog.default, type: .debug)
self?.startActivation(recursionCount: recursionCount + 1, lastError: vpnError, tunnelConfiguration: tunnelConfiguration, resolvedEndpoints: resolvedEndpoints, completionHandler: completionHandler)
}
diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
index 7fc12cf..da4372e 100644
--- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
+++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift
@@ -27,9 +27,9 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
os_log("Starting tunnel", log: OSLog.default, type: .info)
guard let options = options else {
- os_log("Starting tunnel failed: No options passed. Possible connection request from preferences.", log: OSLog.default, type: .error)
+ os_log("Starting tunnel failed: No options passed. Possible connection request from preferences", log: OSLog.default, type: .error)
// displayMessage is deprecated API
- displayMessage("Please use the WireGuard app to start WireGuard tunnels.") { (_) in
+ displayMessage("Please use the WireGuard app to start WireGuard tunnels") { (_) in
startTunnelCompletionHandler(PacketTunnelProviderError.invalidOptions)
}
return