Add missing unit sizes in misc.js

This commit is contained in:
sledgehammer999 2017-05-05 03:27:49 +03:00
parent 44c5a9beff
commit 0addeafc6b
No known key found for this signature in database
GPG Key ID: 6E4A2D025B7CC9A2

View File

@ -8,13 +8,15 @@ function friendlyUnit(value, isSpeed) {
"QBT_TR(MiB)QBT_TR[CONTEXT=misc]",
"QBT_TR(GiB)QBT_TR[CONTEXT=misc]",
"QBT_TR(TiB)QBT_TR[CONTEXT=misc]",
"QBT_TR(PiB)QBT_TR[CONTEXT=misc]",
"QBT_TR(EiB)QBT_TR[CONTEXT=misc]"
];
if (value < 0)
return "QBT_TR(Unknown)QBT_TR[CONTEXT=misc]";
var i = 0;
while (value >= 1024. && i < 4) {
while (value >= 1024. && i < 6) {
value /= 1024.;
++i;
}