(trunk qt) #4050 "transmission-qt translations don't load under Linux" -- fixed via patch from taem

This commit is contained in:
Jordan Lee 2011-02-23 02:16:16 +00:00
parent 094b726316
commit 6754258823
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@
#include <QLabel>
#include <QLibraryInfo>
#include <QRect>
#include <QtGlobal>
#include <libtransmission/transmission.h>
#include <libtransmission/tr-getopt.h>
@ -97,7 +98,11 @@ MyApp :: MyApp( int& argc, char ** argv ):
installTranslator( &qtTranslator );
// install the transmission translator
#ifdef Q_OS_WIN32
appTranslator.load( QString(MY_CONFIG_NAME) + "_" + QLocale::system().name(), QCoreApplication::applicationDirPath() + "/translations" );
#else
appTranslator.load( QString(MY_CONFIG_NAME) + "_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath) );
#endif
installTranslator( &appTranslator );
Formatter::initUnits( );