Skip to content

Commit

Permalink
STYLE: Mark translatable strings in Base/QTApp
Browse files Browse the repository at this point in the history
  • Loading branch information
mhdiop authored and lassoan committed Feb 9, 2023
1 parent 136fb11 commit 89c831d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Base/QTApp/qSlicerAboutDialog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ qSlicerAboutDialog::qSlicerAboutDialog(QWidget* parentWidget)
}
}
#else
d->CreditsTextBrowser->insertHtml("Visit the <a href=\"https://download.slicer.org/\">download site</a> to check if a new version is available.");
QString downloadSiteLink = QString("<a href=\"https://download.slicer.org/\>%1</a>").arg(tr("download site"));
d->CreditsTextBrowser->insertHtml(tr("Visit the %1 to check if a new version is available.").arg(downloadSiteLink));
d->CreditsTextBrowser->append("");
#endif
d->CreditsTextBrowser->append("");
Expand Down
14 changes: 7 additions & 7 deletions Base/QTApp/qSlicerMainWindow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void qSlicerMainWindowPrivate::setupUi(QMainWindow * mainWindow)
// ModuleSelector ToolBar
//----------------------------------------------------------------------------
// Create a Module selector
this->ModuleSelectorToolBar = new qSlicerModuleSelectorToolBar("Module Selection",q);
this->ModuleSelectorToolBar = new qSlicerModuleSelectorToolBar(qSlicerMainWindow::tr("Module Selection"),q);
this->ModuleSelectorToolBar->setObjectName(QString::fromUtf8("ModuleSelectorToolBar"));
this->ModuleSelectorToolBar->setAllowedAreas(Qt::TopToolBarArea | Qt::BottomToolBarArea);
this->ModuleSelectorToolBar->setModuleManager(moduleManager);
Expand Down Expand Up @@ -300,7 +300,7 @@ void qSlicerMainWindowPrivate::setupUi(QMainWindow * mainWindow)
#ifdef Slicer_USE_QtTesting
// we store this layout manager to the Object state property for QtTesting
qSlicerApplication::application()->testingUtility()->addObjectStateProperty(
qSlicerApplication::application()->layoutManager(), QString("layout"));
qSlicerApplication::application()->layoutManager(), QString(/*no tr*/"layout"));
qSlicerApplication::application()->testingUtility()->addObjectStateProperty(
this->ModuleSelectorToolBar->modulesMenu(), QString("currentModule"));
#endif
Expand Down Expand Up @@ -454,7 +454,7 @@ void qSlicerMainWindowPrivate::setupUi(QMainWindow * mainWindow)
else
{
ctkPythonConsole* pythonConsole = q->pythonConsole();
pythonConsole->setWindowTitle("Slicer Python Console");
pythonConsole->setWindowTitle(qSlicerMainWindow::tr("Slicer Python Console"));
pythonConsole->resize(600, 280);
pythonConsole->hide();
this->PythonConsoleToggleViewAction = new QAction("", this->ViewMenu);
Expand Down Expand Up @@ -568,7 +568,7 @@ void qSlicerMainWindowPrivate::setupRecentlyLoadedMenu(const QList<qSlicerIO::IO
// Add separator and clear action
this->RecentlyLoadedMenu->addSeparator();
QAction * clearAction = this->RecentlyLoadedMenu->addAction(
"Clear History", q, SLOT(onFileRecentLoadedActionTriggered()));
qSlicerMainWindow::tr("Clear History"), q, SLOT(onFileRecentLoadedActionTriggered()));
clearAction->setProperty("clearMenu", QVariant(true));
}

Expand Down Expand Up @@ -877,7 +877,7 @@ void qSlicerMainWindow::on_ShowStatusBarAction_triggered(bool toggled)
//---------------------------------------------------------------------------
void qSlicerMainWindow::on_FileFavoriteModulesAction_triggered()
{
qSlicerApplication::application()->openSettingsDialog("Modules");
qSlicerApplication::application()->openSettingsDialog(qSlicerApplication::tr("Modules"));
}

//---------------------------------------------------------------------------
Expand Down Expand Up @@ -999,7 +999,7 @@ void qSlicerMainWindow::on_FileCloseSceneAction_triggered()
qSlicerCoreApplication::application()->mrmlScene()->SetURL("");
// Set default scene file format to .mrml
qSlicerCoreIOManager* coreIOManager = qSlicerCoreApplication::application()->coreIOManager();
coreIOManager->setDefaultSceneFileType("MRML Scene (.mrml)");
coreIOManager->setDefaultSceneFileType(tr("MRML Scene") + " (.mrml)");
}
}

Expand Down Expand Up @@ -1388,7 +1388,7 @@ void qSlicerMainWindow::on_LoadDICOMAction_triggered()
{
return;
}
layoutManager->setCurrentModule("DICOM");
layoutManager->setCurrentModule(/*no tr*/"DICOM");
}

//---------------------------------------------------------------------------
Expand Down

0 comments on commit 89c831d

Please sign in to comment.