diff --git a/mythtv/programs/mythfrontend/statusbox.cpp b/mythtv/programs/mythfrontend/statusbox.cpp index ea16167..a8e3635 100644 --- a/mythtv/programs/mythfrontend/statusbox.cpp +++ b/mythtv/programs/mythfrontend/statusbox.cpp @@ -1014,20 +1014,20 @@ static const QString sm_str(long long sizeKB, int prec=1) if (sizeKB>1024*1024*1024) // Terabytes { double sizeGB = sizeKB/(1024*1024*1024.0); - return QString("%1 TB").arg(sizeGB, 0, 'f', (sizeGB>10)?0:prec); + return QString(QObject::tr("%1 TB")).arg(sizeGB, 0, 'f', (sizeGB>10)?0:prec); } else if (sizeKB>1024*1024) // Gigabytes { double sizeGB = sizeKB/(1024*1024.0); - return QString("%1 GB").arg(sizeGB, 0, 'f', (sizeGB>10)?0:prec); + return QString(QObject::tr("%1 GB")).arg(sizeGB, 0, 'f', (sizeGB>10)?0:prec); } else if (sizeKB>1024) // Megabytes { double sizeMB = sizeKB/1024.0; - return QString("%1 MB").arg(sizeMB, 0, 'f', (sizeMB>10)?0:prec); + return QString(QObject::tr("%1 MB")).arg(sizeMB, 0, 'f', (sizeMB>10)?0:prec); } // Kilobytes - return QString("%1 KB").arg(sizeKB); + return QString(QObject::tr("%1 KB")).arg(sizeKB); } static const QString usage_str_kb(long long total, @@ -1038,7 +1038,7 @@ static const QString usage_str_kb(long long total, if (total > 0.0 && free > 0.0) { double percent = (100.0*free)/total; - ret = QObject::tr("%1 total, %2 used, %3 (or %4%) free.") + ret = StatusBox::tr("%1 total, %2 used, %3 (or %4%) free.") .arg(sm_str(total)).arg(sm_str(used)) .arg(sm_str(free)).arg(percent, 0, 'f', (percent >= 10.0) ? 0 : 2); } @@ -1055,7 +1055,7 @@ static void disk_usage_with_rec_time_kb(QStringList& out, long long total, long long used, long long free, const recprof2bps_t& prof2bps) { - const QString tail = QObject::tr(", using your %1 rate of %2 kb/s"); + const QString tail = StatusBox::tr(", using your %1 rate of %2 kb/s"); out< 60) - out< 0) { char buff[6]; - QString dayLabel = QObject::tr("%n day(s)", "", days); + QString dayLabel = StatusBox::tr("%n day(s)", "", days); sprintf(buff, "%d:%02d", hours, min); @@ -1142,7 +1142,11 @@ void StatusBox::getActualRecordedBPS(QString hostnames) if (query.exec() && query.next() && query.value(0).toDouble() > 0) { - recordingProfilesBPS[tr("average")] = + QString rateStr = tr("average", "average rate"); + + // Don't user a tr() directly here as the Qt tools will + // not be able to extract the string for translation. + recordingProfilesBPS[rateStr] = (int)(query.value(0).toDouble()); } @@ -1158,7 +1162,11 @@ void StatusBox::getActualRecordedBPS(QString hostnames) if (query.exec() && query.next() && query.value(0).toDouble() > 0) { - recordingProfilesBPS[tr("maximum")] = + QString rateStr = tr("maximum", "maximum rate"); + + // Don't user a tr() directly here as the Qt tools will + // not be able to extract the string for translation. + recordingProfilesBPS[rateStr] = (int)(query.value(0).toDouble()); } }