update translations

- fix: options not translated
This commit is contained in:
royqh1979 2021-11-14 18:48:18 +08:00
parent d14a1be208
commit c59b9c9283
4 changed files with 333 additions and 311 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -2677,12 +2677,14 @@ void MainWindow::onLstProblemSetContextMenu(const QPoint &pos)
QAction * action = new QAction(tr("select other file..."),menuSetAnswer); QAction * action = new QAction(tr("select other file..."),menuSetAnswer);
connect(action, &QAction::triggered, connect(action, &QAction::triggered,
[problem,this](){ [problem,this](){
QFileDialog dialog;
QString filename = QFileDialog::getOpenFileName( QString filename = QFileDialog::getOpenFileName(
this, this,
tr("Select Answer Source File"), tr("Select Answer Source File"),
QString(), QString(),
tr("C/C++Source Files (*.c *.cpp *.cc *.cxx)") tr("C/C++Source Files (*.c *.cpp *.cc *.cxx)"),
); nullptr,
dialog.options() | QFileDialog::DontUseNativeDialog);
if (!filename.isEmpty()) { if (!filename.isEmpty()) {
QDir::setCurrent(extractFileDir(filename)); QDir::setCurrent(extractFileDir(filename));
problem->answerProgram = filename; problem->answerProgram = filename;

View File

@ -99,6 +99,8 @@ PSettingsDialog SettingsDialog::optionDialog()
{ {
PSettingsDialog dialog = std::make_shared<SettingsDialog>(); PSettingsDialog dialog = std::make_shared<SettingsDialog>();
dialog->setWindowTitle(tr("Options"));
SettingsWidget* widget = new EnvironmentAppearenceWidget(tr("Appearence"),tr("Environment")); SettingsWidget* widget = new EnvironmentAppearenceWidget(tr("Appearence"),tr("Environment"));
widget->init(); widget->init();
dialog->addWidget(widget); dialog->addWidget(widget);
@ -206,6 +208,8 @@ PSettingsDialog SettingsDialog::projectOptionDialog()
{ {
PSettingsDialog dialog = std::make_shared<SettingsDialog>(); PSettingsDialog dialog = std::make_shared<SettingsDialog>();
dialog->setWindowTitle(tr("Project Options"));
SettingsWidget* widget = new ProjectGeneralWidget(tr("General"),tr("Project")); SettingsWidget* widget = new ProjectGeneralWidget(tr("General"),tr("Project"));
widget->init(); widget->init();
dialog->addWidget(widget); dialog->addWidget(widget);