diff --git a/Passepartout-iOS/Global/SwiftGen+Strings.swift b/Passepartout-iOS/Global/SwiftGen+Strings.swift index bf08a9e1..7d5332ec 100644 --- a/Passepartout-iOS/Global/SwiftGen+Strings.swift +++ b/Passepartout-iOS/Global/SwiftGen+Strings.swift @@ -75,6 +75,18 @@ internal enum L10n { } } internal enum Service { + internal enum Alerts { + internal enum Location { + internal enum Button { + /// Settings + internal static let settings = L10n.tr("App", "service.alerts.location.button.settings") + } + internal enum Message { + /// You must allow location access to trust this Wi-Fi network. Go to iOS settings and review your location permissions for Passepartout. + internal static let denied = L10n.tr("App", "service.alerts.location.message.denied") + } + } + } internal enum Cells { internal enum Host { internal enum Parameters { diff --git a/Passepartout-iOS/Global/en.lproj/App.strings b/Passepartout-iOS/Global/en.lproj/App.strings index 918cb22a..ed67b3ed 100644 --- a/Passepartout-iOS/Global/en.lproj/App.strings +++ b/Passepartout-iOS/Global/en.lproj/App.strings @@ -40,6 +40,8 @@ "service.cells.provider.refresh.caption" = "Refresh infrastructure"; "service.cells.host.parameters.caption" = "Parameters"; "service.cells.trusted_add_wifi.caption" = "Add current Wi-Fi"; +"service.alerts.location.message.denied" = "You must allow location access to trust this Wi-Fi network. Go to iOS settings and review your location permissions for Passepartout."; +"service.alerts.location.button.settings" = "Settings"; "account.sections.credentials.header" = "Credentials"; diff --git a/Passepartout-iOS/Scenes/ServiceViewController.swift b/Passepartout-iOS/Scenes/ServiceViewController.swift index fd5c0bf0..4852ca7f 100644 --- a/Passepartout-iOS/Scenes/ServiceViewController.swift +++ b/Passepartout-iOS/Scenes/ServiceViewController.swift @@ -351,10 +351,10 @@ class ServiceViewController: UIViewController, StrongTableHost { case .denied: let alert = UIAlertController.asAlert( L10n.App.Service.Cells.TrustedAddWifi.caption, - "You must allow location access to trust this Wi-Fi network. Go to iOS settings and review your location permissions for Passepartout." + L10n.App.Service.Alerts.Location.Message.denied ) alert.addCancelAction(L10n.Core.Global.ok) - alert.addPreferredAction("Settings") { + alert.addPreferredAction(L10n.App.Service.Alerts.Location.Button.settings) { UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!, options: [:], completionHandler: nil) } present(alert, animated: true, completion: nil)