Skip to content

Commit

Permalink
Merge e0f9baf into 7dd879f
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Apr 23, 2019
2 parents 7dd879f + e0f9baf commit be50425
Show file tree
Hide file tree
Showing 61 changed files with 352 additions and 343 deletions.
2 changes: 1 addition & 1 deletion src/checkforupdatesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void CheckForUpdatesEngine::check()
} else {
mStatus = tr("The version information is mal-formatted.")
+"<br/>"
+tr("Please <a href=\"http://opencor.ws/user/contactUs.html\">contact us</a> about this error.");
+tr(R"(Please <a href="http://opencor.ws/user/contactUs.html">contact us</a> about this error.)");
}
} else {
mStatus = formatMessage(errorMessage, false, true);
Expand Down
2 changes: 1 addition & 1 deletion src/misc/cliutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ QString applicationDescription(bool pGuiMode)
{
// Return the application description

QString res = QObject::tr("%1 is a cross-platform modelling environment, which can be used to organise, edit, simulate and analyse <a href=\"http://www.cellml.org/\">CellML</a> files.").arg("<a href=\""+QString(HomePageUrl)+"\">"+qAppName()+"</a>");
QString res = QObject::tr(R"(%1 is a cross-platform modelling environment, which can be used to organise, edit, simulate and analyse <a href="http://www.cellml.org/">CellML</a> files.)").arg(R"(<a href=")"+QString(HomePageUrl)+R"(">)"+qAppName()+"</a>");

return pGuiMode?res:plainString(res);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,58 +207,58 @@ void CellmlAnnotationViewEditingWidget::updateWebViewerWithQualifierDetails(WebV

if (pQualifier == ModelIs) {
shortDescription = tr("Identity");
longDescription = tr("The modelling object represented by the model element is identical with the subject of the referenced resource (\"Modelling Object B\"). For instance, this qualifier might be used to link an encoded model to a database of models.");
longDescription = tr(R"(The modelling object represented by the model element is identical with the subject of the referenced resource ("Modelling Object B"). For instance, this qualifier might be used to link an encoded model to a database of models.)");
} else if (pQualifier == ModelIsDerivedFrom) {
shortDescription = tr("Origin");
longDescription = tr("The modelling object represented by the model element is derived from the modelling object represented by the referenced resource (\"Modelling Object B\"). This relation may be used, for instance, to express a refinement or adaptation in usage for a previously described modelling component.");
longDescription = tr(R"(The modelling object represented by the model element is derived from the modelling object represented by the referenced resource ("Modelling Object B"). This relation may be used, for instance, to express a refinement or adaptation in usage for a previously described modelling component.)");
} else if (pQualifier == ModelIsDescribedBy) {
shortDescription = tr("Description");
longDescription = tr("The modelling object represented by the model element is described by the subject of the referenced resource (\"Modelling Object B\"). This relation might be used to link a model or a kinetic law to the literature that describes it.");
longDescription = tr(R"(The modelling object represented by the model element is described by the subject of the referenced resource ("Modelling Object B"). This relation might be used to link a model or a kinetic law to the literature that describes it.)");
} else if (pQualifier == ModelIsInstanceOf) {
shortDescription = tr("Class");
longDescription = tr("The modelling object represented by the model element is an instance of the subject of the referenced resource (\"Modelling Object B\"). For instance, this qualifier might be used to link a specific model with its generic form.");
longDescription = tr(R"(The modelling object represented by the model element is an instance of the subject of the referenced resource ("Modelling Object B"). For instance, this qualifier might be used to link a specific model with its generic form.)");
} else if (pQualifier == ModelHasInstance) {
shortDescription = tr("Instance");
longDescription = tr("The modelling object represented by the model element has for instance (is a class of) the subject of the referenced resource (\"Modelling Object B\"). For instance, this qualifier might be used to link a generic model with its specific forms.");
longDescription = tr(R"(The modelling object represented by the model element has for instance (is a class of) the subject of the referenced resource ("Modelling Object B"). For instance, this qualifier might be used to link a generic model with its specific forms.)");
} else if (pQualifier == BioEncodes) {
shortDescription = tr("Encodement");
longDescription = tr("The biological entity represented by the model element encodes, directly or transitively, the subject of the referenced resource (\"Biological Entity B\"). This relation may be used to express, for example, that a specific DNA sequence encodes a particular protein.");
longDescription = tr(R"(The biological entity represented by the model element encodes, directly or transitively, the subject of the referenced resource ("Biological Entity B"). This relation may be used to express, for example, that a specific DNA sequence encodes a particular protein.)");
} else if (pQualifier == BioHasPart) {
shortDescription = tr("Part");
longDescription = tr("The biological entity represented by the model element includes the subject of the referenced resource (\"Biological Entity B\"), either physically or logically. This relation might be used to link a complex to the description of its components.");
longDescription = tr(R"(The biological entity represented by the model element includes the subject of the referenced resource ("Biological Entity B"), either physically or logically. This relation might be used to link a complex to the description of its components.)");
} else if (pQualifier == BioHasProperty) {
shortDescription = tr("Property");
longDescription = tr("The subject of the referenced resource (\"Biological Entity B\") is a property of the biological entity represented by the model element. This relation might be used when a biological entity exhibits a certain enzymatic activity or exerts a specific function.");
longDescription = tr(R"(The subject of the referenced resource ("Biological Entity B") is a property of the biological entity represented by the model element. This relation might be used when a biological entity exhibits a certain enzymatic activity or exerts a specific function.)");
} else if (pQualifier == BioHasVersion) {
shortDescription = tr("Version");
longDescription = tr("The subject of the referenced resource (\"Biological Entity B\") is a version or an instance of the biological entity represented by the model element. This relation may be used to represent an isoform or modified form of a biological entity.");
longDescription = tr(R"(The subject of the referenced resource ("Biological Entity B") is a version or an instance of the biological entity represented by the model element. This relation may be used to represent an isoform or modified form of a biological entity.)");
} else if (pQualifier == BioIs) {
shortDescription = tr("Indentity");
longDescription = tr("The biological entity represented by the model element has identity with the subject of the referenced resource (\"Biological Entity B\"). This relation might be used to link a reaction to its exact counterpart in a database, for instance.");
longDescription = tr(R"(The biological entity represented by the model element has identity with the subject of the referenced resource ("Biological Entity B"). This relation might be used to link a reaction to its exact counterpart in a database, for instance.)");
} else if (pQualifier == BioIsDescribedBy) {
shortDescription = tr("Description");
longDescription = tr("The biological entity represented by the model element is described by the subject of the referenced resource (\"Biological Entity B\"). This relation should be used, for instance, to link a species or a parameter to the literature that describes the concentration of that species or the value of that parameter.");
longDescription = tr(R"(The biological entity represented by the model element is described by the subject of the referenced resource ("Biological Entity B"). This relation should be used, for instance, to link a species or a parameter to the literature that describes the concentration of that species or the value of that parameter.)");
} else if (pQualifier == BioIsEncodedBy) {
shortDescription = tr("Encoder");
longDescription = tr("The biological entity represented by the model element is encoded, directly or transitively, by the subject of the referenced resource (\"Biological Entity B\"). This relation may be used to express, for example, that a protein is encoded by a specific DNA sequence.");
longDescription = tr(R"(The biological entity represented by the model element is encoded, directly or transitively, by the subject of the referenced resource ("Biological Entity B"). This relation may be used to express, for example, that a protein is encoded by a specific DNA sequence.)");
} else if (pQualifier == BioIsHomologTo) {
shortDescription = tr("Homolog");
longDescription = tr("The biological entity represented by the model element is homologous to the subject of the referenced resource (\"Biological Entity B\"). This relation can be used to represent biological entities that share a common ancestor.");
longDescription = tr(R"(The biological entity represented by the model element is homologous to the subject of the referenced resource ("Biological Entity B"). This relation can be used to represent biological entities that share a common ancestor.)");
} else if (pQualifier == BioIsPartOf) {
shortDescription = tr("Parthood");
longDescription = tr("The biological entity represented by the model element is a physical or logical part of the subject of the referenced resource (\"Biological Entity B\"). This relation may be used to link a model component to a description of the complex in which it is a part.");
longDescription = tr(R"(The biological entity represented by the model element is a physical or logical part of the subject of the referenced resource ("Biological Entity B"). This relation may be used to link a model component to a description of the complex in which it is a part.)");
} else if (pQualifier == BioIsPropertyOf) {
shortDescription = tr("Property bearer");
longDescription = tr("The biological entity represented by the model element is a property of the referenced resource (\"Biological Entity B\").");
longDescription = tr(R"(The biological entity represented by the model element is a property of the referenced resource ("Biological Entity B").)");
} else if (pQualifier == BioIsVersionOf) {
shortDescription = tr("Hypernym");
longDescription = tr("The biological entity represented by the model element is a version or an instance of the subject of the referenced resource (\"Biological Entity B\"). This relation may be used to represent, for example, the 'superclass' or 'parent' form of a particular biological entity.");
longDescription = tr(R"(The biological entity represented by the model element is a version or an instance of the subject of the referenced resource ("Biological Entity B"). This relation may be used to represent, for example, the 'superclass' or 'parent' form of a particular biological entity.)");
} else if (pQualifier == BioOccursIn) {
shortDescription = tr("Container");
longDescription = tr("The biological entity represented by the model element is physically limited to a location, which is the subject of the referenced resource (\"Biological Entity B\"). This relation may be used to ascribe a compartmental location, within which a reaction takes place.");
longDescription = tr(R"(The biological entity represented by the model element is physically limited to a location, which is the subject of the referenced resource ("Biological Entity B"). This relation may be used to ascribe a compartmental location, within which a reaction takes place.)");
} else if (pQualifier == BioHasTaxon) {
shortDescription = tr("Taxon");
longDescription = tr("The biological entity represented by the model element is taxonomically restricted, where the restriction is the subject of the referenced resource (\"Biological Entity B\"). This relation may be used to ascribe a species restriction to a biochemical reaction.");
longDescription = tr(R"(The biological entity represented by the model element is taxonomically restricted, where the restriction is the subject of the referenced resource ("Biological Entity B"). This relation may be used to ascribe a species restriction to a biochemical reaction.)");
} else {
qualifierSvg = QString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void CellmlAnnotationViewMetadataDetailsWidget::retranslateUnsupportedMetadataMe

mUnsupportedMetadataMessage->setMessage(tr("The <strong>%1</strong> view does not support this type of metadata...").arg(mPlugin->viewName()),
Core::FileManager::instance()->isReadableAndWritable(mCellmlFile->fileName())?
tr("Click <a href=\"here\">here</a> if you want to remove the existing metadata."):
tr(R"(Click <a href="here">here</a> if you want to remove the existing metadata.)"):
QString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ void CellmlAnnotationViewMetadataEditDetailsWidget::retranslateUi()
// Retranslate our output headers

updateOutputHeaders();

// Retranslate the description for the current qualifier, if needed

if (mLookUpQualifierButton->isChecked()) {
genericLookUp(mQualifierValue->currentText(), InformationType::Qualifier);
}
}

//==============================================================================
Expand Down Expand Up @@ -584,23 +590,23 @@ void CellmlAnnotationViewMetadataEditDetailsWidget::updateItemsGui(const CellmlA
mItemsMapping.insert(itemInformationSha1, item);
mEnabledItems.insert(itemInformationSha1, true);

ontologicalTerms += "<tr id=\"item_"+itemInformationSha1+"\">\n"
" <td>\n"
" "+item.name()+"\n"
" </td>\n"
" <td id=\"resource_"+itemInformationSha1+"\">\n"
" <a href=\""+itemInformation+"\">"+item.resource()+"</a>\n"
" </td>\n"
" <td id=\"id_"+itemInformationSha1+"\">\n"
" <a href=\""+itemInformation+"\">"+item.id()+"</a>\n"
" </td>\n"
" <td id=\"button_"+itemInformationSha1+"\">\n"
" <a class=\"noHover\" href=\""+itemInformationSha1+"\"><img class=\"button\"></a>\n"
" </td>\n"
" <td id=\"disabledButton_"+itemInformationSha1+"\" style=\"display: none;\">\n"
" <img class=\"disabledButton\">\n"
" </td>\n"
"</tr>\n";
ontologicalTerms += R"(<tr id="item_)"+itemInformationSha1+R"(">)""\n"
" <td>\n"
" "+item.name()+"\n"
" </td>\n"
R"( <td id="resource_)"+itemInformationSha1+R"(">)""\n"
R"( <a href=")"+itemInformation+R"(">)"+item.resource()+"</a>\n"
" </td>\n"
R"( <td id="id_)"+itemInformationSha1+R"(">)""\n"
R"( <a href=")"+itemInformation+R"(">)"+item.id()+"</a>\n"
" </td>\n"
R"( <td id="button_)"+itemInformationSha1+R"(">)""\n"
R"( <a class="noHover" href=")"+itemInformationSha1+R"("><img class="button"></a>)""\n"
" </td>\n"
R"( <td id="disabledButton_)"+itemInformationSha1+R"(" style="display: none;">)""\n"
R"( <img class="disabledButton">)""\n"
" </td>\n"
"</tr>\n";
}

mOutputOntologicalTerms->webView()->page()->mainFrame()->documentElement().findFirst("tbody").appendInside(ontologicalTerms);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,23 +289,23 @@ void CellmlAnnotationViewMetadataNormalViewDetailsWidget::addRdfTriple(CellMLSup
QString rdfTripleInformation = qualifier+"|"+pRdfTriple->resource()+"|"+pRdfTriple->id();
QString rdfTripleInformationSha1 = Core::sha1(rdfTripleInformation);

QString ontologicalTerm = "<tr id=\"item_"+rdfTripleInformationSha1+"\">\n"
" <td id=\"qualifier_"+rdfTripleInformationSha1+"\">\n"
" <a href=\""+rdfTripleInformation+"\">"+qualifier+"</a>\n"
" </td>\n"
" <td id=\"resource_"+rdfTripleInformationSha1+"\">\n"
" <a href=\""+rdfTripleInformation+"\">"+pRdfTriple->resource()+"</a>\n"
" </td>\n"
" <td id=\"id_"+rdfTripleInformationSha1+"\">\n"
" <a href=\""+rdfTripleInformation+"\">"+pRdfTriple->id()+"</a>\n"
" </td>\n"
" <td id=\"button_"+rdfTripleInformationSha1+"\">\n"
" <a class=\"noHover\" href=\""+rdfTripleInformationSha1+"\"><img class=\"button\"></a>\n"
" </td>\n"
" <td id=\"disabledButton_"+rdfTripleInformationSha1+"\" style=\"display: none;\">\n"
" <img class=\"disabledButton\">\n"
" </td>\n"
"</tr>\n";
QString ontologicalTerm = R"(<tr id="item_)"+rdfTripleInformationSha1+R"(">)""\n"
R"( <td id="qualifier_)"+rdfTripleInformationSha1+R"(">)""\n"
R"( <a href=")"+rdfTripleInformation+R"(">)"+qualifier+"</a>\n"
" </td>\n"
R"( <td id="resource_)"+rdfTripleInformationSha1+R"(">)""\n"
R"( <a href=")"+rdfTripleInformation+R"(">)"+pRdfTriple->resource()+"</a>\n"
" </td>\n"
R"( <td id="id_)"+rdfTripleInformationSha1+R"(">)""\n"
R"( <a href=")"+rdfTripleInformation+R"(">)"+pRdfTriple->id()+"</a>\n"
" </td>\n"
R"( <td id="button_)"+rdfTripleInformationSha1+R"(">)""\n"
R"( <a class="noHover" href=")"+rdfTripleInformationSha1+R"("><img class="button"></a>)""\n"
" </td>\n"
R"( <td id="disabledButton_)"+rdfTripleInformationSha1+R"(" style="display: none;">)""\n"
R"( <img class="disabledButton">)""\n"
" </td>\n"
"</tr>\n";

if (mItemsCount == 1) {
mOutputOntologicalTerms->webView()->page()->mainFrame()->documentElement().findFirst("tbody").appendInside(ontologicalTerm);
Expand Down

0 comments on commit be50425

Please sign in to comment.