Перевод Сервера работает

This commit is contained in:
2025-10-21 12:42:12 +03:00
parent b9a39287cf
commit ff6f70c967
3 changed files with 17 additions and 0 deletions

View File

@@ -21,6 +21,9 @@ MainWindow::MainWindow(QWidget *parent) :
connect(serverLMSWidget, &ServerLMSWidget::signal_LanguageChanged, this, &MainWindow::slot_LanguageChanged);
qtLanguageTranslator.load(QString("translations/TrayServerLMS_") + serverLMSWidget->getLanguage(), ".");
qApp->installTranslator(&qtLanguageTranslator);
//this->move(0, 0);
//this->showNormal();
//this->showMaximized();
@@ -64,6 +67,8 @@ MainWindow::MainWindow(QWidget *parent) :
this, SLOT(slot_IconActivated(QSystemTrayIcon::ActivationReason)));
slot_Menu_HideWindow();
}
/* Метод, который обрабатывает событие закрытия окна приложения
@@ -123,6 +128,10 @@ void MainWindow::changeEvent(QEvent *event)
if (event->type() == QEvent::LanguageChange)
{// переведём окно заново
ui->retranslateUi(this);
action_ShowWindow->setText(tr("Expand window"));
action_HideWindow->setText(tr("Minimize window"));
action_Exit->setText(tr("Exit"));
}
}