A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: pluralize folder/file counts correctly in file list summary (#1701)

## Summary

* **Goal**: Fix incorrect pluralization in the file manager web UI
summary line.
* **Changes**: `FilesPage.html` always rendered the plural forms
("folders"/"files") regardless of count. The summary now selects
singular or plural based on each count.

Example:
- Before: `1 folders, 1 files, 12 KB`
- After: `1 folder, 1 file, 12 KB`

## Additional Context

* Cosmetic-only fix — no behavior, performance, or memory impact.
* Change is fully client-side (JavaScript inside a single HTML
template).
* English-only; web UI localization is out of scope here.

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it helps set the right
context for reviewers.

Did you use AI tools to help write this code? _**YES**_

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

authored by

Pietro Campagnano
Claude Sonnet 4.6
and committed by
GitHub
e28918b2 c0ee0968

+4 -1
+4 -1
src/network/html/FilesPage.html
··· 1875 1875 totalSize += file.size; 1876 1876 }); 1877 1877 1878 - document.getElementById('folder-summary').innerHTML = `${folderCount} folders, ${files.length - folderCount} files, ${formatFileSize(totalSize)}`; 1878 + const fileCount = files.length - folderCount; 1879 + const folderLabel = folderCount === 1 ? 'folder' : 'folders'; 1880 + const fileLabel = fileCount === 1 ? 'file' : 'files'; 1881 + document.getElementById('folder-summary').innerHTML = `${folderCount} ${folderLabel}, ${fileCount} ${fileLabel}, ${formatFileSize(totalSize)}`; 1879 1882 1880 1883 if (files.length === 0) { 1881 1884 fileTable.innerHTML = '<div class="no-files">This folder is empty</div>';