[GB.QT4]
* BUG: Hardcode some translations directories when searching for Qt translation files: '/usr/lib/qt4/translations' and '/usr/share/qt4/translations'. git-svn-id: svn://localhost/gambas/trunk@3142 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
27ce882d1e
commit
5ac608f3ef
1 changed files with 8 additions and 3 deletions
|
@ -630,10 +630,15 @@ static void init_lang(QString locale, bool rtl)
|
|||
if (pos >= 0) locale = locale.left(pos);
|
||||
|
||||
qt = new QTranslator();
|
||||
if (!qt->load(QString( "qt_fr"), QString(getenv("QTDIR")) + "/translations"))
|
||||
if (!qt->load(QString("qt") + locale, QString(getenv("QTDIR")) + "/translations")
|
||||
&& !qt->load(QString("qt") + locale, QString("/usr/lib/qt4/translations"))
|
||||
&& !qt->load(QString("qt") + locale, QString("/usr/share/qt4/translations")))
|
||||
{
|
||||
qDebug("warning: unable to load Qt translation: %s", QT_ToUTF8(locale));
|
||||
|
||||
qApp->installTranslator(qt);
|
||||
}
|
||||
else
|
||||
qApp->installTranslator(qt);
|
||||
|
||||
if (rtl)
|
||||
qApp->setLayoutDirection(Qt::RightToLeft);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue