From 8b3a42bd170431490c16a0a2c4beadd4d300cd49 Mon Sep 17 00:00:00 2001 From: Tannin Date: Thu, 8 Jan 2015 20:07:32 +0100 Subject: bugfix: translations for plugins were not used --- src/mainwindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mainwindow.cpp') 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(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("")); -- cgit v1.3.1