mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-07-09 19:37:41 +02:00
Revise formatClientLabel() w/ ngettext
This commit is contained in:
parent
615f2abed1
commit
cfb8435373
@ -58,9 +58,17 @@ function DisplayDashboard(): void
|
||||
$hostapdStatus = ($hostapd[0] == 1) ? "active" : "";
|
||||
$adblockStatus = ($adblock == true) ? "active" : "";
|
||||
$wirelessClientActive = ($wirelessClients > 0) ? "active" : "inactive";
|
||||
$wirelessClientLabel = $wirelessClients. ' WLAN '.$dashboard->formatClientLabel($wirelessClients);
|
||||
$wirelessClientLabel = sprintf(
|
||||
_('%d WLAN %s'),
|
||||
$wirelessClients,
|
||||
$dashboard->formatClientLabel($wirelessClients)
|
||||
);
|
||||
$ethernetClientActive = ($ethernetClients > 0) ? "active" : "inactive";
|
||||
$ethernetClientLabel = $ethernetClients. ' LAN '.$dashboard->formatClientLabel($ethernetClients);
|
||||
$ethernetClientLabel = sprintf(
|
||||
_('%d LAN %s'),
|
||||
$ethernetClients,
|
||||
$dashboard->formatClientLabel($ethernetClients)
|
||||
);
|
||||
$totalClientsActive = ($totalClients > 0) ? "active": "inactive";
|
||||
$freq5active = $freq24active = "";
|
||||
$varName = "freq" . str_replace('.', '', $frequency) . "active";
|
||||
|
@ -208,7 +208,7 @@ class Dashboard {
|
||||
|
||||
public function formatClientLabel($clientCount)
|
||||
{
|
||||
return $clientCount === 1 ? 'client' : 'clients';
|
||||
return ngettext('client', 'clients', $clientCount);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user