summaryrefslogtreecommitdiffstats
path: root/etc/inc/rrd.inc
diff options
context:
space:
mode:
authorCarlos Eduardo Ramos <carlos.ramos@bluepex.com>2010-08-17 12:54:18 -0300
committerCarlos Eduardo Ramos <carlos.ramos@bluepex.com>2010-08-17 12:54:32 -0300
commit9eda6186fb788c712b534517f1788bc2522fbc1f (patch)
tree6f9446d0a01b4b9ad485440e40323b57d4c9cbf2 /etc/inc/rrd.inc
parent069503a181bf2a80b32134ec37d0b08d1d5c6c9a (diff)
downloadpfsense-9eda6186fb788c712b534517f1788bc2522fbc1f.zip
pfsense-9eda6186fb788c712b534517f1788bc2522fbc1f.tar.gz
Implement gettext() calls on rrd.inc
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r--etc/inc/rrd.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc
index 96981da..da7f7e4 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 %s, the error is: %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 %s, the error is: %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 %s DS values and %s RRA databases, new format RRD has %s DS values and %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 %s DS values and %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";
@@ -238,7 +238,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 %s, the error is: %s%s"), $rrdreturn, $rrdrestore, "\n"));
}
}
}
@@ -662,7 +662,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");
@@ -686,7 +686,7 @@ function enable_rrd_graphing() {
}
if($g['booting'])
- echo "done.\n";
+ echo gettext("done.") . "\n";
}
OpenPOWER on IntegriCloud