]> git.ipfire.org Git - thirdparty/wireguard-apple.git/commitdiff
Make strings consistent
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 7 Dec 2018 17:35:06 +0000 (18:35 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 7 Dec 2018 17:52:14 +0000 (18:52 +0100)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
WireGuard/Shared/FileManager+Extension.swift
WireGuard/WireGuard/UI/TunnelViewModel.swift
WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift
WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift

index 4d9bf4f777fd44d25b9c150dd4b77245b6e87dfa..d4c2547bcd4c17e83a55dc5281db674ba7206b22 100644 (file)
@@ -14,7 +14,7 @@ extension FileManager {
             os_log("Can't obtain shared folder URL", log: OSLog.default, type: .error)
             return nil
         }
-        return sharedFolderURL.appendingPathComponent("lastActivatedTunnelLog.txt")
+        return sharedFolderURL.appendingPathComponent("last-activated-tunnel-log.txt")
     }
 
     static func deleteFile(at url: URL) -> Bool {
index ea3adf431aaf46c39cef35afb1ef23968c2c0e0f..f237660cf2b33e3eac070ec2448b8e0c15ad9958 100644 (file)
@@ -454,13 +454,13 @@ extension TunnelViewModel {
     func activateOnDemandOptionText(for activateOnDemandOption: ActivateOnDemandOption) -> String {
         switch (activateOnDemandOption) {
         case .none:
-            return ""
+            return "Off"
         case .useOnDemandOverWiFiOrCellular:
-            return "Over WiFi or cellular"
+            return "Wi-Fi or cellular"
         case .useOnDemandOverWiFiOnly:
-            return "Over WiFi only"
+            return "Wi-Fi only"
         case .useOnDemandOverCellularOnly:
-            return "Over cellular only"
+            return "Cellular only"
         }
     }
 
index 609fa2e45d5a4f788d14aa1b42806b6d57416d82..6623f79b296f16fba927f595889163a4dec8aa03 100644 (file)
@@ -94,7 +94,7 @@ class SettingsTableViewController: UITableViewController {
         let dateFormatter = ISO8601DateFormatter()
         dateFormatter.formatOptions = [.withFullDate, .withTime, .withTimeZone] // Avoid ':' in the filename
         let timeStampString = dateFormatter.string(from: Date())
-        let destinationURL = destinationDir.appendingPathComponent("WireGuard_iOS_log_\(timeStampString).txt")
+        let destinationURL = destinationDir.appendingPathComponent("wireguard-log-\(timeStampString).txt")
 
         if (FileManager.default.fileExists(atPath: destinationURL.path)) {
             let isDeleted = FileManager.deleteFile(at: destinationURL)
@@ -114,7 +114,7 @@ class SettingsTableViewController: UITableViewController {
             try FileManager.default.copyItem(at: networkExtensionLogFileURL, to: destinationURL)
         } catch {
             os_log("Failed to copy file: %{public}@ to %{public}@: %{public}@", log: OSLog.default, type: .error, networkExtensionLogFileURL.absoluteString, destinationURL.absoluteString, error.localizedDescription)
-            ErrorPresenter.showErrorAlert(title: "No log available", message: "The log could not be accessed", from: self)
+            ErrorPresenter.showErrorAlert(title: "Log export failed", message: "The log could not be copied", from: self)
             return
         }
 
index b59c7b55443dd8d3a5fc63b93dd9e9d9c3cddfe1..5873f1df2b5040ffdfe6c69081d91d814b008638 100644 (file)
@@ -433,9 +433,9 @@ class TunnelDetailTableViewActivateOnDemandCell: UITableViewCell {
                 case .none:
                     detailText = "Off"
                 case .useOnDemandOverWiFiOrCellular:
-                    detailText = "WiFi or cellular"
+                    detailText = "Wi-Fi or cellular"
                 case .useOnDemandOverWiFiOnly:
-                    detailText = "WiFi only"
+                    detailText = "Wi-Fi only"
                 case .useOnDemandOverCellularOnly:
                     detailText = "Cellular only"
                 }