mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Merge pull request #1049 from forabi/master
[translation] Added plural forms for hours/mins/secs in download manager and tr() for data units
This commit is contained in:
commit
8a3b3bd6a9
@ -255,13 +255,13 @@ QString DownloadItem::remaingTimeToString(QTime time)
|
||||
return tr("few seconds");
|
||||
}
|
||||
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)) {
|
||||
return time.toString("m") + " " + tr("minutes");
|
||||
return time.toString("m") + " " + tr("minutes", "", time.minute());
|
||||
}
|
||||
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
|
||||
if (speed < 1000) {
|
||||
return QString::number(speed, 'f', 0) + " kB/s";
|
||||
return QString::number(speed, 'f', 0) + " " + tr("kB/s");
|
||||
}
|
||||
|
||||
speed /= 1024; //MB
|
||||
if (speed < 1000) {
|
||||
return QString::number(speed, 'f', 2) + " MB/s";
|
||||
return QString::number(speed, 'f', 2) + " " + tr("MB/s");
|
||||
}
|
||||
|
||||
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)
|
||||
|
@ -1578,26 +1578,47 @@ Please install latest version of QupZilla.</source>
|
||||
<source>few seconds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="258"/>
|
||||
<source>seconds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="unfinished">
|
||||
<numerusform></numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="261"/>
|
||||
<source>minutes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="unfinished">
|
||||
<numerusform></numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="264"/>
|
||||
<source>hours</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="unfinished">
|
||||
<numerusform></numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="271"/>
|
||||
<source>Unknown speed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</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>
|
||||
<location filename="../src/lib/downloads/downloaditem.cpp" line="309"/>
|
||||
<source>Unknown size</source>
|
||||
|
Loading…
Reference in New Issue
Block a user