From dcdb319653c83ba6802781da3a2e5846f580b064 Mon Sep 17 00:00:00 2001 From: ngosang Date: Sat, 23 May 2015 20:35:25 +0200 Subject: [PATCH] Web UI: Complete translatable strings --- src/webui/abstractwebapplication.cpp | 2 +- src/webui/extra_translations.h | 24 +++++++++++++++++----- src/webui/www/public/about.html | 5 ++--- src/webui/www/public/scripts/mocha-init.js | 2 +- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/webui/abstractwebapplication.cpp b/src/webui/abstractwebapplication.cpp index da78b172b..b325b7d8c 100644 --- a/src/webui/abstractwebapplication.cpp +++ b/src/webui/abstractwebapplication.cpp @@ -241,7 +241,7 @@ void AbstractWebApplication::translateDocument(QString& data) "HttpServer", "confirmDeletionDlg", "TrackerList", "TorrentFilesModel", "options_imp", "Preferences", "TrackersAdditionDlg", "ScanFoldersModel", "PropTabBar", "TorrentModel", "downloadFromURL", "MainWindow", "misc", - "StatusBar" + "StatusBar", "AboutDlg", "about", "PeerListWidget" }; const size_t context_count = sizeof(contexts) / sizeof(contexts[0]); int i = 0; diff --git a/src/webui/extra_translations.h b/src/webui/extra_translations.h index 460531152..0af373a2b 100644 --- a/src/webui/extra_translations.h +++ b/src/webui/extra_translations.h @@ -36,13 +36,12 @@ static const char *__TRANSLATIONS__[] = { QT_TRANSLATE_NOOP("HttpServer", "File"), QT_TRANSLATE_NOOP("HttpServer", "Edit"), QT_TRANSLATE_NOOP("HttpServer", "Help"), + QT_TRANSLATE_NOOP("HttpServer", "Logout"), QT_TRANSLATE_NOOP("HttpServer", "Download Torrents from their URL or Magnet link"), QT_TRANSLATE_NOOP("HttpServer", "Only one link per line"), QT_TRANSLATE_NOOP("HttpServer", "Download local torrent"), - QT_TRANSLATE_NOOP("HttpServer", "Torrent files were correctly added to download list."), - QT_TRANSLATE_NOOP("HttpServer", "Point to torrent file"), QT_TRANSLATE_NOOP("HttpServer", "Download"), - QT_TRANSLATE_NOOP("HttpServer", "Are you sure you want to delete the selected torrents from the transfer list and hard disk?"), + QT_TRANSLATE_NOOP("HttpServer", "Are you sure you want to delete the selected torrents from the transfer list?"), QT_TRANSLATE_NOOP("HttpServer", "Download rate limit must be greater than 0 or disabled."), QT_TRANSLATE_NOOP("HttpServer", "Upload rate limit must be greater than 0 or disabled."), QT_TRANSLATE_NOOP("HttpServer", "Maximum number of connections limit must be greater than 0 or disabled."), @@ -65,8 +64,23 @@ static const char *__TRANSLATIONS__[] = { QT_TRANSLATE_NOOP("HttpServer", "Invalid Username or Password."), QT_TRANSLATE_NOOP("HttpServer", "Password"), QT_TRANSLATE_NOOP("HttpServer", "Login"), - QT_TRANSLATE_NOOP("HttpServer", "qBittorrent web User Interface"), - QT_TRANSLATE_NOOP("HttpServer", "Upload Failed!") + QT_TRANSLATE_NOOP("HttpServer", "Upload Failed!"), + QT_TRANSLATE_NOOP("HttpServer", "Original authors"), + QT_TRANSLATE_NOOP("HttpServer", "Upload limit:"), + QT_TRANSLATE_NOOP("HttpServer", "Download limit:"), + QT_TRANSLATE_NOOP("HttpServer", "Apply"), + QT_TRANSLATE_NOOP("HttpServer", "Add"), + QT_TRANSLATE_NOOP("HttpServer", "Upload Torrents"), + QT_TRANSLATE_NOOP("HttpServer", "Use a different port for DHT and BitTorrent"), + QT_TRANSLATE_NOOP("HttpServer", "DHT port:"), + QT_TRANSLATE_NOOP("HttpServer", "All"), + QT_TRANSLATE_NOOP("HttpServer", "Downloading"), + QT_TRANSLATE_NOOP("HttpServer", "Seeding"), + QT_TRANSLATE_NOOP("HttpServer", "Completed"), + QT_TRANSLATE_NOOP("HttpServer", "Resumed"), + QT_TRANSLATE_NOOP("HttpServer", "Paused"), + QT_TRANSLATE_NOOP("HttpServer", "Active"), + QT_TRANSLATE_NOOP("HttpServer", "Inactive") }; static const struct { const char *source; const char *comment; } __COMMENTED_TRANSLATIONS__[] = { diff --git a/src/webui/www/public/about.html b/src/webui/www/public/about.html index b08ae17f6..c5c39d5dd 100644 --- a/src/webui/www/public/about.html +++ b/src/webui/www/public/about.html @@ -1,8 +1,7 @@

qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR

Copyright (c) 2011-2015 The qBittorrent project

-

Homepage: http://www.qbittorrent.org

+

QBT_TR(Home Page: )QBT_TR http://www.qbittorrent.org

-

Original authors

+

QBT_TR(Original authors)QBT_TR

Ishan Arora, Ankit Gupta, Chandan Shikhar Dua and Swapnil Kumar. - diff --git a/src/webui/www/public/scripts/mocha-init.js b/src/webui/www/public/scripts/mocha-init.js index 8a42ba90e..bdf392de1 100644 --- a/src/webui/www/public/scripts/mocha-init.js +++ b/src/webui/www/public/scripts/mocha-init.js @@ -363,7 +363,7 @@ initializeWindows = function() { new Event(e).stop(); new MochaUI.Window({ id: 'aboutpage', - title: 'About', + title: 'QBT_TR(About)QBT_TR', loadMethod: 'xhr', contentURL: 'about.html', width: 650,