Singular / plural

This commit is contained in:
Simon MacMullen 2013-03-26 12:42:29 +00:00
parent 0768272763
commit 3a83526ca5
1 changed files with 6 additions and 2 deletions

View File

@ -739,8 +739,12 @@ function filter_ui(items) {
fmt_escape_html(current_filter) + '"/></td></tr></table>' +
'<div class="updatable">';
var selected = current_filter == '' ? (items.length + ' items') :
(items.length + ' of ' + total + ' items selected');
function items_desc(l) {
return l == 1 ? (l + ' item') : (l + ' items');
}
var selected = current_filter == '' ? (items_desc(items.length)) :
(items.length + ' of ' + items_desc(total) + ' selected');
if (items.length > maximum) {
res += '<p class="filter-warning">' + selected +