mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 12:00:16 -07:00
Improve Web Ui translation
This commit is contained in:
parent
3adc58bb87
commit
e170d9c3a8
9 changed files with 16 additions and 19 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue