Merge pull request #221 from jpcima/i18n

Translation of qt messages
This commit is contained in:
Volker Fischer 2020-05-15 15:50:32 +02:00 committed by GitHub
commit 9e8e501927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,7 @@
#include <QDir> #include <QDir>
#include <QTextStream> #include <QTextStream>
#include <QTranslator> #include <QTranslator>
#include <QLibraryInfo>
#include "global.h" #include "global.h"
#include "clientdlg.h" #include "clientdlg.h"
#include "serverdlg.h" #include "serverdlg.h"
@ -555,6 +556,7 @@ int main ( int argc, char** argv )
// load translations // load translations
QTranslator myappTranslator; QTranslator myappTranslator;
QTranslator myqtTranslator;
if ( bUseGUI && bUseTranslation ) if ( bUseGUI && bUseTranslation )
{ {
@ -562,6 +564,12 @@ int main ( int argc, char** argv )
{ {
pApp->installTranslator ( &myappTranslator ); pApp->installTranslator ( &myappTranslator );
} }
QString myqtLocation = QLibraryInfo::location( QLibraryInfo::TranslationsPath );
if ( myqtTranslator.load ( QLocale(), "qt", "_", myqtLocation ) )
{
pApp->installTranslator ( &myqtTranslator );
}
} }