Replace string with plural resource.

This commit is contained in:
Alex Hart 2025-01-17 16:53:53 -04:00 committed by Greyson Parrelli
parent e370d40560
commit 6a767c40b9
2 changed files with 5 additions and 2 deletions

View file

@ -365,7 +365,7 @@ private fun CouldNotCompleteBackup(
daysSinceLastBackup: Int
) {
Text(
text = stringResource(id = R.string.BackupAlertBottomSheet__your_device_hasnt, daysSinceLastBackup),
text = pluralStringResource(id = R.plurals.BackupAlertBottomSheet__your_device_hasnt, daysSinceLastBackup, daysSinceLastBackup),
textAlign = TextAlign.Center,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(bottom = 60.dp)

View file

@ -7533,7 +7533,10 @@
<!-- Sheet title for generic backup error -->
<string name="BackupAlertBottomSheet__couldnt_complete_backup">Couldn\'t complete backup</string>
<!-- Sheet body for generic backup error. Placeholder is days since last backup. -->
<string name="BackupAlertBottomSheet__your_device_hasnt">Your device hasn\'t completed a backup for %1$d days. Make sure your device is connected to wi-fi and tap \"Back up now.\" </string>
<plurals name="BackupAlertBottomSheet__your_device_hasnt">
<item quantity="one">Your device hasn\'t completed a backup for %1$d day. Make sure your device is connected to wi-fi and tap \"Back up now.\" </item>
<item quantity="other">Your device hasn\'t completed a backup for %1$d days. Make sure your device is connected to wi-fi and tap \"Back up now.\"</item>
</plurals>
<!-- Clickable text to learn more about the content of this bottom sheet -->
<string name="BackupAlertBottomSheet__learn_more">Learn more</string>
<!-- Secondary action button text when user does not have enough free space to download their backup. -->