From 436b3a472a3544c97aff0ce35f525b09310d91d8 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 25 Jun 2015 20:40:09 +0800 Subject: [PATCH] Move translators & thanks to its own file Add HTML header & cleanup --- src/core/unicodestrings.h | 49 +++---------------------------------- src/gui/about.qrc | 2 ++ src/gui/about_imp.h | 20 +++++++++------ src/gui/gpl.html | 11 ++++++++- src/gui/thanks.html | 14 +++++++++++ src/gui/translators.html | 51 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 93 insertions(+), 54 deletions(-) create mode 100644 src/gui/thanks.html create mode 100644 src/gui/translators.html diff --git a/src/core/unicodestrings.h b/src/core/unicodestrings.h index 81d533bff..b76812b55 100644 --- a/src/core/unicodestrings.h +++ b/src/core/unicodestrings.h @@ -26,10 +26,14 @@ * exception statement from your version. */ +// This file must be encoded in "UTF-8 with BOM" #ifdef _MSC_VER #pragma execution_character_set("utf-8") #endif +// Because of the poor handling of UTF-8 characters in MSVC (emits warning C4819), +// we put all problematic UTF-8 chars/strings in this file. +// See issue #3059 for more details (https://github.com/qbittorrent/qBittorrent/issues/3059). const char C_INFINITY[] = "∞"; const char C_UP[] = "▲"; const char C_DOWN[] = "▼"; @@ -76,48 +80,3 @@ const char C_LOCALE_VIETNAMESE[] = "tiếng Việt"; const char C_LOCALE_CHINESE_TRADITIONAL[] = "中文 (繁體)"; const char C_LOCALE_CHINESE_SIMPLIFIED[] = "中文 (简体)"; const char C_LOCALE_KOREAN[] = "한글"; -const char C_THANKS[] = - "

I would first like to thank sourceforge.net for hosting qBittorrent project and for their support.

\ -

I am pleased that people from all over the world are contributing to qBittorrent: Ishan Arora (India), Arnaud Demaizière (France) and Stephanos Antaris (Greece). Their help is greatly appreciated

\ -

I also want to thank Στέφανος Αντάρης (santaris@csd.auth.gr) and Mirco Chinelli (infinity89@fastwebmail.it) for working on Mac OS X packaging.

\ -

I am grateful to Peter Koeleman (peter@qbittorrent.org) and Mohammad Dib (mdib@qbittorrent.org) for working on qBittorrent port to Windows.

\ -

Thanks a lot to our graphist Mateusz Toboła (tobejodok@qbittorrent.org) for his great work.

"; -const char C_TRANSLATORS[] = - ""; diff --git a/src/gui/about.qrc b/src/gui/about.qrc index b7126e9c4..147d23cdd 100644 --- a/src/gui/about.qrc +++ b/src/gui/about.qrc @@ -1,6 +1,8 @@ gpl.html + thanks.html + translators.html diff --git a/src/gui/about_imp.h b/src/gui/about_imp.h index f098176c3..0243261aa 100644 --- a/src/gui/about_imp.h +++ b/src/gui/about_imp.h @@ -72,17 +72,21 @@ class about : public QDialog, private Ui::AboutDlg{ //Title lb_name->setText(QString::fromUtf8("

qBittorrent")+QString::fromUtf8(" " VERSION"

")); // Thanks - te_thanks->setHtml(QString::fromUtf8(C_THANKS)); + QFile thanksfile(":/thanks.html"); + if (thanksfile.open(QIODevice::ReadOnly | QIODevice::Text)) { + te_thanks->setHtml(QString::fromUtf8(thanksfile.readAll().constData())); + thanksfile.close(); + } // Translation - QString trans_txt = "

"+tr("I would like to thank the following people who volunteered to translate qBittorrent:")+"

"; - trans_txt += QString::fromUtf8(C_TRANSLATORS); - trans_txt += "

"+tr("Please contact me if you would like to translate qBittorrent into your own language.")+"

"; - te_translation->setHtml(trans_txt); + QFile translatorsfile(":/translators.html"); + if (translatorsfile.open(QIODevice::ReadOnly | QIODevice::Text)) { + te_translation->setHtml(QString::fromUtf8(translatorsfile.readAll().constData())); + translatorsfile.close(); + } // License - te_license->append(QString::fromUtf8("")); QFile licensefile(":/gpl.html"); - if (licensefile.open(QIODevice::ReadOnly|QIODevice::Text)) { - te_license->setHtml(licensefile.readAll()); + if (licensefile.open(QIODevice::ReadOnly | QIODevice::Text)) { + te_license->setHtml(QString::fromUtf8(licensefile.readAll().constData())); licensefile.close(); } // Libraries diff --git a/src/gui/gpl.html b/src/gui/gpl.html index 312bb1f2c..3a74abc4f 100644 --- a/src/gui/gpl.html +++ b/src/gui/gpl.html @@ -1,3 +1,10 @@ + + + + + License + +

qBittorrent is licensed under the GNU General Public License version 2 with the addition of the following special exception:

@@ -505,4 +512,6 @@ consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. -

\ No newline at end of file +

+ + diff --git a/src/gui/thanks.html b/src/gui/thanks.html new file mode 100644 index 000000000..8bdd5009e --- /dev/null +++ b/src/gui/thanks.html @@ -0,0 +1,14 @@ + + + + + Thanks + + +

I would first like to thank sourceforge.net for hosting qBittorrent project and for their support.

+

I am pleased that people from all over the world are contributing to qBittorrent: Ishan Arora (India), Arnaud Demaizière (France) and Stephanos Antaris (Greece). Their help is greatly appreciated

+

I also want to thank Στέφανος Αντάρης (santaris@csd.auth.gr) and Mirco Chinelli (infinity89@fastwebmail.it) for working on Mac OS X packaging.

+

I am grateful to Peter Koeleman (peter@qbittorrent.org) and Mohammad Dib (mdib@qbittorrent.org) for working on qBittorrent port to Windows.

+

Thanks a lot to our graphist Mateusz Toboła (tobejodok@qbittorrent.org) for his great work.

+ + diff --git a/src/gui/translators.html b/src/gui/translators.html new file mode 100644 index 000000000..38aa69f1b --- /dev/null +++ b/src/gui/translators.html @@ -0,0 +1,51 @@ + + + + + Translators + + +

I would like to thank the following people who volunteered to translate qBittorrent:

+ +

Please contact me if you would like to translate qBittorrent into your own language.

+ +