mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-08 00:22:31 -06:00
[WebUI]Make the context obligatory for translatable strings. Also delete duplicate strings from extra translations.
This commit is contained in:
@@ -207,15 +207,15 @@ window.addEvent('load', function () {
|
||||
};
|
||||
|
||||
var updateFiltersList = function() {
|
||||
updateFilter('all', 'QBT_TR(All (%1))QBT_TR');
|
||||
updateFilter('downloading', 'QBT_TR(Downloading (%1))QBT_TR');
|
||||
updateFilter('seeding', 'QBT_TR(Seeding (%1))QBT_TR');
|
||||
updateFilter('completed', 'QBT_TR(Completed (%1))QBT_TR');
|
||||
updateFilter('resumed', 'QBT_TR(Resumed (%1))QBT_TR');
|
||||
updateFilter('paused', 'QBT_TR(Paused (%1))QBT_TR');
|
||||
updateFilter('active', 'QBT_TR(Active (%1))QBT_TR');
|
||||
updateFilter('inactive', 'QBT_TR(Inactive (%1))QBT_TR');
|
||||
updateFilter('errored', 'QBT_TR(Errored (%1))QBT_TR');
|
||||
updateFilter('all', 'QBT_TR(All (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
updateFilter('downloading', 'QBT_TR(Downloading (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
updateFilter('seeding', 'QBT_TR(Seeding (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
updateFilter('completed', 'QBT_TR(Completed (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
updateFilter('resumed', 'QBT_TR(Resumed (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
updateFilter('paused', 'QBT_TR(Paused (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
updateFilter('active', 'QBT_TR(Active (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
updateFilter('inactive', 'QBT_TR(Inactive (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
updateFilter('errored', 'QBT_TR(Errored (%1))QBT_TR[CONTEXT=StatusFiltersWidget]');
|
||||
};
|
||||
|
||||
var updateCategoryList = function() {
|
||||
@@ -239,8 +239,8 @@ window.addEvent('load', function () {
|
||||
if (row['full_data'].category.length === 0)
|
||||
uncategorized += 1;
|
||||
});
|
||||
categoryList.appendChild(create_link(CATEGORIES_ALL, 'QBT_TR(All (0))QBT_TR'.replace(' (0)', ''), all));
|
||||
categoryList.appendChild(create_link(CATEGORIES_UNCATEGORIZED, 'QBT_TR(Uncategorized (0))QBT_TR'.replace(' (0)', ''), uncategorized));
|
||||
categoryList.appendChild(create_link(CATEGORIES_ALL, 'QBT_TR(All)QBT_TR[CONTEXT=CategoryFilterModel]', all));
|
||||
categoryList.appendChild(create_link(CATEGORIES_UNCATEGORIZED, 'QBT_TR(Uncategorized)QBT_TR[CONTEXT=CategoryFilterModel]', uncategorized));
|
||||
|
||||
var sortedCategories = []
|
||||
Object.each(category_list, function(category) {
|
||||
@@ -279,7 +279,7 @@ window.addEvent('load', function () {
|
||||
noCache : true,
|
||||
method : 'get',
|
||||
onFailure : function () {
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
|
||||
clearTimeout(syncMainDataTimer);
|
||||
syncMainDataTimer = syncMainData.delay(2000);
|
||||
},
|
||||
@@ -362,11 +362,11 @@ window.addEvent('load', function () {
|
||||
transfer_info += " (" + friendlyUnit(serverState.up_info_data, false) + ")";
|
||||
$("UpInfos").set('html', transfer_info);
|
||||
if (speedInTitle) {
|
||||
document.title = "QBT_TR([D:%1 U:%2])QBT_TR".replace("%1", friendlyUnit(serverState.dl_info_speed, true)).replace("%2", friendlyUnit(serverState.up_info_speed, true));
|
||||
document.title += " qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR";
|
||||
document.title = "QBT_TR([D: %1, U: %2] qBittorrent %3)QBT_TR[CONTEXT=MainWindow]".replace("%1", friendlyUnit(serverState.dl_info_speed, true)).replace("%2", friendlyUnit(serverState.up_info_speed, true)).replace("%3", ${VERSION});
|
||||
document.title += " QBT_TR(Web UI)QBT_TR[CONTEXT=OptionsDialog]";
|
||||
}else
|
||||
document.title = "qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR";
|
||||
$('DHTNodes').set('html', 'QBT_TR(DHT: %1 nodes)QBT_TR'.replace("%1", serverState.dht_nodes));
|
||||
document.title = "qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR[CONTEXT=OptionsDialog]";
|
||||
$('DHTNodes').set('html', 'QBT_TR(DHT: %1 nodes)QBT_TR[CONTEXT=StatusBar]'.replace("%1", serverState.dht_nodes));
|
||||
|
||||
<!-- Statistics dialog -->
|
||||
if (document.getElementById("statisticspage")) {
|
||||
@@ -631,7 +631,7 @@ var loadTorrentPeersData = function(){
|
||||
noCache: true,
|
||||
method: 'get',
|
||||
onFailure: function() {
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
|
||||
clearTimeout(loadTorrentPeersTimer);
|
||||
loadTorrentPeersTimer = loadTorrentPeersData.delay(5000);
|
||||
},
|
||||
|
||||
@@ -341,8 +341,8 @@ var TorrentsTableContextMenu = new Class({
|
||||
updateCategoriesSubMenu : function (category_list) {
|
||||
var categoryList = $('contextCategoryList');
|
||||
categoryList.empty();
|
||||
categoryList.appendChild(new Element('li', {html: '<a href="javascript:torrentNewCategoryFN();"><img src="theme/list-add" alt="QBT_TR(New...)QBT_TR"/> QBT_TR(New...)QBT_TR</a>'}));
|
||||
categoryList.appendChild(new Element('li', {html: '<a href="javascript:torrentSetCategoryFN(0);"><img src="theme/edit-clear" alt="QBT_TR(Reset)QBT_TR"/> QBT_TR(Reset)QBT_TR</a>'}));
|
||||
categoryList.appendChild(new Element('li', {html: '<a href="javascript:torrentNewCategoryFN();"><img src="theme/list-add" alt="QBT_TR(New...)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(New...)QBT_TR[CONTEXT=TransferListWidget]</a>'}));
|
||||
categoryList.appendChild(new Element('li', {html: '<a href="javascript:torrentSetCategoryFN(0);"><img src="theme/edit-clear" alt="QBT_TR(Reset)QBT_TR[CONTEXT=TransferListWidget]"/> QBT_TR(Reset)QBT_TR[CONTEXT=TransferListWidget]</a>'}));
|
||||
|
||||
var sortedCategories = []
|
||||
Object.each(category_list, function (category) {
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
*/
|
||||
function friendlyUnit(value, isSpeed) {
|
||||
units = [
|
||||
"QBT_TR(B)QBT_TR",
|
||||
"QBT_TR(KiB)QBT_TR",
|
||||
"QBT_TR(MiB)QBT_TR",
|
||||
"QBT_TR(GiB)QBT_TR",
|
||||
"QBT_TR(TiB)QBT_TR",
|
||||
"QBT_TR(B)QBT_TR[CONTEXT=misc]",
|
||||
"QBT_TR(KiB)QBT_TR[CONTEXT=misc]",
|
||||
"QBT_TR(MiB)QBT_TR[CONTEXT=misc]",
|
||||
"QBT_TR(GiB)QBT_TR[CONTEXT=misc]",
|
||||
"QBT_TR(TiB)QBT_TR[CONTEXT=misc]",
|
||||
];
|
||||
|
||||
if (value < 0)
|
||||
return "QBT_TR(Unknown)QBT_TR";
|
||||
return "QBT_TR(Unknown)QBT_TR[CONTEXT=misc]";
|
||||
|
||||
var i = 0;
|
||||
while (value >= 1024. && i < 4) {
|
||||
@@ -26,7 +26,7 @@ function friendlyUnit(value, isSpeed) {
|
||||
+ " " + units[i];
|
||||
|
||||
if (isSpeed)
|
||||
ret += "QBT_TR(/s)QBT_TR";
|
||||
ret += "QBT_TR(/s)QBT_TR[CONTEXT=misc]";
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -40,18 +40,18 @@ function friendlyDuration(seconds) {
|
||||
if (seconds == 0)
|
||||
return "0";
|
||||
if (seconds < 60)
|
||||
return "QBT_TR(< 1m)QBT_TR";
|
||||
return "QBT_TR(< 1m)QBT_TR[CONTEXT=misc]";
|
||||
var minutes = seconds / 60;
|
||||
if (minutes < 60)
|
||||
return "QBT_TR(%1m)QBT_TR".replace("%1", parseInt(minutes));
|
||||
return "QBT_TR(%1m)QBT_TR[CONTEXT=misc]".replace("%1", parseInt(minutes));
|
||||
var hours = minutes / 60;
|
||||
minutes = minutes % 60;
|
||||
if (hours < 24)
|
||||
return "QBT_TR(%1h %2m)QBT_TR".replace("%1", parseInt(hours)).replace("%2", parseInt(minutes))
|
||||
return "QBT_TR(%1h %2m)QBT_TR[CONTEXT=misc]".replace("%1", parseInt(hours)).replace("%2", parseInt(minutes))
|
||||
var days = hours / 24;
|
||||
hours = hours % 24;
|
||||
if (days < 100)
|
||||
return "QBT_TR(%1d %2h)QBT_TR".replace("%1", parseInt(days)).replace("%2", parseInt(hours))
|
||||
return "QBT_TR(%1d %2h)QBT_TR[CONTEXT=misc]".replace("%1", parseInt(days)).replace("%2", parseInt(hours))
|
||||
return "∞";
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ initializeWindows = function() {
|
||||
new Event(e).stop();
|
||||
new MochaUI.Window({
|
||||
id: 'downloadPage',
|
||||
title: "QBT_TR(Download from URLs)QBT_TR",
|
||||
title: "QBT_TR(Download from URLs)QBT_TR[CONTEXT=downloadFromURL]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'download.html',
|
||||
scrollbars: true,
|
||||
@@ -66,7 +66,7 @@ initializeWindows = function() {
|
||||
new Event(e).stop();
|
||||
new MochaUI.Window({
|
||||
id: 'preferencesPage',
|
||||
title: "QBT_TR(Options)QBT_TR",
|
||||
title: "QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]",
|
||||
loadMethod: 'xhr',
|
||||
toolbar: true,
|
||||
contentURL: 'preferences_content.html',
|
||||
@@ -88,7 +88,7 @@ initializeWindows = function() {
|
||||
new Event(e).stop();
|
||||
new MochaUI.Window({
|
||||
id: 'uploadPage',
|
||||
title: "QBT_TR(Upload local torrent)QBT_TR",
|
||||
title: "QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'upload.html',
|
||||
scrollbars: true,
|
||||
@@ -105,7 +105,7 @@ initializeWindows = function() {
|
||||
globalUploadLimitFN = function() {
|
||||
new MochaUI.Window({
|
||||
id: 'uploadLimitPage',
|
||||
title: "QBT_TR(Global Upload Speed Limit)QBT_TR",
|
||||
title: "QBT_TR(Global Upload Speed Limit)QBT_TR[CONTEXT=MainWindow]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'uploadlimit.html?hashes=global',
|
||||
scrollbars: false,
|
||||
@@ -124,7 +124,7 @@ initializeWindows = function() {
|
||||
var hash = h[0];
|
||||
new MochaUI.Window({
|
||||
id: 'uploadLimitPage',
|
||||
title: "QBT_TR(Torrent Upload Speed Limiting)QBT_TR",
|
||||
title: "QBT_TR(Torrent Upload Speed Limiting)QBT_TR[CONTEXT=TransferListWidget]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'uploadlimit.html?hashes=' + h.join("|"),
|
||||
scrollbars: false,
|
||||
@@ -199,7 +199,7 @@ initializeWindows = function() {
|
||||
globalDownloadLimitFN = function() {
|
||||
new MochaUI.Window({
|
||||
id: 'downloadLimitPage',
|
||||
title: "QBT_TR(Global Download Speed Limit)QBT_TR",
|
||||
title: "QBT_TR(Global Download Speed Limit)QBT_TR[CONTEXT=MainWindow]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'downloadlimit.html?hashes=global',
|
||||
scrollbars: false,
|
||||
@@ -215,7 +215,7 @@ initializeWindows = function() {
|
||||
StatisticsLinkFN = function() {
|
||||
new MochaUI.Window({
|
||||
id: 'statisticspage',
|
||||
title: 'QBT_TR(Statistics)QBT_TR',
|
||||
title: 'QBT_TR(Statistics)QBT_TR[CONTEXT=StatsDialog]',
|
||||
loadMethod: 'xhr',
|
||||
contentURL: 'statistics.html',
|
||||
scrollbars: false,
|
||||
@@ -233,7 +233,7 @@ initializeWindows = function() {
|
||||
var hash = h[0];
|
||||
new MochaUI.Window({
|
||||
id: 'downloadLimitPage',
|
||||
title: "QBT_TR(Torrent Download Speed Limiting)QBT_TR",
|
||||
title: "QBT_TR(Torrent Download Speed Limiting)QBT_TR[CONTEXT=TransferListWidget]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'downloadlimit.html?hashes=' + h.join("|"),
|
||||
scrollbars: false,
|
||||
@@ -252,7 +252,7 @@ initializeWindows = function() {
|
||||
if (h.length) {
|
||||
new MochaUI.Window({
|
||||
id: 'confirmDeletionPage',
|
||||
title: "QBT_TR(Deletion confirmation)QBT_TR",
|
||||
title: "QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=confirmDeletionDlg]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'confirmdeletion.html?hashes=' + h.join("|"),
|
||||
scrollbars: false,
|
||||
@@ -324,7 +324,7 @@ initializeWindows = function() {
|
||||
if (h.length) {
|
||||
new MochaUI.Window({
|
||||
id: 'newCategoryPage',
|
||||
title: "QBT_TR(New Category)QBT_TR",
|
||||
title: "QBT_TR(New Category)QBT_TR[CONTEXT=TransferListWidget]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'newcategory.html?hashes=' + h.join('|'),
|
||||
scrollbars: false,
|
||||
@@ -358,7 +358,7 @@ initializeWindows = function() {
|
||||
createCategoryFN = function () {
|
||||
new MochaUI.Window({
|
||||
id: 'newCategoryPage',
|
||||
title: "QBT_TR(New Category)QBT_TR",
|
||||
title: "QBT_TR(New Category)QBT_TR[CONTEXT=CategoryFilterWidget]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'newcategory.html',
|
||||
scrollbars: false,
|
||||
@@ -437,7 +437,7 @@ initializeWindows = function() {
|
||||
if (h.length) {
|
||||
new MochaUI.Window({
|
||||
id: 'confirmDeletionPage',
|
||||
title: "QBT_TR(Deletion confirmation)QBT_TR",
|
||||
title: "QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=confirmDeletionDlg]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'confirmdeletion.html?hashes=' + h.join("|"),
|
||||
scrollbars: false,
|
||||
@@ -505,7 +505,7 @@ initializeWindows = function() {
|
||||
new Event(e).stop();
|
||||
new MochaUI.Window({
|
||||
id: 'aboutpage',
|
||||
title: 'QBT_TR(About)QBT_TR',
|
||||
title: 'QBT_TR(About)QBT_TR[CONTEXT=AboutDlg]',
|
||||
loadMethod: 'xhr',
|
||||
contentURL: 'about.html',
|
||||
width: 550,
|
||||
@@ -527,11 +527,11 @@ initializeWindows = function() {
|
||||
|
||||
addClickEvent('shutdown', function(e) {
|
||||
new Event(e).stop();
|
||||
if (confirm('QBT_TR(Are you sure you want to quit qBittorrent?)QBT_TR')) {
|
||||
if (confirm('QBT_TR(Are you sure you want to quit qBittorrent?)QBT_TR[CONTEXT=MainWindow]')) {
|
||||
new Request({
|
||||
url: 'command/shutdown',
|
||||
onSuccess: function() {
|
||||
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>QBT_TR(qBittorrent has been shutdown.)QBT_TR</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>QBT_TR(qBittorrent has been shutdown.)QBT_TR</h1></body></html>");
|
||||
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>QBT_TR(qBittorrent has been shutdown.)QBT_TR[CONTEXT=HttpServer]</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>QBT_TR(qBittorrent has been shutdown.)QBT_TR[CONTEXT=HttpServer]</h1></body></html>");
|
||||
stop();
|
||||
}
|
||||
}).send();
|
||||
|
||||
@@ -148,19 +148,19 @@ var createPriorityCombo = function(id, selected_prio) {
|
||||
});
|
||||
var opt = new Element("option");
|
||||
opt.set('value', '1')
|
||||
opt.set('html', "QBT_TR(Normal)QBT_TR");
|
||||
opt.set('html', "QBT_TR(Normal)QBT_TR[CONTEXT=PropListDelegate]");
|
||||
if (selected_prio <= 1)
|
||||
opt.setAttribute('selected', '');
|
||||
opt.injectInside(select);
|
||||
opt = new Element("option");
|
||||
opt.set('value', '2')
|
||||
opt.set('html', "QBT_TR(High)QBT_TR");
|
||||
opt.set('html', "QBT_TR(High)QBT_TR[CONTEXT=PropListDelegate]");
|
||||
if (selected_prio == 2)
|
||||
opt.setAttribute('selected', '');
|
||||
opt.injectInside(select);
|
||||
opt = new Element("option");
|
||||
opt.set('value', '7')
|
||||
opt.set('html', "QBT_TR(Maximum)QBT_TR");
|
||||
opt.set('html', "QBT_TR(Maximum)QBT_TR[CONTEXT=PropListDelegate]");
|
||||
if (selected_prio == 7)
|
||||
opt.setAttribute('selected', '');
|
||||
opt.injectInside(select);
|
||||
@@ -295,7 +295,7 @@ var loadTorrentFilesData = function() {
|
||||
noCache: true,
|
||||
method: 'get',
|
||||
onFailure: function() {
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
|
||||
clearTimeout(loadTorrentFilesDataTimer);
|
||||
loadTorrentFilesDataTimer = loadTorrentFilesData.delay(10000);
|
||||
},
|
||||
|
||||
@@ -47,7 +47,7 @@ var loadTorrentData = function() {
|
||||
noCache: true,
|
||||
method: 'get',
|
||||
onFailure: function() {
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
|
||||
clearTimeout(loadTorrentDataTimer);
|
||||
loadTorrentDataTimer = loadTorrentData.delay(10000);
|
||||
},
|
||||
@@ -57,7 +57,7 @@ var loadTorrentData = function() {
|
||||
var temp;
|
||||
// Update Torrent data
|
||||
if (data.seeding_time > 0)
|
||||
temp = "QBT_TR(%1 (%2 this session))QBT_TR"
|
||||
temp = "QBT_TR(%1 (%2 this session))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", friendlyDuration(data.time_elapsed))
|
||||
.replace("%2", friendlyDuration(data.seeding_time))
|
||||
else
|
||||
@@ -66,27 +66,27 @@ var loadTorrentData = function() {
|
||||
|
||||
$('eta').set('html', friendlyDuration(data.eta));
|
||||
|
||||
temp = "QBT_TR(%1 (%2 max))QBT_TR"
|
||||
temp = "QBT_TR(%1 (%2 max))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", data.nb_connections)
|
||||
.replace("%2", data.nb_connections_limit < 0 ? "∞" : data.nb_connections_limit)
|
||||
$('nb_connections').set('html', temp);
|
||||
|
||||
temp = "QBT_TR(%1 (%2 this session))QBT_TR"
|
||||
temp = "QBT_TR(%1 (%2 this session))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", friendlyUnit(data.total_downloaded))
|
||||
.replace("%2", friendlyUnit(data.total_downloaded_session))
|
||||
$('total_downloaded').set('html', temp);
|
||||
|
||||
temp = "QBT_TR(%1 (%2 this session))QBT_TR"
|
||||
temp = "QBT_TR(%1 (%2 this session))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", friendlyUnit(data.total_uploaded))
|
||||
.replace("%2", friendlyUnit(data.total_uploaded_session))
|
||||
$('total_uploaded').set('html', temp);
|
||||
|
||||
temp = "QBT_TR(%1 (%2 avg.))QBT_TR"
|
||||
temp = "QBT_TR(%1 (%2 avg.))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", friendlyUnit(data.dl_speed, true))
|
||||
.replace("%2", friendlyUnit(data.dl_speed_avg, true));
|
||||
$('dl_speed').set('html', temp);
|
||||
|
||||
temp = "QBT_TR(%1 (%2 avg.))QBT_TR"
|
||||
temp = "QBT_TR(%1 (%2 avg.))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", friendlyUnit(data.up_speed, true))
|
||||
.replace("%2", friendlyUnit(data.up_speed_avg, true));
|
||||
$('up_speed').set('html', temp);
|
||||
@@ -99,12 +99,12 @@ var loadTorrentData = function() {
|
||||
|
||||
$('total_wasted').set('html', friendlyUnit(data.total_wasted));
|
||||
|
||||
temp = "QBT_TR(%1 (%2 total))QBT_TR"
|
||||
temp = "QBT_TR(%1 (%2 total))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", data.seeds)
|
||||
.replace("%2", data.seeds_total);
|
||||
$('seeds').set('html', temp);
|
||||
|
||||
temp = "QBT_TR(%1 (%2 total))QBT_TR"
|
||||
temp = "QBT_TR(%1 (%2 total))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", data.peers)
|
||||
.replace("%2", data.peers_total);
|
||||
$('peers').set('html', temp);
|
||||
@@ -116,25 +116,25 @@ var loadTorrentData = function() {
|
||||
if (data.last_seen != -1)
|
||||
temp = new Date(data.last_seen * 1000).toLocaleString();
|
||||
else
|
||||
temp = "QBT_TR(Never)QBT_TR";
|
||||
temp = "QBT_TR(Never)QBT_TR[CONTEXT=PropertiesWidget]";
|
||||
$('last_seen').set('html', temp);
|
||||
|
||||
$('total_size').set('html', friendlyUnit(data.total_size));
|
||||
|
||||
if (data.pieces_num != -1)
|
||||
temp = "QBT_TR(%1 x %2 (have %3))QBT_TR"
|
||||
temp = "QBT_TR(%1 x %2 (have %3))QBT_TR[CONTEXT=PropertiesWidget]"
|
||||
.replace("%1", data.pieces_num)
|
||||
.replace("%2", friendlyUnit(data.piece_size))
|
||||
.replace("%3", data.pieces_have);
|
||||
else
|
||||
temp = "QBT_TR(Unknown)QBT_TR";
|
||||
temp = "QBT_TR(Unknown)QBT_TR[CONTEXT=HttpServer]";
|
||||
$('pieces').set('html', temp);
|
||||
|
||||
$('created_by').set('html', escapeHtml(data.created_by));
|
||||
if (data.addition_date != -1)
|
||||
temp = new Date(data.addition_date * 1000).toLocaleString();
|
||||
else
|
||||
temp = "QBT_TR(Unknown)QBT_TR";
|
||||
temp = "QBT_TR(Unknown)QBT_TR[CONTEXT=HttpServer]";
|
||||
|
||||
$('addition_date').set('html', temp);
|
||||
if (data.completion_date != -1)
|
||||
@@ -147,7 +147,7 @@ var loadTorrentData = function() {
|
||||
if (data.creation_date != -1)
|
||||
temp = new Date(data.creation_date * 1000).toLocaleString();
|
||||
else
|
||||
temp = "QBT_TR(Unknown)QBT_TR";
|
||||
temp = "QBT_TR(Unknown)QBT_TR[CONTEXT=HttpServer]";
|
||||
$('creation_date').set('html', temp);
|
||||
|
||||
$('save_path').set('html', data.save_path);
|
||||
|
||||
@@ -76,7 +76,7 @@ var loadTrackersData = function() {
|
||||
noCache: true,
|
||||
method: 'get',
|
||||
onFailure: function() {
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
|
||||
clearTimeout(loadTrackersDataTimer);
|
||||
loadTrackersDataTimer = loadTrackersData.delay(20000);
|
||||
},
|
||||
@@ -116,7 +116,7 @@ $('addTrackersPlus').addEvent('click', function addTrackerDlg() {
|
||||
if (current_hash.length == 0) return;
|
||||
new MochaUI.Window({
|
||||
id: 'trackersPage',
|
||||
title: "QBT_TR(Trackers addition dialog)QBT_TR",
|
||||
title: "QBT_TR(Trackers addition dialog)QBT_TR[CONTEXT=TrackersAdditionDlg]",
|
||||
loadMethod: 'iframe',
|
||||
contentURL: 'addtrackers.html?hash=' + current_hash,
|
||||
scrollbars: true,
|
||||
|
||||
@@ -76,7 +76,7 @@ var loadWebSeedsData = function() {
|
||||
noCache: true,
|
||||
method: 'get',
|
||||
onFailure: function() {
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
|
||||
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
|
||||
clearTimeout(loadWebSeedsDataTimer);
|
||||
loadWebSeedsDataTimer = loadWebSeedsData.delay(20000);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user