(trunk qt) #3766 "Qt client i18n improvements" -- committed patch from rb07
This commit is contained in:
parent
4f3ea71479
commit
b03984d039
|
@ -23,7 +23,6 @@
|
|||
#include <QLabel>
|
||||
#include <QLibraryInfo>
|
||||
#include <QRect>
|
||||
#include <QTranslator>
|
||||
|
||||
#include <libtransmission/transmission.h>
|
||||
#include <libtransmission/tr-getopt.h>
|
||||
|
@ -94,13 +93,11 @@ MyApp :: MyApp( int& argc, char ** argv ):
|
|||
setApplicationName( MY_CONFIG_NAME );
|
||||
|
||||
// install the qt translator
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load( "qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
installTranslator( &qtTranslator );
|
||||
|
||||
// install the transmission translator
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load( QString(MY_READABLE_NAME) + "_" + QLocale::system().name() );
|
||||
appTranslator.load( QString(MY_CONFIG_NAME) + "_" + QLocale::system().name(), QCoreApplication::applicationDirPath() + "/translations" );
|
||||
installTranslator( &appTranslator );
|
||||
|
||||
Formatter::initUnits( );
|
||||
|
|
3
qt/app.h
3
qt/app.h
|
@ -16,6 +16,7 @@
|
|||
#include <QApplication>
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
|
||||
#include "favicon.h"
|
||||
|
||||
|
@ -51,6 +52,8 @@ class MyApp: public QApplication
|
|||
QTimer myStatsTimer;
|
||||
QTimer mySessionTimer;
|
||||
time_t myLastFullUpdateTime;
|
||||
QTranslator qtTranslator;
|
||||
QTranslator appTranslator;
|
||||
|
||||
private slots:
|
||||
void consentGiven( );
|
||||
|
|
|
@ -280,7 +280,7 @@ PrefsDialog :: createSpeedTab( )
|
|||
QWidget * w = timeEditNew( Prefs :: ALT_SPEED_LIMIT_TIME_BEGIN );
|
||||
h->addWidget( w, 1 );
|
||||
mySchedWidgets << w;
|
||||
QLabel * nd = new QLabel( "&to" );
|
||||
QLabel * nd = new QLabel( tr("&to") );
|
||||
h->addWidget( nd );
|
||||
mySchedWidgets << nd;
|
||||
w = timeEditNew( Prefs :: ALT_SPEED_LIMIT_TIME_END );
|
||||
|
@ -436,7 +436,7 @@ PrefsDialog :: createPrivacyTab( )
|
|||
|
||||
hig->addSectionTitle( tr( "Blocklist" ) );
|
||||
|
||||
QWidget * l = checkBoxNew( "Enable &blocklist:", Prefs::BLOCKLIST_ENABLED );
|
||||
QWidget * l = checkBoxNew( tr("Enable &blocklist:"), Prefs::BLOCKLIST_ENABLED );
|
||||
QWidget * e = lineEditNew( Prefs::BLOCKLIST_URL );
|
||||
myBlockWidgets << e;
|
||||
hig->addRow( l, e );
|
||||
|
|
|
@ -26,7 +26,10 @@ win32:DEFINES += QT_DBUS
|
|||
win32:LIBS += -levent -lws2_32 -lintl
|
||||
win32:LIBS += -lidn -liconv -lwldap32 -liphlpapi
|
||||
|
||||
TRANSLATIONS += transmission_en.ts transmission_es.ts transmission_pt_BR.ts transmission_ru.ts
|
||||
TRANSLATIONS += translations/transmission_en.ts \
|
||||
translations/transmission_es.ts \
|
||||
translations/transmission_pt_BR.ts \
|
||||
translations/transmission_ru.ts
|
||||
|
||||
FORMS += mainwin.ui
|
||||
RESOURCES += application.qrc
|
||||
|
|
Loading…
Reference in New Issue