diff options
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r-- | etc/inc/rrd.inc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index ce9797a..e928fc8 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -42,7 +42,7 @@ function dump_rrd_to_xml($rrddatabase, $xmldumpfile) { exec("$rrdtool dump {$rrddatabase} {$xmldumpfile} 2>&1", $dumpout, $dumpret); if ($dumpret <> 0) { $dumpout = implode(" ", $dumpout); - log_error("RRD dump failed exited with $dumpret, the error is: $dumpout"); + log_error(sprintf(gettext('RRD dump failed exited with %1$s, the error is: %2$s'), $dumpret, $dumpout)); } return($dumpret); } @@ -53,7 +53,7 @@ function create_new_rrd($rrdcreatecmd) { exec("$rrdcreatecmd 2>&1", $rrdcreateoutput, $rrdcreatereturn); if ($rrdcreatereturn <> 0) { $rrdcreateoutput = implode(" ", $rrdcreateoutput); - log_error("RRD create failed exited with $rrdcreatereturn, the error is: $rrdcreateoutput"); + log_error(sprintf(gettext('RRD create failed exited with %1$s, the error is: %2$s'), $rrdcreatereturn, $rrdcreateoutput)); } return $rrdcreatereturn; } @@ -67,7 +67,7 @@ function migrate_rrd_format($rrdoldxml, $rrdnewxml) { $numdsold = count($rrdoldxml['ds']); $numrranew = count($rrdnewxml['rra']); $numdsnew = count($rrdnewxml['ds']); - log_error("Import RRD has $numdsold DS values and $numrraold RRA databases, new format RRD has $numdsnew DS values and $numrranew RRA databases"); + log_error(sprintf(gettext('Import RRD has %1$s DS values and %2$s RRA databases, new format RRD has %3$s DS values and %4$s RRA databases'), $numdsold, $numrraold, $numdsnew ,$numrranew)); /* add data sources not found in the old array from the new array */ $i = 0; @@ -151,7 +151,7 @@ function migrate_rrd_format($rrdoldxml, $rrdnewxml) { $numrranew = count($rrdoldxml['rra']); $numdsnew = count($rrdoldxml['ds']); - log_error("The new RRD now has $numdsnew DS values and $numrranew RRA databases"); + log_error(sprintf(gettext('The new RRD now has %1$s DS values and %2$s RRA databases'), $numdsnew, $numrranew)); return $rrdoldxml; } @@ -159,7 +159,7 @@ function enable_rrd_graphing() { global $config, $g, $altq_list_queues; if($g['booting']) - echo "Generating RRD graphs..."; + echo gettext("Generating RRD graphs..."); $rrddbpath = "/var/db/rrd/"; $rrdgraphpath = "/usr/local/www/rrd"; @@ -243,7 +243,7 @@ function enable_rrd_graphing() { exec("cd /;LANG=C /usr/bin/tar -xzf {$g['cf_conf_path']}/rrd.tgz 2>&1", $rrdrestore, $rrdreturn); $rrdrestore = implode(" ", $rrdrestore); 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%3$s'), $rrdreturn, $rrdrestore, "\n")); } } } @@ -740,7 +740,7 @@ function enable_rrd_graphing() { $rrdupdatesh .= "sleep 60\n"; $rrdupdatesh .= "done\n"; - log_error("Creating rrd update script"); + log_error(gettext("Creating rrd update script")); /* write the rrd update script */ $updaterrdscript = "{$g['vardb_path']}/rrd/updaterrd.sh"; $fd = fopen("$updaterrdscript", "w"); @@ -764,7 +764,7 @@ function enable_rrd_graphing() { } if($g['booting']) - echo "done.\n"; + echo gettext("done.") . "\n"; } @@ -772,4 +772,4 @@ function kill_traffic_collector() { mwexec("/bin/pkill -f updaterrd.sh", true); } -?>
\ No newline at end of file +?> |