From 22c6400bb87bfa909f067c9a6e814cb534cdd266 Mon Sep 17 00:00:00 2001 From: Daniel Abrao Date: Sun, 14 Apr 2024 19:51:05 -0300 Subject: [PATCH] Refactor i18n pluralization --- invokeai/frontend/web/public/locales/en.json | 4 ++-- .../features/deleteImageModal/components/DeleteImageModal.tsx | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 26e294f422..2f4e70005f 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -326,8 +326,8 @@ "drop": "Drop", "dropOrUpload": "$t(gallery.drop) or Upload", "dropToUpload": "$t(gallery.drop) to Upload", - "deleteImage": "Delete Image", - "deleteImage_plural": "Delete {{count}} Images", + "deleteImage_one": "Delete Image", + "deleteImage_other": "Delete {{count}} Images", "deleteImageBin": "Deleted images will be sent to your operating system's Bin.", "deleteImagePermanent": "Deleted images cannot be restored.", "download": "Download", diff --git a/invokeai/frontend/web/src/features/deleteImageModal/components/DeleteImageModal.tsx b/invokeai/frontend/web/src/features/deleteImageModal/components/DeleteImageModal.tsx index 7a1d670d2c..d5c8f11f81 100644 --- a/invokeai/frontend/web/src/features/deleteImageModal/components/DeleteImageModal.tsx +++ b/invokeai/frontend/web/src/features/deleteImageModal/components/DeleteImageModal.tsx @@ -80,9 +80,7 @@ const DeleteImageModal = () => { return ( 1 ? 'gallery.deleteImage_plural' : 'gallery.deleteImage', { - count: imagesToDelete.length, - })} + title={t('gallery.deleteImage', { count: imagesToDelete.length })} isOpen={isModalOpen} onClose={handleClose} cancelButtonText={t('boards.cancel')}