Changeset View
Changeset View
Standalone View
Standalone View
gui/SensorDisplayLib/FancyPlotter.cpp
Show First 20 Lines • Show All 588 Lines • ▼ Show 20 Line(s) | 588 | if (sensor->unit() == QLatin1String("%")) | |||
---|---|---|---|---|---|
589 | lastValue = i18nc("units", "%1%", lastValue); | 589 | lastValue = i18nc("units", "%1%", lastValue); | ||
590 | else if( !sensor->unit().isEmpty() ) { | 590 | else if( !sensor->unit().isEmpty() ) { | ||
591 | lastValue = i18nc("units", QString(QStringLiteral("%1 ") + sensor->unit()).toUtf8().constData(), lastValue); | 591 | lastValue = i18nc("units", QString(QStringLiteral("%1 ") + sensor->unit()).toUtf8().constData(), lastValue); | ||
592 | } | 592 | } | ||
593 | } | 593 | } | ||
594 | 594 | | |||
595 | if(sensor->maxValue != 0 && sensor->unit() != QLatin1String("%")) { | 595 | if(sensor->maxValue != 0 && sensor->unit() != QLatin1String("%")) { | ||
596 | //Use a multi length string incase we do not have enough room | 596 | //Use a multi length string incase we do not have enough room | ||
597 | lastValue = i18n("%1 of %2" "\xc2\x9c" "%1", lastValue, mPlotter->valueAsString(sensor->maxValue, precision) ); | 597 | lastValue = i18n("%1 of %2", lastValue, mPlotter->valueAsString(sensor->maxValue, precision) ) + "\xc2\x9c" + lastValue; | ||
mart: maybe it's worth to have an i18nc here or it looks pretty mysterious? | |||||
Problem is i don't really understand what lastValue and mlotter->valueAsString are supposed to be 😃 But the nice thing is that at least the message won't be worse than it was. aacid: Problem is i don't really understand what lastValue and mlotter->valueAsString are supposed to… | |||||
598 | } | 598 | } | ||
599 | } else { | 599 | } else { | ||
600 | lastValue = i18n("Error"); | 600 | lastValue = i18n("Error"); | ||
601 | } | 601 | } | ||
602 | static_cast<FancyPlotterLabel *>((static_cast<QWidgetItem *>(mLabelLayout->itemAt(beamId)))->widget())->setValueText(lastValue); | 602 | static_cast<FancyPlotterLabel *>((static_cast<QWidgetItem *>(mLabelLayout->itemAt(beamId)))->widget())->setValueText(lastValue); | ||
603 | } | 603 | } | ||
604 | } | 604 | } | ||
605 | 605 | | |||
▲ Show 20 Lines • Show All 336 Lines • Show Last 20 Lines |
maybe it's worth to have an i18nc here or it looks pretty mysterious?