mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-28 20:04:26 +00:00
feat(webui): translate formatCount in file-browser and add plural keys
This commit is contained in:
@@ -566,9 +566,13 @@ export function FileBrowser({
|
||||
(c) => c.field === 'name' && c.operator === 'contains',
|
||||
)
|
||||
if (isNameFilter && count === 10001) {
|
||||
return `10000+ ${isFile ? 'Asset' : 'Folder'}s`
|
||||
return isFile ? m.count_overflow_assets() : m.count_overflow_folders()
|
||||
}
|
||||
if (isFile) {
|
||||
return count === 1 ? m.n_assets_singular({ count }) : m.n_assets_plural({ count })
|
||||
} else {
|
||||
return count === 1 ? m.n_folders_singular({ count }) : m.n_folders_plural({ count })
|
||||
}
|
||||
return `${count} ${isFile ? 'Asset' : 'Folder'}${count !== 1 ? 's' : ''}`
|
||||
}
|
||||
|
||||
const handleEmptyAreaClick = (e: React.MouseEvent) => {
|
||||
|
||||
Reference in New Issue
Block a user