parent
a17db6c2da
commit
394cc6637c
|
@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
// END HACK to get full width preview layer
|
||||
|
||||
self.scanningInstructionsLabel.text = NSLocalizedString(@"LINK_DEVICE_SCANNING_INSTRUCTIONS",
|
||||
@"QR Scanning screen instructions, placed alongside a camera view for scanning QRCodes");
|
||||
@"QR Scanning screen instructions, placed alongside a camera view for scanning QR Codes");
|
||||
self.title
|
||||
= NSLocalizedString(@"LINK_NEW_DEVICE_TITLE", "Navigation title when scanning QR code to add new device.");
|
||||
}
|
||||
|
|
|
@ -1260,7 +1260,7 @@ typedef enum : NSUInteger {
|
|||
imageEdgeInsets.top = round((kBarButtonSize - image.size.height) * 0.5f);
|
||||
imageEdgeInsets.bottom = round(kBarButtonSize - (image.size.height + imageEdgeInsets.top));
|
||||
callButton.imageEdgeInsets = imageEdgeInsets;
|
||||
callButton.accessibilityLabel = NSLocalizedString(@"CALL_LABEL", "Accessibilty label for placing call button");
|
||||
callButton.accessibilityLabel = NSLocalizedString(@"CALL_LABEL", "Accessibility label for placing call button");
|
||||
[callButton addTarget:self action:@selector(callAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
callButton.frame = CGRectMake(0,
|
||||
0,
|
||||
|
@ -3414,13 +3414,12 @@ typedef enum : NSUInteger {
|
|||
[chooseDocumentAction setValue:chooseDocumentImage forKey:@"image"];
|
||||
[actionSheetController addAction:chooseDocumentAction];
|
||||
|
||||
UIAlertAction *gifAction =
|
||||
[UIAlertAction actionWithTitle:NSLocalizedString(@"SELECT_GIF_BUTTON",
|
||||
@"Label for 'select gif to attach' action sheet button")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *_Nonnull action) {
|
||||
[self showGifPicker];
|
||||
}];
|
||||
UIAlertAction *gifAction = [UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"SELECT_GIF_BUTTON", @"Label for 'select GIF to attach' action sheet button")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *_Nonnull action) {
|
||||
[self showGifPicker];
|
||||
}];
|
||||
UIImage *gifImage = [UIImage imageNamed:@"actionsheet_gif_black"];
|
||||
OWSAssert(gifImage);
|
||||
[gifAction setValue:gifImage forKey:@"image"];
|
||||
|
|
|
@ -116,7 +116,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
|
|||
target: self,
|
||||
action: #selector(donePressed))
|
||||
self.navigationItem.title = NSLocalizedString("GIF_PICKER_VIEW_TITLE",
|
||||
comment: "Title for the 'gif picker' dialog.")
|
||||
comment: "Title for the 'GIF picker' dialog.")
|
||||
|
||||
createViews()
|
||||
|
||||
|
@ -158,7 +158,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
|
|||
searchBar.searchBarStyle = .minimal
|
||||
searchBar.delegate = self
|
||||
searchBar.placeholder = NSLocalizedString("GIF_VIEW_SEARCH_PLACEHOLDER_TEXT",
|
||||
comment: "Placeholder text for the search field in gif view")
|
||||
comment: "Placeholder text for the search field in GIF view")
|
||||
searchBar.backgroundColor = UIColor.white
|
||||
|
||||
self.view.addSubview(searchBar)
|
||||
|
@ -205,7 +205,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
|
|||
noResultsView.autoAlignAxis(.horizontal, toSameAxisOf: self.collectionView)
|
||||
|
||||
let searchErrorView = createErrorLabel(text: NSLocalizedString("GIF_VIEW_SEARCH_ERROR",
|
||||
comment: "Indicates that an error occured while searching."))
|
||||
comment: "Indicates that an error occurred while searching."))
|
||||
self.searchErrorView = searchErrorView
|
||||
self.view.addSubview(searchErrorView)
|
||||
searchErrorView.autoPinWidthToSuperview(withMargin: 20)
|
||||
|
@ -384,7 +384,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
|
|||
return
|
||||
}
|
||||
|
||||
let alert = UIAlertController(title: NSLocalizedString("GIF_PICKER_FAILURE_ALERT_TITLE", comment: "Shown when selected gif couldn't be fetched"),
|
||||
let alert = UIAlertController(title: NSLocalizedString("GIF_PICKER_FAILURE_ALERT_TITLE", comment: "Shown when selected GIF couldn't be fetched"),
|
||||
message: error.localizedDescription,
|
||||
preferredStyle: .alert)
|
||||
alert.addAction(UIAlertAction(title: CommonStrings.retryButton, style: .default) { _ in
|
||||
|
|
|
@ -196,7 +196,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
|
|||
|
||||
ReminderView *missingContactsPermissionView = [ReminderView new];
|
||||
missingContactsPermissionView.text = NSLocalizedString(@"INBOX_VIEW_MISSING_CONTACTS_PERMISSION",
|
||||
@"Multiline label explaining how to show names instead of phone numbers in your inbox");
|
||||
@"Multi-line label explaining how to show names instead of phone numbers in your inbox");
|
||||
missingContactsPermissionView.tapAction = ^{
|
||||
[[UIApplication sharedApplication] openSystemSettings];
|
||||
};
|
||||
|
|
|
@ -209,7 +209,7 @@ class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailCompos
|
|||
mailComposeViewController.setBccRecipients(recipientEmails)
|
||||
|
||||
let subject = NSLocalizedString("EMAIL_INVITE_SUBJECT", comment: "subject of email sent to contacts when inviting to install Signal")
|
||||
let bodyFormat = NSLocalizedString("EMAIL_INVITE_BODY", comment: "body of email sent to contacts when inviting to install Signal. Embeds {{link to install Signal}} and {{link to WhisperSystems home page}}")
|
||||
let bodyFormat = NSLocalizedString("EMAIL_INVITE_BODY", comment: "body of email sent to contacts when inviting to install Signal. Embeds {{link to install Signal}} and {{link to the Signal home page}}")
|
||||
let body = String.init(format: bodyFormat, installUrl, homepageUrl)
|
||||
mailComposeViewController.setSubject(subject)
|
||||
mailComposeViewController.setMessageBody(body, isHTML: false)
|
||||
|
|
|
@ -84,7 +84,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
ReminderView *contactsPermissionReminderView = [[ReminderView alloc]
|
||||
initWithText:NSLocalizedString(@"COMPOSE_SCREEN_MISSING_CONTACTS_PERMISSION",
|
||||
@"Multiline label explaining why compose-screen contact picker is empty.")
|
||||
@"Multi-line label explaining why compose-screen contact picker is empty.")
|
||||
tapAction:^{
|
||||
[[UIApplication sharedApplication] openSystemSettings];
|
||||
}];
|
||||
|
@ -501,7 +501,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
} else {
|
||||
NSString *text = [NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT",
|
||||
@"Text for button to send a Signal invite via SMS. %@ is "
|
||||
@"placeholder for the receipient's phone number."),
|
||||
@"placeholder for the recipient's phone number."),
|
||||
phoneNumber];
|
||||
[phoneNumbersSection addItem:[OWSTableItem disclosureItemWithText:text
|
||||
customRowHeight:self.actionCellHeight
|
||||
|
@ -590,7 +590,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
NSString *text = [NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT",
|
||||
@"Text for button to send a Signal invite via SMS. %@ is "
|
||||
@"placeholder for the receipient's phone number."),
|
||||
@"placeholder for the recipient's phone number."),
|
||||
displayName];
|
||||
[inviteeSection addItem:[OWSTableItem disclosureItemWithText:text
|
||||
customRowHeight:self.actionCellHeight
|
||||
|
|
|
@ -109,7 +109,7 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68;
|
|||
action:@selector(createGroup)];
|
||||
self.navigationItem.rightBarButtonItem.imageInsets = UIEdgeInsetsMake(0, -10, 0, 10);
|
||||
self.navigationItem.rightBarButtonItem.accessibilityLabel
|
||||
= NSLocalizedString(@"FINISH_GROUP_CREATION_LABEL", @"Accessibilty label for finishing new group");
|
||||
= NSLocalizedString(@"FINISH_GROUP_CREATION_LABEL", @"Accessibility label for finishing new group");
|
||||
|
||||
// First section.
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class OWS2FAReminderViewController: UIViewController, PinEntryViewDelegat
|
|||
override public func loadView() {
|
||||
assert(ows2FAManager.pinCode != nil)
|
||||
|
||||
self.navigationItem.title = NSLocalizedString("REMINDER_2FA_NAV_TITLE", comment: "Navbar title for when user is peridoically prompted to enter their registration lock PIN")
|
||||
self.navigationItem.title = NSLocalizedString("REMINDER_2FA_NAV_TITLE", comment: "Navbar title for when user is periodically prompted to enter their registration lock PIN")
|
||||
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(didPressCloseButton))
|
||||
|
||||
|
@ -41,8 +41,8 @@ public class OWS2FAReminderViewController: UIViewController, PinEntryViewDelegat
|
|||
self.pinEntryView = pinEntryView
|
||||
pinEntryView.delegate = self
|
||||
|
||||
let instructionsTextHeader = NSLocalizedString("REMINDER_2FA_BODY_HEADER", comment: "Body header for when user is peridoically prompted to enter their registration lock PIN")
|
||||
let instructionsTextBody = NSLocalizedString("REMINDER_2FA_BODY", comment: "Body text for when user is peridoically prompted to enter their registration lock PIN")
|
||||
let instructionsTextHeader = NSLocalizedString("REMINDER_2FA_BODY_HEADER", comment: "Body header for when user is periodically prompted to enter their registration lock PIN")
|
||||
let instructionsTextBody = NSLocalizedString("REMINDER_2FA_BODY", comment: "Body text for when user is periodically prompted to enter their registration lock PIN")
|
||||
|
||||
let attributes = [NSFontAttributeName: pinEntryView.boldLabelFont]
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class OWS2FAReminderViewController: UIViewController, PinEntryViewDelegat
|
|||
Logger.info("\(logTag) in \(#function)")
|
||||
let alertBody = NSLocalizedString("REMINDER_2FA_FORGOT_PIN_ALERT_MESSAGE",
|
||||
comment: "Alert message explaining what happens if you forget your 'two-factor auth pin'")
|
||||
OWSAlerts.showAlert(title:nil, message:alertBody)
|
||||
OWSAlerts.showAlert(title: nil, message: alertBody)
|
||||
}
|
||||
|
||||
// MARK: Helpers
|
||||
|
|
|
@ -52,11 +52,11 @@ class SafetyNumberConfirmationAlert: NSObject {
|
|||
let displayName = contactsManager.displayName(forPhoneIdentifier: untrustedIdentity.recipientId)
|
||||
|
||||
let titleFormat = NSLocalizedString("CONFIRM_SENDING_TO_CHANGED_IDENTITY_TITLE_FORMAT",
|
||||
comment: "Action sheet title presented when a users's SN have recently changed. Embeds {{contact's name or phone number}}")
|
||||
comment: "Action sheet title presented when a user's SN has recently changed. Embeds {{contact's name or phone number}}")
|
||||
let title = String(format: titleFormat, displayName)
|
||||
|
||||
let bodyFormat = NSLocalizedString("CONFIRM_SENDING_TO_CHANGED_IDENTITY_BODY_FORMAT",
|
||||
comment: "Action sheet body presented when a user's SN have recently changed. Embeds {{contact's name or phone nubmer}}")
|
||||
comment: "Action sheet body presented when a user's SN has recently changed. Embeds {{contact's name or phone number}}")
|
||||
let body = String(format: bodyFormat, displayName)
|
||||
|
||||
let actionSheetController = UIAlertController(title: title, message: body, preferredStyle: .actionSheet)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
@ -17,9 +17,9 @@ extension GiphyError: LocalizedError {
|
|||
public var errorDescription: String? {
|
||||
switch self {
|
||||
case .assertionError:
|
||||
return NSLocalizedString("GIF_PICKER_ERROR_GENERIC", comment: "Generic error displayed when picking a gif")
|
||||
return NSLocalizedString("GIF_PICKER_ERROR_GENERIC", comment: "Generic error displayed when picking a GIF")
|
||||
case .fetchFailure:
|
||||
return NSLocalizedString("GIF_PICKER_ERROR_FETCH_FAILURE", comment: "Error displayed when there is a failure fetching gifs from the remote service.")
|
||||
return NSLocalizedString("GIF_PICKER_ERROR_FETCH_FAILURE", comment: "Error displayed when there is a failure fetching a GIF from the remote service.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -122,33 +122,33 @@ extension GiphyError: LocalizedError {
|
|||
|
||||
public func pickStillRendition() -> GiphyRendition? {
|
||||
// Stills are just temporary placeholders, so use the smallest still possible.
|
||||
return pickRendition(renditionType: .stillPreview, pickingStrategy:.smallerIsBetter, maxFileSize:kPreferedPreviewFileSize)
|
||||
return pickRendition(renditionType: .stillPreview, pickingStrategy: .smallerIsBetter, maxFileSize: kPreferedPreviewFileSize)
|
||||
}
|
||||
|
||||
public func pickPreviewRendition() -> GiphyRendition? {
|
||||
// Try to pick a small file...
|
||||
if let rendition = pickRendition(renditionType: .animatedLowQuality, pickingStrategy:.largerIsBetter, maxFileSize:kPreferedPreviewFileSize) {
|
||||
if let rendition = pickRendition(renditionType: .animatedLowQuality, pickingStrategy: .largerIsBetter, maxFileSize: kPreferedPreviewFileSize) {
|
||||
return rendition
|
||||
}
|
||||
// ...but gradually relax the file restriction...
|
||||
if let rendition = pickRendition(renditionType: .animatedLowQuality, pickingStrategy:.smallerIsBetter, maxFileSize:kPreferedPreviewFileSize * 2) {
|
||||
if let rendition = pickRendition(renditionType: .animatedLowQuality, pickingStrategy: .smallerIsBetter, maxFileSize: kPreferedPreviewFileSize * 2) {
|
||||
return rendition
|
||||
}
|
||||
// ...and relax even more until we find an animated rendition.
|
||||
return pickRendition(renditionType: .animatedLowQuality, pickingStrategy:.smallerIsBetter, maxFileSize:kPreferedPreviewFileSize * 3)
|
||||
return pickRendition(renditionType: .animatedLowQuality, pickingStrategy: .smallerIsBetter, maxFileSize: kPreferedPreviewFileSize * 3)
|
||||
}
|
||||
|
||||
public func pickSendingRendition() -> GiphyRendition? {
|
||||
// Try to pick a small file...
|
||||
if let rendition = pickRendition(renditionType: .animatedHighQuality, pickingStrategy:.largerIsBetter, maxFileSize:kPreferedSendingFileSize) {
|
||||
if let rendition = pickRendition(renditionType: .animatedHighQuality, pickingStrategy: .largerIsBetter, maxFileSize: kPreferedSendingFileSize) {
|
||||
return rendition
|
||||
}
|
||||
// ...but gradually relax the file restriction...
|
||||
if let rendition = pickRendition(renditionType: .animatedHighQuality, pickingStrategy:.smallerIsBetter, maxFileSize:kPreferedSendingFileSize * 2) {
|
||||
if let rendition = pickRendition(renditionType: .animatedHighQuality, pickingStrategy: .smallerIsBetter, maxFileSize: kPreferedSendingFileSize * 2) {
|
||||
return rendition
|
||||
}
|
||||
// ...and relax even more until we find an animated rendition.
|
||||
return pickRendition(renditionType: .animatedHighQuality, pickingStrategy:.smallerIsBetter, maxFileSize:kPreferedSendingFileSize * 3)
|
||||
return pickRendition(renditionType: .animatedHighQuality, pickingStrategy: .smallerIsBetter, maxFileSize: kPreferedSendingFileSize * 3)
|
||||
}
|
||||
|
||||
enum RenditionType {
|
||||
|
@ -299,12 +299,12 @@ extension GiphyError: LocalizedError {
|
|||
}
|
||||
|
||||
private func giphyAPISessionManager() -> AFHTTPSessionManager? {
|
||||
guard let baseUrl = NSURL(string:kGiphyBaseURL) else {
|
||||
guard let baseUrl = NSURL(string: kGiphyBaseURL) else {
|
||||
Logger.error("\(TAG) Invalid base URL.")
|
||||
return nil
|
||||
}
|
||||
let sessionManager = AFHTTPSessionManager(baseURL:baseUrl as URL,
|
||||
sessionConfiguration:GiphyAPI.giphySessionConfiguration())
|
||||
let sessionManager = AFHTTPSessionManager(baseURL: baseUrl as URL,
|
||||
sessionConfiguration: GiphyAPI.giphySessionConfiguration())
|
||||
sessionManager.requestSerializer = AFJSONRequestSerializer()
|
||||
sessionManager.responseSerializer = AFJSONResponseSerializer()
|
||||
|
||||
|
@ -319,7 +319,7 @@ extension GiphyError: LocalizedError {
|
|||
failure(nil)
|
||||
return
|
||||
}
|
||||
guard NSURL(string:kGiphyBaseURL) != nil else {
|
||||
guard NSURL(string: kGiphyBaseURL) != nil else {
|
||||
Logger.error("\(TAG) Invalid base URL.")
|
||||
failure(nil)
|
||||
return
|
||||
|
@ -338,10 +338,10 @@ extension GiphyError: LocalizedError {
|
|||
|
||||
sessionManager.get(urlString,
|
||||
parameters: {},
|
||||
progress:nil,
|
||||
progress: nil,
|
||||
success: { _, value in
|
||||
Logger.error("\(GiphyAPI.TAG) search request succeeded")
|
||||
guard let imageInfos = self.parseGiphyImages(responseJson:value) else {
|
||||
guard let imageInfos = self.parseGiphyImages(responseJson: value) else {
|
||||
failure(nil)
|
||||
return
|
||||
}
|
||||
|
@ -355,16 +355,16 @@ extension GiphyError: LocalizedError {
|
|||
|
||||
// MARK: Parse API Responses
|
||||
|
||||
private func parseGiphyImages(responseJson:Any?) -> [GiphyImageInfo]? {
|
||||
private func parseGiphyImages(responseJson: Any?) -> [GiphyImageInfo]? {
|
||||
guard let responseJson = responseJson else {
|
||||
Logger.error("\(TAG) Missing response.")
|
||||
return nil
|
||||
}
|
||||
guard let responseDict = responseJson as? [String:Any] else {
|
||||
guard let responseDict = responseJson as? [String: Any] else {
|
||||
Logger.error("\(TAG) Invalid response.")
|
||||
return nil
|
||||
}
|
||||
guard let imageDicts = responseDict["data"] as? [[String:Any]] else {
|
||||
guard let imageDicts = responseDict["data"] as? [[String: Any]] else {
|
||||
Logger.error("\(TAG) Invalid response data.")
|
||||
return nil
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ extension GiphyError: LocalizedError {
|
|||
}
|
||||
|
||||
// Giphy API results are often incomplete or malformed, so we need to be defensive.
|
||||
private func parseGiphyImage(imageDict: [String:Any]) -> GiphyImageInfo? {
|
||||
private func parseGiphyImage(imageDict: [String: Any]) -> GiphyImageInfo? {
|
||||
guard let giphyId = imageDict["id"] as? String else {
|
||||
Logger.warn("\(TAG) Image dict missing id.")
|
||||
return nil
|
||||
|
@ -383,18 +383,18 @@ extension GiphyError: LocalizedError {
|
|||
Logger.warn("\(TAG) Image dict has invalid id.")
|
||||
return nil
|
||||
}
|
||||
guard let renditionDicts = imageDict["images"] as? [String:Any] else {
|
||||
guard let renditionDicts = imageDict["images"] as? [String: Any] else {
|
||||
Logger.warn("\(TAG) Image dict missing renditions.")
|
||||
return nil
|
||||
}
|
||||
var renditions = [GiphyRendition]()
|
||||
for (renditionName, renditionDict) in renditionDicts {
|
||||
guard let renditionDict = renditionDict as? [String:Any] else {
|
||||
guard let renditionDict = renditionDict as? [String: Any] else {
|
||||
Logger.warn("\(TAG) Invalid rendition dict.")
|
||||
continue
|
||||
}
|
||||
guard let rendition = parseGiphyRendition(renditionName:renditionName,
|
||||
renditionDict:renditionDict) else {
|
||||
guard let rendition = parseGiphyRendition(renditionName: renditionName,
|
||||
renditionDict: renditionDict) else {
|
||||
continue
|
||||
}
|
||||
renditions.append(rendition)
|
||||
|
@ -404,13 +404,13 @@ extension GiphyError: LocalizedError {
|
|||
return nil
|
||||
}
|
||||
|
||||
guard let originalRendition = findOriginalRendition(renditions:renditions) else {
|
||||
guard let originalRendition = findOriginalRendition(renditions: renditions) else {
|
||||
Logger.warn("\(TAG) Image has no original rendition.")
|
||||
return nil
|
||||
}
|
||||
|
||||
return GiphyImageInfo(giphyId : giphyId,
|
||||
renditions : renditions,
|
||||
return GiphyImageInfo(giphyId: giphyId,
|
||||
renditions: renditions,
|
||||
originalRendition: originalRendition)
|
||||
}
|
||||
|
||||
|
@ -425,15 +425,15 @@ extension GiphyError: LocalizedError {
|
|||
//
|
||||
// We should discard renditions which are missing or have invalid properties.
|
||||
private func parseGiphyRendition(renditionName: String,
|
||||
renditionDict: [String:Any]) -> GiphyRendition? {
|
||||
guard let width = parsePositiveUInt(dict:renditionDict, key:"width", typeName:"rendition") else {
|
||||
renditionDict: [String: Any]) -> GiphyRendition? {
|
||||
guard let width = parsePositiveUInt(dict: renditionDict, key: "width", typeName: "rendition") else {
|
||||
return nil
|
||||
}
|
||||
guard let height = parsePositiveUInt(dict:renditionDict, key:"height", typeName:"rendition") else {
|
||||
guard let height = parsePositiveUInt(dict: renditionDict, key: "height", typeName: "rendition") else {
|
||||
return nil
|
||||
}
|
||||
// Be lenient when parsing file sizes - we don't require them for stills.
|
||||
let fileSize = parseLenientUInt(dict:renditionDict, key:"size")
|
||||
let fileSize = parseLenientUInt(dict: renditionDict, key: "size")
|
||||
guard let urlString = renditionDict["url"] as? String else {
|
||||
return nil
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ extension GiphyError: LocalizedError {
|
|||
Logger.warn("\(TAG) Rendition has invalid url.")
|
||||
return nil
|
||||
}
|
||||
guard let url = NSURL(string:urlString) else {
|
||||
guard let url = NSURL(string: urlString) else {
|
||||
Logger.warn("\(TAG) Rendition url could not be parsed.")
|
||||
return nil
|
||||
}
|
||||
|
@ -464,16 +464,16 @@ extension GiphyError: LocalizedError {
|
|||
}
|
||||
|
||||
return GiphyRendition(
|
||||
format : format,
|
||||
name : renditionName,
|
||||
width : width,
|
||||
height : height,
|
||||
fileSize : fileSize,
|
||||
url : url
|
||||
format: format,
|
||||
name: renditionName,
|
||||
width: width,
|
||||
height: height,
|
||||
fileSize: fileSize,
|
||||
url: url
|
||||
)
|
||||
}
|
||||
|
||||
private func parsePositiveUInt(dict: [String:Any], key: String, typeName: String) -> UInt? {
|
||||
private func parsePositiveUInt(dict: [String: Any], key: String, typeName: String) -> UInt? {
|
||||
guard let value = dict[key] else {
|
||||
return nil
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ extension GiphyError: LocalizedError {
|
|||
return parsedValue
|
||||
}
|
||||
|
||||
private func parseLenientUInt(dict: [String:Any], key: String) -> UInt {
|
||||
private func parseLenientUInt(dict: [String: Any], key: String) -> UInt {
|
||||
let defaultValue = UInt(0)
|
||||
|
||||
guard let value = dict[key] else {
|
||||
|
|
|
@ -218,7 +218,7 @@ import CloudKit
|
|||
Logger.error("\(self.logTag) error preparing file for upload.")
|
||||
failure(OWSErrorWithCodeDescription(.exportBackupError,
|
||||
NSLocalizedString("BACKUP_EXPORT_ERROR_SAVE_FILE_TO_CLOUD_FAILED",
|
||||
comment: "Error indicating the a backup export failed to save a file to the cloud.")))
|
||||
comment: "Error indicating the backup export failed to save a file to the cloud.")))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
} else {
|
||||
[weakSelf failWithErrorDescription:
|
||||
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT",
|
||||
@"Error indicating the a backup export could not export the user's data.")];
|
||||
@"Error indicating the backup export could not export the user's data.")];
|
||||
}
|
||||
});
|
||||
}];
|
||||
|
@ -337,9 +337,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
__weak OWSBackupExportJob *weakSelf = self;
|
||||
[self configureExportWithCompletion:^(BOOL configureExportSuccess) {
|
||||
if (!configureExportSuccess) {
|
||||
[self failWithErrorDescription:
|
||||
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT",
|
||||
@"Error indicating the a backup export could not export the user's data.")];
|
||||
[self
|
||||
failWithErrorDescription:NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT",
|
||||
@"Error indicating the backup export could not export the user's data.")];
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (!tryToFetchManifestSuccess) {
|
||||
[self failWithErrorDescription:
|
||||
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT",
|
||||
@"Error indicating the a backup export could not export the user's data.")];
|
||||
@"Error indicating the backup export could not export the user's data.")];
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (![self exportDatabase]) {
|
||||
[self failWithErrorDescription:
|
||||
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT",
|
||||
@"Error indicating the a backup export could not export the user's data.")];
|
||||
@"Error indicating the backup export could not export the user's data.")];
|
||||
return;
|
||||
}
|
||||
if (self.isComplete) {
|
||||
|
@ -918,7 +918,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (!encryptedItem) {
|
||||
completion(OWSErrorWithCodeDescription(OWSErrorCodeExportBackupFailed,
|
||||
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT",
|
||||
@"Error indicating the a backup export could not export the user's data.")));
|
||||
@"Error indicating the backup export could not export the user's data.")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
|
|||
} else {
|
||||
[weakSelf failWithErrorDescription:
|
||||
NSLocalizedString(@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT",
|
||||
@"Error indicating the a backup import could not import the user's data.")];
|
||||
@"Error indicating the backup import could not import the user's data.")];
|
||||
}
|
||||
});
|
||||
}];
|
||||
|
@ -67,7 +67,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
|
|||
|
||||
if (![self configureImport]) {
|
||||
[self failWithErrorDescription:NSLocalizedString(@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT",
|
||||
@"Error indicating the a backup import could not import the user's data.")];
|
||||
@"Error indicating the backup import could not import the user's data.")];
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
|
|||
if (!restoreDatabaseSuccess) {
|
||||
[weakSelf
|
||||
failWithErrorDescription:NSLocalizedString(@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT",
|
||||
@"Error indicating the a backup import "
|
||||
@"Error indicating the backup import "
|
||||
@"could not import the user's data.")];
|
||||
return;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
|
|||
if (!ensureMigrationsSuccess) {
|
||||
[weakSelf failWithErrorDescription:NSLocalizedString(
|
||||
@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT",
|
||||
@"Error indicating the a backup import "
|
||||
@"Error indicating the backup import "
|
||||
@"could not import the user's data.")];
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ NSString *const kOWSBackup_KeychainService = @"kOWSBackup_KeychainService";
|
|||
failure:^{
|
||||
failure(OWSErrorWithCodeDescription(OWSErrorCodeImportBackupFailed,
|
||||
NSLocalizedString(@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT",
|
||||
@"Error indicating the a backup import could not import the user's data.")));
|
||||
@"Error indicating the backup import could not import the user's data.")));
|
||||
}
|
||||
backupIO:backupIO];
|
||||
});
|
||||
|
|
|
@ -293,50 +293,47 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error
|
|||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_EMAIL",
|
||||
@"Label for the 'email debug log' option of the the debug log alert.")
|
||||
@"Label for the 'email debug log' option of the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[Pastelog.sharedManager submitEmail:url];
|
||||
|
||||
completion();
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_COPY_LINK",
|
||||
@"Label for the 'copy link' option of the the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
UIPasteboard *pb = [UIPasteboard generalPasteboard];
|
||||
[pb setString:url.absoluteString];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_COPY_LINK",
|
||||
@"Label for the 'copy link' option of the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
UIPasteboard *pb = [UIPasteboard generalPasteboard];
|
||||
[pb setString:url.absoluteString];
|
||||
|
||||
completion();
|
||||
}]];
|
||||
completion();
|
||||
}]];
|
||||
#ifdef DEBUG
|
||||
[alert
|
||||
addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SEND_TO_SELF",
|
||||
@"Label for the 'send to self' option of the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[Pastelog.sharedManager sendToSelf:url];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SEND_TO_SELF",
|
||||
@"Label for the 'send to self' option of the the debug log alert.")
|
||||
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SEND_TO_LAST_THREAD",
|
||||
@"Label for the 'send to last thread' option of the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[Pastelog.sharedManager sendToSelf:url];
|
||||
[Pastelog.sharedManager sendToMostRecentThread:url];
|
||||
}]];
|
||||
[alert
|
||||
addAction:[UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SEND_TO_LAST_THREAD",
|
||||
@"Label for the 'send to last thread' option of the the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[Pastelog.sharedManager sendToMostRecentThread:url];
|
||||
}]];
|
||||
#endif
|
||||
[alert
|
||||
addAction:[UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_BUG_REPORT",
|
||||
@"Label for the 'Open a Bug Report' option of the the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[Pastelog.sharedManager prepareRedirection:url completion:completion];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_BUG_REPORT",
|
||||
@"Label for the 'Open a Bug Report' option of the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[Pastelog.sharedManager prepareRedirection:url completion:completion];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SHARE",
|
||||
@"Label for the 'Share' option of the the debug log alert.")
|
||||
@"Label for the 'Share' option of the debug log alert.")
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[AttachmentSharing showShareUIForText:url.absoluteString
|
||||
|
@ -488,9 +485,9 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error
|
|||
|
||||
UIAlertController *alert =
|
||||
[UIAlertController alertControllerWithTitle:NSLocalizedString(@"DEBUG_LOG_GITHUB_ISSUE_ALERT_TITLE",
|
||||
@"Title of the alert before redirecting to Github Issues.")
|
||||
@"Title of the alert before redirecting to GitHub Issues.")
|
||||
message:NSLocalizedString(@"DEBUG_LOG_GITHUB_ISSUE_ALERT_MESSAGE",
|
||||
@"Message of the alert before redirecting to Github Issues.")
|
||||
@"Message of the alert before redirecting to GitHub Issues.")
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction
|
||||
actionWithTitle:NSLocalizedString(@"OK", @"")
|
||||
|
|
|
@ -78,7 +78,7 @@ public class DisappearingTimerConfigurationView: UIView {
|
|||
// or as a non-interactive status indicator
|
||||
pressGesture.isEnabled = false
|
||||
|
||||
// Accessability
|
||||
// Accessibility
|
||||
self.accessibilityLabel = NSLocalizedString("DISAPPEARING_MESSAGES_LABEL", comment: "Accessibility label for disappearing messages")
|
||||
let hintFormatString = NSLocalizedString("DISAPPEARING_MESSAGES_HINT", comment: "Accessibility hint that contains current timeout information")
|
||||
let durationString = NSString.formatDurationSeconds(durationSeconds, useShortFormat: false)
|
||||
|
|
|
@ -205,7 +205,7 @@ public class AttachmentApprovalViewController: OWSViewController, CaptioningTool
|
|||
self.mediaMessageView.videoPlayButton?.isHidden = true
|
||||
let playButton = UIButton()
|
||||
self.playVideoButton = playButton
|
||||
playButton.accessibilityLabel = NSLocalizedString("PLAY_BUTTON_ACCESSABILITY_LABEL", comment: "accessability label for button to start media playback")
|
||||
playButton.accessibilityLabel = NSLocalizedString("PLAY_BUTTON_ACCESSABILITY_LABEL", comment: "Accessibility label for button to start media playback")
|
||||
playButton.setBackgroundImage(#imageLiteral(resourceName: "play_button"), for: .normal)
|
||||
playButton.contentMode = .scaleAspectFit
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
= NSLocalizedString(@"PHONE_NUMBER_TYPE_WORK", @"Label for 'Work' phone numbers.");
|
||||
} else if ([phoneNumberField.label isEqualToString:CNLabelPhoneNumberiPhone]) {
|
||||
phoneNumberNameMap[phoneNumber.stringValue]
|
||||
= NSLocalizedString(@"PHONE_NUMBER_TYPE_IPHONE", @"Label for 'IPhone' phone numbers.");
|
||||
= NSLocalizedString(@"PHONE_NUMBER_TYPE_IPHONE", @"Label for 'iPhone' phone numbers.");
|
||||
} else if ([phoneNumberField.label isEqualToString:CNLabelPhoneNumberMobile]) {
|
||||
phoneNumberNameMap[phoneNumber.stringValue]
|
||||
= NSLocalizedString(@"PHONE_NUMBER_TYPE_MOBILE", @"Label for 'Mobile' phone numbers.");
|
||||
|
|
|
@ -173,7 +173,7 @@ NSUInteger const TSAttachmentSchemaVersion = 4;
|
|||
// a voice note vs. other arbitrary audio attachments.
|
||||
if (self.isVoiceMessage || !self.sourceFilename || self.sourceFilename.length == 0) {
|
||||
attachmentString = NSLocalizedString(@"ATTACHMENT_TYPE_VOICE_MESSAGE",
|
||||
@"Short text label for a voice message attachment, used for thread preview and on lockscreen");
|
||||
@"Short text label for a voice message attachment, used for thread preview and on the lock screen");
|
||||
return [NSString stringWithFormat:@"🎤 %@", attachmentString];
|
||||
} else {
|
||||
return [NSString stringWithFormat:@"📻 %@", attachmentString];
|
||||
|
|
|
@ -144,7 +144,7 @@ typedef void (^failureBlock)(NSURLSessionDataTask *task, NSError *error);
|
|||
failureBlock(task,
|
||||
[self errorWithHTTPCode:statusCode
|
||||
description:NSLocalizedString(@"ERROR_DESCRIPTION_NO_INTERNET",
|
||||
@"Generic error used whenver Signal can't contact the server")
|
||||
@"Generic error used whenever Signal can't contact the server")
|
||||
failureReason:networkError.localizedFailureReason
|
||||
recoverySuggestion:NSLocalizedString(@"NETWORK_ERROR_RECOVERY", nil)
|
||||
fallbackError:networkError]);
|
||||
|
|
|
@ -248,7 +248,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SECONDS_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of seconds}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5s' not '5 s'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SECONDS",
|
||||
|
@ -261,7 +261,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of minutes}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5m' not '5 m'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_MINUTE",
|
||||
|
@ -273,7 +273,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of minutes}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5m' not '5 m'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES",
|
||||
|
@ -286,7 +286,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of hours}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5h' not '5 h'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_HOUR",
|
||||
|
@ -299,7 +299,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of hours}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5h' not '5 h'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS",
|
||||
|
@ -312,7 +312,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of days}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5d' not '5 d'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_DAY",
|
||||
|
@ -325,7 +325,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of days}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5d' not '5 d'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS",
|
||||
|
@ -338,7 +338,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_WEEKS_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of weeks}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5w' not '5 w'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_WEEK",
|
||||
|
@ -351,7 +351,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
if (useShortFormat) {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_WEEKS_SHORT_FORMAT",
|
||||
@"Label text below navbar button, embeds {{number of weeks}}. Must be very short, like 1 or 2 "
|
||||
@"characters, The space is intentionally ommitted between the text and the embedded duration so that "
|
||||
@"characters, The space is intentionally omitted between the text and the embedded duration so that "
|
||||
@"we get, e.g. '5w' not '5 w'. See other *_TIME_AMOUNT strings");
|
||||
} else {
|
||||
amountFormat = NSLocalizedString(@"TIME_AMOUNT_WEEKS",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "OWSError.h"
|
||||
|
@ -53,21 +53,21 @@ NSError *OWSErrorMakeMessageSendDisabledDueToPreKeyUpdateFailuresError()
|
|||
{
|
||||
return OWSErrorWithCodeDescription(OWSErrorCodeMessageSendDisabledDueToPreKeyUpdateFailures,
|
||||
NSLocalizedString(@"ERROR_DESCRIPTION_MESSAGE_SEND_DISABLED_PREKEY_UPDATE_FAILURES",
|
||||
@"Error mesage indicating that message send is disabled due to prekey update failures"));
|
||||
@"Error message indicating that message send is disabled due to prekey update failures"));
|
||||
}
|
||||
|
||||
NSError *OWSErrorMakeMessageSendFailedToBlockListError()
|
||||
{
|
||||
return OWSErrorWithCodeDescription(OWSErrorCodeMessageSendFailedToBlockList,
|
||||
NSLocalizedString(@"ERROR_DESCRIPTION_MESSAGE_SEND_FAILED_DUE_TO_BLOCK_LIST",
|
||||
@"Error mesage indicating that message send failed due to block list"));
|
||||
@"Error message indicating that message send failed due to block list"));
|
||||
}
|
||||
|
||||
NSError *OWSErrorMakeWriteAttachmentDataError()
|
||||
{
|
||||
return OWSErrorWithCodeDescription(OWSErrorCodeCouldNotWriteAttachmentData,
|
||||
NSLocalizedString(@"ERROR_DESCRIPTION_MESSAGE_SEND_FAILED_DUE_TO_FAILED_ATTACHMENT_WRITE",
|
||||
@"Error mesage indicating that message send failed due to failed attachment write"));
|
||||
@"Error message indicating that message send failed due to failed attachment write"));
|
||||
}
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
Loading…
Reference in New Issue