Change case of the unit "bit" from "Bit" to "bit" in web UI

The correct case for "kilobit" is "kilobit", not "kiloBit".
And the same applies for Mbit, Gbit etc.
Reference is https://en.wikipedia.org/wiki/Kilobit

This commit changes the texts used in the web UI, so
that it correctly displays as "bit", "kbit", "Mbit" etc.

This fixes bugzilla item 10918.

Signed-off-by: Alf Høgemark <alf@i100.no>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Alf Høgemark
2016-07-14 13:14:55 +02:00
committed by Michael Tremer
parent 5261a13d3c
commit f00699e8bb
13 changed files with 23 additions and 23 deletions

View File

@@ -108,7 +108,7 @@ if ($xlratorsettings{'MAX_DOWNLOAD_RATE'} eq '')
{
&writelog("Retrieving file for local cache: $updatefile");
} else {
&writelog("Retrieving file for local cache at max. " . $xlratorsettings{'MAX_DOWNLOAD_RATE'} . " kBit/s: $updatefile");
&writelog("Retrieving file for local cache at max. " . $xlratorsettings{'MAX_DOWNLOAD_RATE'} . " kbit/s: $updatefile");
}
$ENV{'http_proxy'} = $proxysettings{'UPSTREAM_PROXY'};

View File

@@ -1532,7 +1532,7 @@ END
;
foreach (@throttle_limits) {
print "\t<option value='$_' $selected{'THROTTLING_GREEN_TOTAL'}{$_}>$_ kBit/s</option>\n";
print "\t<option value='$_' $selected{'THROTTLING_GREEN_TOTAL'}{$_}>$_ kbit/s</option>\n";
}
print <<END
@@ -1546,7 +1546,7 @@ END
;
foreach (@throttle_limits) {
print "\t<option value='$_' $selected{'THROTTLING_GREEN_HOST'}{$_}>$_ kBit/s</option>\n";
print "\t<option value='$_' $selected{'THROTTLING_GREEN_HOST'}{$_}>$_ kbit/s</option>\n";
}
print <<END
@@ -1567,7 +1567,7 @@ END
;
foreach (@throttle_limits) {
print "\t<option value='$_' $selected{'THROTTLING_BLUE_TOTAL'}{$_}>$_ kBit/s</option>\n";
print "\t<option value='$_' $selected{'THROTTLING_BLUE_TOTAL'}{$_}>$_ kbit/s</option>\n";
}
print <<END
@@ -1581,7 +1581,7 @@ END
;
foreach (@throttle_limits) {
print "\t<option value='$_' $selected{'THROTTLING_BLUE_HOST'}{$_}>$_ kBit/s</option>\n";
print "\t<option value='$_' $selected{'THROTTLING_BLUE_HOST'}{$_}>$_ kbit/s</option>\n";
}
print <<END

View File

