diff --git a/Frontend Angular 4/src/app/shared/config.ts b/Frontend Angular 4/src/app/shared/config.ts index b7a3aec0d258082f52877e4b0f1007f5d9013676..9a26f6c32cda95aa8c0bc89eecbbaa9715d18b0c 100755 --- a/Frontend Angular 4/src/app/shared/config.ts +++ b/Frontend Angular 4/src/app/shared/config.ts @@ -25,10 +25,10 @@ // export const GHCI_URL = 'ws://35.198.60.74:9090/endpoint'; // psico -// export const SERVER = 'https://matefun.math.psico.edu.uy'; -// export const GHCI_URL = 'wss://matefun.math.psico.edu.uy/endpoint'; +export const SERVER = 'https://matefun.math.psico.edu.uy'; +export const GHCI_URL = 'wss://matefun.math.psico.edu.uy/endpoint'; //diego docker -export const SERVER = 'http://localhost:8080'; -export const GHCI_URL = 'ws://localhost:8080/endpoint'; \ No newline at end of file +// export const SERVER = 'http://localhost:8080'; +//export const GHCI_URL = 'ws://localhost:8080/endpoint'; \ No newline at end of file diff --git a/Frontend Angular 4/src/app/shared/services/ghci.service.ts b/Frontend Angular 4/src/app/shared/services/ghci.service.ts index 438a243f64d29acf72ee806ec7648d859a0b68d8..d641e6d34dc4610a3ec47b1f634923d14f06e7e9 100755 --- a/Frontend Angular 4/src/app/shared/services/ghci.service.ts +++ b/Frontend Angular 4/src/app/shared/services/ghci.service.ts @@ -27,6 +27,7 @@ export class GHCIService { private waitingForWarning : boolean = false; private waitingForWarning2 : boolean = false; private warningText :string = ""; + private errorText :string = ""; private lastError : number = -1; private lastWarning :number = -1; translateService: any; @@ -135,12 +136,17 @@ export class GHCIService { var line = -1; if(this.waitingForError){ var line = this.lastError; + var columna = this.errorText.split(`${this.translateService.get('i18n.codemirror.command.column').value}:`)[1].split("}")[0]; + var ErrorTextToShow = JSON.parse(text).resultado.split("OUT")[1].trim(); + + var ErrorFinalText = `${this.translateService.get('i18n.codemirror.command.inColumn').value}` + columna + ": " + ErrorTextToShow; + if(this.codemirrorRef!==null){ var makeMarker = function() { var marker = document.createElement("div"); marker.id = "error_" + line.toString(); marker.style.width = "15px"; - marker.title = JSON.parse(text).resultado.split("OUT")[1].trim(); + marker.title = ErrorFinalText; marker.style.height = "15px"; marker.style.marginLeft = "-5px"; marker.style.cursor = "pointer"; @@ -154,11 +160,16 @@ export class GHCIService { } }else { try{ - var lineTxt = `${this.translateService.get('i18n.codemirror.command.inLine').value}`; - - var line = Number(JSON.parse(text).resultado.split(lineTxt)[1].split(",")[0].trim())-1; + var m = JSON.parse(text); + var line = m.resultado + .split(`${this.translateService.get('i18n.codemirror.command.outError').value}:`)[1] + .trim() + .split(`${this.translateService.get('i18n.codemirror.command.line').value}:`)[1] + .split(" ")[1]-1; + this.waitingForError = true; this.lastError = line; + this.errorText = m.resultado.split(`${this.translateService.get('i18n.codemirror.command.outError').value}:`)[1].trim(); }catch(err){ } diff --git a/Frontend Angular 4/src/assets/i18n/en.json b/Frontend Angular 4/src/assets/i18n/en.json index e3a3cdcb18e05100af31ce4228ca5508cfd5693b..fcc7ce5710c839af62ac89a7616903ca29a43c53 100644 --- a/Frontend Angular 4/src/assets/i18n/en.json +++ b/Frontend Angular 4/src/assets/i18n/en.json @@ -65,7 +65,8 @@ "column" : "column", "inColumn" : "In column", "line" : "line", - "outWarning" : "OUTWarning" + "outWarning" : "OUTWarning", + "outError" : "OUTError" } }, "msg" : { diff --git a/Frontend Angular 4/src/assets/i18n/es.json b/Frontend Angular 4/src/assets/i18n/es.json index 202cd492cf61211692a15d94e34c1955b4bee06c..95434059a9d33c4780c3422bdf69f9b5f3d4c3d1 100644 --- a/Frontend Angular 4/src/assets/i18n/es.json +++ b/Frontend Angular 4/src/assets/i18n/es.json @@ -62,16 +62,17 @@ "codemirror" : { "command" : { "inLine" : "en linea", - "column" : "column", + "column" : "columna", "inColumn" : "En columna", - "line" : "line", - "outWarning" : "OUTWarning" + "line" : "linea", + "outWarning" : "OUTAdvertencia", + "outError" : "OUTError" } }, "msg" : { "404" : { "title": "Página no encontrada", - "descrp": "Lo sentimos, esta páina no existe.", + "descrp": "Lo sentimos, esta página no existe.", "return": "Volver" }, "codemirror" : { diff --git a/Servidor JEE/WebContent/index.html b/Servidor JEE/WebContent/index.html index b7a2336052ea3fd6dabbc3eef7443a41045fc4a0..14f3892dc7d4bb375a6ff0091c66ebd42dbf9aaa 100644 --- a/Servidor JEE/WebContent/index.html +++ b/Servidor JEE/WebContent/index.html @@ -1,4 +1,4 @@ Proyecto MateFun
\ No newline at end of file + -->
\ No newline at end of file diff --git a/Servidor JEE/src/main/java/edu/proygrado/binarios/MateFun b/Servidor JEE/src/main/java/edu/proygrado/binarios/MateFun index d23aade4ccb9945ab8cd7e53bbb80a855bbf3d8d..14c187713daf5cbbdda8c7ac68012e48959f99af 100755 Binary files a/Servidor JEE/src/main/java/edu/proygrado/binarios/MateFun and b/Servidor JEE/src/main/java/edu/proygrado/binarios/MateFun differ diff --git a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/en.po b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/en.po index 99e5da2630a1b87003ca6b90e9315587dc98cd10..179cfa2e72b914b3c39b46403d2ab4450b8b8927 100644 --- a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/en.po +++ b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/en.po @@ -7,17 +7,17 @@ msgstr "" "PO-Revision-Date: 2009-01-13 06:05-0800\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" +"Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: en\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/MateFun/ReservedNames.hs:20 msgid "3D Figure" msgstr "3D Figure" -#: src/MateFun.hs:359 +#: src/MateFun.hs:360 msgid "3D Figures" msgstr "3D Figures" @@ -73,7 +73,7 @@ msgstr "Circular inclusion" msgid "Color" msgstr "Color" -#: src/MateFun.hs:360 +#: src/MateFun.hs:361 msgid "Colors" msgstr "Colors" @@ -121,9 +121,9 @@ msgstr "Enables function usage warnings" msgid "Enables verbose mode" msgstr "Enables verbose mode" -#: src/MateFun.hs:322 -msgid "Error in line" -msgstr "Error in line" +#: src/MateFun/TypeCheck.hs:51 +msgid "Error" +msgstr "Error" #: src/MateFun.hs:126 msgid "Error reading command to interpretate." @@ -145,7 +145,7 @@ msgstr "FILE" msgid "Figure" msgstr "Figure" -#: src/MateFun.hs:358 +#: src/MateFun.hs:359 msgid "Figures" msgstr "Figures" @@ -157,7 +157,7 @@ msgstr "Found" msgid "Function" msgstr "Function" -#: src/MateFun.hs:373 +#: src/MateFun.hs:374 msgid "Graph" msgstr "Graph" @@ -169,11 +169,16 @@ msgstr "Gray" msgid "Green" msgstr "Green" -#: src/MateFun.hs:356 +#: src/MateFun.hs:357 msgid "Integer" msgstr "Integer" -#: src/MateFun.hs:340 +#: src/MateFun/TypeCheck.hs:88 +#, fuzzy +msgid "Interpreter" +msgstr "Interpreter Commands:" + +#: src/MateFun.hs:341 msgid "Interpreter Commands:" msgstr "Interpreter Commands:" @@ -217,7 +222,7 @@ msgstr "PATH" msgid "Please report this error with code" msgstr "Please report this error with code" -#: src/MateFun.hs:357 +#: src/MateFun.hs:358 msgid "Real" msgstr "Real" @@ -265,6 +270,10 @@ msgstr "Value" msgid "Variable" msgstr "Variable" +#: src/MateFun/Warning.hs:23 +msgid "Warning" +msgstr "Warning" + #: src/MateFun.hs:57 msgid "Web Mode" msgstr "Web Mode" @@ -313,7 +322,7 @@ msgstr "color" msgid "color3D" msgstr "color3D" -#: src/MateFun.hs:322 +#: src/MateFun/TypeCheck.hs:90 msgid "column" msgstr "column" @@ -357,7 +366,7 @@ msgstr "exit" msgid "expression" msgstr "expression" -#: src/MateFun.hs:175 src/MateFun/Parser.hs:217 +#: src/MateFun.hs:175 src/MateFun/Parser.hs:217 src/MateFun/TypeCheck.hs:89 msgid "file" msgstr "file" @@ -413,7 +422,7 @@ msgstr "join" msgid "join3D" msgstr "join3D" -#: src/MateFun/ReservedNames.hs:34 +#: src/MateFun/ReservedNames.hs:34 src/MateFun/TypeCheck.hs:89 msgid "line" msgstr "line" @@ -465,7 +474,7 @@ msgstr "plot a function R -> R" msgid "poli" msgstr "poli" -#: src/MateFun.hs:360 +#: src/MateFun.hs:361 msgid "predefined" msgstr "predefined" @@ -572,3 +581,6 @@ msgstr "vars" #: src/MateFun/ReservedNames.hs:96 msgid "was defined more than once. Defined in:" msgstr "was defined more than once. Defined in:" + +#~ msgid "Error in line" +#~ msgstr "Error in line" diff --git a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/en/LC_MESSAGES/mate-fun.mo b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/en/LC_MESSAGES/mate-fun.mo index 664d4df5b36fcbb0529c2aff650537baa30035d4..374ce0d9523cabcb737cffbd87cabc6ab056f138 100644 Binary files a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/en/LC_MESSAGES/mate-fun.mo and b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/en/LC_MESSAGES/mate-fun.mo differ diff --git a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/es.po b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/es.po index 602730c95a0ca95dd780c15c482df972f431aec7..4368b8f7cf44d1d97d1ea80761d82a27ebcba272 100644 --- a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/es.po +++ b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/es.po @@ -7,17 +7,17 @@ msgstr "" "PO-Revision-Date: 2009-01-13 06:05-0800\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/MateFun/ReservedNames.hs:20 msgid "3D Figure" msgstr "Figura 3D" -#: src/MateFun.hs:359 +#: src/MateFun.hs:360 msgid "3D Figures" msgstr "Figuras 3D" @@ -73,7 +73,7 @@ msgstr "Inclusion Circular" msgid "Color" msgstr "Color" -#: src/MateFun.hs:360 +#: src/MateFun.hs:361 msgid "Colors" msgstr "Colors" @@ -111,8 +111,7 @@ msgstr "Habilita las advertencias de uso de funciones aritmeticas" #: src/MateFun.hs:59 msgid "Enables domain intersection check on functions to load" -msgstr "" -"Habilita chequeo de interseccion de dominios en las funciones a ser cargadas" +msgstr "Habilita chequeo de interseccion de dominios en las funciones a ser cargadas" #: src/MateFun.hs:53 msgid "Enables function usage warnings" @@ -122,9 +121,9 @@ msgstr "Habilita las advertencias de uso de funciones" msgid "Enables verbose mode" msgstr "Habilita modo verboso" -#: src/MateFun.hs:322 -msgid "Error in line" -msgstr "Error en linea" +#: src/MateFun/TypeCheck.hs:51 +msgid "Error" +msgstr "Error" #: src/MateFun.hs:126 msgid "Error reading command to interpretate." @@ -146,7 +145,7 @@ msgstr "ARCHIVO" msgid "Figure" msgstr "Figura" -#: src/MateFun.hs:358 +#: src/MateFun.hs:359 msgid "Figures" msgstr "Figuras" @@ -158,7 +157,7 @@ msgstr "Se encontro" msgid "Function" msgstr "Funcion" -#: src/MateFun.hs:373 +#: src/MateFun.hs:374 msgid "Graph" msgstr "Grafica" @@ -170,11 +169,16 @@ msgstr "Gris" msgid "Green" msgstr "Verde" -#: src/MateFun.hs:356 +#: src/MateFun.hs:357 msgid "Integer" msgstr "Enteros" -#: src/MateFun.hs:340 +#: src/MateFun/TypeCheck.hs:88 +#, fuzzy +msgid "Interpreter" +msgstr "Comandos del Interprete" + +#: src/MateFun.hs:341 msgid "Interpreter Commands:" msgstr "Comandos del Interprete" @@ -218,7 +222,7 @@ msgstr "RUTA" msgid "Please report this error with code" msgstr "Por favor avisar de este error con codigo" -#: src/MateFun.hs:357 +#: src/MateFun.hs:358 msgid "Real" msgstr "Reales" @@ -266,6 +270,10 @@ msgstr "Valor" msgid "Variable" msgstr "Variable" +#: src/MateFun/Warning.hs:23 +msgid "Warning" +msgstr "Advertencia" + #: src/MateFun.hs:57 msgid "Web Mode" msgstr "Modo Web" @@ -314,7 +322,7 @@ msgstr "color" msgid "color3D" msgstr "color3D" -#: src/MateFun.hs:322 +#: src/MateFun/TypeCheck.hs:90 msgid "column" msgstr "columna" @@ -358,7 +366,7 @@ msgstr "salir" msgid "expression" msgstr "expresion" -#: src/MateFun.hs:175 src/MateFun/Parser.hs:217 +#: src/MateFun.hs:175 src/MateFun/Parser.hs:217 src/MateFun/TypeCheck.hs:89 msgid "file" msgstr "archivo" @@ -414,7 +422,7 @@ msgstr "juntar" msgid "join3D" msgstr "juntar3D" -#: src/MateFun/ReservedNames.hs:34 +#: src/MateFun/ReservedNames.hs:34 src/MateFun/TypeCheck.hs:89 msgid "line" msgstr "linea" @@ -466,7 +474,7 @@ msgstr "grafica una funcion de R -> R" msgid "poli" msgstr "poli" -#: src/MateFun.hs:360 +#: src/MateFun.hs:361 msgid "predefined" msgstr "predefinidos" @@ -573,3 +581,6 @@ msgstr "vars" #: src/MateFun/ReservedNames.hs:96 msgid "was defined more than once. Defined in:" msgstr "se definio mas de una vez. Definida en" + +#~ msgid "Error in line" +#~ msgstr "Error en linea" diff --git a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/es/LC_MESSAGES/mate-fun.mo b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/es/LC_MESSAGES/mate-fun.mo index d068c54e1ebdf8c8cbd52f5ca76c79296b57e28c..15846ae988b36308ec8988112cc2d82429c6d46b 100644 Binary files a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/es/LC_MESSAGES/mate-fun.mo and b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/es/LC_MESSAGES/mate-fun.mo differ diff --git a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/messages.pot b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/messages.pot index afa31de17411fe705aeed96695e2f655fd5ace47..9bf716de75fb54ebfbfa4c9f38af34d641d73831 100644 --- a/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/messages.pot +++ b/Servidor JEE/src/main/java/edu/proygrado/binarios/internationalization/messages.pot @@ -17,7 +17,7 @@ msgstr "" msgid "3D Figure" msgstr "" -#: src/MateFun.hs:359 +#: src/MateFun.hs:360 msgid "3D Figures" msgstr "" @@ -74,7 +74,7 @@ msgstr "" msgid "Color" msgstr "" -#: src/MateFun.hs:360 +#: src/MateFun.hs:361 msgid "Colors" msgstr "" @@ -122,8 +122,8 @@ msgstr "" msgid "Enables verbose mode" msgstr "" -#: src/MateFun.hs:322 -msgid "Error in line" +#: src/MateFun/TypeCheck.hs:51 +msgid "Error" msgstr "" #: src/MateFun.hs:126 @@ -147,7 +147,7 @@ msgstr "" msgid "Figure" msgstr "" -#: src/MateFun.hs:358 +#: src/MateFun.hs:359 msgid "Figures" msgstr "" @@ -160,7 +160,7 @@ msgstr "" msgid "Function" msgstr "" -#: src/MateFun.hs:373 +#: src/MateFun.hs:374 msgid "Graph" msgstr "" @@ -172,11 +172,15 @@ msgstr "" msgid "Green" msgstr "" -#: src/MateFun.hs:356 +#: src/MateFun.hs:357 msgid "Integer" msgstr "" -#: src/MateFun.hs:340 +#: src/MateFun/TypeCheck.hs:88 +msgid "Interpreter" +msgstr "" + +#: src/MateFun.hs:341 msgid "Interpreter Commands:" msgstr "" @@ -221,7 +225,7 @@ msgstr "" msgid "Please report this error with code" msgstr "" -#: src/MateFun.hs:357 +#: src/MateFun.hs:358 msgid "Real" msgstr "" @@ -269,6 +273,10 @@ msgstr "" msgid "Variable" msgstr "" +#: src/MateFun/Warning.hs:23 +msgid "Warning" +msgstr "" + #: src/MateFun.hs:57 msgid "Web Mode" msgstr "" @@ -317,7 +325,7 @@ msgstr "" msgid "color3D" msgstr "" -#: src/MateFun.hs:322 +#: src/MateFun/TypeCheck.hs:90 msgid "column" msgstr "" @@ -364,6 +372,7 @@ msgstr "" #: src/MateFun.hs:175 #: src/MateFun/Parser.hs:217 +#: src/MateFun/TypeCheck.hs:89 msgid "file" msgstr "" @@ -421,6 +430,7 @@ msgid "join3D" msgstr "" #: src/MateFun/ReservedNames.hs:34 +#: src/MateFun/TypeCheck.hs:89 msgid "line" msgstr "" @@ -472,7 +482,7 @@ msgstr "" msgid "poli" msgstr "" -#: src/MateFun.hs:360 +#: src/MateFun.hs:361 msgid "predefined" msgstr ""