Converted hardcoded pluralization strings to Android plural resources. (#176)

This commit is contained in:
Aryan 2026-04-12 17:51:23 +05:30 committed by GitHub
parent 3f840a47c8
commit 2c03f125a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 38 additions and 15 deletions

View file

@ -1515,11 +1515,10 @@ private fun RemoveFromShelfConfirmationDialog(
onConfirm: () -> Unit,
onDismiss: () -> Unit
) {
val bookStr = pluralStringResource(id = R.plurals.book_word, count)
AlertDialog(
onDismissRequest = onDismiss,
title = { Text(stringResource(R.string.dialog_remove_from_shelf)) },
text = { Text(stringResource(R.string.dialog_remove_from_shelf_desc, count, bookStr, shelfName)) },
text = { Text(pluralStringResource(R.plurals.dialog_remove_from_shelf_desc, count, count, shelfName)) },
confirmButton = {
TextButton(onClick = onConfirm) { Text(stringResource(R.string.action_remove)) }
},