Importing: Give a clearer error message on importing an invalid config
This commit is contained in:
parent
926a2fa401
commit
e6c146f8c7
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue