diff options
| author | Tannin <devnull@localhost> | 2015-01-08 20:07:32 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-01-08 20:07:32 +0100 |
| commit | 8b3a42bd170431490c16a0a2c4beadd4d300cd49 (patch) | |
| tree | 9e8616c6f7dbaf0f29c562fb6937916efea08ffb /src/mainwindow.cpp | |
| parent | 6f1162c23fb0c9dfc92974e9985ef94f72bd75da (diff) | |
bugfix: translations for plugins were not used
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 44723449..6f6b9a47 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4387,6 +4387,17 @@ void MainWindow::languageChange(const QString &newLanguage) installTranslator("qt"); installTranslator(ToQString(AppConfig::translationPrefix())); + foreach(IPlugin *plugin, m_Settings.plugins()) { + QObject *pluginObj = dynamic_cast<QObject*>(plugin); + if (pluginObj != NULL) { + QVariant fileNameVariant = pluginObj->property("filename"); + if (fileNameVariant.isValid()) { + QString fileName = QFileInfo(fileNameVariant.toString()).baseName(); + installTranslator(fileName); + } + } + } + ui->retranslateUi(this); ui->profileBox->setItemText(0, QObject::tr("<Manage...>")); |
