Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions public/grapheditor/js/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ Actions.prototype.init = function()
}
catch (e)
{
if(getLanguage() == 'pt')
mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message + '. Prezado usuário, o formato da ontologia a ser importada não é compatível com o Onto4AllEditor. Essa versão do editor aceita importações nos seguintes formatos: OWL/XML, .XML');
else
mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message + '. Dear user, the format of the ontology to be imported is not compatible with Onto4AllEditor. This version of the editor accepts imports in the following formats: OWL / XML, .XML');
mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message + '. ' + getTranslation("Dear user, the format of the ontology to be imported is not compatible with Onto4AllEditor. This version of the editor accepts imports in the following formats: OWL / XML, .XML"));
console.log(e);
}
}));
Expand Down
28 changes: 7 additions & 21 deletions public/grapheditor/js/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ var EditDataDialog = function(ui, cell)

let span = document.createElement('span');
span.classList.add('help-block');
span.textContent = getLanguage() == 'en' ? '(The property name must be only numbers and letters)' : '(O nome da propriedade pode conter apenas letras e números)';
span.textContent = getTranslation('(The property name must be only numbers and letters)');

dialog.appendChild(dialogBottom);
dialogBottom.appendChild(span);
Expand Down Expand Up @@ -1564,10 +1564,7 @@ var EditDataDialog = function(ui, cell)
* @param textArea
*/
function addHelpText(textArea) {
if(getLanguage() === 'en')
textArea.insertAdjacentHTML('afterend','<p id="help-text"><i id="help-text-icon" class="fa fa-fw fa-info-circle"></i> None axiom to check! </p>');
else
textArea.insertAdjacentHTML('afterend','<p id="help-text"><i id="help-text-icon" class="fa fa-fw fa-info-circle"></i> Nenhum axioma para checar </p>');
textArea.insertAdjacentHTML('afterend','<p id="help-text"><i id="help-text-icon" class="fa fa-fw fa-info-circle"></i> ' + getTranslate("Nenhum axioma para checar") + ' </p>');

}

Expand All @@ -1591,10 +1588,7 @@ var EditDataDialog = function(ui, cell)
function addKeyupEvents(textArea) {
textArea.addEventListener('keyup', function () {
document.getElementById('help-text-icon').className = "fa fa-fw fa-clock-o";
if(getLanguage() === 'en')
document.getElementById('help-text').childNodes[1].nodeValue = 'Checking the axioms, please wait...';
else
document.getElementById('help-text').childNodes[1].nodeValue = 'Checando os axiomas, aguarde um momento...';
document.getElementById('help-text').childNodes[1].nodeValue = getTranslation('Checking the axioms, please wait...');
});
// Call the Class Expression Edior / Axiom Editor 2 seconds
// after the user stops typing
Expand Down Expand Up @@ -1665,7 +1659,7 @@ var EditDataDialog = function(ui, cell)
} else {
options = classes.filter(e => e.id !== cell.id && e.getAttribute('label') !== cell.getAttribute('label'));
// removes the class Thing from the options
options = options.filter(e => getLanguage() == 'en' ? e.getAttribute('label').toUpperCase() !== 'THING' : e.getAttribute('label').toUpperCase() !== 'COISA');
options = options.filter(e => e.getAttribute('label').toUpperCase() !== getTranslation('THING'));
}

// remove duplicated options
Expand Down Expand Up @@ -1696,20 +1690,12 @@ var EditDataDialog = function(ui, cell)
let placeholder;
if(name === 'inverseOf')
{
if(getLanguage() == 'pt')
placeholder = 'Selecione uma relação';
else
placeholder = 'Select one relation';
placeholder = getTranslation('Select one relation');
}
else if (name === 'equivalentProperty')
if(getLanguage() == 'pt')
placeholder = 'Selecione uma ou mais relações';
else
placeholder = 'Select one or more relations';
else if(getLanguage() == 'pt')
placeholder = 'Selecione uma ou mais classes';
placeholder = getTranslation('Select one or more relations');
else
placeholder = 'Select one or more classes';
placeholder = getTranslation('Select one or more classes');


// select the options according to the property value
Expand Down
122 changes: 61 additions & 61 deletions public/grapheditor/js/SidebarO4A.js

Large diffs are not rendered by default.

13 changes: 3 additions & 10 deletions public/js/Cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,7 @@ function createSelectOptions(cell, propertyName) {
e.getAttribute("label") !== cell.getAttribute("label")
);
// removes the class Thing from the options
options = options.filter((e) =>
getLanguage() == "en"
? e.getAttribute("label").toUpperCase() !== "THING"
: e.getAttribute("label").toUpperCase() !== "COISA"
options = options.filter((e) => getTranslation("THING")
);
}

Expand Down Expand Up @@ -383,12 +380,8 @@ const instanceInputs = {
let constraintInput = classInputs.Constraint;
constraintInput.addEventListener("keyup", function () {
document.getElementById("help-text-icon").className = "fa fa-fw fa-clock-o";
if (getLanguage() === "en")
document.getElementById("help-text").childNodes[1].nodeValue =
"Checking the axioms, please wait...";
else
document.getElementById("help-text").childNodes[1].nodeValue =
"Checando os axiomas, aguarde um momento...";
document.getElementById("help-text").childNodes[1].nodeValue =
getTranslation("Checking the axioms, please wait...");
});
// Call the Class Expression Edior / Axiom Editor 2 seconds
// after the user stops typing
Expand Down
15 changes: 3 additions & 12 deletions public/js/ClassExpressionEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,17 @@ function changeTooltipText(axiomIsValid) {
let language = getLanguage();
switch (axiomIsValid) {
case true:
if (language === 'en')
tooltipText.childNodes[1].nodeValue = 'The axioms are valid!'; // get only the text node, not the other inner HTML tags
else
tooltipText.childNodes[1].nodeValue = 'Os axiomas são válidos!';
tooltipText.childNodes[1].nodeValue = getTranslation('The axioms are valid!'); // get only the text node, not the other inner HTML tags
tooltipText.style.color = 'green';
icon.className = "fa fa-fw fa-check";
break;
case false:
if (language === 'en')
tooltipText.childNodes[1].nodeValue = 'The axioms are not valid!';
else
tooltipText.childNodes[1].nodeValue = 'Os axioma não são válidos!';
tooltipText.childNodes[1].nodeValue = getTranslation('The axioms are not valid!');
tooltipText.style.color = 'red';
icon.className = "fa fa-fw fa-close";
break;
case 'empty':
if (language === 'en')
tooltipText.childNodes[1].nodeValue = 'None axiom to check!';
else
tooltipText.childNodes[1].nodeValue = 'Nenhum axioma para checar!';
tooltipText.childNodes[1].nodeValue = getTranslation('None axiom to check!');
tooltipText.style.color = 'black';
icon.className = "fa fa-fw fa-info-circle";
break;
Expand Down
Loading