mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-17 22:19:08 +00:00
Append exception desc to parsing error alert
This commit is contained in:
parent
684480c826
commit
ccd5e2d03e
@ -120,8 +120,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDele
|
||||
let alert = Macros.alert(L10n.Organizer.Sections.Hosts.header, L10n.Wizards.Host.Alerts.unsupported(option))
|
||||
alert.addCancelAction(L10n.Global.ok)
|
||||
root.present(alert, animated: true, completion: nil)
|
||||
} catch {
|
||||
let alert = Macros.alert(L10n.Organizer.Sections.Hosts.header, L10n.Wizards.Host.Alerts.parsing)
|
||||
} catch let e {
|
||||
let alert = Macros.alert(L10n.Organizer.Sections.Hosts.header, L10n.Wizards.Host.Alerts.parsing(e.localizedDescription))
|
||||
alert.addCancelAction(L10n.Global.ok)
|
||||
root.present(alert, animated: true, completion: nil)
|
||||
}
|
||||
|
@ -47,7 +47,7 @@
|
||||
"wizards.host.sections.existing.header" = "Existing profiles";
|
||||
"wizards.host.alerts.existing" = "A host profile with the same title already exists. Replace it?";
|
||||
"wizards.host.alerts.unsupported" = "The configuration file contains an unsupported option (%@).";
|
||||
"wizards.host.alerts.parsing" = "Unable to parse the provided configuration file.";
|
||||
"wizards.host.alerts.parsing" = "Unable to parse the provided configuration file (%@).";
|
||||
|
||||
"service.welcome.message" = "Welcome to Passepartout!\n\nUse the organizer to add a new profile.";
|
||||
"service.sections.general.header" = "General";
|
||||
|
@ -666,8 +666,10 @@ internal enum L10n {
|
||||
internal enum Alerts {
|
||||
/// A host profile with the same title already exists. Replace it?
|
||||
internal static let existing = L10n.tr("Localizable", "wizards.host.alerts.existing")
|
||||
/// Unable to parse the provided configuration file.
|
||||
internal static let parsing = L10n.tr("Localizable", "wizards.host.alerts.parsing")
|
||||
/// Unable to parse the provided configuration file (%@).
|
||||
internal static func parsing(_ p1: String) -> String {
|
||||
return L10n.tr("Localizable", "wizards.host.alerts.parsing", p1)
|
||||
}
|
||||
/// The configuration file contains an unsupported option (%@).
|
||||
internal static func unsupported(_ p1: String) -> String {
|
||||
return L10n.tr("Localizable", "wizards.host.alerts.unsupported", p1)
|
||||
|
Loading…
Reference in New Issue
Block a user