summaryrefslogtreecommitdiffabout
path: root/src/report.c
Side-by-side diff
Diffstat (limited to 'src/report.c') (more/less context) (show whitespace changes)
-rw-r--r--src/report.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/report.c b/src/report.c
index ed8a34d..ed3a81b 100644
--- a/src/report.c
+++ b/src/report.c
@@ -55,3 +55,3 @@ open_db (int flag)
{
- logmsg (L_ERR, "Cannot open database %s: %s",
+ logmsg (L_ERR, _("cannot open database %s: %s"),
dbname, gdbm_strerror (gdbm_errno));
@@ -93,6 +93,7 @@ _read_db (datum key, struct traffic_record **tr)
if (content.dptr == NULL)
- logmsg (L_NOTICE, "Record for %*.*s not found", key.dsize, key.dsize, key.dptr);
+ logmsg (L_NOTICE, _("record for %*.*s not found"),
+ key.dsize, key.dsize, key.dptr);
else if (content.dsize != sizeof **tr)
{
- logmsg (L_ERR, "Wrong record size for %*.*s: %lu",
+ logmsg (L_ERR, _("wrong record size for %*.*s: %lu"),
key.dsize, key.dsize, key.dptr, content.dsize);
@@ -106,3 +107,3 @@ _read_db (datum key, struct traffic_record **tr)
- logmsg (L_NOTICE, "Creating record for %*.*s",
+ logmsg (L_NOTICE, _("creating record for %*.*s"),
key.dsize, key.dsize, key.dptr);
@@ -138,3 +139,3 @@ write_db (struct monitor *mon, struct traffic_record *tr)
{
- logmsg (L_ERR, "Failed to write data for %s: %s",
+ logmsg (L_ERR, _("failed to write data for %s: %s"),
mon->id, gdbm_strerror (gdbm_errno));
@@ -149,3 +150,5 @@ print_queue (const char *title, queue_t *q)
count = queue_count (q);
- printf ("%s (%d entries):\n", title, count);
+ printf (ngettext ("%s (%d entry):\n", "%s (%d entries):\n",
+ count),
+ title, count);
for (i = count - 1; i >= 0; i--)
@@ -177,16 +180,17 @@ print_tr (datum key, struct traffic_record *tr)
strftime (buf, sizeof buf, "%c", tm);
- printf ("Last sample: %lu (%s) %lu %lu\n",
+ printf (_("Last sample: %lu (%s) %lu %lu\n"),
tr->last.time, buf, tr->last.in, tr->last.out);
- printf ("Last rates: %g %g\n", tr->last_rates.inrate, tr->last_rates.outrate);
- print_queue ("Daily rates", &tr->day_hist);
+ printf (_("Last rates: %g %g\n"),
+ tr->last_rates.inrate, tr->last_rates.outrate);
+ print_queue (_("Daily rates"), &tr->day_hist);
- print_avg ("Weekly average", &tr->week_avg);
- print_queue ("Weekly rates", &tr->week_hist);
+ print_avg (_("Weekly average"), &tr->week_avg);
+ print_queue (_("Weekly rates"), &tr->week_hist);
- print_avg ("Monthly average", &tr->month_avg);
- print_queue ("Monthly rates", &tr->month_hist);
+ print_avg (_("Monthly average"), &tr->month_avg);
+ print_queue (_("Monthly rates"), &tr->month_hist);
- print_avg ("Yearly average", &tr->year_avg);
- print_queue ("Yearly rates", &tr->year_hist);
+ print_avg (_("Yearly average"), &tr->year_avg);
+ print_queue (_("Yearly rates"), &tr->year_hist);
}
@@ -234,3 +238,3 @@ report (Stat *stat, time_t timestamp)
else
- logmsg (L_WARNING, "%s not found in config", stat->name);
+ logmsg (L_WARNING, _("%s not found in config"), stat->name);
}
@@ -275,3 +279,3 @@ rebuild (int force)
- verbose (1, "rebuild initiated");
+ verbose (1, _("rebuild initiated"));
open_db (TAGR_DB_WR);
@@ -286,3 +290,3 @@ rebuild (int force)
close_db ();
- verbose (1, "rebuild finished");
+ verbose (1, _("rebuild finished"));
}

Return to:

Send suggestions and report system problems to the System administrator.