Browse Source

WebUI: Improve translation macro.

Now we use QBT_TR(translatable string)QBT_TR.
adaptive-webui-19844
Vladimir Golovnev (Glassez) 10 years ago
parent
commit
d80a14a2e1
  1. 2
      src/webui/webapplication.cpp
  2. 92
      src/webui/www/private/index.html
  3. 14
      src/webui/www/private/login.html
  4. 6
      src/webui/www/public/addtrackers.html
  5. 8
      src/webui/www/public/confirmdeletion.html
  6. 8
      src/webui/www/public/download.html
  7. 6
      src/webui/www/public/downloadlimit.html
  8. 12
      src/webui/www/public/filters.html
  9. 14
      src/webui/www/public/preferences.html
  10. 234
      src/webui/www/public/preferences_content.html
  11. 6
      src/webui/www/public/properties.html
  12. 36
      src/webui/www/public/properties_content.html
  13. 10
      src/webui/www/public/scripts/client.js
  14. 22
      src/webui/www/public/scripts/misc.js
  15. 20
      src/webui/www/public/scripts/mocha-init.js
  16. 8
      src/webui/www/public/scripts/prop-files.js
  17. 12
      src/webui/www/public/scripts/prop-general.js
  18. 4
      src/webui/www/public/scripts/prop-trackers.js
  19. 18
      src/webui/www/public/transferlist.html
  20. 6
      src/webui/www/public/upload.html
  21. 6
      src/webui/www/public/uploadlimit.html

2
src/webui/webapplication.cpp

@ -187,7 +187,7 @@ QString WebApplication::generateSid() @@ -187,7 +187,7 @@ QString WebApplication::generateSid()
void WebApplication::translateDocument(QString& data)
{
const QRegExp regex(QString::fromUtf8("_\\(([\\w\\s?!:\\/\\(\\),%µ&\\-\\.]+)\\)"));
const QRegExp regex("QBT_TR\\((([^\\)]|\\)(?!QBT_TR))+)\\)QBT_TR");
const QRegExp mnemonic("\\(?&([a-zA-Z]?\\))?");
const std::string contexts[] = {
"TransferListFiltersWidget", "TransferListWidget", "PropertiesWidget",

92
src/webui/www/private/index.html

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=10; IE=9; IE=8;" />
<title>_(qBittorrent web User Interface)</title>
<title>QBT_TR(qBittorrent web User Interface)QBT_TR</title>
<link rel="stylesheet" href="css/dynamicTable.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--<link rel="stylesheet" type="text/css" href="css/Content.css" />-->
@ -33,85 +33,85 @@ @@ -33,85 +33,85 @@
<div id="desktopNavbar">
<ul>
<li>
<a class="returnFalse">_(File)</a>
<a class="returnFalse">QBT_TR(File)QBT_TR</a>
<ul>
<li><a id="uploadLink"><img class="MyMenuIcon" alt="_(&Add torrent file...)" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>_(&Add torrent file...)</a></li>
<li><a id="downloadLink"><img class="MyMenuIcon" alt="_(Add &link to torrent...)" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>_(Add &link to torrent...)</a></li>
<li class="divider"><a id="logoutLink"><img class="MyMenuIcon" alt="_(Logout)" src="theme/system-log-out" width="16" height="16" onload="fixPNG(this)"/>_(Logout)</a></li>
<li><a id="shutdownLink"><img class="MyMenuIcon" alt="_(Exit qBittorrent)" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>_(Exit qBittorrent)</a></li>
<li><a id="uploadLink"><img class="MyMenuIcon" alt="QBT_TR(&Add torrent file...)QBT_TR" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Add torrent file...)QBT_TR</a></li>
<li><a id="downloadLink"><img class="MyMenuIcon" alt="QBT_TR(Add &link to torrent...)QBT_TR" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Add &link to torrent...)QBT_TR</a></li>
<li class="divider"><a id="logoutLink"><img class="MyMenuIcon" alt="QBT_TR(Logout)QBT_TR" src="theme/system-log-out" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Logout)QBT_TR</a></li>
<li><a id="shutdownLink"><img class="MyMenuIcon" alt="QBT_TR(Exit qBittorrent)QBT_TR" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Exit qBittorrent)QBT_TR</a></li>
</ul>
</li>
<li>
<a class="returnFalse">_(Edit)</a>
<a class="returnFalse">QBT_TR(Edit)QBT_TR</a>
<ul>
<li><a id="resumeAllLink"><img class="MyMenuIcon" alt="_(R&esume All)" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(R&esume All)</a></li>
<li><a id="pauseAllLink"><img class="MyMenuIcon" alt="_(P&ause All)" src="theme/media-playback-pause" width="16" height="16" onload="fixPNG(this)"/>_(P&ause All)</a></li>
<li class="divider"><a id="resumeLink"><img class="MyMenuIcon" alt="_(&Resume)" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(&Resume)</a></li>
<li><a id="pauseLink"><img class="MyMenuIcon" src="theme/media-playback-pause" alt="_(&Pause)" width="16" height="16" onload="fixPNG(this)"/>_(&Pause)</a></li>
<li><a id="recheckLink"><img class="MyMenuIcon" src="theme/document-edit-verify" alt="_(Force recheck)" width="16" height="16" onload="fixPNG(this)"/>_(Force recheck)</a></li>
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="theme/list-remove" alt="_(&Delete)" width="16" height="16" onload="fixPNG(this)"/>_(&Delete)</a></li>
<li><a id="resumeAllLink"><img class="MyMenuIcon" alt="QBT_TR(R&esume All)QBT_TR" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(R&esume All)QBT_TR</a></li>
<li><a id="pauseAllLink"><img class="MyMenuIcon" alt="QBT_TR(P&ause All)QBT_TR" src="theme/media-playback-pause" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(P&ause All)QBT_TR</a></li>
<li class="divider"><a id="resumeLink"><img class="MyMenuIcon" alt="QBT_TR(&Resume)QBT_TR" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Resume)QBT_TR</a></li>
<li><a id="pauseLink"><img class="MyMenuIcon" src="theme/media-playback-pause" alt="QBT_TR(&Pause)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Pause)QBT_TR</a></li>
<li><a id="recheckLink"><img class="MyMenuIcon" src="theme/document-edit-verify" alt="QBT_TR(Force recheck)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Force recheck)QBT_TR</a></li>
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="theme/list-remove" alt="QBT_TR(&Delete)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Delete)QBT_TR</a></li>
</ul>
</li>
<li>
<a class="returnFalse">_(&View)</a>
<a class="returnFalse">QBT_TR(&View)QBT_TR</a>
<ul>
<li><a id="speedInBrowserTitleBarLink"><img class="MyMenuIcon" src="theme/checked" alt="_(&Speed in title bar)" width="16" height="16" onload="fixPNG(this)"/>_(&Speed in title bar)</a></li>
<li><a id="speedInBrowserTitleBarLink"><img class="MyMenuIcon" src="theme/checked" alt="QBT_TR(&Speed in title bar)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Speed in title bar)QBT_TR</a></li>
</ul>
</li>
<li>
<a class="returnFalse">_(&Tools)</a>
<a class="returnFalse">QBT_TR(&Tools)QBT_TR</a>
<ul>
<li><a id="preferencesLink"><img class="MyMenuIcon" src="theme/preferences-system" alt="_(&Options...)" width="16" height="16" onload="fixPNG(this)"/>_(&Options...)</a></li>
<li><a id="preferencesLink"><img class="MyMenuIcon" src="theme/preferences-system" alt="QBT_TR(&Options...)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Options...)QBT_TR</a></li>
</ul>
</li>
<li>
<a class="returnFalse">_(&Help)</a>
<a class="returnFalse">QBT_TR(&Help)QBT_TR</a>
<ul>
<li><a id="bugLink" target="_blank" href="http://bugs.qbittorrent.org/"><img class="MyMenuIcon" src="theme/tools-report-bug" alt="_(Report a &bug)" width="16" height="16" onload="fixPNG(this)"/>_(Report a &bug)</a></li>
<li><a id="siteLink" target="_blank" href="http://www.qbittorrent.org/"><img class="MyMenuIcon" src="images/skin/qbittorrent16.png" alt="_(Visit &Website)" width="16" height="16" onload="fixPNG(this)"/>_(Visit &Website)</a></li>
<li><a id="docsLink" target="_blank" href="http://wiki.qbittorrent.org/"><img class="MyMenuIcon" src="theme/help-contents" alt="_(&Documentation)" width="16" height="16" onload="fixPNG(this)"/>_(&Documentation)</a></li>
<li><a id="aboutLink"><img class="MyMenuIcon" src="theme/help-about" alt="_(&About)" width="16" height="16" onload="fixPNG(this)"/>_(&About)</a></li>
<li><a id="bugLink" target="_blank" href="http://bugs.qbittorrent.org/"><img class="MyMenuIcon" src="theme/tools-report-bug" alt="QBT_TR(Report a &bug)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Report a &bug)QBT_TR</a></li>
<li><a id="siteLink" target="_blank" href="http://www.qbittorrent.org/"><img class="MyMenuIcon" src="images/skin/qbittorrent16.png" alt="QBT_TR(Visit &Website)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Visit &Website)QBT_TR</a></li>
<li><a id="docsLink" target="_blank" href="http://wiki.qbittorrent.org/"><img class="MyMenuIcon" src="theme/help-contents" alt="QBT_TR(&Documentation)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Documentation)QBT_TR</a></li>
<li><a id="aboutLink"><img class="MyMenuIcon" src="theme/help-about" alt="QBT_TR(&About)QBT_TR" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&About)QBT_TR</a></li>
</ul>
</li>
</ul>
</div>
<div id="mochaToolbar">
&nbsp;&nbsp;
<a id="uploadButton"><img class="mochaToolButton" title="_(&Add torrent file...)" src="theme/list-add" alt="_(&Add torrent file...)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="downloadButton"><img class="mochaToolButton" title="_(Add &link to torrent...)" src="theme/insert-link" alt="_(Add &link to torrent...)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="deleteButton" class="divider"><img class="mochaToolButton" title="_(Delete)" src="theme/list-remove" alt="_(Delete)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="_(Resume)" src="theme/media-playback-start" alt="_(Resume)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="pauseButton"><img class="mochaToolButton" title="_(Pause)" src="theme/media-playback-pause" alt="_(Pause)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="uploadButton"><img class="mochaToolButton" title="QBT_TR(&Add torrent file...)QBT_TR" src="theme/list-add" alt="QBT_TR(&Add torrent file...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="downloadButton"><img class="mochaToolButton" title="QBT_TR(Add &link to torrent...)QBT_TR" src="theme/insert-link" alt="QBT_TR(Add &link to torrent...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="deleteButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Delete)QBT_TR" src="theme/list-remove" alt="QBT_TR(Delete)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Resume)QBT_TR" src="theme/media-playback-start" alt="QBT_TR(Resume)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="pauseButton"><img class="mochaToolButton" title="QBT_TR(Pause)QBT_TR" src="theme/media-playback-pause" alt="QBT_TR(Pause)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<span id="queueingButtons">
<a id="bottomPrioButton" class="divider"><img class="mochaToolButton" title="_(Move to bottom)" src="theme/go-bottom" alt="_(Move to bottom)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="decreasePrioButton"><img class="mochaToolButton" title="_(Decrease priority)" src="theme/go-down" alt="_(Decrease priority)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="increasePrioButton"><img class="mochaToolButton" title="_(Increase priority)" src="theme/go-up" alt="_(Increase priority)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="topPrioButton"><img class="mochaToolButton" title="_(Move to top)" src="theme/go-top" alt="_(Move to top)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="bottomPrioButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Move to bottom)QBT_TR" src="theme/go-bottom" alt="QBT_TR(Move to bottom)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="decreasePrioButton"><img class="mochaToolButton" title="QBT_TR(Decrease priority)QBT_TR" src="theme/go-down" alt="QBT_TR(Decrease priority)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="increasePrioButton"><img class="mochaToolButton" title="QBT_TR(Increase priority)QBT_TR" src="theme/go-up" alt="QBT_TR(Increase priority)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="topPrioButton"><img class="mochaToolButton" title="QBT_TR(Move to top)QBT_TR" src="theme/go-top" alt="QBT_TR(Move to top)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
</span>
<a id="preferencesButton" class="divider"><img class="mochaToolButton" title="_(Options)" src="theme/preferences-system" alt="_(Options)" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="preferencesButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Options)QBT_TR" src="theme/preferences-system" alt="QBT_TR(Options)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
</div>
</div>
<div id="pageWrapper">
</div>
</div>
<ul id="contextmenu">
<li><a href="#Start"><img src="theme/media-playback-start" alt="_(Resume)"/> _(Resume)</a></li>
<li><a href="#Pause"><img src="theme/media-playback-pause" alt="_(Pause)"/> _(Pause)</a></li>
<li class="separator"><a href="#Delete"><img src="theme/list-remove" alt="_(Delete)"/> _(Delete)</a></li>
<li><a href="#Start"><img src="theme/media-playback-start" alt="QBT_TR(Resume)QBT_TR"/> QBT_TR(Resume)QBT_TR</a></li>
<li><a href="#Pause"><img src="theme/media-playback-pause" alt="QBT_TR(Pause)QBT_TR"/> QBT_TR(Pause)QBT_TR</a></li>
<li class="separator"><a href="#Delete"><img src="theme/list-remove" alt="QBT_TR(Delete)QBT_TR"/> QBT_TR(Delete)QBT_TR</a></li>
<li id="queueingMenuItems" class="separator">
<a href="#priority" class="arrow-right"><span style="display: inline-block; width:16px"></span> _(Priority)</a>
<a href="#priority" class="arrow-right"><span style="display: inline-block; width:16px"></span> QBT_TR(Priority)QBT_TR</a>
<ul>
<li><a href="#prioTop"><img src="theme/go-top" alt="_(Move to top)"/> _(Move to top)</a></li>
<li><a href="#prioUp"><img src="theme/go-up" alt="_(Move up)"/> _(Move up)</a></li>
<li><a href="#prioDown"><img src="theme/go-down" alt="_(Move down)"/> _(Move down)</a></li>
<li><a href="#prioBottom"><img src="theme/go-bottom" alt="_(Move to bottom)"/> _(Move to bottom)</a></li>
<li><a href="#prioTop"><img src="theme/go-top" alt="QBT_TR(Move to top)QBT_TR"/> QBT_TR(Move to top)QBT_TR</a></li>
<li><a href="#prioUp"><img src="theme/go-up" alt="QBT_TR(Move up)QBT_TR"/> QBT_TR(Move up)QBT_TR</a></li>
<li><a href="#prioDown"><img src="theme/go-down" alt="QBT_TR(Move down)QBT_TR"/> QBT_TR(Move down)QBT_TR</a></li>
<li><a href="#prioBottom"><img src="theme/go-bottom" alt="QBT_TR(Move to bottom)QBT_TR"/> QBT_TR(Move to bottom)QBT_TR</a></li>
</ul>
</li>
<li class="separator"><a href="#DownloadLimit"><img src="images/skin/download.png" alt="_(Limit download rate...)"/> _(Limit download rate...)</a></li>
<li><a href="#UploadLimit"><img src="images/skin/seeding.png" alt="_(Limit upload rate...)"/> _(Limit upload rate...)</a></li>
<li class="separator"><a href="#SequentialDownload"><img src="theme/checked" alt="_(Download in sequential order)"/> _(Download in sequential order)</a></li>
<li><a href="#FirstLastPiecePrio"><img src="theme/checked" alt="_(Download first and last piece first)"/> _(Download first and last piece first)</a></li>
<li class="separator"><a href="#ForceRecheck"><img src="theme/document-edit-verify" alt="_(Force recheck)"/> _(Force recheck)</a></li>
<li class="separator"><a href="#DownloadLimit"><img src="images/skin/download.png" alt="QBT_TR(Limit download rate...)QBT_TR"/> QBT_TR(Limit download rate...)QBT_TR</a></li>
<li><a href="#UploadLimit"><img src="images/skin/seeding.png" alt="QBT_TR(Limit upload rate...)QBT_TR"/> QBT_TR(Limit upload rate...)QBT_TR</a></li>
<li class="separator"><a href="#SequentialDownload"><img src="theme/checked" alt="QBT_TR(Download in sequential order)QBT_TR"/> QBT_TR(Download in sequential order)QBT_TR</a></li>
<li><a href="#FirstLastPiecePrio"><img src="theme/checked" alt="QBT_TR(Download first and last piece first)QBT_TR"/> QBT_TR(Download first and last piece first)QBT_TR</a></li>
<li class="separator"><a href="#ForceRecheck"><img src="theme/document-edit-verify" alt="QBT_TR(Force recheck)QBT_TR"/> QBT_TR(Force recheck)QBT_TR</a></li>
</ul>
<div id="desktopFooterWrapper">
<div id="desktopFooter">
@ -122,7 +122,7 @@ @@ -122,7 +122,7 @@
<td style="width: 2px;margin:0;"><img src="images/skin/toolbox-divider.gif" alt="" style="height: 18px; padding-left: 10px; padding-right: 10px; margin-bottom: -2px;"/></td>
<td><img id="connectionStatus" alt="Connection Status" src="images/skin/firewalled.png" /></td>
<td style="width: 2px;margin:0;"><img src="images/skin/toolbox-divider.gif" alt="" style="height: 18px; padding-left: 10px; padding-right: 10px; margin-bottom: -2px;"/></td>
<td style="cursor:pointer;"><img id="alternativeSpeedLimits" alt="_(Alternative speed limits)" src="images/slow_off.png" /></td>
<td style="cursor:pointer;"><img id="alternativeSpeedLimits" alt="QBT_TR(Alternative speed limits)QBT_TR" src="images/slow_off.png" /></td>
<td style="width: 2px;margin:0;"><img src="images/skin/toolbox-divider.gif" alt="" style="height: 18px; padding-left: 10px; padding-right: 10px; margin-bottom: -2px;"/></td>
<td id="DlInfos" style="cursor:pointer; min-width: 200px"></td>
<td style="width: 2px;margin:0;"><img src="images/skin/toolbox-divider.gif" alt="" style="height: 18px; padding-left: 10px; padding-right: 10px; margin-bottom: -2px;"/></td>

