Pluralize backup strings.

This commit is contained in:
Alex Hart
2024-06-28 11:56:27 -03:00
committed by Cody Henthorne
parent 5b949b0116
commit 3879a8ffdb
2 changed files with 11 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
@@ -199,7 +200,7 @@ private fun MediaBackupsAreOffBody(
daysUntilDeletion: Long daysUntilDeletion: Long
) { ) {
Text( Text(
text = stringResource(id = R.string.BackupAlertBottomSheet__your_signal_media_backup_plan, daysUntilDeletion), text = pluralStringResource(id = R.plurals.BackupAlertBottomSheet__your_signal_media_backup_plan, daysUntilDeletion.toInt(), daysUntilDeletion),
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier.padding(bottom = 24.dp) modifier = Modifier.padding(bottom = 24.dp)
) )
@@ -238,7 +239,7 @@ private fun DiskFullBody(
) )
Text( Text(
text = stringResource(id = R.string.BackupAlertBottomSheet__if_you_choose_skip, daysUntilDeletion), // TODO [message-backups] Learn More link text = pluralStringResource(id = R.plurals.BackupAlertBottomSheet__if_you_choose_skip, daysUntilDeletion.toInt(), daysUntilDeletion), // TODO [message-backups] Learn More link
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier.padding(bottom = 36.dp) modifier = Modifier.padding(bottom = 36.dp)
) )

View File

@@ -6999,7 +6999,10 @@
<!-- Sheet title when media backups have been disabled --> <!-- Sheet title when media backups have been disabled -->
<string name="BackupAlertBottomSheet__media_backups_are_off">Media backups are off</string> <string name="BackupAlertBottomSheet__media_backups_are_off">Media backups are off</string>
<!-- Sheet body part 1 when media backups have been disabled. Placeholder is the number of days until deletion. --> <!-- Sheet body part 1 when media backups have been disabled. Placeholder is the number of days until deletion. -->
<string name="BackupAlertBottomSheet__your_signal_media_backup_plan">Your Signal media backup plan has been canceled because we couldn\'t process your payment. You have %1$d days to download any media stored in your backup. After %1$d days, the media in your backup will be deleted.</string> <plurals name="BackupAlertBottomSheet__your_signal_media_backup_plan">
<item quantity="one">Your Signal media backup plan has been canceled because we couldn\'t process your payment. You have %1$d day to download any media stored in your backup. After %1$d day, the media in your backup will be deleted.</item>
<item quantity="other">Your Signal media backup plan has been canceled because we couldn\'t process your payment. You have %1$d days to download any media stored in your backup. After %1$d days, the media in your backup will be deleted.</item>
</plurals>
<!-- Sheet body part 2 when media backups have been disabled. --> <!-- Sheet body part 2 when media backups have been disabled. -->
<string name="BackupAlertBottomSheet__you_can_begin_paying_for_backups_again">You can begin paying for backups again at any time to continue backing up all your media. </string> <string name="BackupAlertBottomSheet__you_can_begin_paying_for_backups_again">You can begin paying for backups again at any time to continue backing up all your media. </string>
<!-- Sheet title when user's media will be deleted today --> <!-- Sheet title when user's media will be deleted today -->
@@ -7011,7 +7014,10 @@
<!-- Sheet body part 1 when user does not have enough space to download their backup. Placeholder is the amount of space needed. --> <!-- Sheet body part 1 when user does not have enough space to download their backup. Placeholder is the amount of space needed. -->
<string name="BackupAlertBottomSheet__your_device_does_not_have_enough_free_space">Your device does not have enough free space. Free up to %1$s of space to download the media stored in your backup.</string> <string name="BackupAlertBottomSheet__your_device_does_not_have_enough_free_space">Your device does not have enough free space. Free up to %1$s of space to download the media stored in your backup.</string>
<!-- Sheet body part 2 when user does not have enough space to download their backup. Placeholder is the number of days until deletion --> <!-- Sheet body part 2 when user does not have enough space to download their backup. Placeholder is the number of days until deletion -->
<string name="BackupAlertBottomSheet__if_you_choose_skip">If you choose \"Skip\" the media in your backup will be deleted in %1$d days.</string> <plurals name="BackupAlertBottomSheet__if_you_choose_skip">
<item quantity="one">If you choose \"Skip\" the media in your backup will be deleted in %1$d day.</item>
<item quantity="other">If you choose \"Skip\" the media in your backup will be deleted in %1$d days.</item>
</plurals>
<!-- Sheet title when user payment failed to process --> <!-- Sheet title when user payment failed to process -->
<string name="BackupAlertBottomSheet__cant_process_backup_payment">Can\'t process backup payment</string> <string name="BackupAlertBottomSheet__cant_process_backup_payment">Can\'t process backup payment</string>
<!-- Sheet body when user payment failed to process --> <!-- Sheet body when user payment failed to process -->