diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 9d046ddb..13a7c7ae 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -738,7 +738,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow repopulateAccountsMenu(); accountMenuButton = new QToolButton(this); - accountMenuButton->setText(tr("Profiles")); accountMenuButton->setMenu(accountMenu); accountMenuButton->setPopupMode(QToolButton::InstantPopup); accountMenuButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -837,6 +836,21 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow // removing this looks stupid view->setFocus(); + + retranslateUi(); +} + +void MainWindow::retranslateUi() +{ + accountMenuButton->setText(tr("Profiles")); + + if (m_selectedInstance) { + m_statusLeft->setText(m_selectedInstance->getStatusbarDescription()); + } else { + m_statusLeft->setText(tr("No instance selected")); + } + + ui->retranslateUi(this); } MainWindow::~MainWindow() @@ -1751,7 +1765,7 @@ void MainWindow::changeEvent(QEvent* event) { if (event->type() == QEvent::LanguageChange) { - ui->retranslateUi(this); + retranslateUi(); } QMainWindow::changeEvent(event); } diff --git a/application/MainWindow.h b/application/MainWindow.h index 3d4114de..08c6b969 100644 --- a/application/MainWindow.h +++ b/application/MainWindow.h @@ -187,6 +187,8 @@ private slots: void globalSettingsClosed(); private: + void retranslateUi(); + void addInstance(QString url = QString()); void activateInstance(InstancePtr instance); void setCatBackground(bool enabled);