aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-02-22 13:03:03 +0530
committerRoopesh Chander <roop@roopc.net>2019-02-22 13:03:53 +0530
commitb01d09dfb505ce47b32f826692bc34eb9cb4400e (patch)
treedbfdce0c7a7fb41a0753d8164bb62e4b004ad8f9 /WireGuard/WireGuard
parentmacOS: Show 'quitting with active tunnel' only when appropriate (diff)
downloadwireguard-apple-b01d09dfb505ce47b32f826692bc34eb9cb4400e.tar.xz
wireguard-apple-b01d09dfb505ce47b32f826692bc34eb9cb4400e.zip
Importing: Give a clearer error message on importing an invalid config
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/Base.lproj/Localizable.strings4
-rw-r--r--WireGuard/WireGuard/UI/TunnelImporter.swift2
2 files changed, 3 insertions, 3 deletions
diff --git a/WireGuard/WireGuard/Base.lproj/Localizable.strings b/WireGuard/WireGuard/Base.lproj/Localizable.strings
index 29fd7cb..15ef50b 100644
--- a/WireGuard/WireGuard/Base.lproj/Localizable.strings
+++ b/WireGuard/WireGuard/Base.lproj/Localizable.strings
@@ -26,8 +26,8 @@
"alertImportedFromZipTitle (%d)" = "Created %d tunnels";
"alertImportedFromZipMessage (%1$d of %2$d)" = "Created %1$d of %2$d tunnels from zip archive";
-"alertUnableToImportTitle" = "Unable to import tunnel";
-"alertUnableToImportMessage" = "An error occured when importing the tunnel configuration.";
+"alertBadConfigImportTitle" = "Unable to import tunnel";
+"alertBadConfigImportMessage (%@)" = "The file ‘%@’ does not contain a valid WireGuard configuration";
// Tunnel detail and edit UI
diff --git a/WireGuard/WireGuard/UI/TunnelImporter.swift b/WireGuard/WireGuard/UI/TunnelImporter.swift
index 0bf76e5..2c88219 100644
--- a/WireGuard/WireGuard/UI/TunnelImporter.swift
+++ b/WireGuard/WireGuard/UI/TunnelImporter.swift
@@ -41,7 +41,7 @@ class TunnelImporter {
}
}
} else {
- errorPresenterType.showErrorAlert(title: tr("alertUnableToImportTitle"), message: tr("alertUnableToImportMessage"),
+ errorPresenterType.showErrorAlert(title: tr("alertBadConfigImportTitle"), message: tr(format: "alertBadConfigImportMessage (%@)", fileName),
from: sourceVC, onPresented: completionHandler)
}
}