diff --git a/i18n/en.json b/i18n/en.json index 743b269b28..934227f3b9 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -593,6 +593,7 @@ "asset_viewer_settings_title": "Asset Viewer", "assets": "Assets", "assets_added_to_album_count": "Added {count, plural, one {# asset} other {# assets}} to the album", + "assets_added_to_album_partial_count": "Added {successCount} out of {totalCount} {totalCount, plural, one {asset} other {assets}} to the album", "assets_added_to_albums_count": "Added {assetTotal, plural, one {# asset} other {# assets}} to {albumTotal, plural, one {# album} other {# albums}}", "assets_cannot_be_added_to_album_count": "{count, plural, one {Asset} other {Assets}} cannot be added to the album", "assets_cannot_be_added_to_albums": "{count, plural, one {Asset} other {Assets}} cannot be added to any of the albums", diff --git a/web/src/lib/services/album.service.ts b/web/src/lib/services/album.service.ts index 09796d440a..fc09a11215 100644 --- a/web/src/lib/services/album.service.ts +++ b/web/src/lib/services/album.service.ts @@ -134,10 +134,13 @@ const notifyAddToAlbum = ($t: MessageFormatter, albumId: string, assetIds: strin const successCount = results.filter(({ success }) => success).length; const duplicateCount = results.filter(({ error }) => error === 'duplicate').length; let description = $t('assets_cannot_be_added_to_album_count', { values: { count: assetIds.length } }); - if (successCount > 0) { - description = $t('assets_added_to_album_count', { values: { count: successCount } }); - } else if (duplicateCount > 0) { + + if (duplicateCount === assetIds.length) { description = $t('assets_were_part_of_album_count', { values: { count: duplicateCount } }); + } else if (successCount === assetIds.length) { + description = $t('assets_added_to_album_count', { values: { count: successCount } }); + } else if (successCount > 0) { + description = $t('assets_added_to_album_partial_count', { values: { successCount, totalCount: assetIds.length } }); } toastManager.primary(