diff --git a/Signal/Backups/BackupSettingsViewController.swift b/Signal/Backups/BackupSettingsViewController.swift index 57e4b68a6c..80284f3ae2 100644 --- a/Signal/Backups/BackupSettingsViewController.swift +++ b/Signal/Backups/BackupSettingsViewController.swift @@ -1760,7 +1760,7 @@ private struct BackupAttachmentDownloadProgressView: View { "BACKUP_SETTINGS_DOWNLOAD_PROGRESS_SUBTITLE_SUSPENDED", comment: "Subtitle for a view explaining that downloads are available but not running. Embeds {{ the amount available to download as a file size, e.g. 100 MB }}." ), - latestDownloadUpdate.totalBytesToDownload.formatted(.byteCount(style: .decimal)) + latestDownloadUpdate.totalBytesToDownload.formatted(.byteCount(style: .decimal, spellsOutZero: false)) ) case .disabling, .paidExpiringSoon: String( @@ -1768,7 +1768,7 @@ private struct BackupAttachmentDownloadProgressView: View { "BACKUP_SETTINGS_DOWNLOAD_PROGRESS_SUBTITLE_SUSPENDED_PAID_SUBSCRIPTION_EXPIRING", comment: "Subtitle for a view explaining that downloads are available but not running, and the user's paid subscription is expiring. Embeds {{ the amount available to download as a file size, e.g. 100 MB }}." ), - latestDownloadUpdate.totalBytesToDownload.formatted(.byteCount(style: .decimal)) + latestDownloadUpdate.totalBytesToDownload.formatted(.byteCount(style: .decimal, spellsOutZero: false)) ) } case .running: @@ -1777,8 +1777,8 @@ private struct BackupAttachmentDownloadProgressView: View { "BACKUP_SETTINGS_DOWNLOAD_PROGRESS_SUBTITLE_RUNNING", comment: "Subtitle for a progress bar tracking active downloading. Embeds 1:{{ the amount downloaded as a file size, e.g. 100 MB }}; 2:{{ the total amount to download as a file size, e.g. 1 GB }}; 3:{{ the amount downloaded as a percentage, e.g. 10% }}." ), - latestDownloadUpdate.bytesDownloaded.formatted(.byteCount(style: .decimal)), - latestDownloadUpdate.totalBytesToDownload.formatted(.byteCount(style: .decimal)), + latestDownloadUpdate.bytesDownloaded.formatted(.byteCount(style: .decimal, spellsOutZero: false)), + latestDownloadUpdate.totalBytesToDownload.formatted(.byteCount(style: .decimal, spellsOutZero: false)), latestDownloadUpdate.percentageDownloaded.formatted(.percent.precision(.fractionLength(0))), ) case .pausedLowBattery: @@ -1807,7 +1807,7 @@ private struct BackupAttachmentDownloadProgressView: View { "BACKUP_SETTINGS_DOWNLOAD_PROGRESS_SUBTITLE_PAUSED_NEEDS_DISK_SPACE", comment: "Subtitle for a progress bar tracking downloads that are paused because they need more disk space available. Embeds {{ the amount of space needed as a file size, e.g. 100 MB }}." ), - bytesRequired.formatted(.byteCount(style: .decimal)) + bytesRequired.formatted(.byteCount(style: .decimal, spellsOutZero: false)) ) } @@ -1906,8 +1906,8 @@ private struct BackupAttachmentUploadProgressView: View { "BACKUP_SETTINGS_UPLOAD_PROGRESS_SUBTITLE_RUNNING", comment: "Subtitle for a progress bar tracking active uploading. Embeds 1:{{ the amount uploaded as a file size, e.g. 100 MB }}; 2:{{ the total amount to upload as a file size, e.g. 1 GB }}." ), - uploadUpdate.bytesUploaded.formatted(.byteCount(style: .decimal)), - uploadUpdate.totalBytesToUpload.formatted(.byteCount(style: .decimal)), + uploadUpdate.bytesUploaded.formatted(.byteCount(style: .decimal, spellsOutZero: false)), + uploadUpdate.totalBytesToUpload.formatted(.byteCount(style: .decimal, spellsOutZero: false)), ) case .pausedLowBattery: OWSLocalizedString( @@ -2205,7 +2205,7 @@ private struct BackupDetailsView: View { )) Spacer() if let lastBackupSizeBytes { - Text(lastBackupSizeBytes.formatted(.byteCount(style: .decimal))) + Text(lastBackupSizeBytes.formatted(.byteCount(style: .decimal, spellsOutZero: false))) .foregroundStyle(Color.Signal.secondaryLabel) } } diff --git a/Signal/Provisioning/UserInterface/LinkAndSyncProvisioningProgressViewController.swift b/Signal/Provisioning/UserInterface/LinkAndSyncProvisioningProgressViewController.swift index bd059b8231..2d203b6ab7 100644 --- a/Signal/Provisioning/UserInterface/LinkAndSyncProvisioningProgressViewController.swift +++ b/Signal/Provisioning/UserInterface/LinkAndSyncProvisioningProgressViewController.swift @@ -172,7 +172,7 @@ struct LinkAndSyncProvisioningProgressView: View { } private var byteCountFormat: ByteCountFormatStyle { - .byteCount(style: .decimal, allowedUnits: [.mb, .gb]) + .byteCount(style: .decimal, allowedUnits: [.mb, .gb], spellsOutZero: false) } private var subtitle: String { diff --git a/Signal/src/ViewControllers/AppSettings/Linked Devices/BackupProgressModal.swift b/Signal/src/ViewControllers/AppSettings/Linked Devices/BackupProgressModal.swift index a57cd90eec..9808eaa35c 100644 --- a/Signal/src/ViewControllers/AppSettings/Linked Devices/BackupProgressModal.swift +++ b/Signal/src/ViewControllers/AppSettings/Linked Devices/BackupProgressModal.swift @@ -226,7 +226,7 @@ struct BackupProgressView: View { } private var byteCountFormat: ByteCountFormatStyle { - .byteCount(style: .decimal, allowedUnits: [.mb, .gb]) + .byteCount(style: .decimal, allowedUnits: [.mb, .gb], spellsOutZero: false) } private var progressString: String {