From 8ff84184416a69c03fa3b3dee203e67638242004 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Thu, 23 Apr 2026 09:30:50 +0200 Subject: [PATCH] pluralize folder/file counts correctly in file list summary (#1701) --- src/network/html/FilesPage.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/network/html/FilesPage.html b/src/network/html/FilesPage.html index 1cb3f7db..4d7db447 100644 --- a/src/network/html/FilesPage.html +++ b/src/network/html/FilesPage.html @@ -2257,7 +2257,10 @@ totalSize += file.size; }); - document.getElementById('folder-summary').innerHTML = `${folderCount} folders, ${files.length - folderCount} files, ${formatFileSize(totalSize)}`; + const fileCount = files.length - folderCount; + const folderLabel = folderCount === 1 ? 'folder' : 'folders'; + const fileLabel = fileCount === 1 ? 'file' : 'files'; + document.getElementById('folder-summary').innerHTML = `${folderCount} ${folderLabel}, ${fileCount} ${fileLabel}, ${formatFileSize(totalSize)}`; if (files.length === 0) { fileTable.innerHTML = '
This folder is empty
';