mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-05 11:24:15 +00:00
Improved Web UI translation
This commit is contained in:
parent
e170d9c3a8
commit
16be6fe474
@ -111,7 +111,7 @@ void HttpConnection::write()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString HttpConnection::translateDocument(QString data) {
|
QString HttpConnection::translateDocument(QString data) {
|
||||||
std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget", "PropertiesWidget", "MainWindow", "HttpServer", "confirmDeletionDlg", "TrackerList", "TorrentFilesModel", "options_imp", "Preferences", "TrackersAdditionDlg", "ScanFoldersModel", "PropTabBar", "TorrentModel"};
|
std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget", "PropertiesWidget", "MainWindow", "HttpServer", "confirmDeletionDlg", "TrackerList", "TorrentFilesModel", "options_imp", "Preferences", "TrackersAdditionDlg", "ScanFoldersModel", "PropTabBar", "TorrentModel", "downloadFromURL"};
|
||||||
int i=0;
|
int i=0;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
do {
|
do {
|
||||||
@ -126,7 +126,7 @@ QString HttpConnection::translateDocument(QString data) {
|
|||||||
do {
|
do {
|
||||||
translation = qApp->translate(contexts[context_index].c_str(), word.toLocal8Bit().constData(), 0, QCoreApplication::UnicodeUTF8, 1);
|
translation = qApp->translate(contexts[context_index].c_str(), word.toLocal8Bit().constData(), 0, QCoreApplication::UnicodeUTF8, 1);
|
||||||
++context_index;
|
++context_index;
|
||||||
}while(translation == word && context_index < 14);
|
}while(translation == word && context_index < 15);
|
||||||
// Remove keyboard shortcuts
|
// Remove keyboard shortcuts
|
||||||
translation = translation.replace("&", "");
|
translation = translation.replace("&", "");
|
||||||
//qDebug("Translation is %s", translation.toUtf8().data());
|
//qDebug("Translation is %s", translation.toUtf8().data());
|
||||||
|
@ -23,7 +23,7 @@ initializeWindows = function(){
|
|||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
id: 'downloadPage',
|
id: 'downloadPage',
|
||||||
title: "_(Download from URL)",
|
title: "_(Download from urls)",
|
||||||
loadMethod: 'iframe',
|
loadMethod: 'iframe',
|
||||||
contentURL:'download.html',
|
contentURL:'download.html',
|
||||||
scrollbars: true,
|
scrollbars: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user