@@ -432,9 +432,9 @@ END
foreach (@bandwidth_limits) {
if ($_ >= 1024) {
print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_RATE'}{$_}>". $_ / 1024 ." MBit/s</option>\n";
print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_RATE'}{$_}>". $_ / 1024 ." Mbit/s</option>\n";
} else {
print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_RATE'}{$_}>$_ kBit/s</option>\n";
print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_RATE'}{$_}>$_ kbit/s</option>\n";
}
}
@@ -455,9 +455,9 @@ END
foreach (@bandwidth_limits) {
if ($_ >= 1024) {
print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_BURST'}{$_}>". $_ / 1024 ." MBit/s</option>\n";
print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_BURST'}{$_}>". $_ / 1024 ." Mbit/s</option>\n";
} else {
print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_BURST'}{$_}>$_ kBit/s</option>\n";
print "<option value='$_' $selected{'TOR_RELAY_BANDWIDTH_BURST'}{$_}>$_ kbit/s</option>\n";
}
}
print <<END;
@@ -978,7 +978,7 @@ sub FormatBytes() {
sub FormatBitsPerSecond() {
my $bits = shift;
my @units = ("Bit/s", "KBit/s", "MBit/s", "GBit/s", "TBit/s");
my @units = ("bit/s", "kbit/s", "Mbit/s", "Gbit/s", "Tbit/s");
my $units_index = 0;
while (($units_index <= $#units) && ($bits >= 1024)) {

View File

@@ -70,8 +70,8 @@ sub showmenu() {
print <<EOF;
<div id='traffic'>
<strong>Traffic:</strong>
In <span id='rx_kbs'>--.-- Bit/s</span> &nbsp;
Out <span id='tx_kbs'>--.-- Bit/s</span>
In <span id='rx_kbs'>--.-- bit/s</span> &nbsp;
Out <span id='tx_kbs'>--.-- bit/s</span>
</div>
EOF
}

View File

@@ -51,7 +51,7 @@ function refreshInetInfo() {
}
function format_bytes(bytes) {
var units = ["Bit/s", "kBit/s", "MBit/s", "GBit/s", "TBit/s"];
var units = ["bit/s", "kbit/s", "Mbit/s", "Gbit/s", "Tbit/s"];
var unit = units[0];
for (var i = 1; i < units.length; i++) {

View File

@@ -786,7 +786,7 @@
'dos charset' => 'DOS Charset',
'down and up speed' => 'Geben Sie bitte hier ihre Download- bzw. Upload-Geschwindigkeit ein <br /> und klicken Sie danach auf <i>Speichern</i>.',
'downlink' => 'Downlink',
'downlink speed' => 'Downlink-Geschwindigkeit (kBit/sek)',
'downlink speed' => 'Downlink-Geschwindigkeit (kbit/sek)',
'downlink std class' => 'Downloadstandardklasse',
'download' => 'herunterladen',
'download ca certificate' => 'CA-Zertifikat herunterladen',
@@ -2323,7 +2323,7 @@
'updxlrtr maintenance' => 'Wartung',
'updxlrtr marked as' => 'markiert als',
'updxlrtr max disk usage' => 'Max. Festplattennutzung',
'updxlrtr max download rate' => 'Max. externe Downloadrate (kBit/s)',
'updxlrtr max download rate' => 'Max. externe Downloadrate (kbit/s)',
'updxlrtr month' => 'einem Monat',
'updxlrtr monthly' => 'monatlich',
'updxlrtr not accessed' => 'nicht zugegriffen seit',
@@ -2357,7 +2357,7 @@
'updxlrtr year' => 'einem Jahr',
'upgrade' => 'upgrade',
'uplink' => 'Uplink',
'uplink speed' => 'Uplink-Geschwindigkeit (kBit/sek)',
'uplink speed' => 'Uplink-Geschwindigkeit (kbit/sek)',
'uplink std class' => 'Uploadstandardklasse',
'upload' => 'Hochladen',
'upload a certificate' => 'Ein Zertifikat hochladen:',

View File

@@ -2363,7 +2363,7 @@
'updxlrtr maintenance' => 'Maintenance',
'updxlrtr marked as' => 'marked as',
'updxlrtr max disk usage' => 'Max. disk usage',
'updxlrtr max download rate' => 'Max. external download rate (kBit/s)',
'updxlrtr max download rate' => 'Max. external download rate (kbit/s)',
'updxlrtr month' => 'one month',
'updxlrtr monthly' => 'monthly',
'updxlrtr not accessed' => 'not accessed since',

View File

@@ -1813,7 +1813,7 @@
'updxlrtr maintenance' => 'Mantenimiento',
'updxlrtr marked as' => 'marcado como',
'updxlrtr max disk usage' => 'Máximo uso de disco',
'updxlrtr max download rate' => 'Tasa Máxima de descarga externa (kBit/s)',
'updxlrtr max download rate' => 'Tasa Máxima de descarga externa (kbit/s)',
'updxlrtr month' => 'un mes',
'updxlrtr monthly' => 'mensual',
'updxlrtr not accessed' => 'no se ha accesado desde',

View File

@@ -1818,7 +1818,7 @@
'updxlrtr maintenance' => 'Maintenance',
'updxlrtr marked as' => 'marqué comme',
'updxlrtr max disk usage' => 'Utilisation du disque Max.',
'updxlrtr max download rate' => 'Taux de téléchargement externe Max. (kBit/s)',
'updxlrtr max download rate' => 'Taux de téléchargement externe Max. (kbit/s)',
'updxlrtr month' => 'un mois',
'updxlrtr monthly' => 'mensuellement',
'updxlrtr not accessed' => 'la dernière utilisation date de',

View File

@@ -2281,7 +2281,7 @@
'updxlrtr maintenance' => 'Maintenance',
'updxlrtr marked as' => 'marked as',
'updxlrtr max disk usage' => 'Max. disk usage',
'updxlrtr max download rate' => 'Max. external download rate (kBit/s)',
'updxlrtr max download rate' => 'Max. external download rate (kbit/s)',
'updxlrtr month' => 'one month',
'updxlrtr monthly' => 'Mensile',
'updxlrtr not accessed' => 'not accessed since',

View File

@@ -2226,7 +2226,7 @@
'updxlrtr maintenance' => 'Onderhoud',
'updxlrtr marked as' => 'gemarkeerd als',
'updxlrtr max disk usage' => 'Max. schijfgebruik',
'updxlrtr max download rate' => 'Max. externe downloadsnelheid (kBit/s)',
'updxlrtr max download rate' => 'Max. externe downloadsnelheid (kbit/s)',
'updxlrtr month' => 'een maand',
'updxlrtr monthly' => 'maandelijks',
'updxlrtr not accessed' => 'niet benaderd sinds',

View File

@@ -1826,7 +1826,7 @@
'updxlrtr maintenance' => 'Konserwacja',
'updxlrtr marked as' => 'oznaczone jako',
'updxlrtr max disk usage' => 'Maks. wykorzystanie dysku',
'updxlrtr max download rate' => 'Maks. prędkość pobierania (kBit/s)',
'updxlrtr max download rate' => 'Maks. prędkość pobierania (kbit/s)',
'updxlrtr month' => 'miesiąca',
'updxlrtr monthly' => 'miesięcznie',
'updxlrtr not accessed' => 'bez żądania od',

View File

@@ -1821,7 +1821,7 @@
'updxlrtr maintenance' => 'Управление',
'updxlrtr marked as' => 'отмечен как',
'updxlrtr max disk usage' => 'Максимальное использование диска',
'updxlrtr max download rate' => 'Максимальная скорость загрузки (kBit/s)',
'updxlrtr max download rate' => 'Максимальная скорость загрузки (kbit/s)',
'updxlrtr month' => 'один месяц',
'updxlrtr monthly' => 'Ежемесячно',
'updxlrtr not accessed' => 'Не обращались с',