Refactor i18n pluralization

This commit is contained in:
Daniel Abrao 2024-04-14 19:51:05 -03:00 committed by psychedelicious
parent 1ca152f6c8
commit 22c6400bb8
2 changed files with 3 additions and 5 deletions

View File

@ -326,8 +326,8 @@
"drop": "Drop", "drop": "Drop",
"dropOrUpload": "$t(gallery.drop) or Upload", "dropOrUpload": "$t(gallery.drop) or Upload",
"dropToUpload": "$t(gallery.drop) to Upload", "dropToUpload": "$t(gallery.drop) to Upload",
"deleteImage": "Delete Image", "deleteImage_one": "Delete Image",
"deleteImage_plural": "Delete {{count}} Images", "deleteImage_other": "Delete {{count}} Images",
"deleteImageBin": "Deleted images will be sent to your operating system's Bin.", "deleteImageBin": "Deleted images will be sent to your operating system's Bin.",
"deleteImagePermanent": "Deleted images cannot be restored.", "deleteImagePermanent": "Deleted images cannot be restored.",
"download": "Download", "download": "Download",

View File

@ -80,9 +80,7 @@ const DeleteImageModal = () => {
return ( return (
<ConfirmationAlertDialog <ConfirmationAlertDialog
title={t(imagesToDelete.length > 1 ? 'gallery.deleteImage_plural' : 'gallery.deleteImage', { title={t('gallery.deleteImage', { count: imagesToDelete.length })}
count: imagesToDelete.length,
})}
isOpen={isModalOpen} isOpen={isModalOpen}
onClose={handleClose} onClose={handleClose}
cancelButtonText={t('boards.cancel')} cancelButtonText={t('boards.cancel')}