aboutsummaryrefslogtreecommitdiff
path: root/src/stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stat.c')
-rw-r--r--src/stat.c65
1 files changed, 35 insertions, 30 deletions
diff --git a/src/stat.c b/src/stat.c
index ed4ab8e..85b76d9 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -47,3 +47,3 @@ interpolate (queue_t *q,
th.outrate = outrate;
- verbose (3, "Insert %lu %g %g", next, th.inrate, th.outrate);
+ verbose (3, _("insert %lu %g %g"), next, th.inrate, th.outrate);
queue_put (q, &th);
@@ -60,3 +60,3 @@ interpolate (queue_t *q,
/ interval + last_rates->outrate;
- verbose (3, "Insert %lu %g %g", next, th.inrate, th.outrate);
+ verbose (3, _("insert %lu %g %g"), next, th.inrate, th.outrate);
queue_put (q, &th);
@@ -94,3 +94,3 @@ overflow (struct traffic_history *th,
tmp.outrate = avg->outrate;
- verbose (3, "Insert %lu %g %g", now, tmp.inrate, tmp.outrate);
+ verbose (3, _("insert %lu %g %g"), now, tmp.inrate, tmp.outrate);
queue_put (q, &tmp);
@@ -110,6 +110,7 @@ ovf_monthly (struct traffic_history *th, struct traffic_record *tr, time_t now)
{
- verbose (2, "begin overflow_monthly %lu %g %g", now, th->inrate, th->outrate);
+ verbose (2, _("begin overflow_monthly %lu %g %g"),
+ now, th->inrate, th->outrate);
overflow (th, tr, now, NULL, &tr->year_avg, &tr->year_hist,
YEAR_COUNT, YEAR_SAMPLE);
- verbose (2, "end overflow_monthly");
+ verbose (2, _("end overflow_monthly"));
}
@@ -119,6 +120,7 @@ ovf_weekly (struct traffic_history *th, struct traffic_record *tr, time_t now)
{
- verbose (2, "begin overflow_weekly %lu %g %g", now, th->inrate, th->outrate);
+ verbose (2, _("begin overflow_weekly %lu %g %g"),
+ now, th->inrate, th->outrate);
overflow (th, tr, now, ovf_monthly, &tr->month_avg, &tr->month_hist,
MONTH_COUNT, MONTH_SAMPLE);
- verbose (2, "end overflow_daily");
+ verbose (2, _("end overflow_daily"));
}
@@ -128,6 +130,7 @@ ovf_daily (struct traffic_history *th, struct traffic_record *tr, time_t now)
{
- verbose (2, "begin overflow_daily %lu %g %g", now, th->inrate, th->outrate);
+ verbose (2, _("begin overflow_daily %lu %g %g"),
+ now, th->inrate, th->outrate);
overflow (th, tr, now, ovf_weekly, &tr->week_avg, &tr->week_hist,
WEEK_COUNT, WEEK_SAMPLE);
- verbose (2, "end overflow_daily");
+ verbose (2, _("end overflow_daily"));
}
@@ -146,3 +149,3 @@ update_stats (struct monitor *mon, struct traffic_sample *sample,
{
- logmsg (L_ERR, "Ignoring zero interval");
+ logmsg (L_ERR, _("ignoring zero interval"));
return;
@@ -219,3 +222,3 @@ _convert (queue_t *q, ovf_t ovf,
{
- logmsg (L_ERR, "Ignoring zero interval");
+ logmsg (L_ERR, _("ignoring zero interval"));
break;
@@ -254,3 +257,3 @@ convert_yearly (struct traffic_record *tr, struct traffic_sample *hp,
{
- verbose (2, "begin convert_yearly");
+ verbose (2, _("begin convert_yearly"));
_convert (&tr->year_hist, NULL, tr,
@@ -258,3 +261,3 @@ convert_yearly (struct traffic_record *tr, struct traffic_sample *hp,
compute_avg (&tr->year_avg, &tr->year_hist, &tr->last);
- verbose (2, "end convert_yearly");
+ verbose (2, _("end convert_yearly"));
}
@@ -265,3 +268,3 @@ convert_monthly (struct traffic_record *tr, struct traffic_sample *hp,
{
- verbose (2, "begin convert_monthly");
+ verbose (2, _("begin convert_monthly"));
if (count > MONTH_COUNT+1)
@@ -271,3 +274,3 @@ convert_monthly (struct traffic_record *tr, struct traffic_sample *hp,
compute_avg (&tr->month_avg, &tr->month_hist, &tr->last);
- verbose (2, "end convert_monthly");
+ verbose (2, _("end convert_monthly"));
}
@@ -277,3 +280,3 @@ convert_weekly (struct traffic_record *tr, struct traffic_sample *hp, size_t cou
{
- verbose (2, "begin convert_weekly");
+ verbose (2, _("begin convert_weekly"));
if (count > WEEK_COUNT+1)
@@ -283,3 +286,3 @@ convert_weekly (struct traffic_record *tr, struct traffic_sample *hp, size_t cou
compute_avg (&tr->week_avg, &tr->week_hist, &tr->last);
- verbose (2, "end convert_weekly");
+ verbose (2, _("end convert_weekly"));
}
@@ -289,3 +292,3 @@ convert_daily (struct traffic_record *tr, struct traffic_sample *hp, size_t coun
{
- verbose (2, "begin convert_daily");
+ verbose (2, _("begin convert_daily"));
if (count > DAY_COUNT+1)
@@ -293,3 +296,3 @@ convert_daily (struct traffic_record *tr, struct traffic_sample *hp, size_t coun
_convert (&tr->day_hist, ovf_daily, tr, hp, DAY_COUNT + 1, DAY_SAMPLE);
- verbose (2, "end convert_daily");
+ verbose (2, _("end convert_daily"));
}
@@ -331,6 +334,6 @@ import_log (const char *name)
{
- logmsg (L_ERR, "cannot open `%s': %s", name, strerror (errno));
+ logmsg (L_ERR, _("cannot open `%s': %s"), name, strerror (errno));
return 1;
}
- verbose (2, "Importing %s", name);
+ verbose (2, _("importing %s"), name);
@@ -339,3 +342,3 @@ import_log (const char *name)
{
- logmsg (L_ERR, "%s:1: Unexpected number of fields", name);
+ logmsg (L_ERR, _("%s:1: unexpected number of fields"), name);
fclose (fp);
@@ -366,3 +369,3 @@ import_log (const char *name)
{
- logmsg (L_WARNING, "%s:%lu: is corrupted", name, line);
+ logmsg (L_WARNING, _("%s:%lu: is corrupted"), name, line);
break;
@@ -401,3 +404,3 @@ import_log (const char *name)
{
- logmsg (L_ERR, "cannot find monitor `%s'", base);
+ logmsg (L_ERR, _("cannot find monitor `%s'"), base);
rc = 1;
@@ -418,6 +421,7 @@ import (const char *dirname)
- verbose (2, "Examining `%s'", dirname);
+ verbose (2, _("examining `%s'"), dirname);
if (stat (dirname, &st))
- die (EX_OSERR, "cannot stat file `%s': %s", dirname, strerror (errno));
+ die (EX_OSERR, _("cannot stat file `%s': %s"),
+ dirname, strerror (errno));
else if (S_ISREG (st.st_mode))
@@ -452,6 +456,7 @@ import (const char *dirname)
case GLOB_NOSPACE:
- die (EX_UNAVAILABLE, "cannot scan directory: %s", strerror (ENOMEM));
+ die (EX_UNAVAILABLE, _("cannot scan directory: %s"),
+ strerror (ENOMEM));
case GLOB_ABORTED:
- die (EX_UNAVAILABLE, "scanning aborted");
+ die (EX_UNAVAILABLE, _("scanning aborted"));
@@ -461,3 +466,3 @@ import (const char *dirname)
default:
- die (EX_UNAVAILABLE, "cannot scan directory `%s'", dirname);
+ die (EX_UNAVAILABLE, _("cannot scan directory `%s'"), dirname);
}
@@ -465,3 +470,3 @@ import (const char *dirname)
- verbose (1, "Number of imported log files: %d", count);
+ verbose (1, _("number of imported log files: %d"), count);
}

Return to:

Send suggestions and report system problems to the System administrator.