From a17db6c2dabace3176a254c008f9f5a6966a8d60 Mon Sep 17 00:00:00 2001 From: Joshua Lund Date: Sun, 25 Mar 2018 23:27:21 -0600 Subject: [PATCH 1/2] Update Screen Lock text. Clean up a few other strings and comments. --- .../translations/en.lproj/Localizable.strings | 104 +++++++++--------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 2d1d0225d..69dfde5cb 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -148,7 +148,7 @@ /* Alert title when picking a document fails because user picked a directory/bundle */ "ATTACHMENT_PICKER_DOCUMENTS_PICKED_DIRECTORY_FAILED_ALERT_TITLE" = "Unsupported File"; -/* 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 */ "ATTACHMENT_TYPE_VOICE_MESSAGE" = "Voice Message"; /* action sheet button title to enable built in speaker during a call */ @@ -157,13 +157,13 @@ /* button text for back button */ "BACK_BUTTON" = "Back"; -/* 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. */ "BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT" = "Backup data could not be exported."; /* Error indicating that the app received an invalid response from CloudKit. */ "BACKUP_EXPORT_ERROR_INVALID_CLOUDKIT_RESPONSE" = "Invalid Service Response"; -/* Error indicating the a backup export failed to save a file to the cloud. */ +/* Error indicating the backup export failed to save a file to the cloud. */ "BACKUP_EXPORT_ERROR_SAVE_FILE_TO_CLOUD_FAILED" = "Backup data could not be uploaded."; /* Indicates that the cloud is being cleaned up. */ @@ -181,7 +181,7 @@ /* Indicates that the backup export data is being uploaded. */ "BACKUP_EXPORT_PHASE_UPLOAD" = "Uploading Backup"; -/* 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. */ "BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT" = "Backup could not be imported."; /* Indicates that the backup import is checking for an existing backup. */ @@ -271,7 +271,7 @@ /* Alert title when calling and permissions for microphone are missing */ "CALL_AUDIO_PERMISSION_TITLE" = "Microphone Access Required"; -/* Accessibilty label for placing call button */ +/* Accessibility label for placing call button */ "CALL_LABEL" = "Call"; /* Call setup status label after outgoing call times out */ @@ -358,7 +358,7 @@ /* Table section header for invite listing when composing a new message */ "COMPOSE_MESSAGE_INVITE_SECTION_TITLE" = "Invite"; -/* Multiline label explaining why compose-screen contact picker is empty. */ +/* Multi-line label explaining why compose-screen contact picker is empty. */ "COMPOSE_SCREEN_MISSING_CONTACTS_PERMISSION" = "To see which of your contacts are Signal users, allow contacts access in your system settings."; /* No comment provided by engineer. */ @@ -376,10 +376,10 @@ /* Button text */ "CONFIRM_LINK_NEW_DEVICE_ACTION" = "Link New Device"; -/* Action sheet body presented when a user's SN have recently changed. Embeds {{contact's name or phone nubmer}} */ +/* Action sheet body presented when a user's SN has recently changed. Embeds {{contact's name or phone number}} */ "CONFIRM_SENDING_TO_CHANGED_IDENTITY_BODY_FORMAT" = "%@ may have reinstalled or changed devices. Verify your safety number with them to ensure privacy."; -/* Action sheet title presented when a users's SN have recently changed. Embeds {{contact's name or phone number}} */ +/* Action sheet title presented when a user's SN has recently changed. Embeds {{contact's name or phone number}} */ "CONFIRM_SENDING_TO_CHANGED_IDENTITY_TITLE_FORMAT" = "Safety number with %@ has changed"; /* Generic button text to proceed with an action */ @@ -520,32 +520,32 @@ /* Error indicating that no debug logs could be found. */ "DEBUG_LOG_ALERT_NO_LOGS" = "Could not find any logs."; -/* Label for the 'Open a Bug Report' option of the the debug log alert. */ +/* Label for the 'Open a Bug Report' option of the debug log alert. */ "DEBUG_LOG_ALERT_OPTION_BUG_REPORT" = "Open a Bug Report"; -/* Label for the 'copy link' option of the the debug log alert. */ +/* Label for the 'copy link' option of the debug log alert. */ "DEBUG_LOG_ALERT_OPTION_COPY_LINK" = "Copy Link"; -/* 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. */ "DEBUG_LOG_ALERT_OPTION_EMAIL" = "Email Support"; -/* Label for the 'send to last thread' option of the the debug log alert. */ +/* Label for the 'send to last thread' option of the debug log alert. */ "DEBUG_LOG_ALERT_OPTION_SEND_TO_LAST_THREAD" = "Send to Last Thread"; -/* Label for the 'send to self' option of the the debug log alert. */ +/* Label for the 'send to self' option of the debug log alert. */ "DEBUG_LOG_ALERT_OPTION_SEND_TO_SELF" = "Send to Self"; -/* Label for the 'Share' option of the the debug log alert. */ +/* Label for the 'Share' option of the debug log alert. */ "DEBUG_LOG_ALERT_OPTION_SHARE" = "Share"; /* Title of the alert shown for failures while uploading debug logs. Title of the debug log alert. */ "DEBUG_LOG_ALERT_TITLE" = "One More Step"; -/* Message of the alert before redirecting to Github Issues. */ +/* Message of the alert before redirecting to GitHub Issues. */ "DEBUG_LOG_GITHUB_ISSUE_ALERT_MESSAGE" = "The gist link was copied in your clipboard. You are about to be redirected to the GitHub issue list."; -/* Title of the alert before redirecting to Github Issues. */ +/* Title of the alert before redirecting to GitHub Issues. */ "DEBUG_LOG_GITHUB_ISSUE_ALERT_TITLE" = "GitHub Redirection"; /* {{Short Date}} when device last communicated with Signal Server. */ @@ -623,7 +623,7 @@ /* No comment provided by engineer. */ "EDIT_TXT" = "Edit"; -/* body of email sent to contacts when inviting to install Signal. Embeds {{link to install Signal}} and {{link to WhisperSystems home page}} */ +/* body of email sent to contacts when inviting to install Signal. Embeds {{link to install Signal}} and {{link to the Signal home page}} */ "EMAIL_INVITE_BODY" = "Hey,\n\nLately I've been using Signal to keep the conversations on my iPhone private. I'd like you to install it too, so we can be confident that only you and I can read our messages or hear our calls.\n\nSignal is available for iPhones and Android. Get it here: %@\n\nSignal works like your existing messaging app. We can send pictures and video, make calls, and start group chats. The best part is, no one else can see any of it, not even the people who make Signal!\n\nYou can read more about Open Whisper Systems, the people who make Signal, here: %@"; /* subject of email sent to contacts when inviting to install Signal */ @@ -701,16 +701,16 @@ /* Generic notice when message failed to send. */ "ERROR_DESCRIPTION_CLIENT_SENDING_FAILURE" = "Failed to send message."; -/* 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 */ "ERROR_DESCRIPTION_MESSAGE_SEND_DISABLED_PREKEY_UPDATE_FAILURES" = "Unable to send due to stale privacy data."; -/* Error mesage indicating that message send failed due to block list */ +/* Error message indicating that message send failed due to block list */ "ERROR_DESCRIPTION_MESSAGE_SEND_FAILED_DUE_TO_BLOCK_LIST" = "Failed to message user because you blocked them."; -/* Error mesage indicating that message send failed due to failed attachment write */ +/* Error message indicating that message send failed due to failed attachment write */ "ERROR_DESCRIPTION_MESSAGE_SEND_FAILED_DUE_TO_FAILED_ATTACHMENT_WRITE" = "Failed due to failed attachment write."; -/* Generic error used whenver Signal can't contact the server */ +/* Generic error used whenever Signal can't contact the server */ "ERROR_DESCRIPTION_NO_INTERNET" = "Signal was unable to connect to the internet. Please try from another WiFi network or use mobile data."; /* Error indicating that an outgoing message had no valid recipients. */ @@ -773,7 +773,7 @@ /* No comment provided by engineer. */ "FINGERPRINT_SHRED_KEYMATERIAL_BUTTON" = "Reset Session"; -/* Accessibilty label for finishing new group */ +/* Accessibility label for finishing new group */ "FINISH_GROUP_CREATION_LABEL" = "Finish creating group"; /* Label indicating media gallery is empty */ @@ -791,28 +791,28 @@ /* A label for generic attachments. */ "GENERIC_ATTACHMENT_LABEL" = "Attachment"; -/* Error displayed when there is a failure fetching gifs from the remote service. */ +/* Error displayed when there is a failure fetching a GIF from the remote service. */ "GIF_PICKER_ERROR_FETCH_FAILURE" = "Failed to fetch the requested GIF. Please verify you are online."; -/* Generic error displayed when picking a gif */ -"GIF_PICKER_ERROR_GENERIC" = "An unknown error occured."; +/* Generic error displayed when picking a GIF */ +"GIF_PICKER_ERROR_GENERIC" = "An unknown error occurred."; -/* Shown when selected gif couldn't be fetched */ +/* Shown when selected GIF couldn't be fetched */ "GIF_PICKER_FAILURE_ALERT_TITLE" = "Unable to Choose GIF"; /* Alert message shown when user tries to search for GIFs without entering any search terms. */ "GIF_PICKER_VIEW_MISSING_QUERY" = "Please enter your search."; -/* Title for the 'gif picker' dialog. */ +/* Title for the 'GIF picker' dialog. */ "GIF_PICKER_VIEW_TITLE" = "GIF Search"; -/* Indicates that an error occured while searching. */ +/* Indicates that an error occurred while searching. */ "GIF_VIEW_SEARCH_ERROR" = "Error. Tap to Retry."; /* Indicates that the user's search had no results. */ "GIF_VIEW_SEARCH_NO_RESULTS" = "No Results."; -/* Placeholder text for the search field in gif view */ +/* Placeholder text for the search field in GIF view */ "GIF_VIEW_SEARCH_PLACEHOLDER_TEXT" = "Enter your search"; /* No comment provided by engineer. */ @@ -890,7 +890,7 @@ /* Label reminding the user that they are in archive mode. */ "INBOX_VIEW_ARCHIVE_MODE_REMINDER" = "You are viewing your archived messages. Tap to return to your Inbox."; -/* 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 */ "INBOX_VIEW_MISSING_CONTACTS_PERMISSION" = "To see the names of your contacts, update your system settings to allow contact access."; /* notification body */ @@ -953,7 +953,7 @@ /* attempt another linking */ "LINK_DEVICE_RESTART" = "Retry"; -/* 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 */ "LINK_DEVICE_SCANNING_INSTRUCTIONS" = "Scan the QR code displayed on the device to link."; /* Subheading for 'Link New Device' navigation */ @@ -1270,7 +1270,7 @@ /* Label for 'HomeFAX' phone numbers. */ "PHONE_NUMBER_TYPE_HOME_FAX" = "Home Fax"; -/* Label for 'IPhone' phone numbers. */ +/* Label for 'iPhone' phone numbers. */ "PHONE_NUMBER_TYPE_IPHONE" = "iPhone"; /* Label for 'Main' phone numbers. */ @@ -1297,7 +1297,7 @@ /* Label for 'Work FAX' phone numbers. */ "PHONE_NUMBER_TYPE_WORK_FAX" = "Work Fax"; -/* accessability label for button to start media playback */ +/* Accessibility label for button to start media playback */ "PLAY_BUTTON_ACCESSABILITY_LABEL" = "Play Media"; /* Label indicating that the user is not verified. Embeds {{the user's name or phone number}}. */ @@ -1501,16 +1501,16 @@ /* No comment provided by engineer. */ "RELAY_REGISTERED_ERROR_RECOVERY" = "The phone number you are trying to register has already been registered on another server, please unregister from there and try again."; -/* Body text for when user is peridoically prompted to enter their registration lock PIN */ +/* Body text for when user is periodically prompted to enter their registration lock PIN */ "REMINDER_2FA_BODY" = "Registration Lock is enabled for your phone number. To help you memorize your Registration Lock PIN, Signal will periodically ask you to confirm it."; -/* Body header for when user is peridoically prompted to enter their registration lock PIN */ +/* Body header for when user is periodically prompted to enter their registration lock PIN */ "REMINDER_2FA_BODY_HEADER" = "Reminder:"; /* Alert message explaining what happens if you forget your 'two-factor auth pin' */ "REMINDER_2FA_FORGOT_PIN_ALERT_MESSAGE" = "Registration Lock helps protect your phone number from unauthorized registration attempts. This feature can be disabled at any time in your Signal privacy settings."; -/* Navbar title for when user is peridoically prompted to enter their registration lock PIN */ +/* Navbar title for when user is periodically prompted to enter their registration lock PIN */ "REMINDER_2FA_NAV_TITLE" = "Enter Your Registration Lock PIN"; /* Alert body after wrong guess for 'two-factor auth pin' reminder activity */ @@ -1562,25 +1562,25 @@ "SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_FAILED" = "Authentication failed."; /* Indicates that Touch ID/Face ID/Phone Passcode is 'locked out' on this device due to authentication failures. */ -"SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_LOCKOUT" = "Too many failures. Please try again later."; +"SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_LOCKOUT" = "Too many failed authentication attempts. Please try again later."; /* Indicates that Touch ID/Face ID/Phone Passcode are not available on this device. */ -"SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_NOT_AVAILABLE" = "You must configure a passcode on your phone to use Screen Lock."; +"SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_NOT_AVAILABLE" = "You must enable a passcode in your iOS Settings in order to use Screen Lock."; /* Indicates that Touch ID/Face ID/Phone Passcode is not configured on this device. */ -"SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_NOT_ENROLLED" = "You must configure a passcode on your phone to use Screen Lock."; +"SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_NOT_ENROLLED" = "You must enable a passcode in your iOS Settings in order to use Screen Lock."; /* Indicates that Touch ID/Face ID/Phone Passcode passcode is not set. */ -"SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_PASSCODE_NOT_SET" = "You must configure a passcode on your phone to use Screen Lock."; +"SCREEN_LOCK_ERROR_LOCAL_AUTHENTICATION_PASSCODE_NOT_SET" = "You must enable a passcode in your iOS Settings in order to use Screen Lock."; /* Description of how and why Signal iOS uses Touch ID/Face ID/Phone Passcode to disable 'screen lock'. */ "SCREEN_LOCK_REASON_DISABLE_SCREEN_LOCK" = "Authenticate to disable Screen Lock."; /* Description of how and why Signal iOS uses Touch ID/Face ID/Phone Passcode to enable 'screen lock'. */ -"SCREEN_LOCK_REASON_ENABLE_SCREEN_LOCK" = "Authenticate to lock access to Signal."; +"SCREEN_LOCK_REASON_ENABLE_SCREEN_LOCK" = "Authenticate to enable Screen Lock."; /* Description of how and why Signal iOS uses Touch ID/Face ID/Phone Passcode to unlock 'screen lock'. */ -"SCREEN_LOCK_REASON_UNLOCK_SCREEN_LOCK" = "Authenticate to access Signal."; +"SCREEN_LOCK_REASON_UNLOCK_SCREEN_LOCK" = "Authenticate to open Signal."; /* Title for alert indicating that screen lock could not be unlocked. */ "SCREEN_LOCK_UNLOCK_FAILED" = "Authentication Failed"; @@ -1591,7 +1591,7 @@ /* No comment provided by engineer. */ "SECURE_SESSION_RESET" = "Secure session was reset."; -/* Label for 'select gif to attach' action sheet button */ +/* Label for 'select GIF to attach' action sheet button */ "SELECT_GIF_BUTTON" = "GIF"; /* Table section header for conversations you haven't recently used. */ @@ -1612,7 +1612,7 @@ /* Alert body after invite succeeded */ "SEND_INVITE_SUCCESS" = "You've invited your friend to use Signal!"; -/* Text for button to send a Signal invite via SMS. %@ is placeholder for the receipient's phone number. */ +/* Text for button to send a Signal invite via SMS. %@ is placeholder for the recipient's phone number. */ "SEND_INVITE_VIA_SMS_BUTTON_FORMAT" = "Invite via SMS: %@"; /* No comment provided by engineer. */ @@ -1748,7 +1748,7 @@ "SETTINGS_INVITE_TITLE" = "Invite Your Friends"; /* content of tweet when inviting via twitter */ -"SETTINGS_INVITE_TWITTER_TEXT" = "You can reach me using Signal by @WhisperSystems, get it now."; +"SETTINGS_INVITE_TWITTER_TEXT" = "You can reach me using @signalapp. Get it now: https://signal.org/download/"; /* Label for settings view that allows user to change the notification sound. */ "SETTINGS_ITEM_NOTIFICATION_SOUND" = "Message Sound"; @@ -1790,7 +1790,7 @@ "SETTINGS_REMOVE_METADATA" = "Remove Media Metadata"; /* Remove metadata section footer */ -"SETTINGS_REMOVE_METADATA_DETAIL" = "Removes user-identifying metadata and GPS information when sending image and video messages."; +"SETTINGS_REMOVE_METADATA_DETAIL" = "Remove user-identifying metadata and GPS information when sending image and video messages."; /* Remove metadata section header */ "SETTINGS_REMOVE_METADATA_TITLE" = "Metadata"; @@ -1799,7 +1799,7 @@ "SETTINGS_SCREEN_LOCK_ACTIVITY_TIMEOUT" = "Screen Lock Timeout"; /* Footer for the 'screen lock' section of the privacy settings. */ -"SETTINGS_SCREEN_LOCK_SECTION_FOOTER" = "Lock Signal when it hasn't been used recently. Unlock it with Touch ID, Face ID or your passcode."; +"SETTINGS_SCREEN_LOCK_SECTION_FOOTER" = "Unlock Signal's screen using Touch ID, Face ID, or your iOS device passcode."; /* Title for the 'screen lock' section of the privacy settings. */ "SETTINGS_SCREEN_LOCK_SECTION_TITLE" = "Screen Lock"; @@ -1906,25 +1906,25 @@ /* {{number of days}} embedded in strings, e.g. 'Alice updated disappearing messages expiration to {{5 days}}'. See other *_TIME_AMOUNT strings */ "TIME_AMOUNT_DAYS" = "%@ days"; -/* 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 we get, e.g. '5d' not '5 d'. See other *_TIME_AMOUNT strings */ +/* Label text below navbar button, embeds {{number of days}}. Must be very short, like 1 or 2 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 */ "TIME_AMOUNT_DAYS_SHORT_FORMAT" = "%@d"; /* {{number of hours}} embedded in strings, e.g. 'Alice updated disappearing messages expiration to {{5 hours}}'. See other *_TIME_AMOUNT strings */ "TIME_AMOUNT_HOURS" = "%@ hours"; -/* 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 we get, e.g. '5h' not '5 h'. See other *_TIME_AMOUNT strings */ +/* Label text below navbar button, embeds {{number of hours}}. Must be very short, like 1 or 2 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 */ "TIME_AMOUNT_HOURS_SHORT_FORMAT" = "%@h"; /* {{number of minutes}} embedded in strings, e.g. 'Alice updated disappearing messages expiration to {{5 minutes}}'. See other *_TIME_AMOUNT strings */ "TIME_AMOUNT_MINUTES" = "%@ minutes"; -/* 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 we get, e.g. '5m' not '5 m'. See other *_TIME_AMOUNT strings */ +/* Label text below navbar button, embeds {{number of minutes}}. Must be very short, like 1 or 2 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 */ "TIME_AMOUNT_MINUTES_SHORT_FORMAT" = "%@m"; /* {{number of seconds}} embedded in strings, e.g. 'Alice updated disappearing messages expiration to {{5 seconds}}'. See other *_TIME_AMOUNT strings */ "TIME_AMOUNT_SECONDS" = "%@ seconds"; -/* 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 we get, e.g. '5s' not '5 s'. See other *_TIME_AMOUNT strings */ +/* Label text below navbar button, embeds {{number of seconds}}. Must be very short, like 1 or 2 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 */ "TIME_AMOUNT_SECONDS_SHORT_FORMAT" = "%@s"; /* {{1 day}} embedded in strings, e.g. 'Alice updated disappearing messages expiration to {{1 day}}'. See other *_TIME_AMOUNT strings */ @@ -1942,7 +1942,7 @@ /* {{number of weeks}}, embedded in strings, e.g. 'Alice updated disappearing messages expiration to {{5 weeks}}'. See other *_TIME_AMOUNT strings */ "TIME_AMOUNT_WEEKS" = "%@ weeks"; -/* 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 we get, e.g. '5w' not '5 w'. See other *_TIME_AMOUNT strings */ +/* Label text below navbar button, embeds {{number of weeks}}. Must be very short, like 1 or 2 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 */ "TIME_AMOUNT_WEEKS_SHORT_FORMAT" = "%@w"; /* Label for the cancel button in an alert or action sheet. */ From 394cc6637cf6d2f92b4fbada063ff8d8bdaa66db Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 26 Mar 2018 09:37:43 -0400 Subject: [PATCH 2/2] Backport comments from translations // FREEBIE --- .../AppSettings/OWSLinkDeviceViewController.m | 2 +- .../ConversationViewController.m | 15 ++-- .../GifPicker/GifPickerViewController.swift | 8 +- .../src/ViewControllers/HomeViewController.m | 2 +- Signal/src/ViewControllers/InviteFlow.swift | 2 +- .../NewContactThreadViewController.m | 6 +- .../ViewControllers/NewGroupViewController.m | 2 +- .../OWS2FAReminderViewController.swift | 8 +- .../SafetyNumberConfirmationAlert.swift | 4 +- Signal/src/network/GiphyAPI.swift | 80 +++++++++---------- Signal/src/util/OWSBackupAPI.swift | 2 +- Signal/src/util/OWSBackupExportJob.m | 14 ++-- Signal/src/util/OWSBackupImportJob.m | 8 +- Signal/src/util/OWSBackupJob.m | 2 +- Signal/src/util/Pastelog.m | 59 +++++++------- .../DisappearingTimerConfigurationView.swift | 2 +- .../AttachmentApprovalViewController.swift | 2 +- SignalServiceKit/src/Contacts/Contact.m | 2 +- .../src/Messages/Attachments/TSAttachment.m | 2 +- .../src/Network/API/TSNetworkManager.m | 2 +- SignalServiceKit/src/Util/NSString+SSK.m | 18 ++--- SignalServiceKit/src/Util/OWSError.m | 8 +- 22 files changed, 123 insertions(+), 127 deletions(-) diff --git a/Signal/src/ViewControllers/AppSettings/OWSLinkDeviceViewController.m b/Signal/src/ViewControllers/AppSettings/OWSLinkDeviceViewController.m index 48a9fc327..0405ef4f1 100644 --- a/Signal/src/ViewControllers/AppSettings/OWSLinkDeviceViewController.m +++ b/Signal/src/ViewControllers/AppSettings/OWSLinkDeviceViewController.m @@ -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."); } diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index b22b8787b..241a1c1ca 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -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"]; diff --git a/Signal/src/ViewControllers/GifPicker/GifPickerViewController.swift b/Signal/src/ViewControllers/GifPicker/GifPickerViewController.swift index b77f3cf7a..8a8ee98d7 100644 --- a/Signal/src/ViewControllers/GifPicker/GifPickerViewController.swift +++ b/Signal/src/ViewControllers/GifPicker/GifPickerViewController.swift @@ -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 diff --git a/Signal/src/ViewControllers/HomeViewController.m b/Signal/src/ViewControllers/HomeViewController.m index dccd63e15..dd48ef95e 100644 --- a/Signal/src/ViewControllers/HomeViewController.m +++ b/Signal/src/ViewControllers/HomeViewController.m @@ -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]; }; diff --git a/Signal/src/ViewControllers/InviteFlow.swift b/Signal/src/ViewControllers/InviteFlow.swift index 7380d13fd..8f2b469f6 100644 --- a/Signal/src/ViewControllers/InviteFlow.swift +++ b/Signal/src/ViewControllers/InviteFlow.swift @@ -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) diff --git a/Signal/src/ViewControllers/NewContactThreadViewController.m b/Signal/src/ViewControllers/NewContactThreadViewController.m index c83a7f6f2..662168946 100644 --- a/Signal/src/ViewControllers/NewContactThreadViewController.m +++ b/Signal/src/ViewControllers/NewContactThreadViewController.m @@ -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 diff --git a/Signal/src/ViewControllers/NewGroupViewController.m b/Signal/src/ViewControllers/NewGroupViewController.m index ba6f633b1..161a4c467 100644 --- a/Signal/src/ViewControllers/NewGroupViewController.m +++ b/Signal/src/ViewControllers/NewGroupViewController.m @@ -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. diff --git a/Signal/src/ViewControllers/OWS2FAReminderViewController.swift b/Signal/src/ViewControllers/OWS2FAReminderViewController.swift index ca5246212..58dc312e4 100644 --- a/Signal/src/ViewControllers/OWS2FAReminderViewController.swift +++ b/Signal/src/ViewControllers/OWS2FAReminderViewController.swift @@ -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 diff --git a/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift b/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift index 5de06b6b2..7eb7742ac 100644 --- a/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift +++ b/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift @@ -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) diff --git a/Signal/src/network/GiphyAPI.swift b/Signal/src/network/GiphyAPI.swift index 2ee16daa4..97f68382a 100644 --- a/Signal/src/network/GiphyAPI.swift +++ b/Signal/src/network/GiphyAPI.swift @@ -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 { diff --git a/Signal/src/util/OWSBackupAPI.swift b/Signal/src/util/OWSBackupAPI.swift index 5979a025b..a3a53e0f0 100644 --- a/Signal/src/util/OWSBackupAPI.swift +++ b/Signal/src/util/OWSBackupAPI.swift @@ -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 } diff --git a/Signal/src/util/OWSBackupExportJob.m b/Signal/src/util/OWSBackupExportJob.m index 35abe3489..28d82b1f0 100644 --- a/Signal/src/util/OWSBackupExportJob.m +++ b/Signal/src/util/OWSBackupExportJob.m @@ -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; } diff --git a/Signal/src/util/OWSBackupImportJob.m b/Signal/src/util/OWSBackupImportJob.m index c8abf73d7..7b75ee502 100644 --- a/Signal/src/util/OWSBackupImportJob.m +++ b/Signal/src/util/OWSBackupImportJob.m @@ -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; } diff --git a/Signal/src/util/OWSBackupJob.m b/Signal/src/util/OWSBackupJob.m index fef0b393e..35a0c91a0 100644 --- a/Signal/src/util/OWSBackupJob.m +++ b/Signal/src/util/OWSBackupJob.m @@ -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]; }); diff --git a/Signal/src/util/Pastelog.m b/Signal/src/util/Pastelog.m index 7739581df..c94eb3275 100644 --- a/Signal/src/util/Pastelog.m +++ b/Signal/src/util/Pastelog.m @@ -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 debug log alert.") + style:UIAlertActionStyleDefault + handler:^(UIAlertAction *action) { + UIPasteboard *pb = [UIPasteboard generalPasteboard]; + [pb setString:url.absoluteString]; + + 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_COPY_LINK", - @"Label for the 'copy link' 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) { - UIPasteboard *pb = [UIPasteboard generalPasteboard]; - [pb setString:url.absoluteString]; - - completion(); + [Pastelog.sharedManager sendToMostRecentThread:url]; }]]; -#ifdef DEBUG +#endif [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_BUG_REPORT", + @"Label for the 'Open a Bug Report' option of the debug log alert.") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { - [Pastelog.sharedManager sendToSelf:url]; + [Pastelog.sharedManager prepareRedirection:url completion:completion]; }]]; - [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_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", @"") diff --git a/SignalMessaging/Views/DisappearingTimerConfigurationView.swift b/SignalMessaging/Views/DisappearingTimerConfigurationView.swift index 3953c9638..35c369b52 100644 --- a/SignalMessaging/Views/DisappearingTimerConfigurationView.swift +++ b/SignalMessaging/Views/DisappearingTimerConfigurationView.swift @@ -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) diff --git a/SignalMessaging/attachments/AttachmentApprovalViewController.swift b/SignalMessaging/attachments/AttachmentApprovalViewController.swift index a29f4275d..137f5ebc5 100644 --- a/SignalMessaging/attachments/AttachmentApprovalViewController.swift +++ b/SignalMessaging/attachments/AttachmentApprovalViewController.swift @@ -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 diff --git a/SignalServiceKit/src/Contacts/Contact.m b/SignalServiceKit/src/Contacts/Contact.m index 957ff9efc..35f2d0d5f 100644 --- a/SignalServiceKit/src/Contacts/Contact.m +++ b/SignalServiceKit/src/Contacts/Contact.m @@ -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."); diff --git a/SignalServiceKit/src/Messages/Attachments/TSAttachment.m b/SignalServiceKit/src/Messages/Attachments/TSAttachment.m index 43af0899d..6fbcaaffc 100644 --- a/SignalServiceKit/src/Messages/Attachments/TSAttachment.m +++ b/SignalServiceKit/src/Messages/Attachments/TSAttachment.m @@ -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]; diff --git a/SignalServiceKit/src/Network/API/TSNetworkManager.m b/SignalServiceKit/src/Network/API/TSNetworkManager.m index eadde3175..900267b76 100644 --- a/SignalServiceKit/src/Network/API/TSNetworkManager.m +++ b/SignalServiceKit/src/Network/API/TSNetworkManager.m @@ -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]); diff --git a/SignalServiceKit/src/Util/NSString+SSK.m b/SignalServiceKit/src/Util/NSString+SSK.m index f42c27299..251a9b8e6 100644 --- a/SignalServiceKit/src/Util/NSString+SSK.m +++ b/SignalServiceKit/src/Util/NSString+SSK.m @@ -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", diff --git a/SignalServiceKit/src/Util/OWSError.m b/SignalServiceKit/src/Util/OWSError.m index 8a0da454d..5d05f686b 100644 --- a/SignalServiceKit/src/Util/OWSError.m +++ b/SignalServiceKit/src/Util/OWSError.m @@ -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