mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Added plural forms for hours/mins/secs in download manager and tr() for data units
This commit is contained in:
parent
00d566fd97
commit
baecfddad1
|
@ -255,13 +255,13 @@ QString DownloadItem::remaingTimeToString(QTime time)
|
||||||
return tr("few seconds");
|
return tr("few seconds");
|
||||||
}
|
}
|
||||||
else if (time < QTime(0, 1)) {
|
else if (time < QTime(0, 1)) {
|
||||||
return time.toString("s") + " " + tr("seconds");
|
return time.toString("s") + " " + tr("seconds", "", time.second());
|
||||||
}
|
}
|
||||||
else if (time < QTime(1, 0)) {
|
else if (time < QTime(1, 0)) {
|
||||||
return time.toString("m") + " " + tr("minutes");
|
return time.toString("m") + " " + tr("minutes", "", time.minute());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return time.toString("h") + " " + tr("hours");
|
return time.toString("h") + " " + tr("hours", "", time.hour());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,16 +273,16 @@ QString DownloadItem::currentSpeedToString(double speed)
|
||||||
|
|
||||||
speed /= 1024; // kB
|
speed /= 1024; // kB
|
||||||
if (speed < 1000) {
|
if (speed < 1000) {
|
||||||
return QString::number(speed, 'f', 0) + " kB/s";
|
return QString::number(speed, 'f', 0) + " " + tr("kB/s");
|
||||||
}
|
}
|
||||||
|
|
||||||
speed /= 1024; //MB
|
speed /= 1024; //MB
|
||||||
if (speed < 1000) {
|
if (speed < 1000) {
|
||||||
return QString::number(speed, 'f', 2) + " MB/s";
|
return QString::number(speed, 'f', 2) + " " + tr("MB/s");
|
||||||
}
|
}
|
||||||
|
|
||||||
speed /= 1024; //GB
|
speed /= 1024; //GB
|
||||||
return QString::number(speed, 'f', 2) + " GB/s";
|
return QString::number(speed, 'f', 2) + " " + tr("GB/s");
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadItem::updateDownloadInfo(double currSpeed, qint64 received, qint64 total)
|
void DownloadItem::updateDownloadInfo(double currSpeed, qint64 received, qint64 total)
|
||||||
|
|
|
@ -1578,26 +1578,47 @@ Please install latest version of QupZilla.</source>
|
||||||
<source>few seconds</source>
|
<source>few seconds</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="258"/>
|
<location filename="../src/lib/downloads/downloaditem.cpp" line="258"/>
|
||||||
<source>seconds</source>
|
<source>seconds</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished">
|
||||||
|
<numerusform></numerusform>
|
||||||
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="261"/>
|
<location filename="../src/lib/downloads/downloaditem.cpp" line="261"/>
|
||||||
<source>minutes</source>
|
<source>minutes</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished">
|
||||||
|
<numerusform></numerusform>
|
||||||
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="264"/>
|
<location filename="../src/lib/downloads/downloaditem.cpp" line="264"/>
|
||||||
<source>hours</source>
|
<source>hours</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished">
|
||||||
|
<numerusform></numerusform>
|
||||||
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="271"/>
|
<location filename="../src/lib/downloads/downloaditem.cpp" line="271"/>
|
||||||
<source>Unknown speed</source>
|
<source>Unknown speed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/lib/downloads/downloaditem.cpp" line="276"/>
|
||||||
|
<source>kB/s</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/lib/downloads/downloaditem.cpp" line="281"/>
|
||||||
|
<source>MB/s</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../src/lib/downloads/downloaditem.cpp" line="285"/>
|
||||||
|
<source>GB/s</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="309"/>
|
<location filename="../src/lib/downloads/downloaditem.cpp" line="309"/>
|
||||||
<source>Unknown size</source>
|
<source>Unknown size</source>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user