Traducción al Español - Spanish translation

pull/176/head
Eduardo 2024-03-04 02:35:06 +00:00
parent bd8422b228
commit bc2cb9e25a
101 changed files with 1003 additions and 1003 deletions

View File

@ -47,10 +47,10 @@ boolean OctoPrintClient::validate() {
boolean rtnValue = false;
printerData.error = "";
if (String(myServer) == "") {
printerData.error += "Server address is required; ";
printerData.error += "La dirección del servidor es obligatoria; ";
}
if (myApiKey == "") {
printerData.error += "ApiKey is required; ";
printerData.error += "La ApiKey es obligatoria; ";
}
if (printerData.error == "") {
rtnValue = true;
@ -62,7 +62,7 @@ WiFiClient OctoPrintClient::getSubmitRequest(String apiGetData) {
WiFiClient printClient;
printClient.setTimeout(5000);
Serial.println("Getting Octoprint Data via GET");
Serial.println("Obteniendo datos de Octoprint via GET");
Serial.println(apiGetData);
result = "";
if (printClient.connect(myServer, myPort)) { //starts client connection, checks for connection
@ -76,18 +76,18 @@ WiFiClient OctoPrintClient::getSubmitRequest(String apiGetData) {
printClient.println("User-Agent: ArduinoWiFi/1.1");
printClient.println("Connection: close");
if (printClient.println() == 0) {
Serial.println("Connection to " + String(myServer) + ":" + String(myPort) + " failed.");
Serial.println("Conexión a " + String(myServer) + ":" + String(myPort) + " fallida.");
Serial.println();
resetPrintData();
printerData.error = "Connection to " + String(myServer) + ":" + String(myPort) + " failed.";
printerData.error = "Conexión a " + String(myServer) + ":" + String(myPort) + " fallida.";
return printClient;
}
}
else {
Serial.println("Connection to OctoPrint failed: " + String(myServer) + ":" + String(myPort)); //error message if no client connect
Serial.println("Conexión a OctoPrint fallida: " + String(myServer) + ":" + String(myPort)); //error message if no client connect
Serial.println();
resetPrintData();
printerData.error = "Connection to OctoPrint failed: " + String(myServer) + ":" + String(myPort);
printerData.error = "Conexión a OctoPrint fallida: " + String(myServer) + ":" + String(myPort);
return printClient;
}
@ -95,18 +95,18 @@ WiFiClient OctoPrintClient::getSubmitRequest(String apiGetData) {
char status[32] = {0};
printClient.readBytesUntil('\r', status, sizeof(status));
if (strcmp(status, "HTTP/1.1 200 OK") != 0 && strcmp(status, "HTTP/1.1 409 CONFLICT") != 0) {
Serial.print(F("Unexpected response: "));
Serial.print(F("Respuesta inesperada: "));
Serial.println(status);
printerData.state = "";
printerData.error = "Response: " + String(status);
printerData.error = "Respuesta: " + String(status);
return printClient;
}
// Skip HTTP headers
char endOfHeaders[] = "\r\n\r\n";
if (!printClient.find(endOfHeaders)) {
Serial.println(F("Invalid response"));
printerData.error = "Invalid response from " + String(myServer) + ":" + String(myPort);
Serial.println(F("Respuesta no válida"));
printerData.error = "Respuesta no válida de " + String(myServer) + ":" + String(myPort);
printerData.state = "";
}
@ -117,13 +117,13 @@ WiFiClient OctoPrintClient::getPostRequest(String apiPostData, String apiPostBod
WiFiClient printClient;
printClient.setTimeout(5000);
Serial.println("Getting Octoprint Data via POST");
Serial.println("Obteniendo datos de Octoprint via POST");
Serial.println(apiPostData + " | " + apiPostBody);
result = "";
if (printClient.connect(myServer, myPort)) { //starts client connection, checks for connection
printClient.println(apiPostData);
printClient.println("Host: " + String(myServer) + ":" + String(myPort));
printClient.println("Connection: close");
printClient.println("Conexión: close");
printClient.println("X-Api-Key: " + myApiKey);
if (encodedAuth != "") {
printClient.print("Authorization: ");
@ -136,18 +136,18 @@ WiFiClient OctoPrintClient::getPostRequest(String apiPostData, String apiPostBod
printClient.println();
printClient.println(apiPostBody);
if (printClient.println() == 0) {
Serial.println("Connection to " + String(myServer) + ":" + String(myPort) + " failed.");
Serial.println("Conexión a " + String(myServer) + ":" + String(myPort) + " fallida.");
Serial.println();
resetPrintData();
printerData.error = "Connection to " + String(myServer) + ":" + String(myPort) + " failed.";
printerData.error = "Conexión a " + String(myServer) + ":" + String(myPort) + " fallida.";
return printClient;
}
}
else {
Serial.println("Connection to OctoPrint failed: " + String(myServer) + ":" + String(myPort)); //error message if no client connect
Serial.println("Conexión a OctoPrint fallida: " + String(myServer) + ":" + String(myPort)); //error message if no client connect
Serial.println();
resetPrintData();
printerData.error = "Connection to OctoPrint failed: " + String(myServer) + ":" + String(myPort);
printerData.error = "Conexión a OctoPrint fallida: " + String(myServer) + ":" + String(myPort);
return printClient;
}
@ -155,18 +155,18 @@ WiFiClient OctoPrintClient::getPostRequest(String apiPostData, String apiPostBod
char status[32] = {0};
printClient.readBytesUntil('\r', status, sizeof(status));
if (strcmp(status, "HTTP/1.1 200 OK") != 0 && strcmp(status, "HTTP/1.1 409 CONFLICT") != 0) {
Serial.print(F("Unexpected response: "));
Serial.print(F("Respuesta inesperada: "));
Serial.println(status);
printerData.state = "";
printerData.error = "Response: " + String(status);
printerData.error = "Respuesta: " + String(status);
return printClient;
}
// Skip HTTP headers
char endOfHeaders[] = "\r\n\r\n";
if (!printClient.find(endOfHeaders)) {
Serial.println(F("Invalid response"));
printerData.error = "Invalid response from " + String(myServer) + ":" + String(myPort);
Serial.println(F("Respuesta no válida"));
printerData.error = "Respuesta no válida de " + String(myServer) + ":" + String(myPort);
printerData.state = "";
}
@ -189,8 +189,8 @@ void OctoPrintClient::getPrinterJobResults() {
// Parse JSON object
JsonObject& root = jsonBuffer.parseObject(printClient);
if (!root.success()) {
Serial.println("OctoPrint Data Parsing failed: " + String(myServer) + ":" + String(myPort));
printerData.error = "OctoPrint Data Parsing failed: " + String(myServer) + ":" + String(myPort);
Serial.println("Fallo al parsear los datos de OctoPrint: " + String(myServer) + ":" + String(myPort));
printerData.error = "Fallo al parsear los datos de OctoPrint: " + String(myServer) + ":" + String(myPort);
printerData.state = "";
return;
}
@ -208,9 +208,9 @@ void OctoPrintClient::getPrinterJobResults() {
printerData.state = (const char*)root["state"];
if (isOperational()) {
Serial.println("Status: " + printerData.state);
Serial.println("Estado: " + printerData.state);
} else {
Serial.println("Printer Not Operational");
Serial.println("Impresora no disponible");
}
//**** get the Printer Temps and Stat
@ -245,7 +245,7 @@ void OctoPrintClient::getPrinterJobResults() {
printerData.bedTargetTemp = (const char*)root2["temperature"]["bed"]["target"];
if (isPrinting()) {
Serial.println("Status: " + printerData.state + " " + printerData.fileName + "(" + printerData.progressCompletion + "%)");
Serial.println("Estado: " + printerData.state + " " + printerData.fileName + "(" + printerData.progressCompletion + "%)");
}
}

0
printermonitor/OctoPrintClient.h Normal file → Executable file
View File

View File

@ -37,7 +37,7 @@ void OpenWeatherMapClient::updateWeatherApiKey(String ApiKey) {
void OpenWeatherMapClient::updateLanguage(String language) {
lang = language;
if (lang == "") {
lang = "en";
lang = "es";
}
}
@ -45,7 +45,7 @@ void OpenWeatherMapClient::updateWeather() {
WiFiClient weatherClient;
String apiGetData = "GET /data/2.5/group?id=" + myCityIDs + "&units=" + units + "&cnt=1&APPID=" + myApiKey + "&lang=" + lang + " HTTP/1.1";
Serial.println("Getting Weather Data");
Serial.println("Obteniendo datos de clima");
Serial.println(apiGetData);
result = "";
if (weatherClient.connect(servername, 80)) { //starts client connection, checks for connection
@ -56,14 +56,14 @@ void OpenWeatherMapClient::updateWeather() {
weatherClient.println();
}
else {
Serial.println("connection for weather data failed"); //error message if no client connect
Serial.println("conexión fallida al obtener datos del clima"); //error message if no client connect
Serial.println();
return;
}
while(weatherClient.connected() && !weatherClient.available()) delay(1); //waits for data
Serial.println("Waiting for data");
Serial.println("Esperando por datos");
// Check HTTP status
char status[32] = {0};
@ -78,7 +78,7 @@ void OpenWeatherMapClient::updateWeather() {
// Skip HTTP headers
char endOfHeaders[] = "\r\n\r\n";
if (!weatherClient.find(endOfHeaders)) {
Serial.println(F("Invalid response"));
Serial.println(F("Respuesta no válida"));
return;
}
@ -90,15 +90,15 @@ void OpenWeatherMapClient::updateWeather() {
// Parse JSON object
JsonObject& root = jsonBuffer.parseObject(weatherClient);
if (!root.success()) {
Serial.println(F("Weather Data Parsing failed!"));
weathers[0].error = "Weather Data Parsing failed!";
Serial.println(F("Fallo al parsear los datos del clima!"));
weathers[0].error = "Fallo al parsear los datos del clima!";
return;
}
weatherClient.stop(); //stop client
if (root.measureLength() <= 150) {
Serial.println("Error Does not look like we got the data. Size: " + String(root.measureLength()));
Serial.println("Error No parece que hayamos obtenido los datos. Tamaño: " + String(root.measureLength()));
weathers[0].cached = true;
weathers[0].error = (const char*)root["message"];
Serial.println("Error: " + weathers[0].error);

0
printermonitor/OpenWeatherMapClient.h Normal file → Executable file
View File

View File

@ -48,10 +48,10 @@ boolean RepetierClient::validate() {
boolean rtnValue = false;
printerData.error = "";
if (String(myServer) == "") {
printerData.error += "Server address is required; ";
printerData.error += "La dirección del servidor es obligatoria; ";
}
if (myApiKey == "") {
printerData.error += "ApiKey is required; ";
printerData.error += "La ApiKey es obligatoria; ";
}
if (printerData.error == "") {
rtnValue = true;
@ -63,7 +63,7 @@ WiFiClient RepetierClient::getSubmitRequest(String apiGetData) {
WiFiClient printClient;
printClient.setTimeout(5000);
Serial.println("Getting Repetier Data via GET");
Serial.println("Obteniendo datos del Repetidor via GET");
Serial.println(apiGetData);
result = "";
if (printClient.connect(myServer, myPort)) { //starts client connection, checks for connection
@ -85,10 +85,10 @@ WiFiClient RepetierClient::getSubmitRequest(String apiGetData) {
}
}
else {
Serial.println("Connection to Repetier failed: " + String(myServer) + ":" + String(myPort)); //error message if no client connect
Serial.println("Conexión a OctoPrint fallida: " + String(myServer) + ":" + String(myPort)); //error message if no client connect
Serial.println();
resetPrintData();
printerData.error = "Connection to Repetier failed: " + String(myServer) + ":" + String(myPort);
printerData.error = "Conexión a OctoPrint fallida: " + String(myServer) + ":" + String(myPort);
return printClient;
}
/*
@ -132,7 +132,7 @@ void RepetierClient::getPrinterJobResults() {
JsonArray& root = jsonBuffer.parseArray(printClient);
if (!root.success()) {
printerData.error = "Repetier Data Parsing failed: " + String(myServer) + ":" + String(myPort);
printerData.error = "Fallo al parsear los datos de OctoPrint: " + String(myServer) + ":" + String(myPort);
Serial.println(printerData.error);
printerData.state = "";
return;
@ -186,9 +186,9 @@ void RepetierClient::getPrinterJobResults() {
}
if (isOperational()) {
Serial.println("Status: " + printerData.state);
Serial.println("Estado: " + printerData.state);
} else {
Serial.println("Printer Not Operational");
Serial.println("Impresora no disponible");
}
//**** get the Printer Temps and Stat

0
printermonitor/RepetierClient.h Normal file → Executable file
View File

View File

@ -71,34 +71,34 @@ String PrinterAuthPass = ""; // only used with haproxy or basic auth (only
boolean DISPLAYWEATHER = true; // true = show weather when not printing / false = no weather
String WeatherApiKey = ""; // Your API Key from http://openweathermap.org/
// Default City Location (use http://openweathermap.org/find to find city ID)
int CityIDs[] = { 5304391 }; //Only USE ONE for weather marquee
boolean IS_METRIC = false; // false = Imperial and true = Metric
int CityIDs[] = { 2515270 }; //Only USE ONE for weather marquee
boolean IS_METRIC = true; // false = Imperial and true = Metric
// Languages: ar, bg, ca, cz, de, el, en, fa, fi, fr, gl, hr, hu, it, ja, kr, la, lt, mk, nl, pl, pt, ro, ru, se, sk, sl, es, tr, ua, vi, zh_cn, zh_tw
String WeatherLanguage = "en"; //Default (en) English
String WeatherLanguage = "es"; //Default (en) English
// Webserver
const int WEBSERVER_PORT = 80; // The port you can access this device on over HTTP
const boolean WEBSERVER_ENABLED = true; // Device will provide a web interface via http://[ip]:[port]/
boolean IS_BASIC_AUTH = true; // true = require athentication to change configuration settings / false = no auth
char* www_username = "admin"; // User account for the Web Interface
char* www_password = "password"; // Password for the Web Interface
char www_username[] = "admin"; // User account for the Web Interface
char www_password[] = "password"; // Password for the Web Interface
// Date and Time
float UtcOffset = -7; // Hour offset from GMT for your timezone
boolean IS_24HOUR = false; // 23:00 millitary 24 hour clock
int minutesBetweenDataRefresh = 15;
float UtcOffset = 0; // Hour offset from GMT for your timezone
boolean IS_24HOUR = true; // 23:00 millitary 24 hour clock
int minutesBetweenDataRefresh = 10;
boolean DISPLAYCLOCK = true; // true = Show Clock when not printing / false = turn off display when not printing
// Display Settings
const int I2C_DISPLAY_ADDRESS = 0x3c; // I2C Address of your Display (usually 0x3c or 0x3d)
const int SDA_PIN = D2;
const int SCL_PIN = D5; // original code D5 -- Monitor Easy Board use D1
boolean INVERT_DISPLAY = false; // true = pins at top | false = pins at the bottom
boolean INVERT_DISPLAY = true; // true = pins at top | false = pins at the bottom
//#define DISPLAY_SH1106 // Uncomment this line to use the SH1106 display -- SSD1306 is used by default and is most common
// LED Settings
const int externalLight = LED_BUILTIN; // LED will always flash on bootup or Wifi Errors
boolean USE_FLASH = true; // true = System LED will Flash on Service Calls; false = disabled LED flashing
boolean USE_FLASH = false; // true = System LED will Flash on Service Calls; false = disabled LED flashing
// PSU Control
boolean HAS_PSU = false; // Set to true if https://github.com/kantlivelong/OctoPrint-PSUControl/ in use
@ -111,4 +111,4 @@ String OTA_Password = ""; // Set an OTA password here -- leave blank if you
// End Settings
//******************************
String themeColor = "light-green"; // this can be changed later in the web interface.
String themeColor = "light-blue"; // this can be changed later in the web interface.

0
printermonitor/TimeClient.cpp Normal file → Executable file
View File

0
printermonitor/TimeClient.h Normal file → Executable file
View File

0
printermonitor/WeatherStationFonts.h Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/ArduinoJson.h Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/CHANGELOG.md Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/CMakeLists.txt Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/CONTRIBUTING.md Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/LICENSE.md Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/README.md Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/SUPPORT.md Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/appveyor.yml Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/banner.svg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

0
printermonitor/libs/ArduinoJson/keywords.txt Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/src/ArduinoJson.h Normal file → Executable file
View File

0
printermonitor/libs/ArduinoJson/src/ArduinoJson.hpp Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More