Wraps Alert strings in `NSLocalizedString`
Also removes `tel` scheme handling.
This commit is contained in:
parent
e825a5d516
commit
f58ac4d160
|
@ -15,8 +15,4 @@ extension URL {
|
|||
scheme == "mailto" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : nil
|
||||
}
|
||||
|
||||
/// Extracts telephone number from a `URL` with a `tel` scheme, otherwise `nil`.
|
||||
var telNumber: String? {
|
||||
scheme == "tel" ? URLComponents(url: self, resolvingAgainstBaseURL: false)?.path : nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -324,8 +324,8 @@ extension WebViewController: WKNavigationDelegate {
|
|||
mailComposeViewController.mailComposeDelegate = self
|
||||
self.present(mailComposeViewController, animated: true, completion: {})
|
||||
} else {
|
||||
let alert = UIAlertController(title: "Error", message: "This device cannot send emails.", preferredStyle: .alert)
|
||||
alert.addAction(.init(title: "Dismiss", style: .cancel, handler: nil))
|
||||
let alert = UIAlertController(title: NSLocalizedString("Error", comment: "Error"), message: NSLocalizedString("This device cannot send emails.", comment: "This device cannot send emails."), preferredStyle: .alert)
|
||||
alert.addAction(.init(title: NSLocalizedString("Dismiss", comment: "Dismiss"), style: .cancel, handler: nil))
|
||||
self.present(alert, animated: true, completion: nil)
|
||||
}
|
||||
} else if components?.scheme == "tel" {
|
||||
|
|
Loading…
Reference in New Issue