From 66b4aedd087299751fa39c2b54dace6babcb3ac6 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 7 Dec 2018 18:35:06 +0100 Subject: Make strings consistent Signed-off-by: Jason A. Donenfeld --- WireGuard/Shared/FileManager+Extension.swift | 2 +- WireGuard/WireGuard/UI/TunnelViewModel.swift | 8 ++++---- WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift | 4 ++-- WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'WireGuard') diff --git a/WireGuard/Shared/FileManager+Extension.swift b/WireGuard/Shared/FileManager+Extension.swift index 4d9bf4f..d4c2547 100644 --- a/WireGuard/Shared/FileManager+Extension.swift +++ b/WireGuard/Shared/FileManager+Extension.swift @@ -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 { diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift index ea3adf4..f237660 100644 --- a/WireGuard/WireGuard/UI/TunnelViewModel.swift +++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift @@ -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" } } diff --git a/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift b/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift index 609fa2e..6623f79 100644 --- a/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/SettingsTableViewController.swift @@ -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 } diff --git a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift index b59c7b5..5873f1d 100644 --- a/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/TunnelDetailTableViewController.swift @@ -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" } -- cgit v1.2.3-59-g8ed1b