Respond to CR.

pull/1/head
Matthew Chen 7 years ago
parent 0ba47808a8
commit 24cc95585f

@ -88,15 +88,16 @@ NS_ASSUME_NONNULL_BEGIN
if (OWSBackup.sharedManager.backupExportProgress) {
NSUInteger progressPercent
= (NSUInteger)round(OWSBackup.sharedManager.backupExportProgress.floatValue * 100);
NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setNumberStyle:NSNumberFormatterPercentStyle];
[numberFormatter setMaximumFractionDigits:0];
[numberFormatter setMultiplier:@1];
NSString *progressString = [numberFormatter stringFromNumber:@(progressPercent)];
[progressSection
addItem:[OWSTableItem
labelItemWithText:NSLocalizedString(@"SETTINGS_BACKUP_PROGRESS",
@"Label for phase row in the in the backup settings view.")
accessoryText:[NSString
stringWithFormat:NSLocalizedString(@"PERCENTAGE_FORMAT",
@"Format for percentages, e.g. 65%. "
@"Embeds {{percentage}}, e.g. 65."),
@(progressPercent).stringValue]]];
accessoryText:progressString]];
}
}
}

@ -552,10 +552,10 @@ import CloudKit
// MARK: - Retry
private enum CKOutcome {
private enum APIOutcome {
case success
case failureDoNotRetry(error:Error)
case failureRetryAfterDelay(retryDelay: Double)
case failureRetryAfterDelay(retryDelay: TimeInterval)
case failureRetryWithoutDelay
// This only applies to fetches.
case unknownItem
@ -563,7 +563,7 @@ import CloudKit
private class func outcomeForCloudKitError(error: Error?,
remainingRetries: Int,
label: String) -> CKOutcome {
label: String) -> APIOutcome {
if let error = error as? CKError {
if error.code == CKError.unknownItem {
// This is not always an error for our purposes.

@ -160,6 +160,9 @@
/* Error indicating the a backup export could not export the user's data. */
"BACKUP_EXPORT_ERROR_COULD_NOT_EXPORT" = "Backup data could be exported.";
/* Error indicating that the app received an invalid response from CloudKit. */
"BACKUP_EXPORT_ERROR_INVALID_CLOUDKIT_RESPONSE" = "Invalid server response.";
/* Error indicating the a backup export failed to save a file to the cloud. */
"BACKUP_EXPORT_ERROR_SAVE_FILE_TO_CLOUD_FAILED" = "Backup could not upload data.";
@ -178,9 +181,6 @@
/* Error indicating the a backup import could not import the user's data. */
"BACKUP_IMPORT_ERROR_COULD_NOT_IMPORT" = "Backup could not be imported.";
/* Error indicating the a backup import failed to download a file from the cloud. */
"BACKUP_IMPORT_ERROR_DOWNLOAD_FILE_FROM_CLOUD_FAILED" = "Could not download backup data.";
/* Indicates that the backup import is being configured. */
"BACKUP_IMPORT_PHASE_CONFIGURATION" = "Configuring Backup";
@ -1225,9 +1225,6 @@
/* A display format for oversize text messages. */
"OVERSIZE_TEXT_DISPLAY_FORMAT" = "%@…";
/* Format for percentages, e.g. 65%. Embeds {{percentage}}, e.g. 65. */
"PERCENTAGE_FORMAT" = "%@%%";
/* A format for a label showing an example phone number. Embeds {{the example phone number}}. */
"PHONE_NUMBER_EXAMPLE_FORMAT" = "Example: %@";

Loading…
Cancel
Save