14
src/webui/www/private/login.html

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>_(qBittorrent web User Interface)</title>
<title>QBT_TR(qBittorrent web User Interface)QBT_TR</title>
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript">
@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
if (xhr.responseText != "") {
$('error_msg').set('html', xhr.responseText);
} else {
$('error_msg').set('html', '_(Unable to log in, qBittorrent is probably unreachable.)');
$('error_msg').set('html', 'QBT_TR(Unable to log in, qBittorrent is probably unreachable.)QBT_TR');
}
},
onSuccess: function(text) {
@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
// Session started. Simply reload page.
window.location.reload();
} else {
$('error_msg').set('html', '_(Invalid Username or Password.)');
$('error_msg').set('html', 'QBT_TR(Invalid Username or Password.)QBT_TR');
}
}
}).send();
@ -70,15 +70,15 @@ @@ -70,15 +70,15 @@
</head>
<body>
<div id="main">
<h1>_(qBittorrent web User Interface)</h1>
<h1>QBT_TR(qBittorrent web User Interface)QBT_TR</h1>
<div id="logo" class="col">
<img src="images/qbittorrent.png" alt="qBittorrent logo"/>
</div>
<div id="formplace" class="col">
<form id="loginform" action="">
<div class="row"><label for="username">_(Name)</label><br /><input type="text" id="username" name="username" /></div>
<div class="row"><label for="password">_(Password)</label><br /><input type="password" id="password" name="password" /></div>
<div class="row"><input type="submit" id="login" value="_(Login)" /></div>
<div class="row"><label for="username">QBT_TR(Name)QBT_TR</label><br /><input type="text" id="username" name="username" /></div>
<div class="row"><label for="password">QBT_TR(Password)QBT_TR</label><br /><input type="password" id="password" name="password" /></div>
<div class="row"><input type="submit" id="login" value="QBT_TR(Login)QBT_TR" /></div>
</form>
</div>
<div id="error_msg"></div>

6
src/webui/www/public/addtrackers.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>_(Trackers addition dialog)</title>
<title>QBT_TR(Trackers addition dialog)QBT_TR</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/mootools-1.2-more.js" charset="utf-8"></script>
@ -23,10 +23,10 @@ @@ -23,10 +23,10 @@
</head>
<body>
<center>
<h1 class="vcenter">_(List of trackers to add (one per line):)</h1><br/>
<h1 class="vcenter">QBT_TR(List of trackers to add (one per line):)QBT_TR</h1><br/>
<textarea name="list" id="trackersUrls" rows="10" cols="1"></textarea>
<br/>
<a id="addTrackersButton">_(Add)</a>
<a id="addTrackersButton">QBT_TR(Add)QBT_TR</a>
</center>
</body>
</html>

