mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
WebUI: don't auto infer radix parameter
This commit is contained in:
committed by
sledgehammer999
parent
1c5af96ad8
commit
4a36fe7278
@@ -112,18 +112,18 @@ window.qBittorrent.Misc = (function() {
|
||||
return "QBT_TR(< 1m)QBT_TR[CONTEXT=misc]";
|
||||
let minutes = seconds / 60;
|
||||
if (minutes < 60)
|
||||
return "QBT_TR(%1m)QBT_TR[CONTEXT=misc]".replace("%1", parseInt(minutes));
|
||||
return "QBT_TR(%1m)QBT_TR[CONTEXT=misc]".replace("%1", Math.floor(minutes));
|
||||
let hours = minutes / 60;
|
||||
minutes %= 60;
|
||||
if (hours < 24)
|
||||
return "QBT_TR(%1h %2m)QBT_TR[CONTEXT=misc]".replace("%1", parseInt(hours)).replace("%2", parseInt(minutes));
|
||||
return "QBT_TR(%1h %2m)QBT_TR[CONTEXT=misc]".replace("%1", Math.floor(hours)).replace("%2", Math.floor(minutes));
|
||||
let days = hours / 24;
|
||||
hours %= 24;
|
||||
if (days < 365)
|
||||
return "QBT_TR(%1d %2h)QBT_TR[CONTEXT=misc]".replace("%1", parseInt(days)).replace("%2", parseInt(hours));
|
||||
return "QBT_TR(%1d %2h)QBT_TR[CONTEXT=misc]".replace("%1", Math.floor(days)).replace("%2", Math.floor(hours));
|
||||
const years = days / 365;
|
||||
days %= 365;
|
||||
return "QBT_TR(%1y %2d)QBT_TR[CONTEXT=misc]".replace("%1", parseInt(years)).replace("%2", parseInt(days));
|
||||
return "QBT_TR(%1y %2d)QBT_TR[CONTEXT=misc]".replace("%1", Math.floor(years)).replace("%2", Math.floor(days));
|
||||
};
|
||||
|
||||
const friendlyPercentage = function(value) {
|
||||
|
||||
Reference in New Issue
Block a user