forked from qt-creator/qt-creator
Also search for Qt tr cataloges in the Creator tr dir. Add qt_help cataloge.
The qt_help cataloge is required to fully translate the help plugin. The additional lookup is mandated by the binary packages, where the translations are simply put in Creatrors translation directories and the Qt translation path is invalid. Reviewed-by: con <qtc-committer@nokia.com>
This commit is contained in:
@@ -121,9 +121,12 @@ bool FormEditorPlugin::initialize(const QStringList &arguments, QString *error)
|
||||
QString locale = qApp->property("qtc_locale").toString();
|
||||
if (!locale.isEmpty()) {
|
||||
QTranslator *qtr = new QTranslator(this);
|
||||
qtr->load(QLatin1String("designer_") + locale,
|
||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
qApp->installTranslator(qtr);
|
||||
const QString &creatorTrPath =
|
||||
Core::ICore::instance()->resourcePath() + QLatin1String("/translations");
|
||||
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
const QString &trFile = QLatin1String("designer_") + locale;
|
||||
if (qtr->load(trFile, qtTrPath) || qtr->load(trFile, creatorTrPath))
|
||||
qApp->installTranslator(qtr);
|
||||
}
|
||||
|
||||
error->clear();
|
||||
|
||||
Reference in New Issue
Block a user