diff options
Diffstat (limited to 'src/etc/inc/rrd.inc')
-rw-r--r-- | src/etc/inc/rrd.inc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc index ff1d3e1..29411aa 100644 --- a/src/etc/inc/rrd.inc +++ b/src/etc/inc/rrd.inc @@ -98,7 +98,7 @@ function restore_rrd() { unset($rrdrestore); $_gb = exec("cd /;LANG=C /usr/bin/tar -tf {$g['cf_conf_path']}/rrd.tgz", $rrdrestore, $rrdreturn); if ($rrdreturn != 0) { - log_error("RRD restore failed exited with $rrdreturn, the error is: $rrdrestore\n"); + log_error(sprintf(gettext('RRD restore failed exited with %1$s, the error is: %2$s'), $rrdreturn, $rrdrestore)); return; } foreach ($rrdrestore as $xml_file) { @@ -109,12 +109,12 @@ function restore_rrd() { file_put_contents("{$g['tmp_path']}/rrd_restore", $xml_file); $_gb = exec("cd /;LANG=C /usr/bin/tar -xf {$g['cf_conf_path']}/rrd.tgz -T {$g['tmp_path']}/rrd_restore"); if (!file_exists("/{$xml_file}")) { - log_error("Could not extract {$xml_file} RRD xml file from archive!"); + log_error(sprintf(gettext("Could not extract %s RRD xml file from archive!"), $xml_file)); continue; } $_gb = exec("$rrdtool restore -f '/{$xml_file}' '{$rrd_file}'", $output, $status); if ($status) { - log_error("rrdtool restore -f '{$xml_file}' '{$rrd_file}' failed returning {$status}."); + log_error(sprintf(gettext("rrdtool restore -f '%1\$s' '%2\$s' failed returning %3\$s."), $xml_file, $rrd_file, $status)); continue; } unset($output); @@ -512,17 +512,17 @@ function enable_rrd_graphing() { switch ($altq->GetBwscale()) { case "Gb": $factor = 1024 * 1024 * 1024; - break; + break; case "Mb": - $factor = 1024 * 1024; - break; + $factor = 1024 * 1024; + break; case "Kb": - $factor = 1024; - break; + $factor = 1024; + break; case "b": default: - $factor = 1; - break; + $factor = 1; + break; } $qbandwidth = $altq->GetBandwidth() * $factor; if ($qbandwidth <= 0) { |