mirror of
https://github.com/YGGverse/Yo.git
synced 2025-01-30 00:14:54 +00:00
update placeholder, remove plural extras
This commit is contained in:
parent
2fa73aa254
commit
662c7aed6e
@ -8,13 +8,6 @@ error_reporting(E_ALL);
|
||||
// Load dependencies
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
function plural(int $number, array $texts)
|
||||
{
|
||||
$cases = [2, 0, 1, 1, 1, 2];
|
||||
|
||||
return $texts[(($number % 100) > 4 && ($number % 100) < 20) ? 2 : $cases[min($number % 10, 5)]];
|
||||
}
|
||||
|
||||
// Init config
|
||||
$config = json_decode(
|
||||
file_get_contents(
|
||||
@ -44,28 +37,12 @@ $total = $index->search('')
|
||||
->get()
|
||||
->getTotal();
|
||||
|
||||
$placeholder = plural(
|
||||
$total,
|
||||
[
|
||||
sprintf(
|
||||
_('Over %s page or enter the new one...'),
|
||||
number_format(
|
||||
$total
|
||||
)
|
||||
),
|
||||
sprintf(
|
||||
_('Over %s pages or enter the new one...'),
|
||||
number_format(
|
||||
$total
|
||||
)
|
||||
),
|
||||
sprintf(
|
||||
_('Over %s pages or enter the new one...'),
|
||||
number_format(
|
||||
$total
|
||||
)
|
||||
),
|
||||
]
|
||||
$placeholder = sprintf(
|
||||
_('index contain %s documents %s'),
|
||||
number_format(
|
||||
$total
|
||||
),
|
||||
$config->webui->search->index->request->url->enabled ? _('or crawl new address...') : false
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -8,13 +8,6 @@ error_reporting(E_ALL);
|
||||
// Load dependencies
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
function plural(int $number, array $texts)
|
||||
{
|
||||
$cases = [2, 0, 1, 1, 1, 2];
|
||||
|
||||
return $texts[(($number % 100) > 4 && ($number % 100) < 20) ? 2 : $cases[min($number % 10, 5)]];
|
||||
}
|
||||
|
||||
// Init config
|
||||
$config = json_decode(
|
||||
file_get_contents(
|
||||
@ -42,28 +35,12 @@ $total = $index->search('')
|
||||
->get()
|
||||
->getTotal();
|
||||
|
||||
$placeholder = plural(
|
||||
$total,
|
||||
[
|
||||
sprintf(
|
||||
_('Over %s page or enter the new one...'),
|
||||
number_format(
|
||||
$total
|
||||
)
|
||||
),
|
||||
sprintf(
|
||||
_('Over %s pages or enter the new one...'),
|
||||
number_format(
|
||||
$total
|
||||
)
|
||||
),
|
||||
sprintf(
|
||||
_('Over %s pages or enter the new one...'),
|
||||
number_format(
|
||||
$total
|
||||
)
|
||||
),
|
||||
]
|
||||
$placeholder = sprintf(
|
||||
_('index contain %s documents %s'),
|
||||
number_format(
|
||||
$total
|
||||
),
|
||||
$config->webui->search->index->request->url->enabled ? _('or crawl new address...') : false
|
||||
);
|
||||
|
||||
$response = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user