diff --git a/src/app/drive/components/ItemDetailsDialog/ItemDetailsDialog.tsx b/src/app/drive/components/ItemDetailsDialog/ItemDetailsDialog.tsx index 531ab76d9..1c8686421 100644 --- a/src/app/drive/components/ItemDetailsDialog/ItemDetailsDialog.tsx +++ b/src/app/drive/components/ItemDetailsDialog/ItemDetailsDialog.tsx @@ -142,12 +142,10 @@ const ItemDetailsDialog = ({ onClose(); }; - const MAX_DISPLAYABLE_FILE_COUNT = 1000; - - const formatFileCount = (count: number | undefined) => { - if (count === undefined) return undefined; - if (count > MAX_DISPLAYABLE_FILE_COUNT) return translate('modals.itemDetailsModal.fileCountMoreThan1000'); - return translate('modals.itemDetailsModal.fileCount', { count }); + const formatFileCount = (folderStats?: FolderStatsResponse) => { + if (folderStats?.fileCount === undefined) return undefined; + const key = folderStats.isFileCountExact ? 'fileCount' : 'fileCountMoreThan'; + return translate(`modals.itemDetailsModal.${key}`, { count: folderStats.fileCount }); }; const getFolderStats = (item: DriveItemDetails, itemUuid: string) => { @@ -205,7 +203,7 @@ const ItemDetailsDialog = ({ name: item.name, shared: isShared, type: item.isFolder ? undefined : item.type, - numberOfFiles: item.isFolder ? formatFileCount(folderStats?.fileCount) : undefined, + numberOfFiles: item.isFolder ? formatFileCount(folderStats) : undefined, size, uploaded, modified, diff --git a/src/app/i18n/locales/de.json b/src/app/i18n/locales/de.json index 39c81e4fa..ce0d787de 100644 --- a/src/app/i18n/locales/de.json +++ b/src/app/i18n/locales/de.json @@ -804,7 +804,7 @@ }, "fileCount_one": "{{count}} Datei", "fileCount_other": "{{count}} Dateien", - "fileCountMoreThan1000": "Mehr als 1000 Dateien" + "fileCountMoreThan": "{{count}}+ Dateien" }, "versionHistory": { "title": "Versionsverlauf", diff --git a/src/app/i18n/locales/en.json b/src/app/i18n/locales/en.json index e12762466..a64601317 100644 --- a/src/app/i18n/locales/en.json +++ b/src/app/i18n/locales/en.json @@ -901,7 +901,7 @@ }, "fileCount_one": "{{count}} file", "fileCount_other": "{{count}} files", - "fileCountMoreThan1000": "1000+ files" + "fileCountMoreThan": "{{count}}+ files" }, "versionHistory": { "title": "Version history", diff --git a/src/app/i18n/locales/es.json b/src/app/i18n/locales/es.json index d73f650d3..13eedbd62 100644 --- a/src/app/i18n/locales/es.json +++ b/src/app/i18n/locales/es.json @@ -883,7 +883,7 @@ }, "fileCount_one": "{{count}} archivo", "fileCount_other": "{{count}} archivos", - "fileCountMoreThan1000": "Más de 1000 archivos" + "fileCountMoreThan": "{{count}}+ archivos" }, "versionHistory": { "title": "Historial de versiones", diff --git a/src/app/i18n/locales/fr.json b/src/app/i18n/locales/fr.json index 057e2b7a3..a4a73f8d8 100644 --- a/src/app/i18n/locales/fr.json +++ b/src/app/i18n/locales/fr.json @@ -825,7 +825,7 @@ }, "fileCount_one": "{{count}} fichier", "fileCount_other": "{{count}} fichiers", - "fileCountMoreThan1000": "Plus de 1000 fichiers" + "fileCountMoreThan": "{{count}}+ fichiers" }, "versionHistory": { "title": "Historique des versions", diff --git a/src/app/i18n/locales/it.json b/src/app/i18n/locales/it.json index 3427b0c64..4d2923695 100644 --- a/src/app/i18n/locales/it.json +++ b/src/app/i18n/locales/it.json @@ -937,7 +937,7 @@ }, "fileCount_one": "{{count}} file", "fileCount_other": "{{count}} file", - "fileCountMoreThan1000": "Più di 1000 file" + "fileCountMoreThan": "{{count}}+ file" }, "versionHistory": { "title": "Cronologia versioni", diff --git a/src/app/i18n/locales/ru.json b/src/app/i18n/locales/ru.json index cbe0f9d2b..14d6dbce3 100644 --- a/src/app/i18n/locales/ru.json +++ b/src/app/i18n/locales/ru.json @@ -846,7 +846,7 @@ "fileCount_few": "{{count}} файла", "fileCount_many": "{{count}} файлов", "fileCount_other": "{{count}} файлов", - "fileCountMoreThan1000": "Более 1000 файлов" + "fileCountMoreThan": "{{count}}+ файлов" }, "versionHistory": { "title": "История версий", diff --git a/src/app/i18n/locales/tw.json b/src/app/i18n/locales/tw.json index a26fddd7a..222fc28a7 100644 --- a/src/app/i18n/locales/tw.json +++ b/src/app/i18n/locales/tw.json @@ -831,7 +831,7 @@ }, "fileCount_one": "{{count}} 個文件", "fileCount_other": "{{count}} 個文件", - "fileCountMoreThan1000": "超過 1000 個文件" + "fileCountMoreThan": "{{count}}+ 個文件" }, "versionHistory": { "title": "版本歷史", diff --git a/src/app/i18n/locales/zh.json b/src/app/i18n/locales/zh.json index 938f058b4..67f1269f2 100644 --- a/src/app/i18n/locales/zh.json +++ b/src/app/i18n/locales/zh.json @@ -867,7 +867,7 @@ }, "fileCount_one": "{{count}} 个文件", "fileCount_other": "{{count}} 个文件", - "fileCountMoreThan1000": "超过 1000 个文件" + "fileCountMoreThan": "{{count}}+ 个文件" }, "versionHistory": { "title": "版本历史",