Skip to content
Snippets Groups Projects
Commit 480e925e authored by Jared Hancock's avatar Jared Hancock
Browse files

i18n: Fix bad call to _N() in filters.inc.php

parent 5b2cb791
No related branches found
No related tags found
No related merge requests found
......@@ -333,9 +333,9 @@ class Internationalization {
TextDomain::lookup()->setPath(I18N_DIR);
// User-specific translations
function _N($msgid, $plural, $count) {
return TextDomain::lookup()->getTranslation(LC_MESSAGES)
->ngettext($msgid, $plural, $count);
function _N($msgid, $plural, $n) {
return TextDomain::lookup()->getTranslation()
->ngettext($msgid, $plural, is_numeric($n) ? $n : 1);
}
// System-specific translations
......@@ -354,7 +354,7 @@ class Internationalization {
}
function _NP($context, $singular, $plural, $n) {
return TextDomain::lookup()->getTranslation()
->npgettext($context, $singular, $plural, $n);
->npgettext($context, $singular, $plural, is_numeric($n) ? $n : 1);
}
// Language-specific translations
......@@ -364,7 +364,7 @@ class Internationalization {
}
function _NL($msgid, $plural, $n, $locale) {
return TextDomain::lookup()->getTranslation($locale)
->ngettext($msgid, $plural, $n);
->ngettext($msgid, $plural, is_numeric($n) ? $n : 1);
}
}
}
......
......@@ -38,7 +38,7 @@ $qstr.='&order='.($order=='DESC'?'ASC':'DESC');
$query="$sql ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
$res=db_query($query);
if($res && ($num=db_num_rows($res)))
$showing=$pageNav->showing().' '._N('filter', 'filters', $count);
$showing=$pageNav->showing().' '._N('filter', 'filters', $num);
else
$showing=__('No filters found!');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment