diff options
author | Takumi Asaki <asaki@sra.co.jp> | 2013-07-11 10:33:47 +0900 |
---|---|---|
committer | Kai Koehne <kai.koehne@digia.com> | 2013-07-14 11:23:49 +0200 |
commit | 43a57a4518037080fae5fbac50d22530f2843368 (patch) | |
tree | ba71177996de778971046f408a7beab5e39cbf0a /src/libs/kdtools/kdupdaterfiledownloader.cpp | |
parent | a8b92fc819753c757ca8bc66359d091e16e24642 (diff) |
Change some messages translator friendly.
Change-Id: Ib61b852dccf08c6efa272c48601919fdbd9ac1ce
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/libs/kdtools/kdupdaterfiledownloader.cpp')
-rw-r--r-- | src/libs/kdtools/kdupdaterfiledownloader.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libs/kdtools/kdupdaterfiledownloader.cpp b/src/libs/kdtools/kdupdaterfiledownloader.cpp index fee2a853e..19ba204c0 100644 --- a/src/libs/kdtools/kdupdaterfiledownloader.cpp +++ b/src/libs/kdtools/kdupdaterfiledownloader.cpp @@ -320,13 +320,13 @@ void KDUpdater::FileDownloader::emitDownloadStatus() if (bytesReceived.endsWith(tmp)) bytesReceived.chop(tmp.length()); - status = bytesReceived + tr(" of ") + bytesToReceive; + status = tr("%1 of %2").arg(bytesReceived).arg(bytesToReceive); } else { if (d->m_bytesReceived > 0) - status = humanReadableSize(d->m_bytesReceived) + tr(" downloaded."); + status = tr("%1 downloaded.").arg(humanReadableSize(d->m_bytesReceived)); } - status += QLatin1String(" (") + humanReadableSize(d->m_downloadSpeed) + tr("/sec") + QLatin1Char(')'); + status += QLatin1Char(' ') + tr("(%1/sec)").arg(humanReadableSize(d->m_downloadSpeed)); if (d->m_bytesToReceive > 0 && d->m_downloadSpeed > 0) { const qint64 time = (d->m_bytesToReceive - d->m_bytesReceived) / d->m_downloadSpeed; @@ -337,22 +337,22 @@ void KDUpdater::FileDownloader::emitDownloadStatus() QString days; if (d > 0) - days = QString::number(d) + (d < 2 ? tr(" day") : tr(" days")) + QLatin1String(", "); + days = tr("%n day(s), ", "", d); QString hours; if (h > 0) - hours = QString::number(h) + (h < 2 ? tr(" hour") : tr(" hours")) + QLatin1String(", "); + hours = tr("%n hour(s), ", "", h); QString minutes; if (m > 0) - minutes = QString::number(m) + (m < 2 ? tr(" minute") : tr(" minutes")); + minutes = tr("%n minute(s)", "", m); QString seconds; if (s >= 0 && minutes.isEmpty()) { s = (s <= 0 ? 1 : s); - seconds = QString::number(s) + (s < 2 ? tr(" second") : tr(" seconds")); + seconds = tr("%n second(s)", "", s); } - status += tr(" - ") + days + hours + minutes + seconds + tr(" remaining."); + status += tr(" - %1%2%3%4 remaining.").arg(days).arg(hours).arg(minutes).arg(seconds); } else { status += tr(" - unknown time remaining."); } |