Backport comments from translations

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent a17db6c2da
commit 394cc6637c

@ -1260,7 +1260,7 @@ typedef enum : NSUInteger {
imageEdgeInsets.top = round((kBarButtonSize - image.size.height) * 0.5f); imageEdgeInsets.top = round((kBarButtonSize - image.size.height) * 0.5f);
imageEdgeInsets.bottom = round(kBarButtonSize - (image.size.height + imageEdgeInsets.top)); imageEdgeInsets.bottom = round(kBarButtonSize - (image.size.height + imageEdgeInsets.top));
callButton.imageEdgeInsets = imageEdgeInsets; 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 addTarget:self action:@selector(callAction) forControlEvents:UIControlEventTouchUpInside];
callButton.frame = CGRectMake(0, callButton.frame = CGRectMake(0,
0, 0,
@ -3414,9 +3414,8 @@ typedef enum : NSUInteger {
[chooseDocumentAction setValue:chooseDocumentImage forKey:@"image"]; [chooseDocumentAction setValue:chooseDocumentImage forKey:@"image"];
[actionSheetController addAction:chooseDocumentAction]; [actionSheetController addAction:chooseDocumentAction];
UIAlertAction *gifAction = UIAlertAction *gifAction = [UIAlertAction
[UIAlertAction actionWithTitle:NSLocalizedString(@"SELECT_GIF_BUTTON", actionWithTitle:NSLocalizedString(@"SELECT_GIF_BUTTON", @"Label for 'select GIF to attach' action sheet button")
@"Label for 'select gif to attach' action sheet button")
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler:^(UIAlertAction *_Nonnull action) { handler:^(UIAlertAction *_Nonnull action) {
[self showGifPicker]; [self showGifPicker];

@ -116,7 +116,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
target: self, target: self,
action: #selector(donePressed)) action: #selector(donePressed))
self.navigationItem.title = NSLocalizedString("GIF_PICKER_VIEW_TITLE", self.navigationItem.title = NSLocalizedString("GIF_PICKER_VIEW_TITLE",
comment: "Title for the 'gif picker' dialog.") comment: "Title for the 'GIF picker' dialog.")
createViews() createViews()
@ -158,7 +158,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
searchBar.searchBarStyle = .minimal searchBar.searchBarStyle = .minimal
searchBar.delegate = self searchBar.delegate = self
searchBar.placeholder = NSLocalizedString("GIF_VIEW_SEARCH_PLACEHOLDER_TEXT", 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 searchBar.backgroundColor = UIColor.white
self.view.addSubview(searchBar) self.view.addSubview(searchBar)
@ -205,7 +205,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
noResultsView.autoAlignAxis(.horizontal, toSameAxisOf: self.collectionView) noResultsView.autoAlignAxis(.horizontal, toSameAxisOf: self.collectionView)
let searchErrorView = createErrorLabel(text: NSLocalizedString("GIF_VIEW_SEARCH_ERROR", 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.searchErrorView = searchErrorView
self.view.addSubview(searchErrorView) self.view.addSubview(searchErrorView)
searchErrorView.autoPinWidthToSuperview(withMargin: 20) searchErrorView.autoPinWidthToSuperview(withMargin: 20)
@ -384,7 +384,7 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
return 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, message: error.localizedDescription,
preferredStyle: .alert) preferredStyle: .alert)
alert.addAction(UIAlertAction(title: CommonStrings.retryButton, style: .default) { _ in alert.addAction(UIAlertAction(title: CommonStrings.retryButton, style: .default) { _ in

@ -196,7 +196,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
ReminderView *missingContactsPermissionView = [ReminderView new]; ReminderView *missingContactsPermissionView = [ReminderView new];
missingContactsPermissionView.text = NSLocalizedString(@"INBOX_VIEW_MISSING_CONTACTS_PERMISSION", 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 = ^{ missingContactsPermissionView.tapAction = ^{
[[UIApplication sharedApplication] openSystemSettings]; [[UIApplication sharedApplication] openSystemSettings];
}; };

@ -209,7 +209,7 @@ class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailCompos
mailComposeViewController.setBccRecipients(recipientEmails) mailComposeViewController.setBccRecipients(recipientEmails)
let subject = NSLocalizedString("EMAIL_INVITE_SUBJECT", comment: "subject of email sent to contacts when inviting to install Signal") 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) let body = String.init(format: bodyFormat, installUrl, homepageUrl)
mailComposeViewController.setSubject(subject) mailComposeViewController.setSubject(subject)
mailComposeViewController.setMessageBody(body, isHTML: false) mailComposeViewController.setMessageBody(body, isHTML: false)

@ -84,7 +84,7 @@ NS_ASSUME_NONNULL_BEGIN
ReminderView *contactsPermissionReminderView = [[ReminderView alloc] ReminderView *contactsPermissionReminderView = [[ReminderView alloc]
initWithText:NSLocalizedString(@"COMPOSE_SCREEN_MISSING_CONTACTS_PERMISSION", 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:^{ tapAction:^{
[[UIApplication sharedApplication] openSystemSettings]; [[UIApplication sharedApplication] openSystemSettings];
}]; }];
@ -501,7 +501,7 @@ NS_ASSUME_NONNULL_BEGIN
} else { } else {
NSString *text = [NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT", NSString *text = [NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT",
@"Text for button to send a Signal invite via SMS. %@ is " @"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]; phoneNumber];
[phoneNumbersSection addItem:[OWSTableItem disclosureItemWithText:text [phoneNumbersSection addItem:[OWSTableItem disclosureItemWithText:text
customRowHeight:self.actionCellHeight customRowHeight:self.actionCellHeight
@ -590,7 +590,7 @@ NS_ASSUME_NONNULL_BEGIN
NSString *text = [NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT", NSString *text = [NSString stringWithFormat:NSLocalizedString(@"SEND_INVITE_VIA_SMS_BUTTON_FORMAT",
@"Text for button to send a Signal invite via SMS. %@ is " @"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]; displayName];
[inviteeSection addItem:[OWSTableItem disclosureItemWithText:text [inviteeSection addItem:[OWSTableItem disclosureItemWithText:text
customRowHeight:self.actionCellHeight customRowHeight:self.actionCellHeight

@ -109,7 +109,7 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68;
action:@selector(createGroup)]; action:@selector(createGroup)];
self.navigationItem.rightBarButtonItem.imageInsets = UIEdgeInsetsMake(0, -10, 0, 10); self.navigationItem.rightBarButtonItem.imageInsets = UIEdgeInsetsMake(0, -10, 0, 10);
self.navigationItem.rightBarButtonItem.accessibilityLabel 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. // First section.

@ -29,7 +29,7 @@ public class OWS2FAReminderViewController: UIViewController, PinEntryViewDelegat
override public func loadView() { override public func loadView() {
assert(ows2FAManager.pinCode != nil) 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)) self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(didPressCloseButton))
@ -41,8 +41,8 @@ public class OWS2FAReminderViewController: UIViewController, PinEntryViewDelegat
self.pinEntryView = pinEntryView self.pinEntryView = pinEntryView
pinEntryView.delegate = self 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 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 peridoically 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] let attributes = [NSFontAttributeName: pinEntryView.boldLabelFont]

@ -52,11 +52,11 @@ class SafetyNumberConfirmationAlert: NSObject {
let displayName = contactsManager.displayName(forPhoneIdentifier: untrustedIdentity.recipientId) let displayName = contactsManager.displayName(forPhoneIdentifier: untrustedIdentity.recipientId)
let titleFormat = NSLocalizedString("CONFIRM_SENDING_TO_CHANGED_IDENTITY_TITLE_FORMAT", 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 title = String(format: titleFormat, displayName)
let bodyFormat = NSLocalizedString("CONFIRM_SENDING_TO_CHANGED_IDENTITY_BODY_FORMAT", 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 body = String(format: bodyFormat, displayName)
let actionSheetController = UIAlertController(title: title, message: body, preferredStyle: .actionSheet) 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 import Foundation
@ -17,9 +17,9 @@ extension GiphyError: LocalizedError {
public var errorDescription: String? { public var errorDescription: String? {
switch self { switch self {
case .assertionError: 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: 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.")
} }
} }
} }

@ -218,7 +218,7 @@ import CloudKit
Logger.error("\(self.logTag) error preparing file for upload.") Logger.error("\(self.logTag) error preparing file for upload.")
failure(OWSErrorWithCodeDescription(.exportBackupError, failure(OWSErrorWithCodeDescription(.exportBackupError,
NSLocalizedString("BACKUP_EXPORT_ERROR_SAVE_FILE_TO_CLOUD_FAILED", 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 return
} }

@ -322,7 +322,7 @@ NS_ASSUME_NONNULL_BEGIN
} else { } else {
[weakSelf failWithErrorDescription: [weakSelf failWithErrorDescription:
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT", 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; __weak OWSBackupExportJob *weakSelf = self;
[self configureExportWithCompletion:^(BOOL configureExportSuccess) { [self configureExportWithCompletion:^(BOOL configureExportSuccess) {
if (!configureExportSuccess) { if (!configureExportSuccess) {
[self failWithErrorDescription: [self
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT", 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; return;
} }
@ -350,7 +350,7 @@ NS_ASSUME_NONNULL_BEGIN
if (!tryToFetchManifestSuccess) { if (!tryToFetchManifestSuccess) {
[self failWithErrorDescription: [self failWithErrorDescription:
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT", 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; return;
} }
@ -363,7 +363,7 @@ NS_ASSUME_NONNULL_BEGIN
if (![self exportDatabase]) { if (![self exportDatabase]) {
[self failWithErrorDescription: [self failWithErrorDescription:
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT", 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; return;
} }
if (self.isComplete) { if (self.isComplete) {
@ -918,7 +918,7 @@ NS_ASSUME_NONNULL_BEGIN
if (!encryptedItem) { if (!encryptedItem) {
completion(OWSErrorWithCodeDescription(OWSErrorCodeExportBackupFailed, completion(OWSErrorWithCodeDescription(OWSErrorCodeExportBackupFailed,
NSLocalizedString(@"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT", 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; return;
} }

@ -53,7 +53,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
} else { } else {
[weakSelf failWithErrorDescription: [weakSelf failWithErrorDescription:
NSLocalizedString(@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT", 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]) { if (![self configureImport]) {
[self failWithErrorDescription:NSLocalizedString(@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT", [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; return;
} }
@ -132,7 +132,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
if (!restoreDatabaseSuccess) { if (!restoreDatabaseSuccess) {
[weakSelf [weakSelf
failWithErrorDescription:NSLocalizedString(@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT", 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.")]; @"could not import the user's data.")];
return; return;
} }
@ -145,7 +145,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
if (!ensureMigrationsSuccess) { if (!ensureMigrationsSuccess) {
[weakSelf failWithErrorDescription:NSLocalizedString( [weakSelf failWithErrorDescription:NSLocalizedString(
@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT", @"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT",
@"Error indicating the a backup import " @"Error indicating the backup import "
@"could not import the user's data.")]; @"could not import the user's data.")];
return; return;
} }

@ -179,7 +179,7 @@ NSString *const kOWSBackup_KeychainService = @"kOWSBackup_KeychainService";
failure:^{ failure:^{
failure(OWSErrorWithCodeDescription(OWSErrorCodeImportBackupFailed, failure(OWSErrorWithCodeDescription(OWSErrorCodeImportBackupFailed,
NSLocalizedString(@"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT", 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]; backupIO:backupIO];
}); });

@ -293,16 +293,15 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error
preferredStyle:UIAlertControllerStyleAlert]; preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction [alert addAction:[UIAlertAction
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_EMAIL", 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 style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) { handler:^(UIAlertAction *action) {
[Pastelog.sharedManager submitEmail:url]; [Pastelog.sharedManager submitEmail:url];
completion(); completion();
}]]; }]];
[alert addAction:[UIAlertAction [alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_COPY_LINK",
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_COPY_LINK", @"Label for the 'copy link' option of the debug log alert.")
@"Label for the 'copy link' option of the the debug log alert.")
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) { handler:^(UIAlertAction *action) {
UIPasteboard *pb = [UIPasteboard generalPasteboard]; UIPasteboard *pb = [UIPasteboard generalPasteboard];
@ -311,32 +310,30 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error
completion(); completion();
}]]; }]];
#ifdef DEBUG #ifdef DEBUG
[alert addAction:[UIAlertAction [alert
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SEND_TO_SELF", addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SEND_TO_SELF",
@"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.")
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) { handler:^(UIAlertAction *action) {
[Pastelog.sharedManager sendToSelf:url]; [Pastelog.sharedManager sendToSelf:url];
}]]; }]];
[alert [alert addAction:[UIAlertAction
addAction:[UIAlertAction
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SEND_TO_LAST_THREAD", actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SEND_TO_LAST_THREAD",
@"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.")
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) { handler:^(UIAlertAction *action) {
[Pastelog.sharedManager sendToMostRecentThread:url]; [Pastelog.sharedManager sendToMostRecentThread:url];
}]]; }]];
#endif #endif
[alert [alert addAction:[UIAlertAction
addAction:[UIAlertAction
actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_BUG_REPORT", actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_BUG_REPORT",
@"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.")
style:UIAlertActionStyleDefault style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) { handler:^(UIAlertAction *action) {
[Pastelog.sharedManager prepareRedirection:url completion:completion]; [Pastelog.sharedManager prepareRedirection:url completion:completion];
}]]; }]];
[alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"DEBUG_LOG_ALERT_OPTION_SHARE", [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 style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) { handler:^(UIAlertAction *action) {
[AttachmentSharing showShareUIForText:url.absoluteString [AttachmentSharing showShareUIForText:url.absoluteString
@ -488,9 +485,9 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error
UIAlertController *alert = UIAlertController *alert =
[UIAlertController alertControllerWithTitle:NSLocalizedString(@"DEBUG_LOG_GITHUB_ISSUE_ALERT_TITLE", [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: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]; preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction [alert addAction:[UIAlertAction
actionWithTitle:NSLocalizedString(@"OK", @"") actionWithTitle:NSLocalizedString(@"OK", @"")

@ -78,7 +78,7 @@ public class DisappearingTimerConfigurationView: UIView {
// or as a non-interactive status indicator // or as a non-interactive status indicator
pressGesture.isEnabled = false pressGesture.isEnabled = false
// Accessability // Accessibility
self.accessibilityLabel = NSLocalizedString("DISAPPEARING_MESSAGES_LABEL", comment: "Accessibility label for disappearing messages") 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 hintFormatString = NSLocalizedString("DISAPPEARING_MESSAGES_HINT", comment: "Accessibility hint that contains current timeout information")
let durationString = NSString.formatDurationSeconds(durationSeconds, useShortFormat: false) let durationString = NSString.formatDurationSeconds(durationSeconds, useShortFormat: false)

@ -205,7 +205,7 @@ public class AttachmentApprovalViewController: OWSViewController, CaptioningTool
self.mediaMessageView.videoPlayButton?.isHidden = true self.mediaMessageView.videoPlayButton?.isHidden = true
let playButton = UIButton() let playButton = UIButton()
self.playVideoButton = playButton 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.setBackgroundImage(#imageLiteral(resourceName: "play_button"), for: .normal)
playButton.contentMode = .scaleAspectFit playButton.contentMode = .scaleAspectFit

@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
= NSLocalizedString(@"PHONE_NUMBER_TYPE_WORK", @"Label for 'Work' phone numbers."); = NSLocalizedString(@"PHONE_NUMBER_TYPE_WORK", @"Label for 'Work' phone numbers.");
} else if ([phoneNumberField.label isEqualToString:CNLabelPhoneNumberiPhone]) { } else if ([phoneNumberField.label isEqualToString:CNLabelPhoneNumberiPhone]) {
phoneNumberNameMap[phoneNumber.stringValue] 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]) { } else if ([phoneNumberField.label isEqualToString:CNLabelPhoneNumberMobile]) {
phoneNumberNameMap[phoneNumber.stringValue] phoneNumberNameMap[phoneNumber.stringValue]
= NSLocalizedString(@"PHONE_NUMBER_TYPE_MOBILE", @"Label for 'Mobile' phone numbers."); = 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. // a voice note vs. other arbitrary audio attachments.
if (self.isVoiceMessage || !self.sourceFilename || self.sourceFilename.length == 0) { if (self.isVoiceMessage || !self.sourceFilename || self.sourceFilename.length == 0) {
attachmentString = NSLocalizedString(@"ATTACHMENT_TYPE_VOICE_MESSAGE", 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]; return [NSString stringWithFormat:@"🎤 %@", attachmentString];
} else { } else {
return [NSString stringWithFormat:@"📻 %@", attachmentString]; return [NSString stringWithFormat:@"📻 %@", attachmentString];

@ -144,7 +144,7 @@ typedef void (^failureBlock)(NSURLSessionDataTask *task, NSError *error);
failureBlock(task, failureBlock(task,
[self errorWithHTTPCode:statusCode [self errorWithHTTPCode:statusCode
description:NSLocalizedString(@"ERROR_DESCRIPTION_NO_INTERNET", 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 failureReason:networkError.localizedFailureReason
recoverySuggestion:NSLocalizedString(@"NETWORK_ERROR_RECOVERY", nil) recoverySuggestion:NSLocalizedString(@"NETWORK_ERROR_RECOVERY", nil)
fallbackError:networkError]); fallbackError:networkError]);

@ -248,7 +248,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SECONDS_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_SECONDS_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of seconds}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5s' not '5 s'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SECONDS", amountFormat = NSLocalizedString(@"TIME_AMOUNT_SECONDS",
@ -261,7 +261,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of minutes}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5m' not '5 m'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_MINUTE", amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_MINUTE",
@ -273,7 +273,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of minutes}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5m' not '5 m'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES", amountFormat = NSLocalizedString(@"TIME_AMOUNT_MINUTES",
@ -286,7 +286,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of hours}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5h' not '5 h'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_HOUR", amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_HOUR",
@ -299,7 +299,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of hours}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5h' not '5 h'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS", amountFormat = NSLocalizedString(@"TIME_AMOUNT_HOURS",
@ -312,7 +312,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of days}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5d' not '5 d'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_DAY", amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_DAY",
@ -325,7 +325,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of days}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5d' not '5 d'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS", amountFormat = NSLocalizedString(@"TIME_AMOUNT_DAYS",
@ -338,7 +338,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_WEEKS_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_WEEKS_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of weeks}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5w' not '5 w'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_WEEK", amountFormat = NSLocalizedString(@"TIME_AMOUNT_SINGLE_WEEK",
@ -351,7 +351,7 @@ NS_ASSUME_NONNULL_BEGIN
if (useShortFormat) { if (useShortFormat) {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_WEEKS_SHORT_FORMAT", amountFormat = NSLocalizedString(@"TIME_AMOUNT_WEEKS_SHORT_FORMAT",
@"Label text below navbar button, embeds {{number of weeks}}. Must be very short, like 1 or 2 " @"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"); @"we get, e.g. '5w' not '5 w'. See other *_TIME_AMOUNT strings");
} else { } else {
amountFormat = NSLocalizedString(@"TIME_AMOUNT_WEEKS", 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" #import "OWSError.h"
@ -53,21 +53,21 @@ NSError *OWSErrorMakeMessageSendDisabledDueToPreKeyUpdateFailuresError()
{ {
return OWSErrorWithCodeDescription(OWSErrorCodeMessageSendDisabledDueToPreKeyUpdateFailures, return OWSErrorWithCodeDescription(OWSErrorCodeMessageSendDisabledDueToPreKeyUpdateFailures,
NSLocalizedString(@"ERROR_DESCRIPTION_MESSAGE_SEND_DISABLED_PREKEY_UPDATE_FAILURES", 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() NSError *OWSErrorMakeMessageSendFailedToBlockListError()
{ {
return OWSErrorWithCodeDescription(OWSErrorCodeMessageSendFailedToBlockList, return OWSErrorWithCodeDescription(OWSErrorCodeMessageSendFailedToBlockList,
NSLocalizedString(@"ERROR_DESCRIPTION_MESSAGE_SEND_FAILED_DUE_TO_BLOCK_LIST", 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() NSError *OWSErrorMakeWriteAttachmentDataError()
{ {
return OWSErrorWithCodeDescription(OWSErrorCodeCouldNotWriteAttachmentData, return OWSErrorWithCodeDescription(OWSErrorCodeCouldNotWriteAttachmentData,
NSLocalizedString(@"ERROR_DESCRIPTION_MESSAGE_SEND_FAILED_DUE_TO_FAILED_ATTACHMENT_WRITE", 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 NS_ASSUME_NONNULL_END

Loading…
Cancel
Save