8
src/webui/www/public/confirmdeletion.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>_(Deletion confirmation - qBittorrent)</title>
<title>QBT_TR(Deletion confirmation - qBittorrent)QBT_TR</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/mootools-1.2-more.js" charset="utf-8"></script>
@ -64,10 +64,10 @@ window.addEvent('domready', function(){ @@ -64,10 +64,10 @@ window.addEvent('domready', function(){
<body>
<br/>
<p>&nbsp;&nbsp;_(Are you sure you want to delete the selected torrents from the transfer list?)</p>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="deleteFromDiskCB"/> <label for="deleteFromDiskCB"><i>_(Also delete the files on the hard disk)</i></label><br/><br/>
<p>&nbsp;&nbsp;QBT_TR(Are you sure you want to delete the selected torrents from the transfer list?)QBT_TR</p>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id="deleteFromDiskCB"/> <label for="deleteFromDiskCB"><i>QBT_TR(Also delete the files on the hard disk)QBT_TR</i></label><br/><br/>
<div style="text-align: right;">
<input type="button" id="cancelBtn" value="_(No)" />&nbsp;&nbsp;<input type="button" id="confirmBtn" value="_(Yes)"/>&nbsp;&nbsp;
<input type="button" id="cancelBtn" value="QBT_TR(No)QBT_TR" />&nbsp;&nbsp;<input type="button" id="confirmBtn" value="QBT_TR(Yes)QBT_TR"/>&nbsp;&nbsp;
</div>
</body>
</html>

8
src/webui/www/public/download.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>_(Add &link to torrent...)</title>
<title>QBT_TR(Add &link to torrent...)QBT_TR</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/download.js" charset="utf-8"></script>
@ -10,10 +10,10 @@ @@ -10,10 +10,10 @@
<body>
<center>
<br/>
<h2 class="vcenter"><img class="vcenter" title="Download from URL" src="theme/insert-link"/>_(Download Torrents from their URL or Magnet link)</h2>
<h2 class="vcenter"><img class="vcenter" title="Download from URL" src="theme/insert-link"/>QBT_TR(Download Torrents from their URL or Magnet link)QBT_TR</h2>
<textarea id="urls" rows="10"></textarea>
<p>_(Only one link per line)</p>
<input type="button" value="_(Download)" id="downButton"/>
<p>QBT_TR(Only one link per line)QBT_TR</p>
<input type="button" value="QBT_TR(Download)QBT_TR" id="downButton"/>
</center>
</body>
</html>

6
src/webui/www/public/downloadlimit.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>_(Torrent Download Speed Limiting)</title>
<title>QBT_TR(Torrent Download Speed Limiting)QBT_TR</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/mootools-1.2-more.js" charset="utf-8"></script>
@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
<body>
<div style="width: 100%; text-align: center; margin: 0 auto; overflow: hidden">
<div id="dllimitSlider" class="slider">
<div id="dllimitUpdate" class="update">_(Download limit:) <input id="dllimitUpdatevalue" size="6" placeholder="∞" style="text-align: center;"> <span id="dlLimitUnit">_(KiB/s)</span></div>
<div id="dllimitUpdate" class="update">QBT_TR(Download limit:)QBT_TR <input id="dllimitUpdatevalue" size="6" placeholder="∞" style="text-align: center;"> <span id="dlLimitUnit">QBT_TR(KiB/s)QBT_TR</span></div>
<div class="sliderWrapper">
<div id="dllimitSliderknob" class="sliderknob"></div>
<div id="dllimitSliderarea" class="sliderarea"></div>
@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
}
}
</script>
<input type="button" value="_(Apply)" onclick="setDlLimit()"/>
<input type="button" value="QBT_TR(Apply)QBT_TR" onclick="setDlLimit()"/>
</div>
<script type="text/javascript">

12
src/webui/www/public/filters.html

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<ul class="filterList">
<li id="all_filter"><a href="#" onclick="setFilter('all');return false;"><img src="images/skin/filterall.png"/>_(All)</a></li>
<li id="downloading_filter"><a href="#" onclick="setFilter('downloading');return false;"><img src="images/skin/downloading.png"/>_(Downloading)</a></li>
<li id="completed_filter"><a href="#" onclick="setFilter('completed');return false;"><img src="images/skin/uploading.png"/>_(Completed)</a></li>
<li id="paused_filter"><a href="#" onclick="setFilter('paused');return false;"><img src="images/skin/paused.png"/>_(Paused)</a></li>
<li id="active_filter"><a href="#" onclick="setFilter('active');return false;"><img src="images/skin/filteractive.png"/>_(Active)</a></li>
<li id="inactive_filter"><a href="#" onclick="setFilter('inactive');return false;"><img src="images/skin/filterinactive.png"/>_(Inactive)</a></li>
<li id="all_filter"><a href="#" onclick="setFilter('all');return false;"><img src="images/skin/filterall.png"/>QBT_TR(All)QBT_TR</a></li>
<li id="downloading_filter"><a href="#" onclick="setFilter('downloading');return false;"><img src="images/skin/downloading.png"/>QBT_TR(Downloading)QBT_TR</a></li>
<li id="completed_filter"><a href="#" onclick="setFilter('completed');return false;"><img src="images/skin/uploading.png"/>QBT_TR(Completed)QBT_TR</a></li>
<li id="paused_filter"><a href="#" onclick="setFilter('paused');return false;"><img src="images/skin/paused.png"/>QBT_TR(Paused)QBT_TR</a></li>
<li id="active_filter"><a href="#" onclick="setFilter('active');return false;"><img src="images/skin/filteractive.png"/>QBT_TR(Active)QBT_TR</a></li>
<li id="inactive_filter"><a href="#" onclick="setFilter('inactive');return false;"><img src="images/skin/filterinactive.png"/>QBT_TR(Inactive)QBT_TR</a></li>
</ul>

14
src/webui/www/public/preferences.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>_(Download from URL)</title>
<title>QBT_TR(Download from URL)QBT_TR</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/Tabs.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
@ -13,12 +13,12 @@ @@ -13,12 +13,12 @@
<!-- preferences -->
<div class="toolbarTabs">
<ul id="preferencesTabs" class="tab-menu">
<li id="PrefConnectionLink" class="selected"><a>_(Connection)</a></li>
<li id="PrefBittorrentLink"><a>_(BitTorrent)</a></li>
<li id="PrefDownloadsLink"><a>_(Downloads)</a></li>
<li id="PrefProxyLink"><a>_(Proxy Server)</a></li>
<li id="PrefFilterLink"><a>_(IP Filtering)</a></li>
<li id="PrefWebUILink"><a>_(Web UI)</a></li>
<li id="PrefConnectionLink" class="selected"><a>QBT_TR(Connection)QBT_TR</a></li>
<li id="PrefBittorrentLink"><a>QBT_TR(BitTorrent)QBT_TR</a></li>
<li id="PrefDownloadsLink"><a>QBT_TR(Downloads)QBT_TR</a></li>
<li id="PrefProxyLink"><a>QBT_TR(Proxy Server)QBT_TR</a></li>
<li id="PrefFilterLink"><a>QBT_TR(IP Filtering)QBT_TR</a></li>
<li id="PrefWebUILink"><a>QBT_TR(Web UI)QBT_TR</a></li>
</ul>
<div class="clear"></div>
</div>

234
src/webui/www/public/preferences_content.html

@ -1,102 +1,102 @@ @@ -1,102 +1,102 @@
<div id="ConnectionTab" class="PrefTab">
<fieldset class="settings">
<legend>_(Listening Port)</legend>
<label for="port_value">_(Port used for incoming connections:)</label>
<legend>QBT_TR(Listening Port)QBT_TR</legend>
<label for="port_value">QBT_TR(Port used for incoming connections:)QBT_TR</label>
<input type="text" id="port_value" style="width: 4em;"/><br/>
<input type="checkbox" id="upnp_checkbox"/>
<label for="upnp_checkbox">_(Use UPnP / NAT-PMP port forwarding from my router)</label>
<label for="upnp_checkbox">QBT_TR(Use UPnP / NAT-PMP port forwarding from my router)QBT_TR</label>
</fieldset>
<fieldset class="settings">
<legend>_(Connections Limits)</legend>
<legend>QBT_TR(Connections Limits)QBT_TR</legend>
<table>
<tr>
<td>
<input type="checkbox" id="max_connec_checkbox" onClick="updateMaxConnecEnabled();"/>
<label for="max_connec_checkbox">_(Global maximum number of connections:)</label>
<label for="max_connec_checkbox">QBT_TR(Global maximum number of connections:)QBT_TR</label>
</td>
<td><input type="text" id="max_connec_value" style="width: 4em;"/></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_connec_per_torrent_checkbox" onClick="updateMaxConnecPerTorrentEnabled();"/>
<label for="max_connec_per_torrent_checkbox">_(Maximum number of connections per torrent:)</label>
<label for="max_connec_per_torrent_checkbox">QBT_TR(Maximum number of connections per torrent:)QBT_TR</label>
</td>
<td><input type="text" id="max_connec_per_torrent_value" style="width: 4em;"/></td>
</tr>
<tr>
<td>
<input type="checkbox" id="max_uploads_per_torrent_checkbox" onClick="updateMaxUploadsPerTorrentEnabled();"/>
<label for="max_uploads_per_torrent_checkbox">_(Maximum number of upload slots per torrent:)</label>
<label for="max_uploads_per_torrent_checkbox">QBT_TR(Maximum number of upload slots per torrent:)QBT_TR</label>
</td>
<td><input type="text" id="max_uploads_per_torrent_value" style="width: 4em;"/></td>
</tr>
</table>
</fieldset>
<fieldset class="settings">
<legend>_(Global Rate Limits)</legend>
<legend>QBT_TR(Global Rate Limits)QBT_TR</legend>
<table>
<tr>
<td>
<input type="checkbox" id="up_limit_checkbox" onClick="updateUpLimitEnabled();"/>
<label for ="up_limit_checkbox">_(Upload:)</label>
<label for ="up_limit_checkbox">QBT_TR(Upload:)QBT_TR</label>
</td>
<td><input type="text" id="up_limit_value" style="width: 4em;"/>&nbsp;&nbsp;_(KiB/s)</td>
<td><input type="text" id="up_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
<tr>
<td>
<input type="checkbox" id="dl_limit_checkbox" onClick="updateDlLimitEnabled();"/>
<label for="dl_limit_checkbox">_(Download:)</label>
<label for="dl_limit_checkbox">QBT_TR(Download:)QBT_TR</label>
</td>
<td><input type="text" id="dl_limit_value" style="width: 4em;"/>&nbsp;&nbsp;_(KiB/s)</td>
<td><input type="text" id="dl_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
</table>
<fieldset class="settings">
<legend>_(Options)</legend>
<legend>QBT_TR(Options)QBT_TR</legend>
<input type="checkbox" id="enable_utp_checkbox"/>
<label for="enable_utp_checkbox">_(Enable bandwidth management (uTP))</label><br/>
<label for="enable_utp_checkbox">QBT_TR(Enable bandwidth management (uTP))QBT_TR</label><br/>
<input type="checkbox" id="limit_utp_rate_checkbox"/>
<label for="limit_utp_rate_checkbox">_(Apply rate limit to uTP connections)</label><br/>
<label for="limit_utp_rate_checkbox">QBT_TR(Apply rate limit to uTP connections)QBT_TR</label><br/>
<input type="checkbox" id="limit_tcp_overhead_checkbox"/>
<label for="limit_tcp_overhead_checkbox">_(Apply rate limit to transport overhead)</label><br/>
<label for="limit_tcp_overhead_checkbox">QBT_TR(Apply rate limit to transport overhead)QBT_TR</label><br/>
</fieldset>
</fieldset>
<fieldset class="settings">
<legend>_(Alternative Global Rate Limits)</legend>
<legend>QBT_TR(Alternative Global Rate Limits)QBT_TR</legend>
<table>
<tr>
<td>
_(Upload:)
QBT_TR(Upload:)QBT_TR
</td>
<td><input type="text" id="alt_up_limit_value" style="width: 4em;"/>&nbsp;&nbsp;_(KiB/s)</td>
<td><input type="text" id="alt_up_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
<tr>
<td>
_(Download:)
QBT_TR(Download:)QBT_TR
</td>
<td><input type="text" id="alt_dl_limit_value" style="width: 4em;"/>&nbsp;&nbsp;_(KiB/s)</td>
<td><input type="text" id="alt_dl_limit_value" style="width: 4em;"/>&nbsp;&nbsp;QBT_TR(KiB/s)QBT_TR</td>
</tr>
</table>
<fieldset class="settings">
<legend><input type="checkbox" id="limit_sheduling_checkbox" onClick="updateSchedulingEnabled();"/>
<label for="limit_sheduling_checkbox">_(Schedule the use of alternative rate limits)</label></legend>
_(from)
<label for="limit_sheduling_checkbox">QBT_TR(Schedule the use of alternative rate limits)QBT_TR</label></legend>
QBT_TR(from)QBT_TR
<input type="text" id="schedule_from_hour" style="width: 1.5em;"/>:<input type="text" id="schedule_from_min" style="width: 1.5em;"/>
_(to)
QBT_TR(to)QBT_TR
<input type="text" id="schedule_to_hour" style="width: 1.5em;"/>:<input type="text" id="schedule_to_min" style="width: 1.5em;"/>
<br/>
_(When:)
QBT_TR(When:)QBT_TR
<select id="schedule_freq_select">
<option value="0">_(Every day)</option>
<option value="1">_(Week days)</option>
<option value="2">_(Week ends)</option>
<option value="3">_(Monday)</option>
<option value="4">_(Tuesday)</option>
<option value="5">_(Wednesday)</option>
<option value="6">_(Thursday)</option>
<option value="7">_(Friday)</option>
<option value="8">_(Saturday)</option>
<option value="9">_(Sunday)</option>
<option value="0">QBT_TR(Every day)QBT_TR</option>
<option value="1">QBT_TR(Week days)QBT_TR</option>
<option value="2">QBT_TR(Week ends)QBT_TR</option>
<option value="3">QBT_TR(Monday)QBT_TR</option>
<option value="4">QBT_TR(Tuesday)QBT_TR</option>
<option value="5">QBT_TR(Wednesday)QBT_TR</option>
<option value="6">QBT_TR(Thursday)QBT_TR</option>
<option value="7">QBT_TR(Friday)QBT_TR</option>
<option value="8">QBT_TR(Saturday)QBT_TR</option>
<option value="9">QBT_TR(Sunday)QBT_TR</option>
</select>
</br/>
</fieldset>
@ -105,161 +105,161 @@ @@ -105,161 +105,161 @@
<div id="BittorrentTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>_(Privacy)</legend>
<legend>QBT_TR(Privacy)QBT_TR</legend>
<input type="checkbox" id="dht_checkbox"/>
<label for="dht_checkbox">_(Enable DHT (decentralized network) to find more peers)</label><br/>
<label for="dht_checkbox">QBT_TR(Enable DHT (decentralized network) to find more peers)QBT_TR</label><br/>
<input type="checkbox" id="DHTPortDiffThanBT_checkbox" onclick="updateDHTPortSettings();"/>
<label for="DHTPortDiffThanBT_checkbox">_(Use a different port for DHT and BitTorrent)</label><br/>
<label for="DHTPort_txt" style="margin-left: 20px;">_(DHT port:)</label>
<label for="DHTPortDiffThanBT_checkbox">QBT_TR(Use a different port for DHT and BitTorrent)QBT_TR</label><br/>
<label for="DHTPort_txt" style="margin-left: 20px;">QBT_TR(DHT port:)QBT_TR</label>
<input type="text" id="DHTPort_txt" value="6881"/><br/>
<input type="checkbox" id="pex_checkbox"/>
<label for="pex_checkbox">_(Enable Peer Exchange (PeX) to find more peers)</label><br/>
<label for="pex_checkbox">QBT_TR(Enable Peer Exchange (PeX) to find more peers)QBT_TR</label><br/>
<input type="checkbox" id="lsd_checkbox"/>
<label for="lsd_checkbox">_(Enable Local Peer Discovery to find more peers)</label><br/>
<label for="lsd_checkbox">QBT_TR(Enable Local Peer Discovery to find more peers)QBT_TR</label><br/>
<label for="encryption_select">_(Encryption mode:)</label>
<label for="encryption_select">QBT_TR(Encryption mode:)QBT_TR</label>
<select id="encryption_select">
<option value="0">_(Prefer encryption)</option>
<option value="1">_(Require encryption)</option>
<option value="2">_(Disable encryption)</option>
<option value="0">QBT_TR(Prefer encryption)QBT_TR</option>
<option value="1">QBT_TR(Require encryption)QBT_TR</option>
<option value="2">QBT_TR(Disable encryption)QBT_TR</option>
</select><br/>
<input type="checkbox" id="anonymous_mode_checkbox" onClick="toggleAnonymousMode()"/>
<label for="anonymous_mode_checkbox">_(Enable anonymous mode) (<a href="https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode">More information</a>)</label><br/>
<label for="anonymous_mode_checkbox">QBT_TR(Enable anonymous mode)QBT_TR (<a href="https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode">More information</a>)</label><br/>
</fieldset>
</div>
<div id="DownloadsTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>_(Hard Disk)</legend>
<legend>QBT_TR(Hard Disk)QBT_TR</legend>
<div class="formRow">
<label for="savepath_text" class="leftLabelLarge">_(Save files to location:)</label>
<label for="savepath_text" class="leftLabelLarge">QBT_TR(Save files to location:)QBT_TR</label>
<input type="text" id="savepath_text"/>
</div>
<div class="formRow">
<input type="checkbox" id="temppath_checkbox" onclick="updateTempDirEnabled();"/>
<label for="temppath_checkbox">_(Keep incomplete torrents in:)</label>
<label for="temppath_checkbox">QBT_TR(Keep incomplete torrents in:)QBT_TR</label>
<input type="text" id="temppath_text"/>
</div>
<br/>
_(Automatically add torrents from:)<br/>
QBT_TR(Automatically add torrents from:)QBT_TR<br/>
<table border="1" id="watched_folders_tab">
<thead><tr><th>_(Watched Folder)</th><th>_(Download here)</th></tr></thead>
<thead><tr><th>QBT_TR(Watched Folder)QBT_TR</th><th>QBT_TR(Download here)QBT_TR</th></tr></thead>
<tbody></tbody>
<tfoot><tr><td style="padding-top:4px;"><input type="text" id="new_watch_folder_txt"/></td><td style="padding-top:4px;"><input type="checkbox" id="new_watch_folder_dl" style="padding-left:18px;"/><img src="theme/list-add" alt="Add" style="padding-left:2px;width:16px;cursor:pointer;margin-right:-18px;" onclick="javascript:addWatchFolder();"/></td></tr></tfoot>
</table><br/>
<input type="checkbox" id="exportdir_checkbox" onclick="updateExportDirEnabled();"/>
<label for="exportdir_checkbox">_(Copy .torrent files to:)</label>&nbsp;&nbsp;
<label for="exportdir_checkbox">QBT_TR(Copy .torrent files to:)QBT_TR</label>&nbsp;&nbsp;
<input type="text" id="exportdir_text"/><br/>
<span id="appendexttr">
<input type="checkbox" id="appendext_checkbox"/>
<label for="appendext_checkbox">_(Append .!qB extension to incomplete files)</label><br/>
<label for="appendext_checkbox">QBT_TR(Append .!qB extension to incomplete files)QBT_TR</label><br/>
</span>
<input type="checkbox" id="preallocateall_checkbox"/>
<label for="preallocateall_checkbox">_(Pre-allocate disk space for all files)</label><br/>
<label for="preallocateall_checkbox">QBT_TR(Pre-allocate disk space for all files)QBT_TR</label><br/>
</fieldset>
<fieldset class="settings">
<legend>_(Email notification upon download completion)</legend>
<legend>QBT_TR(Email notification upon download completion)QBT_TR</legend>
<input type="checkbox" id="mail_notification_checkbox" onclick="updateMailNotification();"/>
<label for="mail_notification_checkbox">_(Email notification upon download completion)</label><br/>
<label for="mail_notification_checkbox">QBT_TR(Email notification upon download completion)QBT_TR</label><br/>
<div class="formRow">
<label for="dest_email_txt" class="leftLabelLarge">_(Destination email:)</label><input type="text" id="dest_email_txt"/>
<label for="dest_email_txt" class="leftLabelLarge">QBT_TR(Destination email:)QBT_TR</label><input type="text" id="dest_email_txt"/>
</div>
<div class="formRow">
<label for="smtp_server_txt" class="leftLabelLarge">_(SMTP server:)</label><input type="text" id="smtp_server_txt"/>
<label for="smtp_server_txt" class="leftLabelLarge">QBT_TR(SMTP server:)QBT_TR</label><input type="text" id="smtp_server_txt"/>
</div>
<div class="formRow">
<input type="checkbox" id="mail_ssl_checkbox"/><label for="mail_ssl_checkbox">_(This server requires a secure connection (SSL))</label>
<input type="checkbox" id="mail_ssl_checkbox"/><label for="mail_ssl_checkbox">QBT_TR(This server requires a secure connection (SSL))QBT_TR</label>
</div>
<input type="checkbox" id="mail_auth_checkbox" onclick="updateMailAuthSettings();"/><label for="mail_auth_checkbox">_(Authentication)</label><br/>
<input type="checkbox" id="mail_auth_checkbox" onclick="updateMailAuthSettings();"/><label for="mail_auth_checkbox">QBT_TR(Authentication)QBT_TR</label><br/>
<div class="formRow">
<label for="mail_username_text" class="leftLabelLarge">_(Username:)</label><input type="text" id="mail_username_text"/>
<label for="mail_username_text" class="leftLabelLarge">QBT_TR(Username:)QBT_TR</label><input type="text" id="mail_username_text"/>
</div>
<div class="formRow">
<label for="mail_password_text" class="leftLabelLarge">_(Password:)</label><input type="password" id="mail_password_text"/>
<label for="mail_password_text" class="leftLabelLarge">QBT_TR(Password:)QBT_TR</label><input type="password" id="mail_password_text"/>
</div>
</fieldset>
<fieldset class="settings">
<legend>_(Run an external program on torrent completion)</legend>
<legend>QBT_TR(Run an external program on torrent completion)QBT_TR</legend>
<input type="checkbox" id="autorun_checkbox" onclick="updateAutoRun();"/>
<label for="autorun_checkbox">_(Run an external program on torrent completion)</label><br/>
<label for="autorun_checkbox">QBT_TR(Run an external program on torrent completion)QBT_TR</label><br/>
<input type="text" id="autorunProg_txt" style="width: 400px;"/><br/>
<i>_(The following parameters are supported:)
<i>QBT_TR(The following parameters are supported:)QBT_TR
<ul>
<li>%f: _(Torrent path)</li>
<li>%n: _(Torrent name)</li>
<li>%f: QBT_TR(Torrent path)QBT_TR</li>
<li>%n: QBT_TR(Torrent name)QBT_TR</li>
</ul></i>
</fieldset>
<fieldset class="settings">
<legend>_(Torrent Queueing)</legend>
<legend>QBT_TR(Torrent Queueing)QBT_TR</legend>
<input type="checkbox" id="queueing_checkbox" onclick="updateQueueingSystem();"/>
<label for="queueing_checkbox">_(Torrent Queueing)</label><br/>
<label for="queueing_checkbox">QBT_TR(Torrent Queueing)QBT_TR</label><br/>
<div class="formRow">
<label for="max_active_dl_value" style="margin-left: 20px;" class="leftLabelLarge">_(Maximum active downloads:)</label>
<label for="max_active_dl_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active downloads:)QBT_TR</label>
<input type="text" id="max_active_dl_value" style="width: 4em;"/>
</div>
<div class="formRow">
<label for="max_active_up_value" style="margin-left: 20px;" class="leftLabelLarge">_(Maximum active uploads:)</label>
<label for="max_active_up_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active uploads:)QBT_TR</label>
<input type="text" id="max_active_up_value" style="width: 4em;"/>
</div>
<div class="formRow">
<label for="max_active_to_value" style="margin-left: 20px;" class="leftLabelLarge">_(Maximum active torrents:)</label>
<label for="max_active_to_value" style="margin-left: 20px;" class="leftLabelLarge">QBT_TR(Maximum active torrents:)QBT_TR</label>
<input type="text" id="max_active_to_value" style="width: 4em;"/>
</div>
<div class="formRow">
<input type="checkbox" id="dont_count_slow_torrents_checkbox"/>
<label for="dont_count_slow_torrents_checkbox">_(Do not count slow torrents in these limits)</label>
<label for="dont_count_slow_torrents_checkbox">QBT_TR(Do not count slow torrents in these limits)QBT_TR</label>
</div>
</fieldset>
</div>
<div id="FilterTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>_(IP Filtering)</legend>
<legend>QBT_TR(IP Filtering)QBT_TR</legend>
<input type="checkbox" id="ipfilter_enabled_checkbox" onclick="updateFilterSettings();"/>
<label for="ipfilter_enabled_checkbox">_(IP Filtering)</label><br/>
<label for="ipfilter_text">_(Filter path (.dat, .p2p, .p2b):)</label>
<label for="ipfilter_enabled_checkbox">QBT_TR(IP Filtering)QBT_TR</label><br/>
<label for="ipfilter_text">QBT_TR(Filter path (.dat, .p2p, .p2b):)QBT_TR</label>
<input type="text" id="ipfilter_text"/>
</fieldset>
</div>
<div id="ProxyTab" class="PrefTab invisible">
<fieldset class="settings">
<legend>_(Proxy Server)</legend>
<legend>QBT_TR(Proxy Server)QBT_TR</legend>
<div class="formRow">
<label for="peer_proxy_type_select" class="leftLabelSmall">_(Type:)</label>
<label for="peer_proxy_type_select" class="leftLabelSmall">QBT_TR(Type:)QBT_TR</label>
<select id ="peer_proxy_type_select" onchange="updatePeerProxySettings();">
<option value="none">_((None))</option>
<option value="socks4">_(SOCKS4)</option>
<option value="socks5">_(SOCKS5)</option>
<option value="http">_(HTTP)</option>
<option value="none">QBT_TR((None))QBT_TR</option>
<option value="socks4">QBT_TR(SOCKS4)QBT_TR</option>
<option value="socks5">QBT_TR(SOCKS5)QBT_TR</option>
<option value="http">QBT_TR(HTTP)QBT_TR</option>
</select>
</div>
<div class="formRow">
<label for="peer_proxy_host_text" class="leftLabelSmall">_(Host:)</label>
<label for="peer_proxy_host_text" class="leftLabelSmall">QBT_TR(Host:)QBT_TR</label>
<input type="text" id="peer_proxy_host_text" />
</div>
<div class="formRow">
<label for="peer_proxy_port_value" class="leftLabelSmall">_(Port:)</label>
<label for="peer_proxy_port_value" class="leftLabelSmall">QBT_TR(Port:)QBT_TR</label>
<input type="text" id="peer_proxy_port_value" style="width: 4em;"/>
</div>
<div class="formRow">
<input type="checkbox" id="use_peer_proxy_checkbox"/>
<label for="use_peer_proxy_checkbox">_(Use proxy for peer connections)</label>
<label for="use_peer_proxy_checkbox">QBT_TR(Use proxy for peer connections)QBT_TR</label>
</div>
<input type="checkbox" id="peer_proxy_auth_checkbox" onclick="updatePeerProxyAuthSettings();"/>
<label for="peer_proxy_auth_checkbox">_(Authentication)</label><br/>
<label for="peer_proxy_auth_checkbox">QBT_TR(Authentication)QBT_TR</label><br/>
<div class="formRow">
<label for="peer_proxy_username_text" style="margin-left: 20px;" class="leftLabelSmall">_(Username:)</label>
<label for="peer_proxy_username_text" style="margin-left: 20px;" class="leftLabelSmall">QBT_TR(Username:)QBT_TR</label>
<input type="text" id="peer_proxy_username_text" />
</div>
<div class="formRow">
<label for="peer_proxy_password_text" style="margin-left: 20px;" class="leftLabelSmall">_(Password:)</label>
<label for="peer_proxy_password_text" style="margin-left: 20px;" class="leftLabelSmall">QBT_TR(Password:)QBT_TR</label>
<input type="password" id="peer_proxy_password_text" />
</div>
</fieldset>
@ -267,8 +267,8 @@ @@ -267,8 +267,8 @@
<div id="WebUITab" class="PrefTab invisible">
<fieldset class="settings">
<legend>_(Language)</legend>
<label for="locale_select">_(User Interface Language:)</label>
<legend>QBT_TR(Language)QBT_TR</legend>
<label for="locale_select">QBT_TR(User Interface Language:)QBT_TR</label>
<select id="locale_select">
<option value="en">English</option>
<option value="en_AU">English(Australia)</option>
@ -314,57 +314,57 @@ @@ -314,57 +314,57 @@
</fieldset>
<fieldset class="settings">
<legend>_(HTTP Server)</legend>
<label for="webui_port_value">_(Port:)</label><input type="text" id="webui_port_value" style="width: 4em;"/><br/>
<legend>QBT_TR(HTTP Server)QBT_TR</legend>
<label for="webui_port_value">QBT_TR(Port:)QBT_TR</label><input type="text" id="webui_port_value" style="width: 4em;"/><br/>
<input type="checkbox" id="use_https_checkbox" onclick="updateHttpsSettings();" />
<label for="use_https_checkbox">_(Use HTTPS instead of HTTP)</label><br/>
<label for="use_https_checkbox">QBT_TR(Use HTTPS instead of HTTP)QBT_TR</label><br/>
<div class="formRow">
<label for="ssl_key_textarea" style="margin-left: 20px;" class="leftLabelSmall">_(Key:)</label>
<label for="ssl_key_textarea" style="margin-left: 20px;" class="leftLabelSmall">QBT_TR(Key:)QBT_TR</label>
<textarea id="ssl_key_textarea" rows="5" cols="70"></textarea>
</div>
<div class="formRow">
<label for="ssl_cert_textarea" style="margin-left: 20px;" class="leftLabelSmall">_(Certificate:)</label>
<label for="ssl_cert_textarea" style="margin-left: 20px;" class="leftLabelSmall">QBT_TR(Certificate:)QBT_TR</label>
<textarea id="ssl_cert_textarea" rows="5" cols="70"></textarea>
</div>
<div style="padding-left: 10px;"><a href=http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#aboutcerts>Information about certificates</a></div>
</fieldset>
<fieldset class="settings">
<legend>_(Authentication)</legend>
<legend>QBT_TR(Authentication)QBT_TR</legend>
<div class="formRow">
<label for="webui_username_text" class="leftLabelSmall">_(Username:)</label><input type="text" id="webui_username_text" />
<label for="webui_username_text" class="leftLabelSmall">QBT_TR(Username:)QBT_TR</label><input type="text" id="webui_username_text" />
</div>
<div class="formRow">
<label for="webui_password_text" class="leftLabelSmall">_(Password:)</label><input type="password" id="webui_password_text" />
<label for="webui_password_text" class="leftLabelSmall">QBT_TR(Password:)QBT_TR</label><input type="password" id="webui_password_text" />
</div>
<input type="checkbox" id="bypass_local_auth_checkbox" />
<label for="bypass_local_auth_checkbox">_(Bypass authentication for localhost)</label>
<label for="bypass_local_auth_checkbox">QBT_TR(Bypass authentication for localhost)QBT_TR</label>
</fieldset>
<fieldset class="settings">
<legend><input type="checkbox" id="use_dyndns_checkbox" onclick="updateDynDnsSettings();" />
<label for="use_dyndns_checkbox">_(Update my dynamic domain name)</label></legend>
<label for="use_dyndns_checkbox">QBT_TR(Update my dynamic domain name)QBT_TR</label></legend>
<select id="dyndns_select">
<option value="0">DynDNS</option>
<option value="1">NO-IP</option>
</select>
<input type="button" value="_(Register)" onclick="registerDynDns();"/><br/><br/>
<input type="button" value="QBT_TR(Register)QBT_TR" onclick="registerDynDns();"/><br/><br/>
<div class="formRow">
<label for="dyndns_domain_text" class="leftLabelSmall">_(Domain name:)</label><input type="text" id="dyndns_domain_text"/>
<label for="dyndns_domain_text" class="leftLabelSmall">QBT_TR(Domain name:)QBT_TR</label><input type="text" id="dyndns_domain_text"/>
</div>
<div class="formRow">
<label for="dyndns_username_text" class="leftLabelSmall">_(Username:)</label><input type="text" id="dyndns_username_text"/>
<label for="dyndns_username_text" class="leftLabelSmall">QBT_TR(Username:)QBT_TR</label><input type="text" id="dyndns_username_text"/>
</div>
<div class="formRow">
<label for="dyndns_password_text" class="leftLabelSmall">_(Password:)</label><input type="password" id="dyndns_password_text"/>
<label for="dyndns_password_text" class="leftLabelSmall">QBT_TR(Password:)QBT_TR</label><input type="password" id="dyndns_password_text"/>
</div>
</fieldset>
</div>
<br/>
<center><input type="button" value="_(Save)" onclick="applyPreferences();"/></center>
<center><input type="button" value="QBT_TR(Save)QBT_TR" onclick="applyPreferences();"/></center>
<script type="text/javascript">
var WatchedFoldersTable = new HtmlTable($("watched_folders_tab"));
@ -840,7 +840,7 @@ applyPreferences = function() { @@ -840,7 +840,7 @@ applyPreferences = function() {
// Connection
var listen_port = $('port_value').getProperty('value').toInt();
if(listen_port <= 1024 || listen_port > 65535) {
alert("_(The port used for incoming connections must be greater than 1024 and less than 65535.)");
alert("QBT_TR(The port used for incoming connections must be greater than 1024 and less than 65535.)QBT_TR");
return;
}
settings.set('listen_port', listen_port);
@ -851,7 +851,7 @@ applyPreferences = function() { @@ -851,7 +851,7 @@ applyPreferences = function() {
if($('dl_limit_checkbox').getProperty('checked')) {
dl_limit = $('dl_limit_value').getProperty('value').toInt();
if(dl_limit <= 0) {
alert("_(Download rate limit must be greater than 0 or disabled.)");
alert("QBT_TR(Download rate limit must be greater than 0 or disabled.)QBT_TR");
return;
}
}
@ -861,7 +861,7 @@ applyPreferences = function() { @@ -861,7 +861,7 @@ applyPreferences = function() {
if($('up_limit_checkbox').getProperty('checked')) {
up_limit = $('up_limit_value').getProperty('value').toInt();
if(up_limit <= 0) {
alert("_(Upload rate limit must be greater than 0 or disabled.)");
alert("QBT_TR(Upload rate limit must be greater than 0 or disabled.)QBT_TR");
return;
}
}
@ -878,7 +878,7 @@ applyPreferences = function() { @@ -878,7 +878,7 @@ applyPreferences = function() {
if($('max_connec_checkbox').getProperty('checked')) {
max_connec = $('max_connec_value').getProperty('value').toInt();
if(max_connec <= 0) {
alert("_(Maximum number of connections limit must be greater than 0 or disabled.)");
alert("QBT_TR(Maximum number of connections limit must be greater than 0 or disabled.)QBT_TR");
return;
}
}
@ -888,7 +888,7 @@ applyPreferences = function() { @@ -888,7 +888,7 @@ applyPreferences = function() {
if($('max_connec_per_torrent_checkbox').getProperty('checked')) {
max_connec_per_torrent = $('max_connec_per_torrent_value').getProperty('value').toInt();
if(max_connec_per_torrent <= 0) {
alert("_(Maximum number of connections per torrent limit must be greater than 0 or disabled.)");
alert("QBT_TR(Maximum number of connections per torrent limit must be greater than 0 or disabled.)QBT_TR");
return;
}
}
@ -898,7 +898,7 @@ applyPreferences = function() { @@ -898,7 +898,7 @@ applyPreferences = function() {
if($('max_uploads_per_torrent_checkbox').getProperty('checked')) {
max_uploads_per_torrent = $('max_uploads_per_torrent_value').getProperty('value').toInt();
if(max_uploads_per_torrent <= 0) {
alert("_(Maximum number of upload slots per torrent limit must be greater than 0 or disabled.)");
alert("QBT_TR(Maximum number of upload slots per torrent limit must be greater than 0 or disabled.)QBT_TR");
return;
}
}
@ -907,14 +907,14 @@ applyPreferences = function() { @@ -907,14 +907,14 @@ applyPreferences = function() {
// Alternative speed limits
var alt_dl_limit = $('alt_dl_limit_value').getProperty('value').toInt();
if(alt_dl_limit <= 0) {
alert("_(Download rate limit must be greater than 0 or disabled.)");
alert("QBT_TR(Download rate limit must be greater than 0 or disabled.)QBT_TR");
return;
}
settings.set('alt_dl_limit', alt_dl_limit);
var alt_up_limit = $('alt_up_limit_value').getProperty('value').toInt();
if(alt_up_limit <= 0) {
alert("_(Upload rate limit must be greater than 0 or disabled.)");
alert("QBT_TR(Upload rate limit must be greater than 0 or disabled.)QBT_TR");
return;
}
settings.set('alt_up_limit', alt_up_limit);
@ -1014,7 +1014,7 @@ applyPreferences = function() { @@ -1014,7 +1014,7 @@ applyPreferences = function() {
// Web UI
var web_ui_port = $('webui_port_value').getProperty('value').toInt();
if(web_ui_port <= 1024 || web_ui_port > 65535) {
alert("_(The port used for the Web UI must be greater than 1024 and less than 65535.)");
alert("QBT_TR(The port used for the Web UI must be greater than 1024 and less than 65535.)QBT_TR");
return;
}
settings.set('web_ui_port', web_ui_port);
@ -1023,11 +1023,11 @@ applyPreferences = function() { @@ -1023,11 +1023,11 @@ applyPreferences = function() {
var web_ui_password = $('webui_password_text').getProperty('value');
// Add some username/password length checking
if(web_ui_username.length < 3) {
alert("_(The Web UI username must be at least 3 characters long.)");
alert("QBT_TR(The Web UI username must be at least 3 characters long.)QBT_TR");
return;
}
if(web_ui_password.length < 3) {
alert("_(The Web UI password must be at least 3 characters long.)");
alert("QBT_TR(The Web UI password must be at least 3 characters long.)QBT_TR");
return;
}
settings.set('web_ui_username', web_ui_username);
@ -1056,7 +1056,7 @@ applyPreferences = function() { @@ -1056,7 +1056,7 @@ applyPreferences = function() {
data: {'json': json_str,
},
onFailure: function() {
alert("_(Unable to save program preferences, qBittorrent is probably unreachable.)");
alert("QBT_TR(Unable to save program preferences, qBittorrent is probably unreachable.)QBT_TR");
window.parent.closeWindows();
},
onSuccess: function() {

6
src/webui/www/public/properties.html

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<div class="toolbarTabs">
<ul id="propertiesTabs" class="tab-menu">
<li id="PropGeneralLink" class="selected"><a>_(General)</a></li>
<li id="PropTrackersLink"><a>_(Trackers)</a></li>
<li id="PropFilesLink"><a>_(Content)</a></li>
<li id="PropGeneralLink" class="selected"><a>QBT_TR(General)QBT_TR</a></li>
<li id="PropTrackersLink"><a>QBT_TR(Trackers)QBT_TR</a></li>
<li id="PropFilesLink"><a>QBT_TR(Content)QBT_TR</a></li>
</ul>
<div class="clear"></div>
</div>

36
src/webui/www/public/properties_content.html

@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
<div id="prop_general">
<fieldset>
<legend><b>_(Transfer)</b></legend>
<legend><b>QBT_TR(Transfer)QBT_TR</b></legend>
<table>
<tr><td style="text-align:right; padding: 4px;">_(Uploaded:)</td><td style="padding-right: 20px;" id="total_uploaded"></td><td style="text-align:right; padding: 4px;">_(UP limit:)</td><td style="padding-right: 20px;" id="up_limit"></td><td style="text-align:right; padding: 4px;">_(Share ratio:)</td><td id="share_ratio"></td></tr>
<tr><td style="text-align:right; padding: 4px;">_(Downloaded:)</td><td style="padding-right: 20px;" id="total_downloaded"></td><td style="text-align:right; padding: 4px;">_(DL limit:)</td><td style="padding-right: 20px;" id="dl_limit"></td><td style="text-align:right; padding: 4px;">_(Connections:)</td><td id="nb_connections"></td></tr>
<tr><td style="text-align:right; padding: 4px;">_(Wasted:)</td><td style="padding-right: 20px;" id="total_wasted"></td><td style="text-align:right; padding: 4px;">_(Time active:)</td><td style="padding-right: 20px;" id="time_elapsed"></td><td></td></tr>
<tr><td style="text-align:right; padding: 4px;">QBT_TR(Uploaded:)QBT_TR</td><td style="padding-right: 20px;" id="total_uploaded"></td><td style="text-align:right; padding: 4px;">QBT_TR(UP limit:)QBT_TR</td><td style="padding-right: 20px;" id="up_limit"></td><td style="text-align:right; padding: 4px;">QBT_TR(Share ratio:)QBT_TR</td><td id="share_ratio"></td></tr>
<tr><td style="text-align:right; padding: 4px;">QBT_TR(Downloaded:)QBT_TR</td><td style="padding-right: 20px;" id="total_downloaded"></td><td style="text-align:right; padding: 4px;">QBT_TR(DL limit:)QBT_TR</td><td style="padding-right: 20px;" id="dl_limit"></td><td style="text-align:right; padding: 4px;">QBT_TR(Connections:)QBT_TR</td><td id="nb_connections"></td></tr>
<tr><td style="text-align:right; padding: 4px;">QBT_TR(Wasted:)QBT_TR</td><td style="padding-right: 20px;" id="total_wasted"></td><td style="text-align:right; padding: 4px;">QBT_TR(Time active:)QBT_TR</td><td style="padding-right: 20px;" id="time_elapsed"></td><td></td></tr>
</table>
</fieldset>
<fieldset>
<legend><b>_(Information)</b></legend>
<legend><b>QBT_TR(Information)QBT_TR</b></legend>
<table>
<tr><td style="text-align:right; padding: 4px;">_(Save path:)</td><td id="save_path"></td></tr>
<tr><td style="text-align:right; padding: 4px;">_(Created on:)</td><td id="creation_date"></td></tr>
<tr><td style="text-align:right; padding: 4px;">_(Pieces size:)</td><td id="piece_size"></td></tr>
<tr><td style="text-align:right; padding: 4px;">_(Torrent hash:)</td><td id="torrent_hash"></td></tr>
<tr><td style="text-align:right; padding: 4px;">QBT_TR(Save path:)QBT_TR</td><td id="save_path"></td></tr>
<tr><td style="text-align:right; padding: 4px;">QBT_TR(Created on:)QBT_TR</td><td id="creation_date"></td></tr>
<tr><td style="text-align:right; padding: 4px;">QBT_TR(Pieces size:)QBT_TR</td><td id="piece_size"></td></tr>
<tr><td style="text-align:right; padding: 4px;">QBT_TR(Torrent hash:)QBT_TR</td><td id="torrent_hash"></td></tr>
<tr><td style="vertical-align: top; padding: 4px; text-align:right;">
<br/>
_(Comment:)
QBT_TR(Comment:)QBT_TR
</td><td>
<textarea name="comment" id="comment" rows="15" cols="80" readonly>
</textarea>
@ -32,10 +32,10 @@ @@ -32,10 +32,10 @@
<table class="torrentTable" cellpadding="0" cellspacing="0" style="width: 100%">
<thead>
<tr>
<th>_(URL) <img src="theme/list-add" id="addTrackersPlus"/></th>
<th style="width: 250px;">_(Status)</th>
<th style="width: 150px;">_(Peers)</th>
<th style="width: 200px;">_(Message)</th>
<th>QBT_TR(URL)QBT_TR <img src="theme/list-add" id="addTrackersPlus"/></th>
<th style="width: 250px;">QBT_TR(Status)QBT_TR</th>
<th style="width: 150px;">QBT_TR(Peers)QBT_TR</th>
<th style="width: 200px;">QBT_TR(Message)QBT_TR</th>
</tr>
</thead>
<tbody id="trackersTable"></tbody>
@ -49,10 +49,10 @@ @@ -49,10 +49,10 @@
<thead>
<tr>
<th style="width: 30px; border-right: 0"><input type="checkbox" id="tristate_cb" style="display: none;" onclick="javascript:switchCBState()" /><label id="all_files_cb" class="tristate" for="tristate_cb"></label></th>
<th>_(Name)</th>
<th style="width: 150px;">_(Size)</th>
<th style="width: 90px;">_(Progress)</th>
<th style="width: 150px; border-right: 0">_(Priority)</th>
<th>QBT_TR(Name)QBT_TR</th>
<th style="width: 150px;">QBT_TR(Size)QBT_TR</th>
<th style="width: 90px;">QBT_TR(Progress)QBT_TR</th>
<th style="width: 150px; border-right: 0">QBT_TR(Priority)QBT_TR</th>
</tr>
</thead>
<tbody id="filesTable"></tbody>

10
src/webui/www/public/scripts/client.js

@ -139,7 +139,7 @@ window.addEvent('load', function () { @@ -139,7 +139,7 @@ window.addEvent('load', function () {
noCache : true,
method : 'get',
onFailure : function () {
$('error_div').set('html', '_(qBittorrent client is not reachable)');
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
clearTimeout(loadTorrentsInfoTimer);
loadTorrentsInfoTimer = loadTorrentsInfo.delay(2000);
},
@ -242,7 +242,7 @@ window.addEvent('load', function () { @@ -242,7 +242,7 @@ window.addEvent('load', function () {
noCache : true,
method : 'get',
onFailure : function () {
$('error_div').set('html', '_(qBittorrent client is not reachable)');
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
clearTimeout(loadTransferInfoTimer);
loadTransferInfoTimer = loadTransferInfo.delay(4000);
},
@ -261,10 +261,10 @@ window.addEvent('load', function () { @@ -261,10 +261,10 @@ window.addEvent('load', function () {
transfer_info += " (" + friendlyUnit(info.up_info_data, false) + ")"
$("UpInfos").set('html', transfer_info);
if (speedInTitle)
document.title = "_(D:%1 U:%2)".replace("%1", friendlyUnit(info.dl_info_speed, true)).replace("%2", friendlyUnit(info.up_info_speed, true));
document.title = "QBT_TR(D:%1 U:%2)QBT_TR".replace("%1", friendlyUnit(info.dl_info_speed, true)).replace("%2", friendlyUnit(info.up_info_speed, true));
else
document.title = "_(qBittorrent web User Interface)";
$('DHTNodes').set('html', '_(DHT: %1 nodes)'.replace("%1", info.dht_nodes));
document.title = "QBT_TR(qBittorrent web User Interface)QBT_TR";
$('DHTNodes').set('html', 'QBT_TR(DHT: %1 nodes)QBT_TR'.replace("%1", info.dht_nodes));
if (info.connection_status == "connected")
$('connectionStatus').src = 'images/skin/connected.png';
else if (info.connection_status == "firewalled")

22
src/webui/www/public/scripts/misc.js

@ -3,22 +3,22 @@ @@ -3,22 +3,22 @@
*/
function friendlyUnit(value, isSpeed) {
units = [
"_(B)",
"_(KiB)",
"_(MiB)",
"_(GiB)",
"_(TiB)",
"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",
];
if (value < 0)
return "_(Unknown)";
return "QBT_TR(Unknown)QBT_TR";
var i = 0;
while (value >= 1024. && i++ < 6)
value /= 1024.;
var ret;
ret = value.toFixed(1) + " " + units[i];
if (isSpeed)
ret += "_(/s)";
ret += "QBT_TR(/s)QBT_TR";
return ret;
}
@ -32,18 +32,18 @@ function friendlyDuration(seconds) { @@ -32,18 +32,18 @@ function friendlyDuration(seconds) {
if (seconds == 0)
return "0";
if (seconds < 60)
return "< " + "_(%1m)".replace("%1", "1"); //translation of "< 1m" not working
return "< " + "QBT_TR(%1m)QBT_TR".replace("%1", "1"); //translation of "< 1m" not working
var minutes = seconds / 60;
if (minutes < 60)
return "_(%1m)".replace("%1", parseInt(minutes));
return "QBT_TR(%1m)QBT_TR".replace("%1", parseInt(minutes));
var hours = minutes / 60;
minutes = minutes - hours * 60;
if (hours < 24)
return "_(%1h %2m)".replace("%1", parseInt(hours)).replace("%2", parseInt(minutes))
return "QBT_TR(%1h %2m)QBT_TR".replace("%1", parseInt(hours)).replace("%2", parseInt(minutes))
var days = hours / 24;
hours = hours - days * 24;
if (days < 100)
return "_(%1d %2h)".replace("%1", parseInt(days)).replace("%2", parseInt(hours))
return "QBT_TR(%1d %2h)QBT_TR".replace("%1", parseInt(days)).replace("%2", parseInt(hours))
return "∞";
}

20
src/webui/www/public/scripts/mocha-init.js

@ -43,7 +43,7 @@ initializeWindows = function() { @@ -43,7 +43,7 @@ initializeWindows = function() {
new Event(e).stop();
new MochaUI.Window({
id: 'downloadPage',
title: "_(Download from urls)",
title: "QBT_TR(Download from urls)QBT_TR",
loadMethod: 'iframe',
contentURL: 'download.html',
scrollbars: true,
@ -62,7 +62,7 @@ initializeWindows = function() { @@ -62,7 +62,7 @@ initializeWindows = function() {
new Event(e).stop();
new MochaUI.Window({
id: 'preferencesPage',
title: "_(Options)",
title: "QBT_TR(Options)QBT_TR",
loadMethod: 'xhr',
toolbar: true,
contentURL: 'preferences_content.html',
@ -84,7 +84,7 @@ initializeWindows = function() { @@ -84,7 +84,7 @@ initializeWindows = function() {
new Event(e).stop();
new MochaUI.Window({
id: 'uploadPage',
title: "_(Download local torrent)",
title: "QBT_TR(Download local torrent)QBT_TR",
loadMethod: 'iframe',
contentURL: 'upload.html',
scrollbars: true,
@ -101,7 +101,7 @@ initializeWindows = function() { @@ -101,7 +101,7 @@ initializeWindows = function() {
globalUploadLimitFN = function() {
new MochaUI.Window({
id: 'uploadLimitPage',
title: "_(Global Upload Speed Limit)",
title: "QBT_TR(Global Upload Speed Limit)QBT_TR",
loadMethod: 'iframe',
contentURL: 'uploadlimit.html?hash=global',
scrollbars: false,
@ -120,7 +120,7 @@ initializeWindows = function() { @@ -120,7 +120,7 @@ initializeWindows = function() {
var hash = h[0];
new MochaUI.Window({
id: 'uploadLimitPage',
title: "_(Torrent Upload Speed Limiting)",
title: "QBT_TR(Torrent Upload Speed Limiting)QBT_TR",
loadMethod: 'iframe',
contentURL: 'uploadlimit.html?hash=' + hash,
scrollbars: false,
@ -165,7 +165,7 @@ initializeWindows = function() { @@ -165,7 +165,7 @@ initializeWindows = function() {
globalDownloadLimitFN = function() {
new MochaUI.Window({
id: 'downloadLimitPage',
title: "_(Global Download Speed Limit)",
title: "QBT_TR(Global Download Speed Limit)QBT_TR",
loadMethod: 'iframe',
contentURL: 'downloadlimit.html?hash=global',
scrollbars: false,
@ -184,7 +184,7 @@ initializeWindows = function() { @@ -184,7 +184,7 @@ initializeWindows = function() {
var hash = h[0];
new MochaUI.Window({
id: 'downloadLimitPage',
title: "_(Torrent Download Speed Limiting)",
title: "QBT_TR(Torrent Download Speed Limiting)QBT_TR",
loadMethod: 'iframe',
contentURL: 'downloadlimit.html?hash=' + hash,
scrollbars: false,
@ -200,7 +200,7 @@ initializeWindows = function() { @@ -200,7 +200,7 @@ initializeWindows = function() {
deleteFN = function() {
var h = myTable.selectedIds();
/*if(h.length && confirm('_(Are you sure you want to delete the selected torrents from the transfer list?)')) {
/*if(h.length && confirm('QBT_TR(Are you sure you want to delete the selected torrents from the transfer list?)QBT_TR')) {
h.each(function(item, index){
new Request({url: 'command/delete', method: 'post', data: {hash: item}}).send();
});
@ -208,7 +208,7 @@ initializeWindows = function() { @@ -208,7 +208,7 @@ initializeWindows = function() {
if (h.length) {
new MochaUI.Window({
id: 'confirmDeletionPage',
title: "_(Deletion confirmation - qBittorrent)",
title: "QBT_TR(Deletion confirmation - qBittorrent)QBT_TR",
loadMethod: 'iframe',
contentURL: 'confirmdeletion.html?hashes=' + h.join(','),
scrollbars: false,
@ -350,7 +350,7 @@ initializeWindows = function() { @@ -350,7 +350,7 @@ initializeWindows = function() {
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>_(qBittorrent has been shutdown.)</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>_(qBittorrent has been shutdown.)</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</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>QBT_TR(qBittorrent has been shutdown.)QBT_TR</h1></body></html>");
stop();
}
}).send();

8
src/webui/www/public/scripts/prop-files.js

@ -148,19 +148,19 @@ var createPriorityCombo = function(id, selected_prio) { @@ -148,19 +148,19 @@ var createPriorityCombo = function(id, selected_prio) {
});
var opt = new Element("option");
opt.set('value', '1')
opt.set('html', "_(Normal)");
opt.set('html', "QBT_TR(Normal)QBT_TR");
if (selected_prio <= 1)
opt.setAttribute('selected', '');
opt.injectInside(select);
opt = new Element("option");
opt.set('value', '2')
opt.set('html', "_(High)");
opt.set('html', "QBT_TR(High)QBT_TR");
if (selected_prio == 2)
opt.setAttribute('selected', '');
opt.injectInside(select);
opt = new Element("option");
opt.set('value', '7')
opt.set('html', "_(Maximum)");
opt.set('html', "QBT_TR(Maximum)QBT_TR");
if (selected_prio == 7)
opt.setAttribute('selected', '');
opt.injectInside(select);
@ -295,7 +295,7 @@ var loadTorrentFilesData = function() { @@ -295,7 +295,7 @@ var loadTorrentFilesData = function() {
noCache: true,
method: 'get',
onFailure: function() {
$('error_div').set('html', '_(qBittorrent client is not reachable)');
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
clearTimeout(loadTorrentFilesDataTimer);
loadTorrentFilesDataTimer = loadTorrentFilesData.delay(10000);
},

12
src/webui/www/public/scripts/prop-general.js

@ -35,7 +35,7 @@ var loadTorrentData = function() { @@ -35,7 +35,7 @@ var loadTorrentData = function() {
noCache: true,
method: 'get',
onFailure: function() {
$('error_div').set('html', '_(qBittorrent client is not reachable)');
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
clearTimeout(loadTorrentDataTimer);
loadTorrentDataTimer = loadTorrentData.delay(10000);
},
@ -46,7 +46,7 @@ var loadTorrentData = function() { @@ -46,7 +46,7 @@ var loadTorrentData = function() {
// Update Torrent data
$('save_path').set('html', data.save_path);
temp = data.creation_date;
var timestamp = "_(Unknown)";
var timestamp = "QBT_TR(Unknown)QBT_TR";
if (temp != -1)
timestamp = new Date(data.creation_date * 1000).toISOString();
$('creation_date').set('html', timestamp);
@ -54,10 +54,10 @@ var loadTorrentData = function() { @@ -54,10 +54,10 @@ var loadTorrentData = function() {
$('comment').set('html', data.comment);
$('total_uploaded').set('html', friendlyUnit(data.total_uploaded) +
" (" + friendlyUnit(data.total_uploaded_session) +
" _(this session)" + ")");
" QBT_TR(this session)QBT_TR" + ")");
$('total_downloaded').set('html', friendlyUnit(data.total_downloaded) +
" (" + friendlyUnit(data.total_downloaded_session) +
" _(this session)" + ")");
" QBT_TR(this session)QBT_TR" + ")");
$('total_wasted').set('html', data.total_wasted);
temp = data.up_limit;
$('up_limit').set('html', temp == -1 ? "∞" : temp);
@ -65,9 +65,9 @@ var loadTorrentData = function() { @@ -65,9 +65,9 @@ var loadTorrentData = function() {
$('dl_limit').set('html', temp == -1 ? "∞" : temp);
temp = friendlyDuration(status.active_time);
if (status.is_seed)
temp += " (" + "_(Seeded for %1)".replace("%1", status.seeding_time) + ")";
temp += " (" + "QBT_TR(Seeded for %1)QBT_TR".replace("%1", status.seeding_time) + ")";
$('time_elapsed').set('html', temp);
temp = data.nb_connections + " (" + "_(%1 max)".replace("%1", status.nb_connections_limit) + ")";
temp = data.nb_connections + " (" + "QBT_TR(%1 max)QBT_TR".replace("%1", status.nb_connections_limit) + ")";
$('nb_connections').set('html', temp);
$('share_ratio').set('html', data.share_ratio.toFixed(2));
}

4
src/webui/www/public/scripts/prop-trackers.js

@ -75,7 +75,7 @@ var loadTrackersData = function() { @@ -75,7 +75,7 @@ var loadTrackersData = function() {
noCache: true,
method: 'get',
onFailure: function() {
$('error_div').set('html', '_(qBittorrent client is not reachable)');
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR');
clearTimeout(loadTrackersDataTimer);
loadTrackersDataTimer = loadTrackersData.delay(20000);
},
@ -115,7 +115,7 @@ $('addTrackersPlus').addEvent('click', function addTrackerDlg() { @@ -115,7 +115,7 @@ $('addTrackersPlus').addEvent('click', function addTrackerDlg() {
if (current_hash.length == 0) return;
new MochaUI.Window({
id: 'trackersPage',
title: "_(Trackers addition dialog)",
title: "QBT_TR(Trackers addition dialog)QBT_TR",
loadMethod: 'iframe',
contentURL: 'addtrackers.html?hash=' + current_hash,
scrollbars: true,

18
src/webui/www/public/transferlist.html

@ -2,16 +2,16 @@ @@ -2,16 +2,16 @@
<thead>
<tr>
<th style="width: 16px"></th>
<th onClick="setSortedColumn('name');" style="min-width: 200px; cursor: pointer">_(Name)</th>
<th onClick="setSortedColumn('name');" style="min-width: 200px; cursor: pointer">QBT_TR(Name)QBT_TR</th>
<th id='prioHeader' onClick="setSortedColumn('priority');" style="width: 90px; cursor: pointer">#</th>
<th onClick="setSortedColumn('size');" style="width: 100px; cursor: pointer">_(Size)</th>
<th onClick="setSortedColumn('progress');" style="width: 80px; cursor: pointer">_(Done)</th>
<th onClick="setSortedColumn('num_seeds');" style="width: 100px; cursor: pointer">_(Seeds)</th>
<th onClick="setSortedColumn('num_leechs');" style="width: 100px; cursor: pointer">_(Peers)</th>
<th onClick="setSortedColumn('dlspeed');" style="width: 100px; cursor: pointer">_(Down Speed)</th>
<th onClick="setSortedColumn('upspeed');" style="width: 100px; cursor: pointer">_(Up Speed)</th>
<th onClick="setSortedColumn('eta');" style="width: 100px; cursor: pointer">_(ETA)</th>
<th onClick="setSortedColumn('ratio');" style="width: 100px; cursor: pointer">_(Ratio)</th>
<th onClick="setSortedColumn('size');" style="width: 100px; cursor: pointer">QBT_TR(Size)QBT_TR</th>
<th onClick="setSortedColumn('progress');" style="width: 80px; cursor: pointer">QBT_TR(Done)QBT_TR</th>
<th onClick="setSortedColumn('num_seeds');" style="width: 100px; cursor: pointer">QBT_TR(Seeds)QBT_TR</th>
<th onClick="setSortedColumn('num_leechs');" style="width: 100px; cursor: pointer">QBT_TR(Peers)QBT_TR</th>
<th onClick="setSortedColumn('dlspeed');" style="width: 100px; cursor: pointer">QBT_TR(Down Speed)QBT_TR</th>
<th onClick="setSortedColumn('upspeed');" style="width: 100px; cursor: pointer">QBT_TR(Up Speed)QBT_TR</th>
<th onClick="setSortedColumn('eta');" style="width: 100px; cursor: pointer">QBT_TR(ETA)QBT_TR</th>
<th onClick="setSortedColumn('ratio');" style="width: 100px; cursor: pointer">QBT_TR(Ratio)QBT_TR</th>
</tr>
</thead>
<tbody id="myTable"></tbody>

6
src/webui/www/public/upload.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>_(Download local torrent)</title>
<title>QBT_TR(Download local torrent)QBT_TR</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/Window.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
@ -16,7 +16,7 @@ function stateChangeHandler() { @@ -16,7 +16,7 @@ function stateChangeHandler() {
if (this.responseText != "") {
alert(this.responseText);
} else {
alert("_(Upload Failed!)");
alert("QBT_TR(Upload Failed!)QBT_TR");
}
}
$('upload_spinner').style.display = "none";
@ -66,7 +66,7 @@ window.addEvent('load', function() { @@ -66,7 +66,7 @@ window.addEvent('load', function() {
<input type="file" id="fileselect" name="fileselect[]" multiple="multiple" />
</div>
<div id="submitbutton" style="margin-top: 30px;">
<button type="submit" style="font-size: 1em;">_(Upload Torrents)</button>
<button type="submit" style="font-size: 1em;">QBT_TR(Upload Torrents)QBT_TR</button>
</div>
</form>
<div id="upload_spinner" class="mochaSpinner"></div>

6
src/webui/www/public/uploadlimit.html

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>_(Torrent Upload Speed Limiting)</title>
<title>QBT_TR(Torrent Upload Speed Limiting)QBT_TR</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/mootools-1.2-more.js" charset="utf-8"></script>
@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
<body>
<div style="width: 100%; text-align: center; margin: 0 auto; overflow: hidden">
<div id="uplimitSlider" class="slider">
<div id="uplimitUpdate" class="update">_(Upload limit:) <input id="uplimitUpdatevalue" size="6" placeholder="∞" style="text-align: center;"> <span id="upLimitUnit">_(KiB/s)</span></div>
<div id="uplimitUpdate" class="update">QBT_TR(Upload limit:)QBT_TR <input id="uplimitUpdatevalue" size="6" placeholder="∞" style="text-align: center;"> <span id="upLimitUnit">QBT_TR(KiB/s)QBT_TR</span></div>
<div class="sliderWrapper">
<div id="uplimitSliderknob" class="sliderknob"></div>
<div id="uplimitSliderarea" class="sliderarea"></div>
@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
}
}
</script>
<input type="button" value="_(Apply)" onclick="setUpLimit()"/>
<input type="button" value="QBT_TR(Apply)QBT_TR" onclick="setUpLimit()"/>
</div>
<script type="text/javascript">

Loading…
Cancel
Save