Skip to content

Commit

Permalink
STYLE: Mark some translatable strings as complete sentence in Base/QT…
Browse files Browse the repository at this point in the history
…Core

Updates on Slicer@6e940aa after PR comments
See also Slicer/SlicerLanguagePacks#12
  • Loading branch information
mhdiop committed Jan 9, 2023
1 parent 6e940aa commit de19d63
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
7 changes: 3 additions & 4 deletions Base/QTCore/qSlicerAbstractCoreModule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ QString qSlicerAbstractCoreModule::defaultDocumentationLink()const
return "";
}
QString url = app->moduleDocumentationUrl(this->name());
QString linkText = QString("<p>%1 <a href=\"%2\">%3</a>.</p>")
.arg(tr("For more information see the"))
.arg(url)
.arg(tr("online documentation"));
QString linkText = QString("<p>%1</a>.</p>")
.arg(tr("For more information see the %1 online documentation").arg("<a href=\"%1\">"))
.arg(url);
}
10 changes: 5 additions & 5 deletions Base/QTCore/qSlicerCoreApplication.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1764,11 +1764,11 @@ QString qSlicerCoreApplication::acknowledgment()const
tr("Slicer is NOT an FDA approved medical device.") + "<br /><br />" +
tr("Supported by: NA-MIC, NAC, BIRN, NCIGT and the Slicer Community.") + "<br /><br />" +
tr("Special thanks to the NIH and our other supporters.") + "<br /><br />" +
tr("This work is part of the National Alliance for Medical Image Computing ") +
tr("(NA-MIC), funded by the National Institutes of Health through the NIH ") +
tr("Roadmap for Medical Research, Grant U54 EB005149. Information on the ") +
tr("National Centers for Biomedical Computing can be obtained from ") +
"<a href=\"https://commonfund.nih.gov/bioinformatics\">https://commonfund.nih.gov/bioinformatics</a>.<br /><br />");
tr("This work is part of the National Alliance for Medical Image Computing "
"(NA-MIC), funded by the National Institutes of Health through the NIH "
"Roadmap for Medical Research, Grant U54 EB005149. Information on the "
"National Centers for Biomedical Computing can be obtained from %1")
.arg("<a href=\"https://commonfund.nih.gov/bioinformatics\">https://commonfund.nih.gov/bioinformatics</a>.<br /><br />"));
return acknowledgmentText;
}

Expand Down
2 changes: 1 addition & 1 deletion Base/QTCore/qSlicerCoreIOManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ bool qSlicerCoreIOManager::loadNodes(const qSlicerIO::IOFileType& fileType,
bool success = false;
int numberOfUserMessagesBefore = userMessages ? userMessages->GetNumberOfMessages() : 0;
//: %1 is the filename
QString userMessagePrefix = tr("Loading %1 - ").arg(parameters["fileName"].toString());
QString userMessagePrefix = tr("Loading %1").arg(parameters["fileName"].toString()) + " - ";

QStringList nodes;
foreach (qSlicerFileReader* reader, readers)
Expand Down
3 changes: 2 additions & 1 deletion Base/QTCore/qSlicerExtensionsManagerModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,8 @@ bool qSlicerExtensionsManagerModel::installExtension(
.arg(unresolvedDependencies.join(", "));
if (d->Interactive)
{
QString msg = QString("<p>%1 %2</p><ul>").arg(extensionName).arg(tr("depends on the following extensions, which could not be found:"));
//: %1 is the extension name
QString msg = QString("<p>%1</p><ul>").arg(tr("%1 depends on the following extensions, which could not be found:")).arg(extensionName);
foreach(const QString & dependencyName, unresolvedDependencies)
{
msg += QString("<li>%1</li>").arg(dependencyName);
Expand Down

0 comments on commit de19d63

Please sign in to comment.