]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Global: no periods at the end of error messages
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 3 Nov 2018 01:55:19 +0000 (02:55 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 3 Nov 2018 02:43:09 +0000 (03:43 +0100)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
WireGuard/WireGuard/UI/iOS/ErrorPresenter.swift
WireGuard/WireGuard/UI/iOS/QRScanViewController.swift
WireGuard/WireGuard/VPN/TunnelsManager.swift
WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift

index 676e918f19be93772241d1665d865611ea5dcd1f..cb63867a8b22b5bd5481db9838ff8b7d9b08bf74 100644 (file)
@@ -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)")
index a65c7123f294a82e9c777d7a9a879e0aeffe0cd1..9dd298a1f8bf6508028173a92b665523bef98399 100644 (file)
@@ -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
         }
 
index 5015be0c960ffa96e3c5c2aa707f0e87f3ba6fd3..4a43755ac5657062100ba46c345fd649008056be 100644 (file)
@@ -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)
             }
index 7fc12cfae8e0a7950980421bc0c2614733eb8e1d..da4372e3cbe5a73e296939a749327e152ddee97f 100644 (file)
@@ -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