Commit 54eead12 authored by Franco Pariani's avatar Franco Pariani
Browse files

Working in spanish

parent bc4a04ac
......@@ -191,12 +191,18 @@ var mac = /Mac/.test(navigator.platform);
else {
var title = ownerDocument.createElement("p");
title.className = "function-definition-title";
title.appendChild(ownerDocument.createTextNode("Function typing \n"));
if (completion.options.mode.name == "matefun-EN")
title.appendChild(ownerDocument.createTextNode("Function's typing \n"));
else
title.appendChild(ownerDocument.createTextNode("Tipado de la función \n"));
elt.appendChild(title);
var rexp_name = new RegExp(/(.*\:\:)(.*)/.source, "g");
var m = rexp_name.exec(cur.displayText || getText(cur));
var b_elem = ownerDocument.createElement("b");
b_elem.appendChild(ownerDocument.createTextNode((hintWords.EN_typed_functions().indexOf(m[1] + m[2]) == -1 ? (completion.filename + '.') : "") + m[1]));
if (completion.options.mode.name == "matefun-EN")
b_elem.appendChild(ownerDocument.createTextNode((hintWords.EN_typed_functions().indexOf(m[1] + m[2]) == -1 ? (completion.filename + '.') : "") + m[1]));
else
b_elem.appendChild(ownerDocument.createTextNode((hintWords.ES_typed_functions().indexOf(m[1] + m[2]) == -1 ? (completion.filename + '.') : "") + m[1]));
elt.appendChild(b_elem);
elt.appendChild(ownerDocument.createTextNode(m[2]));
}
......@@ -463,7 +469,10 @@ var mac = /Mac/.test(navigator.platform);
}
// add default functions
var default_functions = hintWords.EN_typed_functions();
if (options.mode.name == "matefun-EN")
var default_functions = hintWords.EN_typed_functions();
else
var default_functions = hintWords.ES_typed_functions();
for (var i = 0; i < default_functions.length; i++) {
re_funs = new RegExp(COMPLETE_FUNS.source, "g");
var m = re_funs.exec(default_functions[i]);
......
......@@ -29,6 +29,18 @@ let ES_default_sets = [
'R', 'Color', 'Fig', 'A', 'Fig3D'
]
let ES_typed_functions = [
'- :: R -> R', 'red :: R -> R', 'sen :: R -> R', 'cos :: R -> R', 'raizcuad :: R -> R',
'rgb :: (R X R X R) -> Color', 'rect :: (R X R) -> Fig', 'circ :: R -> Fig', 'linea :: ((R X R) X (R X R)) -> Fig',
'poli :: (R X R)* -> Fig', 'juntar :: (Fig X Fig) -> Fig', 'color :: (Fig X Color) -> Fig',
'mover :: (Fig X (R X R)) -> Fig', 'rotar :: (Fig X R) -> Fig', 'escalar :: (Fig X R) -> Fig',
'aFig :: A -> Fig', 'linea3D :: ((R X R X R) X (R X R X R)) -> Fig3D', 'esfera :: R -> Fig3D', 'cilindro :: (R X R X R) -> Fig3D',
'cubo :: (R X R X R) -> Fig3D', 'anillo :: (R X R X R) -> Fig3D', 'juntar3D :: (Fig3D X Fig3D) -> Fig3D',
'color3D :: (Fig3D X Color) -> Fig3D', 'mover3D :: (Fig3D X (R X R X R)) -> Fig3D',
'rotar3D :: (Fig3D X (R X R X R)) -> Fig3D', 'escalar3D :: (Fig3D X R) -> Fig3D', 'rango :: (R X R X R) -> R*',
'primero :: A* -> A', 'resto :: A* -> A*'
]
module.exports = {
EN_default_sets: function() {
return EN_default_sets;
......@@ -44,5 +56,8 @@ module.exports = {
},
ES_functions: function() {
return ES_functions;
},
ES_typed_functions: function() {
return ES_typed_functions;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment