mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
Improve Web Ui translation
This commit is contained in:
parent
3adc58bb87
commit
e170d9c3a8
@ -90,14 +90,11 @@ QIcon IconProvider::generateDifferentSizes(const QIcon &icon)
|
||||
if(pixoff.height() > size.height())
|
||||
pixoff = pixoff.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
new_icon.addPixmap(pixoff, mode, QIcon::Off);
|
||||
Q_ASSERT(pixoff.height() <= size.height());
|
||||
QPixmap pixon = icon.pixmap(size, mode, QIcon::On);
|
||||
if(pixon.height() > size.height())
|
||||
pixon = pixoff.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
new_icon.addPixmap(pixon, mode, QIcon::On);
|
||||
Q_ASSERT(pixon.height() <= size.height());
|
||||
}
|
||||
Q_ASSERT(new_icon.availableSizes().contains(size));
|
||||
}
|
||||
return new_icon;
|
||||
}
|
||||
|
@ -923,7 +923,7 @@ QGroupBox {
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-51</y>
|
||||
<y>0</y>
|
||||
<width>506</width>
|
||||
<height>457</height>
|
||||
</rect>
|
||||
|
@ -67,7 +67,7 @@ window.addEvent('domready', function(){
|
||||
<p>_(Are you sure you want to delete the selected torrents from the transfer list?)</p>
|
||||
<input type="checkbox" id="deleteFromDiskCB"/> <i>_(Also delete the files on the hard disk)</i><br/><br/>
|
||||
<div style="text-align: right;">
|
||||
<input type="button" id="cancelBtn" value="_(No)" /> <input type="button" id="confirmBtn" value="Yes"/>
|
||||
<input type="button" id="cancelBtn" value="_(No)" /> <input type="button" id="confirmBtn" value="_(Yes)"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -35,17 +35,17 @@
|
||||
<li>
|
||||
<a class="returnFalse">_(File)</a>
|
||||
<ul>
|
||||
<li><a id="uploadLink"><img class="MyMenuIcon" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>_(&Add File...)</a></li>
|
||||
<li><a id="downloadLink"><img class="MyMenuIcon" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>_(Add &URL...)</a></li>
|
||||
<li><a id="uploadLink"><img class="MyMenuIcon" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>_(&Add torrent file...)</a></li>
|
||||
<li><a id="downloadLink"><img class="MyMenuIcon" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>_(Add &link to torrent...)</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a class="returnFalse">_(Edit)</a>
|
||||
<ul>
|
||||
<li><a id="resumeAllLink"><img class="MyMenuIcon" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(S&tart All)</a></li>
|
||||
<li><a id="resumeAllLink"><img class="MyMenuIcon" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(R&esume All)</a></li>
|
||||
<li><a id="pauseAllLink"><img class="MyMenuIcon" 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" src="theme/media-playback-start" width="16" height="16" onload="fixPNG(this)"/>_(&Start)</a></li>
|
||||
<li class="divider"><a id="resumeLink"><img class="MyMenuIcon" 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" width="16" height="16" onload="fixPNG(this)"/>_(&Pause)</a></li>
|
||||
<li><a id="recheckLink"><img class="MyMenuIcon" src="theme/document-edit-verify" width="16" height="16" onload="fixPNG(this)"/>_(Force recheck)</a></li>
|
||||
<li class="divider"><a id="deleteLink"><img class="MyMenuIcon" src="theme/list-remove" width="16" height="16" onload="fixPNG(this)"/>_(&Delete)</a></li>
|
||||
@ -97,8 +97,8 @@
|
||||
<li><a href="#prioBottom"><img src="theme/go-bottom"/> _(Move to bottom)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="separator"><a href="#DownloadLimit"><img src="images/skin/download.png"/> _(Limit download rate)</a></li>
|
||||
<li><a href="#UploadLimit"><img src="images/skin/seeding.png"/> _(Limit upload rate)</a></li>
|
||||
<li class="separator"><a href="#DownloadLimit"><img src="images/skin/download.png"/> _(Limit download rate...)</a></li>
|
||||
<li><a href="#UploadLimit"><img src="images/skin/seeding.png"/> _(Limit upload rate...)</a></li>
|
||||
<li class="separator"><a href="#ForceRecheck"><img src="theme/document-edit-verify"/> _(Force recheck)</a></li>
|
||||
</ul>
|
||||
<div id="desktopFooterWrapper">
|
||||
|
@ -52,7 +52,7 @@
|
||||
<td style="vertical-align: bottom; text-align: right;"><input type="checkbox" id="dht_checkbox"/></td><td>_(Enable DHT (decentralized network) to find more peers)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: bottom; text-align: right;"><input type="checkbox" id="DHTPortDiffThanBT_checkbox" onclick="updateDHTPortSettings();"/></td><td>_(Use a different port for DHT and Bittorrent)</td>
|
||||
<td style="vertical-align: bottom; text-align: right;"><input type="checkbox" id="DHTPortDiffThanBT_checkbox" onclick="updateDHTPortSettings();"/></td><td>_(Use a different port for DHT and BitTorrent)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: bottom; text-align: right;">_(DHT port:)</td><td><input type="text" id="DHTPort_txt" value="6881"/></td>
|
||||
@ -260,7 +260,7 @@
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<center><input type="button" value="_(Apply)" onclick="applyPreferences();"/></center>
|
||||
<center><input type="button" value="_(Save)" onclick="applyPreferences();"/></center>
|
||||
|
||||
<script type="text/javascript">
|
||||
var WatchedFoldersTable = new HtmlTable($("watched_folders_tab"));
|
||||
|
@ -3,7 +3,7 @@
|
||||
<table>
|
||||
<tr><td style="text-align:right; padding: 4px;">_(Uploaded:)</td><td style="padding-right: 20px;" id="total_uploaded">0 Kb</td><td style="text-align:right; padding: 4px;">_(UP limit:)</td><td style="padding-right: 20px;" id="up_limit">xx</td><td style="text-align:right; padding: 4px;">_(Share ratio:)</td><td id="share_ratio">xx</td></tr>
|
||||
<tr><td style="text-align:right; padding: 4px;">_(Downloaded:)</td><td style="padding-right: 20px;" id="total_downloaded">0 Kb</td><td style="text-align:right; padding: 4px;">_(DL limit:)</td><td style="padding-right: 20px;" id="dl_limit">xx</td><td style="text-align:right; padding: 4px;">_(Connections:)</td><td id="nb_connections">xx</td></tr>
|
||||
<tr><td style="text-align:right; padding: 4px;">_(Wasted:)</td><td style="padding-right: 20px;" id="total_wasted">0 Kb</td><td style="text-align:right; padding: 4px;">_(Time elapsed:)</td><td style="padding-right: 20px;" id="time_elapsed">xx</td><td></td></tr>
|
||||
<tr><td style="text-align:right; padding: 4px;">_(Wasted:)</td><td style="padding-right: 20px;" id="total_wasted">0 Kb</td><td style="text-align:right; padding: 4px;">_(Time active:)</td><td style="padding-right: 20px;" id="time_elapsed">xx</td><td></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
<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>_(Files)</a></li>
|
||||
<li id="PropFilesLink"><a>_(Content)</a></li>
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -111,7 +111,7 @@ void HttpConnection::write()
|
||||
}
|
||||
|
||||
QString HttpConnection::translateDocument(QString data) {
|
||||
std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget", "PropertiesWidget", "GUI", "MainWindow", "HttpServer", "confirmDeletionDlg", "TrackerList", "TorrentFilesModel", "options_imp", "Preferences", "TrackersAdditionDlg", "ScanFoldersModel"};
|
||||
std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget", "PropertiesWidget", "MainWindow", "HttpServer", "confirmDeletionDlg", "TrackerList", "TorrentFilesModel", "options_imp", "Preferences", "TrackersAdditionDlg", "ScanFoldersModel", "PropTabBar", "TorrentModel"};
|
||||
int i=0;
|
||||
bool found = false;
|
||||
do {
|
||||
@ -126,7 +126,7 @@ QString HttpConnection::translateDocument(QString data) {
|
||||
do {
|
||||
translation = qApp->translate(contexts[context_index].c_str(), word.toLocal8Bit().constData(), 0, QCoreApplication::UnicodeUTF8, 1);
|
||||
++context_index;
|
||||
}while(translation == word && context_index < 13);
|
||||
}while(translation == word && context_index < 14);
|
||||
// Remove keyboard shortcuts
|
||||
translation = translation.replace("&", "");
|
||||
//qDebug("Translation is %s", translation.toUtf8().data());
|
||||
|
@ -107,7 +107,6 @@ HttpServer::HttpServer(int msec, QObject* parent) : QTcpServer(parent) {
|
||||
QString a = tr("File");
|
||||
a = tr("Edit");
|
||||
a = tr("Help");
|
||||
a = tr("Delete from HD");
|
||||
a = tr("Download Torrents from their URL or Magnet link");
|
||||
a = tr("Only one link per line");
|
||||
a = tr("Download local torrent");
|
||||
@ -127,6 +126,7 @@ HttpServer::HttpServer(int msec, QObject* parent) : QTcpServer(parent) {
|
||||
a = tr("The port used for the Web UI must be greater than 1024 and less than 65535.");
|
||||
a = tr("The Web UI username must be at least 3 characters long.");
|
||||
a = tr("The Web UI password must be at least 3 characters long.");
|
||||
a = tr("Save");
|
||||
}
|
||||
|
||||
HttpServer::~HttpServer()
|
||||
|
Loading…
Reference in New Issue
Block a user