forked from wikimedia/wikipedia-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
41 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,25 +4,24 @@ import MessageUI | |
extension NSError { | ||
|
||
public func alertMessage() -> String { | ||
if(self.wmf_isNetworkConnectionError()){ | ||
if self.wmf_isNetworkConnectionError() { | ||
return CommonStrings.noInternetConnection | ||
}else{ | ||
} else { | ||
return self.localizedDescription | ||
} | ||
} | ||
|
||
public func alertType() -> RMessageType { | ||
if(self.wmf_isNetworkConnectionError()){ | ||
if self.wmf_isNetworkConnectionError() { | ||
return .warning | ||
}else{ | ||
} else { | ||
return .error | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
open class WMFAlertManager: NSObject, RMessageProtocol, MFMailComposeViewControllerDelegate, Themeable { | ||
open class WMFAlertManager: NSObject, RMessageProtocol, Themeable { | ||
|
||
@objc static let sharedInstance = WMFAlertManager() | ||
|
||
|
@@ -137,30 +136,5 @@ open class WMFAlertManager: NSObject, RMessageProtocol, MFMailComposeViewControl | |
messageView.titleTextColor = theme.colors.link | ||
} | ||
} | ||
|
||
@objc func showEmailFeedbackAlertViewWithError(_ error: NSError) { | ||
let message = WMFLocalizedString("request-feedback-on-error", value:"The app has encountered a problem that our developers would like to know more about. Please tap here to send us an email with the error details.", comment:"Displayed to beta users when they encounter an error we'd like feedback on") | ||
showErrorAlertWithMessage(message, sticky: true, dismissPreviousAlerts: true) { | ||
self.dismissAllAlerts() | ||
if MFMailComposeViewController.canSendMail() { | ||
guard let rootVC = UIApplication.shared.keyWindow?.rootViewController else { | ||
return | ||
} | ||
let vc = MFMailComposeViewController() | ||
vc.setSubject("Bug:\(WikipediaAppUtils.versionedUserAgent())") | ||
vc.setToRecipients(["[email protected]"]) | ||
vc.mailComposeDelegate = self | ||
vc.setMessageBody("Domain:\t\(error.domain)\nCode:\t\(error.code)\nDescription:\t\(error.localizedDescription)\n\n\n\nVersion:\t\(WikipediaAppUtils.versionedUserAgent())", isHTML: false) | ||
rootVC.present(vc, animated: true, completion: nil) | ||
} else { | ||
self.showErrorAlertWithMessage(WMFLocalizedString("no-email-account-alert", value:"Please setup an email account on your device and try again.", comment:"Displayed to the user when they try to send a feedback email, but they have never set up an account on their device"), sticky: false, dismissPreviousAlerts: false) { | ||
|
||
} | ||
} | ||
} | ||
} | ||
|
||
@objc public func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) { | ||
controller.dismiss(animated: true, completion: nil) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-360 Bytes
(99%)
Wikipedia/iOS Native Localizations/af.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.45 KB
(100%)
Wikipedia/iOS Native Localizations/ar.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-452 Bytes
(100%)
Wikipedia/iOS Native Localizations/ast.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.46 KB
(99%)
Wikipedia/iOS Native Localizations/bn.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-466 Bytes
(99%)
Wikipedia/iOS Native Localizations/br.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-410 Bytes
(99%)
Wikipedia/iOS Native Localizations/bs.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-446 Bytes
(100%)
Wikipedia/iOS Native Localizations/ca.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.55 KB
(99%)
Wikipedia/iOS Native Localizations/ckb.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-498 Bytes
(100%)
Wikipedia/iOS Native Localizations/cs.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-358 Bytes
(100%)
Wikipedia/iOS Native Localizations/da.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-440 Bytes
(100%)
Wikipedia/iOS Native Localizations/de.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-520 Bytes
(100%)
Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-402 Bytes
(100%)
Wikipedia/iOS Native Localizations/eo.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-472 Bytes
(100%)
Wikipedia/iOS Native Localizations/es.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-398 Bytes
(100%)
Wikipedia/iOS Native Localizations/eu.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.83 KB
(99%)
Wikipedia/iOS Native Localizations/fa.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-508 Bytes
(100%)
Wikipedia/iOS Native Localizations/fi.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-494 Bytes
(100%)
Wikipedia/iOS Native Localizations/fr.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-482 Bytes
(100%)
Wikipedia/iOS Native Localizations/gl.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.21 KB
(100%)
Wikipedia/iOS Native Localizations/he.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.5 KB
(99%)
Wikipedia/iOS Native Localizations/hi.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-466 Bytes
(100%)
Wikipedia/iOS Native Localizations/hu.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-398 Bytes
(100%)
Wikipedia/iOS Native Localizations/id.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-570 Bytes
(100%)
Wikipedia/iOS Native Localizations/is.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-422 Bytes
(100%)
Wikipedia/iOS Native Localizations/it.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-896 Bytes
(100%)
Wikipedia/iOS Native Localizations/ja.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-534 Bytes
(99%)
Wikipedia/iOS Native Localizations/jv.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-392 Bytes
(99%)
Wikipedia/iOS Native Localizations/kab.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-742 Bytes
(100%)
Wikipedia/iOS Native Localizations/ko.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-476 Bytes
(98%)
Wikipedia/iOS Native Localizations/ksh.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-424 Bytes
(99%)
Wikipedia/iOS Native Localizations/lb.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.5 KB
(100%)
Wikipedia/iOS Native Localizations/mk.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-396 Bytes
(100%)
Wikipedia/iOS Native Localizations/ms.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-378 Bytes
(100%)
Wikipedia/iOS Native Localizations/nb.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-366 Bytes
(100%)
Wikipedia/iOS Native Localizations/nl.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-526 Bytes
(100%)
Wikipedia/iOS Native Localizations/pl.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-368 Bytes
(100%)
Wikipedia/iOS Native Localizations/pt-br.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-456 Bytes
(100%)
Wikipedia/iOS Native Localizations/pt.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-472 Bytes
(100%)
Wikipedia/iOS Native Localizations/ro.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-2.04 KB
(99%)
Wikipedia/iOS Native Localizations/ru.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.86 KB
(98%)
Wikipedia/iOS Native Localizations/sah.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.52 KB
(99%)
Wikipedia/iOS Native Localizations/sd.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-426 Bytes
(100%)
Wikipedia/iOS Native Localizations/sk.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.48 KB
(100%)
Wikipedia/iOS Native Localizations/sr-EC.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-404 Bytes
(100%)
Wikipedia/iOS Native Localizations/sr-el.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-422 Bytes
(99%)
Wikipedia/iOS Native Localizations/su.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-418 Bytes
(100%)
Wikipedia/iOS Native Localizations/sv.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-544 Bytes
(100%)
Wikipedia/iOS Native Localizations/tr.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.67 KB
(100%)
Wikipedia/iOS Native Localizations/uk.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-1.63 KB
(98%)
Wikipedia/iOS Native Localizations/ur.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-760 Bytes
(100%)
Wikipedia/iOS Native Localizations/vi.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-680 Bytes
(100%)
Wikipedia/iOS Native Localizations/zh-hans.lproj/Localizable.strings
Binary file not shown.
Binary file modified
BIN
-776 Bytes
(100%)
Wikipedia/iOS Native Localizations/zh-hant.lproj/Localizable.strings
Binary file not shown.