diff options
Diffstat (limited to 'admin/api')
-rw-r--r-- | admin/api/getIpLocation.php | 4 | ||||
-rw-r--r-- | admin/api/getQuota.php | 20 | ||||
-rw-r--r-- | admin/api/getUbuntuUpgrades.php | 4 | ||||
-rw-r--r-- | admin/api/serverLogSummary.php | 2 | ||||
-rw-r--r-- | admin/api/serverTemp.php | 8 | ||||
-rw-r--r-- | admin/api/serverTime.php | 2 |
6 files changed, 20 insertions, 20 deletions
diff --git a/admin/api/getIpLocation.php b/admin/api/getIpLocation.php index fe34438..c40d96e 100644 --- a/admin/api/getIpLocation.php +++ b/admin/api/getIpLocation.php @@ -28,10 +28,10 @@ if ($data === null) { }
if ($data["geoplugin_status"] === 404) {
- die("<span class='text-muted'>Local IP address</span>");
+ die("<span class='text-muted'>" . l("Local IP address", "Adresse IP locale") . "</span>");
} else {
if ($data["geoplugin_inEU"]) {
- die($data["geoplugin_countryName"] . " <span class='badge text-light border-light' style='border:1px solid;vertical-align: middle;'>EU</span>");
+ die($data["geoplugin_countryName"] . " <span class='badge text-light border-light' style='border:1px solid;vertical-align: middle;'>" . l("EU", "UE") . "</span>");
} else {
die($data["geoplugin_countryName"]);
}
diff --git a/admin/api/getQuota.php b/admin/api/getQuota.php index 7b4e8e9..1d64737 100644 --- a/admin/api/getQuota.php +++ b/admin/api/getQuota.php @@ -22,32 +22,32 @@ if (in_array($arg, $webs)) { if ($tier === "3") {
$perc = ($parts2[0] / 100000) * 100;
if ($perc > 75) {
- die("<span class='text-danger'>Using " . $parts[0] . "/100M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-danger'>" . l("Using", "Utilise") . " " . $parts[0] . "/100M (" . round($perc, 2) . "%)</span>");
} else if ($perc > 50) {
- die("<span class='text-warning'>Using " . $parts[0] . "/100M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-warning'>" . l("Using", "Utilise") . " " . $parts[0] . "/100M (" . round($perc, 2) . "%)</span>");
} else {
- die("<span class='text-success'>Using " . $parts[0] . "/100M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-success'>" . l("Using", "Utilise") . " " . $parts[0] . "/100M (" . round($perc, 2) . "%)</span>");
}
} else if ($tier === "5") {
$perc = ($parts2[0] / 250000) * 100;
if ($perc > 75) {
- die("<span class='text-danger'>Using " . $parts[0] . "/250M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-danger'>" . l("Using", "Utilise") . " " . $parts[0] . "/250M (" . round($perc, 2) . "%)</span>");
} else if ($perc > 50) {
- die("<span class='text-warning'>Using " . $parts[0] . "/250M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-warning'>" . l("Using", "Utilise") . " " . $parts[0] . "/250M (" . round($perc, 2) . "%)</span>");
} else {
- die("<span class='text-success'>Using " . $parts[0] . "/250M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-success'>" . l("Using", "Utilise") . " " . $parts[0] . "/250M (" . round($perc, 2) . "%)</span>");
}
} else if ($tier === "7") {
$perc = ($parts2[0] / 500000) * 100;
if ($perc > 75) {
- die("<span class='text-danger'>Using " . $parts[0] . "/500M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-danger'>" . l("Using", "Utilise") . " " . $parts[0] . "/500M (" . round($perc, 2) . "%)</span>");
} else if ($perc > 50) {
- die("<span class='text-warning'>Using " . $parts[0] . "/500M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-warning'>" . l("Using", "Utilise") . " " . $parts[0] . "/500M (" . round($perc, 2) . "%)</span>");
} else {
- die("<span class='text-success'>Using " . $parts[0] . "/500M (" . round($perc, 2) . "%)</span>");
+ die("<span class='text-success'>" . l("Using", "Utilise") . " " . $parts[0] . "/500M (" . round($perc, 2) . "%)</span>");
}
} else {
- die("<span class='text-success'>Using " . $parts[0] . "</span>");
+ die("<span class='text-success'>" . l("Using", "Utilise") . " " . $parts[0] . "</span>");
}
}
diff --git a/admin/api/getUbuntuUpgrades.php b/admin/api/getUbuntuUpgrades.php index 7da6259..8273036 100644 --- a/admin/api/getUbuntuUpgrades.php +++ b/admin/api/getUbuntuUpgrades.php @@ -4,7 +4,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php"; exec("bash -c \"sudo do-release-upgrade -c | grep 'New release'\"", $ret);
if (count($ret) === 1) {
- echo("<b>Ubuntu " . explode("'", $ret[0])[1] . "</b> is available, use <code>do-release-upgrade</code> to upgrade");
+ echo(l("<b>Ubuntu " . explode("'", $ret[0])[1] . "</b> is available, use <code>do-release-upgrade</code> to upgrade", "<b>Ubuntu " . explode("'", $ret[0])[1] . "</b> est disponible, exécutez la commande <code>do-release-upgrade</code> pour effectuer la mise à niveau"));
} else {
- echo("This server is running the latest version of Ubuntu");
+ echo(l("This server is running the latest version of Ubuntu", "Ce serveur exécute la dernière version d'Ubuntu"));
}
\ No newline at end of file diff --git a/admin/api/serverLogSummary.php b/admin/api/serverLogSummary.php index 78c0a2c..a4a20a0 100644 --- a/admin/api/serverLogSummary.php +++ b/admin/api/serverLogSummary.php @@ -5,4 +5,4 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php"; exec("journalctl -b --quiet", $ret);
$cnt = count($ret);
-echo("<b>" . $cnt . "</b> system log messages since last system startup");
\ No newline at end of file +echo("<b>" . $cnt . "</b> " . l("system log messages since last system startup", "messages de journalisation du système depuis le dernier démarrage"));
\ No newline at end of file diff --git a/admin/api/serverTemp.php b/admin/api/serverTemp.php index 55cf34b..613c411 100644 --- a/admin/api/serverTemp.php +++ b/admin/api/serverTemp.php @@ -2,7 +2,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
-echo("Server running at <b>");
+echo(l("Server running at", "Serveur fonctionnant à") . " <b>");
exec("sensors -j", $out);
$outp = implode("\n", $out);
$outd = json_decode($outp, true);
@@ -12,9 +12,9 @@ echo(round($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"], 1)); ?>°C</b>, <?php
if ($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"] > 90) {
- echo("completely overheating!");
+ echo(l("completely overheating!", "en pleine surchauffe !"));
} else if ($outd["cpu_thermal-virtual-0"]["temp1"]["temp1_input"] > 60) {
- echo("starting to throttle!");
+ echo(l("starting to throttle!", "commence à être bridé !"));
} else {
- echo("under normal temperatures");
+ echo(l("under normal temperatures", "températures habituelles"));
}
\ No newline at end of file diff --git a/admin/api/serverTime.php b/admin/api/serverTime.php index 77ba321..a64a39e 100644 --- a/admin/api/serverTime.php +++ b/admin/api/serverTime.php @@ -9,4 +9,4 @@ $mins = $num % 60; $num = intdiv($num, 60); $hours = $num % 24; $num = intdiv($num, 24);
$days = $num;
-echo($days . " day·s, " . $hours . " hour·s, " . $mins . " minute·s, " . ceil($secs) . " second·s");
\ No newline at end of file +echo(l($days . " day·s, " . $hours . " hour·s, " . $mins . " minute·s, " . ceil($secs) . " second·s", $days . " jour·s, " . $hours . " heure·s, " . $mins . " minute·s, " . ceil($secs) . " seconde·s"));
\ No newline at end of file |