"Zero kB" ==> "0 kB" in backups progress bars
This commit is contained in:
parent
c3096a0740
commit
d49113ded7
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user