don't repeat "Average"

In the average column of the RideSummary, we don't need to re-emphasize that
the averages names' start with "Average ".  I hope this doesn't cause
problems for translation.
This commit is contained in:
Sean Rhea
2009-12-20 15:47:19 -05:00
parent 59a0908da4
commit abae88dc6c

View File

@@ -247,15 +247,16 @@ RideSummaryWindow::htmlSummary() const
const char *symbol = metricsList[j];
if (!symbol) break;
const RideMetric *m = rideItem->metrics.value(symbol);
QString name = m->name().replace(QRegExp(tr("^Average ")), "");
if (m->units(metricUnits) == "seconds") {
QString s("<tr><td>%1:</td><td "
"align=\"right\">%2</td></tr>");
s = s.arg(m->name());
s = s.arg(name);
s = s.arg(time_to_string(m->value(metricUnits)));
summary += s;
}
else {
QString s = "<tr><td>" + m->name();
QString s = "<tr><td>" + name;
if (m->units(metricUnits) != "")
s += " (" + m->units(metricUnits) + ")";
s += ":</td><td align=\"right\">%1</td></tr>";