Add translations
parent
04141cd4fb
commit
696faf4f9f
|
|
@ -0,0 +1,162 @@
|
||||||
|
/** The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2018 David Payne
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Additional Contributions:
|
||||||
|
/* 17 Sep 2025 : Eduardo Romero @eduardorq : Add translations */
|
||||||
|
|
||||||
|
#include "I18N.h"
|
||||||
|
|
||||||
|
String I18N::s_lang = "en";
|
||||||
|
String I18N::s_json = "";
|
||||||
|
|
||||||
|
static void replaceAllInPlace(String& s, const String& from, const String& to) {
|
||||||
|
if (from.length() == 0) return;
|
||||||
|
int idx = 0;
|
||||||
|
while ((idx = s.indexOf(from, idx)) >= 0) {
|
||||||
|
s = s.substring(0, idx) + to + s.substring(idx + from.length());
|
||||||
|
idx += to.length();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool isSpace(char c) {
|
||||||
|
return c==' ' || c=='\t' || c=='\r' || c=='\n';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Devuelve el path /i18n/<lang>.json
|
||||||
|
String I18N::pathFor(const String& lang) {
|
||||||
|
String l = lang; l.trim();
|
||||||
|
if (l.length() == 0) l = "en";
|
||||||
|
return String("/i18n/") + l + ".json";
|
||||||
|
}
|
||||||
|
|
||||||
|
bool I18N::findKV(const String& key, String& outVal) {
|
||||||
|
if (s_json.length() == 0) return false;
|
||||||
|
|
||||||
|
String needle = "\"" + key + "\"";
|
||||||
|
int pos = s_json.indexOf(needle);
|
||||||
|
if (pos < 0) return false;
|
||||||
|
|
||||||
|
pos += needle.length();
|
||||||
|
while (pos < (int)s_json.length() && isSpace(s_json[pos])) pos++;
|
||||||
|
if (pos >= (int)s_json.length() || s_json[pos] != ':') return false;
|
||||||
|
pos++;
|
||||||
|
while (pos < (int)s_json.length() && isSpace(s_json[pos])) pos++;
|
||||||
|
if (pos >= (int)s_json.length() || s_json[pos] != '\"') return false;
|
||||||
|
pos++; // dentro del valor
|
||||||
|
|
||||||
|
String val;
|
||||||
|
bool escaped = false;
|
||||||
|
for (; pos < (int)s_json.length(); ++pos) {
|
||||||
|
char c = s_json[pos];
|
||||||
|
if (escaped) {
|
||||||
|
val += c;
|
||||||
|
escaped = false;
|
||||||
|
} else {
|
||||||
|
if (c == '\\') {
|
||||||
|
escaped = true;
|
||||||
|
} else if (c == '\"') {
|
||||||
|
outVal = val;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
val += c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Carga /i18n/<lang>.json desde SPIFFS
|
||||||
|
bool I18N::load(const String& langCode) {
|
||||||
|
String path = pathFor(langCode);
|
||||||
|
File f = SPIFFS.open(path, "r");
|
||||||
|
if (!f) {
|
||||||
|
Serial.println(I18N::t("i18n.file.cant_open") + path);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
s_json = "";
|
||||||
|
const size_t CHUNK = 512;
|
||||||
|
std::unique_ptr<char[]> buf(new char[CHUNK + 1]);
|
||||||
|
while (true) {
|
||||||
|
size_t n = f.readBytes(buf.get(), CHUNK);
|
||||||
|
if (n == 0) break;
|
||||||
|
buf[n] = '\0';
|
||||||
|
s_json += buf.get();
|
||||||
|
if (s_json.length() > 32768) { // límite de seguridad
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
f.close();
|
||||||
|
|
||||||
|
s_lang = langCode;
|
||||||
|
Serial.println(I18N::t("i18n.file.loaded") + path + " (" + String(s_json.length()) + " bytes)");
|
||||||
|
return (s_json.length() > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
String I18N::t(const String& key) {
|
||||||
|
String out;
|
||||||
|
if (findKV(key, out)) return out;
|
||||||
|
return key; // fallback
|
||||||
|
}
|
||||||
|
|
||||||
|
bool I18N::has(const String& key) {
|
||||||
|
String tmp;
|
||||||
|
return findKV(key, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
String I18N::tr(const String& key, const String pairs[][2], size_t count) {
|
||||||
|
String base = t(key);
|
||||||
|
for (size_t i = 0; i < count; ++i) {
|
||||||
|
String ph = "{" + String(pairs[i][0]) + "}";
|
||||||
|
replaceAllInPlace(base, ph, pairs[i][1]);
|
||||||
|
}
|
||||||
|
return base;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sustituye tokens {{ clave }} dentro de una cadena.
|
||||||
|
// Si no existe la clave, deja el token.
|
||||||
|
void I18N::apply(String& s) {
|
||||||
|
int start = 0;
|
||||||
|
while (true) {
|
||||||
|
int open = s.indexOf("{{", start);
|
||||||
|
if (open < 0) break;
|
||||||
|
int close = s.indexOf("}}", open + 2);
|
||||||
|
if (close < 0) break;
|
||||||
|
|
||||||
|
String key = s.substring(open + 2, close);
|
||||||
|
key.trim();
|
||||||
|
|
||||||
|
String val = I18N::t(key);
|
||||||
|
if (val.length() == 0 || val == key) {
|
||||||
|
start = close + 2; // sin traducción, saltar
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
s = s.substring(0, open) + val + s.substring(close + 2);
|
||||||
|
start = open + val.length();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String I18N::current() {
|
||||||
|
return s_lang;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
/** The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2018 David Payne
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Additional Contributions:
|
||||||
|
/* 17 Sep 2025 : Eduardo Romero @eduardorq : Add translations */
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <Arduino.h>
|
||||||
|
#include <FS.h>
|
||||||
|
|
||||||
|
class I18N {
|
||||||
|
public:
|
||||||
|
// Load /i18n/<lang>.json (p.ej. "es" => "/i18n/es.json")
|
||||||
|
static bool load(const String& langCode);
|
||||||
|
|
||||||
|
static String t(const String& key);
|
||||||
|
|
||||||
|
// With placeholders: pairs = {{"printer","Ender3"},{"value","42"}}
|
||||||
|
static String tr(const String& key, const String pairs[][2], size_t count);
|
||||||
|
|
||||||
|
static bool has(const String& key);
|
||||||
|
|
||||||
|
static void apply(String& s);
|
||||||
|
|
||||||
|
static String current();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Estado interno
|
||||||
|
static String s_lang;
|
||||||
|
static String s_json;
|
||||||
|
|
||||||
|
// Utilidades internas
|
||||||
|
static String pathFor(const String& lang);
|
||||||
|
static bool findKV(const String& key, String& outVal);
|
||||||
|
};
|
||||||
|
|
@ -1,311 +0,0 @@
|
||||||
/** The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2018 David Payne
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "OpenWeatherMapClient.h"
|
|
||||||
|
|
||||||
OpenWeatherMapClient::OpenWeatherMapClient(String ApiKey, int CityIDs[], int cityCount, boolean isMetric, String language) {
|
|
||||||
updateCityIdList(CityIDs, cityCount);
|
|
||||||
updateLanguage(language);
|
|
||||||
myApiKey = ApiKey;
|
|
||||||
setMetric(isMetric);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenWeatherMapClient::updateWeatherApiKey(String ApiKey) {
|
|
||||||
myApiKey = ApiKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenWeatherMapClient::updateLanguage(String language) {
|
|
||||||
lang = language;
|
|
||||||
if (lang == "") {
|
|
||||||
lang = "es";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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("Obteniendo datos de clima");
|
|
||||||
Serial.println(apiGetData);
|
|
||||||
result = "";
|
|
||||||
if (weatherClient.connect(servername, 80)) { //starts client connection, checks for connection
|
|
||||||
weatherClient.println(apiGetData);
|
|
||||||
weatherClient.println("Host: " + String(servername));
|
|
||||||
weatherClient.println("User-Agent: ArduinoWiFi/1.1");
|
|
||||||
weatherClient.println("Connection: close");
|
|
||||||
weatherClient.println();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
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("Esperando por datos");
|
|
||||||
|
|
||||||
// Check HTTP status
|
|
||||||
char status[32] = {0};
|
|
||||||
weatherClient.readBytesUntil('\r', status, sizeof(status));
|
|
||||||
Serial.println("Response Header: " + String(status));
|
|
||||||
if (strcmp(status, "HTTP/1.1 200 OK") != 0) {
|
|
||||||
Serial.print(F("Unexpected response: "));
|
|
||||||
Serial.println(status);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Skip HTTP headers
|
|
||||||
char endOfHeaders[] = "\r\n\r\n";
|
|
||||||
if (!weatherClient.find(endOfHeaders)) {
|
|
||||||
Serial.println(F("Respuesta no válida"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const size_t bufferSize = 710;
|
|
||||||
DynamicJsonBuffer jsonBuffer(bufferSize);
|
|
||||||
|
|
||||||
weathers[0].cached = false;
|
|
||||||
weathers[0].error = "";
|
|
||||||
// Parse JSON object
|
|
||||||
JsonObject& root = jsonBuffer.parseObject(weatherClient);
|
|
||||||
if (!root.success()) {
|
|
||||||
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 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);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int count = root["cnt"];
|
|
||||||
|
|
||||||
for (int inx = 0; inx < count; inx++) {
|
|
||||||
weathers[inx].lat = (const char*)root["list"][inx]["coord"]["lat"];
|
|
||||||
weathers[inx].lon = (const char*)root["list"][inx]["coord"]["lon"];
|
|
||||||
weathers[inx].dt = (const char*)root["list"][inx]["dt"];
|
|
||||||
weathers[inx].city = (const char*)root["list"][inx]["name"];
|
|
||||||
weathers[inx].country = (const char*)root["list"][inx]["sys"]["country"];
|
|
||||||
weathers[inx].temp = (const char*)root["list"][inx]["main"]["temp"];
|
|
||||||
weathers[inx].humidity = (const char*)root["list"][inx]["main"]["humidity"];
|
|
||||||
weathers[inx].condition = (const char*)root["list"][inx]["weather"][0]["main"];
|
|
||||||
weathers[inx].wind = (const char*)root["list"][inx]["wind"]["speed"];
|
|
||||||
weathers[inx].weatherId = (const char*)root["list"][inx]["weather"][0]["id"];
|
|
||||||
weathers[inx].description = (const char*)root["list"][inx]["weather"][0]["description"];
|
|
||||||
weathers[inx].icon = (const char*)root["list"][inx]["weather"][0]["icon"];
|
|
||||||
|
|
||||||
Serial.println("lat: " + weathers[inx].lat);
|
|
||||||
Serial.println("lon: " + weathers[inx].lon);
|
|
||||||
Serial.println("dt: " + weathers[inx].dt);
|
|
||||||
Serial.println("city: " + weathers[inx].city);
|
|
||||||
Serial.println("country: " + weathers[inx].country);
|
|
||||||
Serial.println("temp: " + weathers[inx].temp);
|
|
||||||
Serial.println("humidity: " + weathers[inx].humidity);
|
|
||||||
Serial.println("condition: " + weathers[inx].condition);
|
|
||||||
Serial.println("wind: " + weathers[inx].wind);
|
|
||||||
Serial.println("weatherId: " + weathers[inx].weatherId);
|
|
||||||
Serial.println("description: " + weathers[inx].description);
|
|
||||||
Serial.println("icon: " + weathers[inx].icon);
|
|
||||||
Serial.println();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::roundValue(String value) {
|
|
||||||
float f = value.toFloat();
|
|
||||||
int rounded = (int)(f+0.5f);
|
|
||||||
return String(rounded);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenWeatherMapClient::updateCityIdList(int CityIDs[], int cityCount) {
|
|
||||||
myCityIDs = "";
|
|
||||||
for (int inx = 0; inx < cityCount; inx++) {
|
|
||||||
if (CityIDs[inx] > 0) {
|
|
||||||
if (myCityIDs != "") {
|
|
||||||
myCityIDs = myCityIDs + ",";
|
|
||||||
}
|
|
||||||
myCityIDs = myCityIDs + String(CityIDs[inx]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenWeatherMapClient::setMetric(boolean isMetric) {
|
|
||||||
if (isMetric) {
|
|
||||||
units = "metric";
|
|
||||||
} else {
|
|
||||||
units = "imperial";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getWeatherResults() {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getLat(int index) {
|
|
||||||
return weathers[index].lat;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getLon(int index) {
|
|
||||||
return weathers[index].lon;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getDt(int index) {
|
|
||||||
return weathers[index].dt;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getCity(int index) {
|
|
||||||
return weathers[index].city;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getCountry(int index) {
|
|
||||||
return weathers[index].country;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getTemp(int index) {
|
|
||||||
return weathers[index].temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getTempRounded(int index) {
|
|
||||||
return roundValue(getTemp(index));
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getHumidity(int index) {
|
|
||||||
return weathers[index].humidity;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getHumidityRounded(int index) {
|
|
||||||
return roundValue(getHumidity(index));
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getCondition(int index) {
|
|
||||||
return weathers[index].condition;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getWind(int index) {
|
|
||||||
return weathers[index].wind;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getWindRounded(int index) {
|
|
||||||
return roundValue(getWind(index));
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getWeatherId(int index) {
|
|
||||||
return weathers[index].weatherId;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getDescription(int index) {
|
|
||||||
return weathers[index].description;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getIcon(int index) {
|
|
||||||
return weathers[index].icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean OpenWeatherMapClient::getCached() {
|
|
||||||
return weathers[0].cached;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getMyCityIDs() {
|
|
||||||
return myCityIDs;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getError() {
|
|
||||||
return weathers[0].error;
|
|
||||||
}
|
|
||||||
|
|
||||||
String OpenWeatherMapClient::getWeatherIcon(int index)
|
|
||||||
{
|
|
||||||
int id = getWeatherId(index).toInt();
|
|
||||||
String W = ")";
|
|
||||||
switch(id)
|
|
||||||
{
|
|
||||||
case 800: W = "B"; break;
|
|
||||||
case 801: W = "Y"; break;
|
|
||||||
case 802: W = "H"; break;
|
|
||||||
case 803: W = "H"; break;
|
|
||||||
case 804: W = "Y"; break;
|
|
||||||
|
|
||||||
case 200: W = "0"; break;
|
|
||||||
case 201: W = "0"; break;
|
|
||||||
case 202: W = "0"; break;
|
|
||||||
case 210: W = "0"; break;
|
|
||||||
case 211: W = "0"; break;
|
|
||||||
case 212: W = "0"; break;
|
|
||||||
case 221: W = "0"; break;
|
|
||||||
case 230: W = "0"; break;
|
|
||||||
case 231: W = "0"; break;
|
|
||||||
case 232: W = "0"; break;
|
|
||||||
|
|
||||||
case 300: W = "R"; break;
|
|
||||||
case 301: W = "R"; break;
|
|
||||||
case 302: W = "R"; break;
|
|
||||||
case 310: W = "R"; break;
|
|
||||||
case 311: W = "R"; break;
|
|
||||||
case 312: W = "R"; break;
|
|
||||||
case 313: W = "R"; break;
|
|
||||||
case 314: W = "R"; break;
|
|
||||||
case 321: W = "R"; break;
|
|
||||||
|
|
||||||
case 500: W = "R"; break;
|
|
||||||
case 501: W = "R"; break;
|
|
||||||
case 502: W = "R"; break;
|
|
||||||
case 503: W = "R"; break;
|
|
||||||
case 504: W = "R"; break;
|
|
||||||
case 511: W = "R"; break;
|
|
||||||
case 520: W = "R"; break;
|
|
||||||
case 521: W = "R"; break;
|
|
||||||
case 522: W = "R"; break;
|
|
||||||
case 531: W = "R"; break;
|
|
||||||
|
|
||||||
case 600: W = "W"; break;
|
|
||||||
case 601: W = "W"; break;
|
|
||||||
case 602: W = "W"; break;
|
|
||||||
case 611: W = "W"; break;
|
|
||||||
case 612: W = "W"; break;
|
|
||||||
case 615: W = "W"; break;
|
|
||||||
case 616: W = "W"; break;
|
|
||||||
case 620: W = "W"; break;
|
|
||||||
case 621: W = "W"; break;
|
|
||||||
case 622: W = "W"; break;
|
|
||||||
|
|
||||||
case 701: W = "M"; break;
|
|
||||||
case 711: W = "M"; break;
|
|
||||||
case 721: W = "M"; break;
|
|
||||||
case 731: W = "M"; break;
|
|
||||||
case 741: W = "M"; break;
|
|
||||||
case 751: W = "M"; break;
|
|
||||||
case 761: W = "M"; break;
|
|
||||||
case 762: W = "M"; break;
|
|
||||||
case 771: W = "M"; break;
|
|
||||||
case 781: W = "M"; break;
|
|
||||||
|
|
||||||
default:break;
|
|
||||||
}
|
|
||||||
return W;
|
|
||||||
}
|
|
||||||
|
|
@ -115,3 +115,6 @@ String OTA_Password = ""; // Set an OTA password here -- leave blank if you
|
||||||
//******************************
|
//******************************
|
||||||
|
|
||||||
String themeColor = "light-blue"; // this can be changed later in the web interface.
|
String themeColor = "light-blue"; // this can be changed later in the web interface.
|
||||||
|
|
||||||
|
// Idioma de la interfaz (web + OLED). Valores: en, es, fr, de, it, zh, ja, nl, no, pt, ru, uk, ko
|
||||||
|
String UiLanguage = "en";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.about": "About",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"status": "Status",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wifi.signal": "Signal strength",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"app.reset_settings": "Reset settings"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "Por Qrome",
|
||||||
|
"app.file.setup.notexist": "El archivo de configuración aún no existe.",
|
||||||
|
"app.for": "por {name}",
|
||||||
|
"app.reset_settings": "Restablecer configuración",
|
||||||
|
"app.setup.mode": "Modo configuración",
|
||||||
|
"app.setup.openfile": "No se puede abrir el archivo",
|
||||||
|
"app.setup.save.settings": "Guardando configuración...",
|
||||||
|
"app.title": "Monitor de Impresora",
|
||||||
|
"app.version": "Versión",
|
||||||
|
"app.web.disabled": "Interfaz web deshabilitada",
|
||||||
|
"app.web.enable_in_settings": "Actívela en Settings.h",
|
||||||
|
"app.web.must_connect": "Conéctese a esta IP",
|
||||||
|
"app.web.port": "Puerto",
|
||||||
|
"app.web.started": "Interfaz web iniciada",
|
||||||
|
"btn.configure": "Configuración",
|
||||||
|
"cfg.clock.show_when_off": "Mostrar reloj cuando la impresora esté apagada",
|
||||||
|
"cfg.clock.use_24h": "Usar formato 24 horas",
|
||||||
|
"cfg.display.flip": "Voltear orientación de pantalla",
|
||||||
|
"cfg.display.off": "Pantalla apagada",
|
||||||
|
"cfg.display.on": "Pantalla encendida",
|
||||||
|
"cfg.header": "Configuración:",
|
||||||
|
"cfg.monitor.activated": "Monitor de impresora activado.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Nombre de host",
|
||||||
|
"cfg.printer.ip": "IP (sin http://)",
|
||||||
|
"cfg.printer.pass": "Contraseña",
|
||||||
|
"cfg.printer.port": "Puerto",
|
||||||
|
"cfg.printer.user": "Usuario (para haproxy o auth básica)",
|
||||||
|
"cfg.psu.use": "Usar PSU Control de OctoPrint para reloj/negro",
|
||||||
|
"cfg.save": "Guardar",
|
||||||
|
"cfg.security.password": "Contraseña",
|
||||||
|
"cfg.security.use_basic": "Use credenciales de seguridad para cambios",
|
||||||
|
"cfg.security.user_id": "ID de usuario (para este acceso)",
|
||||||
|
"cfg.settings.ui_language": "Idioma",
|
||||||
|
"cfg.setup.ap": "Conectar al punto de acceso",
|
||||||
|
"cfg.setup.monitor": "Configuración en monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetidor",
|
||||||
|
"cfg.setup.wifi": "Configuración wifi",
|
||||||
|
"cfg.setup.wifi2": "y configuración wifi",
|
||||||
|
"cfg.test.conn": "Probar conexión",
|
||||||
|
"cfg.test.conn_json": "Prueba de conexión + respuesta JSON de la API",
|
||||||
|
"cfg.theme.color": "Color del tema",
|
||||||
|
"cfg.timezone": "Huso horario",
|
||||||
|
"cfg.weather.refresh": "Refrescar clima",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Hora local: ",
|
||||||
|
"clock.time": "Hora",
|
||||||
|
"clock.updating": "Actualizando...",
|
||||||
|
"filament.m": "Filamento",
|
||||||
|
"file": "Archivo",
|
||||||
|
"file.size_kb": "Tamaño de archivo",
|
||||||
|
"hostname": "Nombre de host",
|
||||||
|
"i18n.file.cant_open": "[I18N] No se puede abrir fichero: ",
|
||||||
|
"i18n.file.loaded": "[I18N] Fichero cargado: ",
|
||||||
|
"map.it": "Abrir mapa",
|
||||||
|
"mdns.in_mdns": " en mDNS",
|
||||||
|
"mdns.not_service": "Sin servicio, compruebe si su servidor de impresora está encendido",
|
||||||
|
"mdns.printer_serve.found": "*** Servidor de impresora encontrado ",
|
||||||
|
"mdns.searching": "*** Buscando ",
|
||||||
|
"menu.about": "Acerca de",
|
||||||
|
"menu.configure": "Configuración",
|
||||||
|
"menu.forget_wifi": "Olvidar WiFi",
|
||||||
|
"menu.home": "Inicio",
|
||||||
|
"menu.reset": "Resetear",
|
||||||
|
"menu.title": "Menú",
|
||||||
|
"menu.update": "Actualizar firmware",
|
||||||
|
"menu.weather": "Clima",
|
||||||
|
"ota.end": "Fianaliza",
|
||||||
|
"ota.error.auth": "Error de autentificación",
|
||||||
|
"ota.error.begin": "Error deinicio",
|
||||||
|
"ota.error.connect": "Error de conexión",
|
||||||
|
"ota.error.end": "Error de finalizado",
|
||||||
|
"ota.error.receive": "Error de recepción",
|
||||||
|
"ota.progress": "Progreso",
|
||||||
|
"ota.start": "Inicio",
|
||||||
|
"printer.monitor": "Monitor de Impresora",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Motivo",
|
||||||
|
"state.connected": "Conectado",
|
||||||
|
"state.disconnected": "Desconectado",
|
||||||
|
"state.operational": "Operacional",
|
||||||
|
"status": "Estado",
|
||||||
|
"temp.bed": "Temp. de cama",
|
||||||
|
"temp.nozzle": "Temp. de extrusor",
|
||||||
|
"time.left": "Tiempo restante",
|
||||||
|
"time.printed": "Tiempo impreso",
|
||||||
|
"time.printing": "Tiempo imrpimiendo",
|
||||||
|
"time.remaining": "Tiempo estimado pdte.",
|
||||||
|
"ui.bed": "Cama",
|
||||||
|
"ui.bed_temp_title": "Temp. Cama",
|
||||||
|
"ui.clock.mode": "Modo reloj.",
|
||||||
|
"ui.connecting": "Conectando...",
|
||||||
|
"ui.nozzle": "Boquilla",
|
||||||
|
"ui.nozzle_temp_title": "Temp. Extrusor",
|
||||||
|
"ui.printer.mode": "Monito de imrpesora encendido.",
|
||||||
|
"ui.printer_off": "Impresora apagada",
|
||||||
|
"ui.printer_on": "Impresora encendida",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Apagando impresora\nModo suspensión...",
|
||||||
|
"ui.turning_on": "Encendiendo impresora\nDespertando...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (conseguir ",
|
||||||
|
"wcfg.api_key.label_here": "aquí",
|
||||||
|
"wcfg.city_id.label": "ID de ciudad",
|
||||||
|
"wcfg.city_id.search": "Encontrar ID de ciudad",
|
||||||
|
"wcfg.header": "Configuración de clima:",
|
||||||
|
"wcfg.language": "Idioma del clima",
|
||||||
|
"wcfg.metric": "Usar Métrico (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Mostrar el clima cuando la impresora esté apagada",
|
||||||
|
"weather.city_label": "Ciudad",
|
||||||
|
"weather.condition": "Estimación",
|
||||||
|
"weather.configure_link": "Configurar clima",
|
||||||
|
"weather.error": "Error del clima",
|
||||||
|
"weather.feels_like": "Sensación térmica",
|
||||||
|
"weather.get_data": "Obteniendo datos climatológicos...",
|
||||||
|
"weather.humidity": "Humedad",
|
||||||
|
"weather.please": "Por favor",
|
||||||
|
"weather.wind": "Viento",
|
||||||
|
"web.hostname": "Nombre de host",
|
||||||
|
"web.printername": "Nombre de impresora",
|
||||||
|
"wifi.signal": "Intensidad de la señal"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"app.by": "By Qrome",
|
||||||
|
"app.file.setup.notexist": "Settings File does not yet exists.",
|
||||||
|
"app.for": "for {name}",
|
||||||
|
"app.reset_settings": "Reset settings",
|
||||||
|
"app.setup.mode": "Setup mode",
|
||||||
|
"app.setup.openfile": "Can't open file",
|
||||||
|
"app.setup.save.settings": "Saving settings...",
|
||||||
|
"app.title": "Printer Monitor",
|
||||||
|
"app.version": "Version",
|
||||||
|
"app.web.disabled": "Web UI disabled",
|
||||||
|
"app.web.enable_in_settings": "Enable it in Settings.h",
|
||||||
|
"app.web.must_connect": "Connect to this IP",
|
||||||
|
"app.web.port": "Port",
|
||||||
|
"app.web.started": "Web UI started",
|
||||||
|
"btn.configure": "Configure",
|
||||||
|
"cfg.clock.show_when_off": "Show clock when printer is off",
|
||||||
|
"cfg.clock.use_24h": "Use 24-hour clock",
|
||||||
|
"cfg.display.flip": "Flip display orientation",
|
||||||
|
"cfg.display.off": "Display off",
|
||||||
|
"cfg.display.on": "Dispclay on",
|
||||||
|
"cfg.header": "Settings:",
|
||||||
|
"cfg.monitor.activated": "Printer monitor activated.",
|
||||||
|
"cfg.printer.api_key": "API Key (from ",
|
||||||
|
"cfg.printer.hostname": "Hostname",
|
||||||
|
"cfg.printer.ip": "IP (no http://)",
|
||||||
|
"cfg.printer.pass": "Password",
|
||||||
|
"cfg.printer.port": "Port",
|
||||||
|
"cfg.printer.user": "Username (for haproxy or basic auth)",
|
||||||
|
"cfg.psu.use": "Use OctoPrint PSU Control for clock/blank",
|
||||||
|
"cfg.save": "Save",
|
||||||
|
"cfg.security.password": "Password",
|
||||||
|
"cfg.security.use_basic": "Use security credentials for changes",
|
||||||
|
"cfg.security.user_id": "User ID (for this UI)",
|
||||||
|
"cfg.settings.ui_language": "Language",
|
||||||
|
"cfg.setup.ap": "Connect to acces point",
|
||||||
|
"cfg.setup.monitor": "Setup in monitor",
|
||||||
|
"cfg.setup.repetier_title": "Repetier",
|
||||||
|
"cfg.setup.wifi": "Wifi setup",
|
||||||
|
"cfg.setup.wifi2": "and setup wifi",
|
||||||
|
"cfg.test.conn": "Test connection",
|
||||||
|
"cfg.test.conn_json": "Test connection + JSON API response",
|
||||||
|
"cfg.theme.color": "Theme color",
|
||||||
|
"cfg.timezone": "Timezone",
|
||||||
|
"cfg.weather.refresh": "Weather refresh",
|
||||||
|
"cfg.wifi.led": "WiFi LED",
|
||||||
|
"clock.local_time": "Local time: ",
|
||||||
|
"clock.time": "Time",
|
||||||
|
"clock.updating": "Updating...",
|
||||||
|
"filament.m": "Filament",
|
||||||
|
"file": "File",
|
||||||
|
"file.size_kb": "File Size",
|
||||||
|
"hostname": "Hostname",
|
||||||
|
"i18n.file.cant_open": "[I18N] Can't open file: ",
|
||||||
|
"i18n.file.loaded": "[I18N] File loaded: ",
|
||||||
|
"map.it": "Map It!",
|
||||||
|
"mdns.in_mdns": " in mDNS",
|
||||||
|
"mdns.not_service": "No service, check that the printer server is on",
|
||||||
|
"mdns.printer_serve.found": "*** Printer server found ",
|
||||||
|
"mdns.searching": "*** Searching ",
|
||||||
|
"menu.about": "About",
|
||||||
|
"menu.configure": "Settings",
|
||||||
|
"menu.forget_wifi": "Forget WiFi",
|
||||||
|
"menu.home": "Home",
|
||||||
|
"menu.reset": "Factory reset",
|
||||||
|
"menu.title": "Menu",
|
||||||
|
"menu.update": "Update firmware",
|
||||||
|
"menu.weather": "Weather",
|
||||||
|
"ota.end": "End",
|
||||||
|
"ota.error.auth": "Auth error",
|
||||||
|
"ota.error.begin": "Begin error",
|
||||||
|
"ota.error.connect": "Connect error",
|
||||||
|
"ota.error.end": "End error",
|
||||||
|
"ota.error.receive": "Receive error",
|
||||||
|
"ota.progress": "Progress",
|
||||||
|
"ota.start": "Start",
|
||||||
|
"printer.monitor": "Printer Monitor",
|
||||||
|
"psu.off": "psu off",
|
||||||
|
"reason": "Reason",
|
||||||
|
"state.connected": "Connected",
|
||||||
|
"state.disconnected": "Disconnected",
|
||||||
|
"state.operational": "Operational",
|
||||||
|
"status": "Status",
|
||||||
|
"temp.bed": "Bed Temp",
|
||||||
|
"temp.nozzle": "Nozzle Temp",
|
||||||
|
"time.left": "Time Left",
|
||||||
|
"time.printed": "Time Printed",
|
||||||
|
"time.printing": "Printing Time",
|
||||||
|
"time.remaining": "Est. Print Time Left",
|
||||||
|
"ui.bed": "Bed",
|
||||||
|
"ui.bed_temp_title": "Bed Temp",
|
||||||
|
"ui.clock.mode": "Clock mode.",
|
||||||
|
"ui.connecting": "Connecting...",
|
||||||
|
"ui.nozzle": "Nozzle",
|
||||||
|
"ui.nozzle_temp_title": "Nozzle Temp",
|
||||||
|
"ui.printer.mode": "Printer monitor ON.",
|
||||||
|
"ui.printer_off": "Printer Off",
|
||||||
|
"ui.printer_on": "Printer On",
|
||||||
|
"ui.tool_temp_title": "Tool Temp",
|
||||||
|
"ui.turning_off": "Turning off printer\nSleep mode...",
|
||||||
|
"ui.turning_on": "Printer on\nWaking up...",
|
||||||
|
"wcfg.api_key.label": "OpenWeatherMap API Key (get it ",
|
||||||
|
"wcfg.api_key.label_here": "here",
|
||||||
|
"wcfg.city_id.label": "Location ID",
|
||||||
|
"wcfg.city_id.search": "Find location ID",
|
||||||
|
"wcfg.header": "Weather settings:",
|
||||||
|
"wcfg.language": "Weather language",
|
||||||
|
"wcfg.metric": "Use Metric (Celsius)",
|
||||||
|
"wcfg.show_when_off": "Show weather when printer is off",
|
||||||
|
"weather.city_label": "City",
|
||||||
|
"weather.condition": "Condition",
|
||||||
|
"weather.configure_link": "Configure Weather",
|
||||||
|
"weather.error": "Weather Error",
|
||||||
|
"weather.feels_like": "Feels like",
|
||||||
|
"weather.get_data": "Obtaining weather data...",
|
||||||
|
"weather.humidity": "Humidity",
|
||||||
|
"weather.please": "Please",
|
||||||
|
"weather.wind": "Wind",
|
||||||
|
"web.hostname": "Hostname",
|
||||||
|
"web.printername": "Printer name",
|
||||||
|
"wifi.signal": "Signal strength"
|
||||||
|
}
|
||||||
|
|
@ -24,12 +24,14 @@ SOFTWARE.
|
||||||
// Additional Contributions:
|
// Additional Contributions:
|
||||||
/* 15 Jan 2019 : Owen Carter : Add psucontrol option and processing */
|
/* 15 Jan 2019 : Owen Carter : Add psucontrol option and processing */
|
||||||
/* 18 Feb 2022 : Robert von Könemann @vknmnn : Lets us select Moonraker + fix usage of AMPM/24Hrs time */
|
/* 18 Feb 2022 : Robert von Könemann @vknmnn : Lets us select Moonraker + fix usage of AMPM/24Hrs time */
|
||||||
/* 17 Sep 2025 : Eduardo Romero @eduardorq : Fix Weather API request parse data and Spanish translation */
|
/* 17 Sep 2025 : Eduardo Romero @eduardorq : Fix Weather API request parse data and translations */
|
||||||
/**********************************************
|
/**********************************************
|
||||||
* Edit Settings.h for personalization
|
* Edit Settings.h for personalization
|
||||||
***********************************************/
|
***********************************************/
|
||||||
|
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
|
#include "I18N.h"
|
||||||
|
|
||||||
|
|
||||||
#define VERSION "3.1"
|
#define VERSION "3.1"
|
||||||
|
|
||||||
|
|
@ -85,6 +87,9 @@ String lastSecond = "xx";
|
||||||
String lastReportStatus = "";
|
String lastReportStatus = "";
|
||||||
boolean displayOn = true;
|
boolean displayOn = true;
|
||||||
|
|
||||||
|
unsigned long DIAG_LAST = 0;
|
||||||
|
bool I18N_TRIED = false; // para intentar el load() una sola vez desde loop()
|
||||||
|
|
||||||
// Printer Client
|
// Printer Client
|
||||||
#if defined(USE_REPETIER_CLIENT)
|
#if defined(USE_REPETIER_CLIENT)
|
||||||
RepetierClient printerClient(PrinterApiKey, PrinterServer, PrinterPort, PrinterAuthUser, PrinterAuthPass, HAS_PSU);
|
RepetierClient printerClient(PrinterApiKey, PrinterServer, PrinterPort, PrinterAuthUser, PrinterAuthPass, HAS_PSU);
|
||||||
|
|
@ -105,39 +110,39 @@ int8_t getWifiQuality();
|
||||||
ESP8266WebServer server(WEBSERVER_PORT);
|
ESP8266WebServer server(WEBSERVER_PORT);
|
||||||
ESP8266HTTPUpdateServer serverUpdater;
|
ESP8266HTTPUpdateServer serverUpdater;
|
||||||
|
|
||||||
static const char WEB_ACTIONS[] PROGMEM = "<a class='w3-bar-item w3-button' href='/'><i class='fa fa-home'></i> Inicio</a>"
|
static const char WEB_ACTIONS[] PROGMEM = "<a class='w3-bar-item w3-button' href='/'><i class='fa fa-home'></i>{{menu.home}}</a>"
|
||||||
"<a class='w3-bar-item w3-button' href='/configure'><i class='fa fa-cog'></i> Configuración</a>"
|
"<a class='w3-bar-item w3-button' href='/configure'><i class='fa fa-cog'></i> {{menu.configure}}</a>"
|
||||||
"<a class='w3-bar-item w3-button' href='/configureweather'><i class='fa fa-cloud'></i> Clima</a>"
|
"<a class='w3-bar-item w3-button' href='/configureweather'><i class='fa fa-cloud'></i> {{menu.weather}}</a>"
|
||||||
"<a class='w3-bar-item w3-button' href='/systemreset' onclick='return confirm(\"Resetear la configuración a valores por defecto?\")'><i class='fa fa-undo'></i> Restablecer configuración</a>"
|
"<a class='w3-bar-item w3-button' href='/systemreset' onclick='return confirm(\"Resetear la configuración a valores por defecto?\")'><i class='fa fa-undo'></i> {{menu.reset}}</a>"
|
||||||
"<a class='w3-bar-item w3-button' href='/forgetwifi' onclick='return confirm(\"¿Olvidar la conexión WiFi?\")'><i class='fa fa-wifi'></i> Olvidar WiFi</a>"
|
"<a class='w3-bar-item w3-button' href='/forgetwifi' onclick='return confirm(\"¿Olvidar la conexión WiFi?\")'><i class='fa fa-wifi'></i> {{menu.forget_wifi}}</a>"
|
||||||
"<a class='w3-bar-item w3-button' href='/update'><i class='fa fa-wrench'></i> Actualizar Firmware</a>"
|
"<a class='w3-bar-item w3-button' href='/update'><i class='fa fa-wrench'></i> {{menu.update}}</a>"
|
||||||
"<a class='w3-bar-item w3-button' href='https://github.com/Qrome' target='_blank'><i class='fa fa-question-circle'></i> Sobre</a>";
|
"<a class='w3-bar-item w3-button' href='https://github.com/Qrome' target='_blank'><i class='fa fa-question-circle'></i> {{menu.about}}</a>";
|
||||||
|
|
||||||
String CHANGE_FORM = ""; // moved to config to make it dynamic
|
String CHANGE_FORM = ""; // moved to config to make it dynamic
|
||||||
|
|
||||||
static const char CLOCK_FORM[] PROGMEM = "<hr><p><input name='isClockEnabled' class='w3-check w3-margin-top' type='checkbox' %IS_CLOCK_CHECKED%> Mostrar reloj cuando la impresora esté apagada</p>"
|
static const char CLOCK_FORM[] PROGMEM = "<hr><p><input name='isClockEnabled' class='w3-check w3-margin-top' type='checkbox' %IS_CLOCK_CHECKED%> {{cfg.clock.show_when_off}}</p>"
|
||||||
"<p><input name='is24hour' class='w3-check w3-margin-top' type='checkbox' %IS_24HOUR_CHECKED%> Usar reloj 24 Horas</p>"
|
"<p><input name='is24hour' class='w3-check w3-margin-top' type='checkbox' %IS_24HOUR_CHECKED%> {{cfg.clock.use_24h}}</p>"
|
||||||
"<p><input name='invDisp' class='w3-check w3-margin-top' type='checkbox' %IS_INVDISP_CHECKED%> Voltear la orientación de la pantalla</p>"
|
"<p><input name='invDisp' class='w3-check w3-margin-top' type='checkbox' %IS_INVDISP_CHECKED%> {{cfg.display.flip}}</p>"
|
||||||
"<p><input name='useFlash' class='w3-check w3-margin-top' type='checkbox' %USEFLASH%> Activar LED de WiFi</p>"
|
"<p><input name='useFlash' class='w3-check w3-margin-top' type='checkbox' %USEFLASH%> {{cfg.wifi.led}}</p>"
|
||||||
"<p><input name='hasPSU' class='w3-check w3-margin-top' type='checkbox' %HAS_PSU_CHECKED%> Utilizar complemento de control OctoPrint PSU para reloj/blanco</p>"
|
"<p><input name='hasPSU' class='w3-check w3-margin-top' type='checkbox' %HAS_PSU_CHECKED%> {{cfg.psu.use}}</p>"
|
||||||
"<p> Actualizar datos del clima <select class='w3-option w3-padding' name='refresh'>%OPTIONS%</select></p>";
|
"<p> {{cfg.weather.refresh}} <select class='w3-option w3-padding' name='refresh'>%OPTIONS%</select></p>";
|
||||||
|
|
||||||
static const char THEME_FORM[] PROGMEM = "<p>Color de plantilla <select class='w3-option w3-padding' name='theme'>%THEME_OPTIONS%</select></p>"
|
static const char THEME_FORM[] PROGMEM = "<p>{{cfg.theme.color}} <select class='w3-option w3-padding' name='theme'>%THEME_OPTIONS%</select></p>"
|
||||||
"<p><label>Huso horario</label><input class='w3-input w3-border w3-margin-bottom' type='text' name='utcoffset' value='%UTCOFFSET%' maxlength='12'></p><hr>"
|
"<p><label>{{cfg.timezone}}</label><input class='w3-input w3-border w3-margin-bottom' type='text' name='utcoffset' value='%UTCOFFSET%' maxlength='12'></p><hr>"
|
||||||
"<p><input name='isBasicAuth' class='w3-check w3-margin-top' type='checkbox' %IS_BASICAUTH_CHECKED%> Utilice credenciales de seguridad para cambios de configuración</p>"
|
"<p><input name='isBasicAuth' class='w3-check w3-margin-top' type='checkbox' %IS_BASICAUTH_CHECKED%> {{cfg.security.use_basic}}</p>"
|
||||||
"<p><label>ID de usuario (para esta interfaz)</label><input class='w3-input w3-border w3-margin-bottom' type='text' name='userid' value='%USERID%' maxlength='20'></p>"
|
"<p><label>{{cfg.security.user_id}}</label><input class='w3-input w3-border w3-margin-bottom' type='text' name='userid' value='%USERID%' maxlength='20'></p>"
|
||||||
"<p><label>Contraseña</label><input class='w3-input w3-border w3-margin-bottom' type='password' name='stationpassword' value='%STATIONPASSWORD%'></p>"
|
"<p><label>{{cfg.security.password}}</label><input class='w3-input w3-border w3-margin-bottom' type='password' name='stationpassword' value='%STATIONPASSWORD%'></p>"
|
||||||
"<button class='w3-button w3-block w3-grey w3-section w3-padding' type='submit'>Guardar</button></form>";
|
"<button class='w3-button w3-block w3-grey w3-section w3-padding' type='submit'>{{cfg.save}}</button></form>";
|
||||||
|
|
||||||
static const char WEATHER_FORM[] PROGMEM = "<form class='w3-container' action='/updateweatherconfig' method='get'><h2>Configuración del clima:</h2>"
|
static const char WEATHER_FORM[] PROGMEM = "<form class='w3-container' action='/updateweatherconfig' method='get'><h2>{{wcfg.header}}</h2>"
|
||||||
"<p><input name='isWeatherEnabled' class='w3-check w3-margin-top' type='checkbox' %IS_WEATHER_CHECKED%> Mostrar el clima cuando la impresora está apagada</p>"
|
"<p><input name='isWeatherEnabled' class='w3-check w3-margin-top' type='checkbox' %IS_WEATHER_CHECKED%> {{wcfg.show_when_off}}</p>"
|
||||||
"<label>OpenWeatherMap API Key (obtener <a href='https://openweathermap.org/' target='_BLANK'>aquí</a>)</label>"
|
"<label>{{wcfg.api_key.label}}<a href='https://openweathermap.org/' target='_BLANK'>{{wcfg.api_key.label_here}})</a>)</label>"
|
||||||
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='openWeatherMapApiKey' value='%WEATHERKEY%' maxlength='60'>"
|
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='openWeatherMapApiKey' value='%WEATHERKEY%' maxlength='60'>"
|
||||||
"<p><label>%CITYNAME1% (<a href='http://openweathermap.org/find' target='_BLANK'><i class='fa fa-search'></i> Buscar el ID de la localización</a>) "
|
"<p><label>%CITYNAME1% (<a href='http://openweathermap.org/find' target='_BLANK'><i class='fa fa-search'></i> {{wcfg.city_id.search}}</a>) "
|
||||||
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='city1' value='%CITY1%' onkeypress='return isNumberKey(event)'></p>"
|
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='city1' value='%CITY1%' onkeypress='return isNumberKey(event)'></p>"
|
||||||
"<p><input name='metric' class='w3-check w3-margin-top' type='checkbox' %METRIC%> Usar Métrica (Celsius)</p>"
|
"<p><input name='metric' class='w3-check w3-margin-top' type='checkbox' %METRIC%> {{wcfg.metric}}</p>"
|
||||||
"<p>Idioma del clima <select class='w3-option w3-padding' name='language'>%LANGUAGEOPTIONS%</select></p>"
|
"<p>{{wcfg.language}} <select class='w3-option w3-padding' name='language'>%LANGUAGEOPTIONS%</select></p>"
|
||||||
"<button class='w3-button w3-block w3-grey w3-section w3-padding' type='submit'>Guardar</button></form>"
|
"<button class='w3-button w3-block w3-grey w3-section w3-padding' type='submit'>{{cfg.save}}</button></form>"
|
||||||
"<script>function isNumberKey(e){var h=e.which?e.which:event.keyCode;return!(h>31&&(h<48||h>57))}</script>";
|
"<script>function isNumberKey(e){var h=e.which?e.which:event.keyCode;return!(h>31&&(h<48||h>57))}</script>";
|
||||||
|
|
||||||
static const char LANG_OPTIONS[] PROGMEM = "<option>ar</option>"
|
static const char LANG_OPTIONS[] PROGMEM = "<option>ar</option>"
|
||||||
|
|
@ -197,24 +202,25 @@ static const char COLOR_THEMES[] PROGMEM = "<option>red</option>"
|
||||||
"<option>dark-grey</option>"
|
"<option>dark-grey</option>"
|
||||||
"<option>black</option>"
|
"<option>black</option>"
|
||||||
"<option>w3schools</option>";
|
"<option>w3schools</option>";
|
||||||
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
SPIFFS.begin();
|
SPIFFS.begin();
|
||||||
delay(10);
|
delay(10);
|
||||||
|
|
||||||
//New Line to clear from start garbage
|
|
||||||
Serial.println();
|
Serial.println();
|
||||||
|
|
||||||
// Initialize digital pin for LED (little blue light on the Wemos D1 Mini)
|
|
||||||
pinMode(externalLight, OUTPUT);
|
pinMode(externalLight, OUTPUT);
|
||||||
|
|
||||||
//Some Defaults before loading from Config.txt
|
|
||||||
PrinterPort = printerClient.getPrinterPort();
|
PrinterPort = printerClient.getPrinterPort();
|
||||||
|
|
||||||
readSettings();
|
readSettings();
|
||||||
|
|
||||||
|
if (!I18N::load(UiLanguage)) {
|
||||||
|
I18N::load("en");
|
||||||
|
}
|
||||||
|
|
||||||
// initialize display
|
// initialize display
|
||||||
display.init();
|
display.init();
|
||||||
if (INVERT_DISPLAY) {
|
if (INVERT_DISPLAY) {
|
||||||
|
|
@ -228,7 +234,8 @@ void setup() {
|
||||||
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display.setContrast(255); // default is 255
|
display.setContrast(255); // default is 255
|
||||||
display.setFont(ArialMT_Plain_16);
|
display.setFont(ArialMT_Plain_16);
|
||||||
display.drawString(64, 1, "Printer Monitor");
|
display.drawString(64, 1, I18N::t("app.title"));
|
||||||
|
|
||||||
display.setFont(ArialMT_Plain_10);
|
display.setFont(ArialMT_Plain_10);
|
||||||
display.drawString(64, 18, "for " + printerClient.getPrinterType());
|
display.drawString(64, 18, "for " + printerClient.getPrinterType());
|
||||||
display.setFont(ArialMT_Plain_16);
|
display.setFont(ArialMT_Plain_16);
|
||||||
|
|
@ -273,27 +280,33 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// print the received signal strength:
|
// print the received signal strength:
|
||||||
Serial.print("Intensidad de la señal (RSSI): ");
|
Serial.print(I18N::t("wifi.signal")+" (RSSI): ");
|
||||||
Serial.print(getWifiQuality());
|
Serial.print(getWifiQuality());
|
||||||
Serial.println("%");
|
Serial.println("%");
|
||||||
|
|
||||||
|
// NOTA: usa un code de 2 letras "es" o "en"
|
||||||
|
if (!I18N::load(WeatherLanguage)) {
|
||||||
|
I18N::load("en");
|
||||||
|
}
|
||||||
|
|
||||||
if (ENABLE_OTA) {
|
if (ENABLE_OTA) {
|
||||||
ArduinoOTA.onStart([]() {
|
ArduinoOTA.onStart([]() {
|
||||||
Serial.println("Start");
|
Serial.println(I18N::t("ota.start"));
|
||||||
});
|
});
|
||||||
ArduinoOTA.onEnd([]() {
|
ArduinoOTA.onEnd([]() {
|
||||||
Serial.println("\nEnd");
|
Serial.println("\n"+I18N::t("ota.end"));
|
||||||
});
|
});
|
||||||
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
|
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
|
||||||
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
|
Serial.print(I18N::t("ota.progress"));
|
||||||
|
Serial.printf(": %u%%\r", (progress / (total / 100)));
|
||||||
});
|
});
|
||||||
ArduinoOTA.onError([](ota_error_t error) {
|
ArduinoOTA.onError([](ota_error_t error) {
|
||||||
Serial.printf("Error[%u]: ", error);
|
Serial.printf("Error[%u]: ", error);
|
||||||
if (error == OTA_AUTH_ERROR) Serial.println("Autentificación fallida");
|
if (error == OTA_AUTH_ERROR) Serial.println(I18N::t("ota.error.auth"));
|
||||||
else if (error == OTA_BEGIN_ERROR) Serial.println("Inicio fallido");
|
else if (error == OTA_BEGIN_ERROR) Serial.println(I18N::t("ota.error.begin"));
|
||||||
else if (error == OTA_CONNECT_ERROR) Serial.println("Conexión fallida");
|
else if (error == OTA_CONNECT_ERROR) Serial.println(I18N::t("ota.error.connect"));
|
||||||
else if (error == OTA_RECEIVE_ERROR) Serial.println("Recepción fallida");
|
else if (error == OTA_RECEIVE_ERROR) Serial.println(I18N::t("ota.error.receive"));
|
||||||
else if (error == OTA_END_ERROR) Serial.println("Finalización fallida");
|
else if (error == OTA_END_ERROR) Serial.println(I18N::t("ota.error.end"));
|
||||||
});
|
});
|
||||||
ArduinoOTA.setHostname((const char *)hostname.c_str());
|
ArduinoOTA.setHostname((const char *)hostname.c_str());
|
||||||
if (OTA_Password != "") {
|
if (OTA_Password != "") {
|
||||||
|
|
@ -314,26 +327,26 @@ void setup() {
|
||||||
serverUpdater.setup(&server, "/update", www_username, www_password);
|
serverUpdater.setup(&server, "/update", www_username, www_password);
|
||||||
// Start the server
|
// Start the server
|
||||||
server.begin();
|
server.begin();
|
||||||
Serial.println("Servidor iniciado");
|
Serial.println(I18N::t("app.web.started"));
|
||||||
// Print the IP address
|
// Print the IP address
|
||||||
String webAddress = "http://" + WiFi.localIP().toString() + ":" + String(WEBSERVER_PORT) + "/";
|
String webAddress = "http://" + WiFi.localIP().toString() + ":" + String(WEBSERVER_PORT) + "/";
|
||||||
Serial.println("Use esta URL : " + webAddress);
|
Serial.println(I18N::t("app.web.must_connect")+": " + webAddress);
|
||||||
display.clear();
|
display.clear();
|
||||||
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display.setFont(ArialMT_Plain_10);
|
display.setFont(ArialMT_Plain_10);
|
||||||
display.drawString(64, 10, "Entorno web iniciado");
|
display.drawString(64, 10, I18N::t("app.web.started"));
|
||||||
display.drawString(64, 20, "Debe conectar a la IP");
|
display.drawString(64, 20, I18N::t("app.web.must_connect"));
|
||||||
display.setFont(ArialMT_Plain_16);
|
display.setFont(ArialMT_Plain_16);
|
||||||
display.drawString(64, 30, WiFi.localIP().toString());
|
display.drawString(64, 30, WiFi.localIP().toString());
|
||||||
display.drawString(64, 46, "Puerto: " + String(WEBSERVER_PORT));
|
display.drawString(64, 46, I18N::t("app.web.port")+": " + String(WEBSERVER_PORT));
|
||||||
display.display();
|
display.display();
|
||||||
} else {
|
} else {
|
||||||
Serial.println("Entorno web Deshabilitado");
|
Serial.println(I18N::t("app.web.disabled"));
|
||||||
display.clear();
|
display.clear();
|
||||||
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display.setFont(ArialMT_Plain_10);
|
display.setFont(ArialMT_Plain_10);
|
||||||
display.drawString(64, 10, "Entorno web deshabilitado");
|
display.drawString(64, 10, I18N::t("app.web.disabled"));
|
||||||
display.drawString(64, 20, "Activado en Settings.h");
|
display.drawString(64, 20, I18N::t("app.web.enable_in_settings"));
|
||||||
display.display();
|
display.display();
|
||||||
}
|
}
|
||||||
flashLED(5, 100);
|
flashLED(5, 100);
|
||||||
|
|
@ -341,6 +354,24 @@ void setup() {
|
||||||
Serial.println("*** Leaving setup()");
|
Serial.println("*** Leaving setup()");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void diagI18N() {
|
||||||
|
// intenta cargar solo una vez
|
||||||
|
if (!I18N_TRIED) {
|
||||||
|
I18N_TRIED = true;
|
||||||
|
Serial.println("[diag] I18N::load('en')...");
|
||||||
|
bool ok = I18N::load("en"); // fuerza "en" para descartar WeatherLanguage
|
||||||
|
Serial.println(String("[diag] load -> ") + (ok ? "OK" : "FAIL"));
|
||||||
|
Serial.println("[diag] current=" + I18N::current());
|
||||||
|
}
|
||||||
|
|
||||||
|
// (opcional) dibuja una línea en la OLED para ver si cambia
|
||||||
|
display.setTextAlignment(TEXT_ALIGN_LEFT);
|
||||||
|
display.setFont(ArialMT_Plain_10);
|
||||||
|
display.drawString(0, 56, I18N::t("state.disconnected"));
|
||||||
|
display.display();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void findMDNS() {
|
void findMDNS() {
|
||||||
if (PrinterHostName == "" || ENABLE_OTA == false) {
|
if (PrinterHostName == "" || ENABLE_OTA == false) {
|
||||||
return; // nothing to do here
|
return; // nothing to do here
|
||||||
|
|
@ -349,10 +380,10 @@ void findMDNS() {
|
||||||
// over tcp, and get the number of available devices
|
// over tcp, and get the number of available devices
|
||||||
int n = MDNS.queryService("http", "tcp");
|
int n = MDNS.queryService("http", "tcp");
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
Serial.println("sin servicio - compruebe que el servidor de la impresora esté encendido");
|
Serial.println(I18N::t("mdns.not_service"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Serial.println("*** Buscando " + PrinterHostName + " en mDNS");
|
Serial.println(I18N::t("mdns.searching") + PrinterHostName + I18N::t("mdns.in_mdns"));
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
// Going through every available service,
|
// Going through every available service,
|
||||||
// we're searching for the one whose hostname
|
// we're searching for the one whose hostname
|
||||||
|
|
@ -362,7 +393,7 @@ void findMDNS() {
|
||||||
IPAddress serverIp = MDNS.IP(i);
|
IPAddress serverIp = MDNS.IP(i);
|
||||||
PrinterServer = serverIp.toString();
|
PrinterServer = serverIp.toString();
|
||||||
PrinterPort = MDNS.port(i); // save the port
|
PrinterPort = MDNS.port(i); // save the port
|
||||||
Serial.println("*** Servidor de impresora encontrado " + PrinterHostName + " http://" + PrinterServer + ":" + PrinterPort);
|
Serial.println(I18N::t("mdns.printer_server.found") + PrinterHostName + " http://" + PrinterServer + ":" + PrinterPort);
|
||||||
writeSettings(); // update the settings
|
writeSettings(); // update the settings
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -372,7 +403,13 @@ void findMDNS() {
|
||||||
// Main Loop
|
// Main Loop
|
||||||
//************************************************************
|
//************************************************************
|
||||||
void loop() {
|
void loop() {
|
||||||
|
// --- Diag cíclico cada 5s ---
|
||||||
|
if (millis() - DIAG_LAST > 5000UL) {
|
||||||
|
DIAG_LAST = millis();
|
||||||
|
diagI18N();
|
||||||
|
yield(); // alimenta el watchdog
|
||||||
|
}
|
||||||
|
|
||||||
//Get Time Update
|
//Get Time Update
|
||||||
if((getMinutesFromLastRefresh() >= minutesBetweenDataRefresh) || lastEpoch == 0) {
|
if((getMinutesFromLastRefresh() >= minutesBetweenDataRefresh) || lastEpoch == 0) {
|
||||||
getUpdateTime();
|
getUpdateTime();
|
||||||
|
|
@ -413,19 +450,19 @@ void getUpdateTime() {
|
||||||
Serial.println();
|
Serial.println();
|
||||||
|
|
||||||
if (displayOn && DISPLAYWEATHER) {
|
if (displayOn && DISPLAYWEATHER) {
|
||||||
Serial.println("Obteniendo datos del clima...");
|
Serial.println(I18N::t("weather.get_data"));
|
||||||
weatherClient.updateWeather();
|
weatherClient.updateWeather();
|
||||||
}
|
}
|
||||||
|
|
||||||
Serial.println("Actualizando...");
|
Serial.println(I18N::t("clock.updating"));
|
||||||
//Update the Time
|
//Update the Time
|
||||||
timeClient.updateTime();
|
timeClient.updateTime();
|
||||||
lastEpoch = timeClient.getCurrentEpoch();
|
lastEpoch = timeClient.getCurrentEpoch();
|
||||||
|
|
||||||
if (IS_24HOUR) {
|
if (IS_24HOUR) {
|
||||||
Serial.println("Local time: " + timeClient.getFormattedTime());
|
Serial.println(I18N::t("clock.local_time") + timeClient.getFormattedTime());
|
||||||
} else {
|
} else {
|
||||||
Serial.println("Local time: " + timeClient.getAmPmFormattedTime());
|
Serial.println(I18N::t("clock.local_time") + timeClient.getAmPmFormattedTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
ledOnOff(false); // turn off the LED
|
ledOnOff(false); // turn off the LED
|
||||||
|
|
@ -442,7 +479,7 @@ void handleSystemReset() {
|
||||||
if (!authentication()) {
|
if (!authentication()) {
|
||||||
return server.requestAuthentication();
|
return server.requestAuthentication();
|
||||||
}
|
}
|
||||||
Serial.println("Reiniciar configuración del sistema");
|
Serial.println(I18N::t("app.reset_settings"));
|
||||||
if (SPIFFS.remove(CONFIG)) {
|
if (SPIFFS.remove(CONFIG)) {
|
||||||
redirectHome();
|
redirectHome();
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
|
|
@ -453,6 +490,7 @@ void handleUpdateWeather() {
|
||||||
if (!authentication()) {
|
if (!authentication()) {
|
||||||
return server.requestAuthentication();
|
return server.requestAuthentication();
|
||||||
}
|
}
|
||||||
|
Serial.println(server.arg("language"));
|
||||||
DISPLAYWEATHER = server.hasArg("isWeatherEnabled");
|
DISPLAYWEATHER = server.hasArg("isWeatherEnabled");
|
||||||
WeatherApiKey = server.arg("openWeatherMapApiKey");
|
WeatherApiKey = server.arg("openWeatherMapApiKey");
|
||||||
CityIDs[0] = server.arg("city1").toInt();
|
CityIDs[0] = server.arg("city1").toInt();
|
||||||
|
|
@ -470,6 +508,17 @@ void handleUpdateConfig() {
|
||||||
if (!authentication()) {
|
if (!authentication()) {
|
||||||
return server.requestAuthentication();
|
return server.requestAuthentication();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (server.hasArg("uilang")) {
|
||||||
|
UiLanguage = server.arg("uilang");
|
||||||
|
if (!I18N::load(UiLanguage)) {
|
||||||
|
I18N::load("en");
|
||||||
|
}
|
||||||
|
ui.init();
|
||||||
|
if (INVERT_DISPLAY) display.flipScreenVertically();
|
||||||
|
ui.update();
|
||||||
|
}
|
||||||
|
|
||||||
if (server.hasArg("printer")) {
|
if (server.hasArg("printer")) {
|
||||||
printerClient.setPrinterName(server.arg("printer"));
|
printerClient.setPrinterName(server.arg("printer"));
|
||||||
}
|
}
|
||||||
|
|
@ -535,6 +584,7 @@ void handleWeatherConfigure() {
|
||||||
server.sendContent(html);
|
server.sendContent(html);
|
||||||
|
|
||||||
String form = FPSTR(WEATHER_FORM);
|
String form = FPSTR(WEATHER_FORM);
|
||||||
|
I18N::apply(form);
|
||||||
String isWeatherChecked = "";
|
String isWeatherChecked = "";
|
||||||
if (DISPLAYWEATHER) {
|
if (DISPLAYWEATHER) {
|
||||||
isWeatherChecked = "checked='checked'";
|
isWeatherChecked = "checked='checked'";
|
||||||
|
|
@ -549,6 +599,7 @@ void handleWeatherConfigure() {
|
||||||
}
|
}
|
||||||
form.replace("%METRIC%", checked);
|
form.replace("%METRIC%", checked);
|
||||||
String options = FPSTR(LANG_OPTIONS);
|
String options = FPSTR(LANG_OPTIONS);
|
||||||
|
I18N::apply(options);
|
||||||
options.replace(">"+String(WeatherLanguage)+"<", " selected>"+String(WeatherLanguage)+"<");
|
options.replace(">"+String(WeatherLanguage)+"<", " selected>"+String(WeatherLanguage)+"<");
|
||||||
form.replace("%LANGUAGEOPTIONS%", options);
|
form.replace("%LANGUAGEOPTIONS%", options);
|
||||||
server.sendContent(form);
|
server.sendContent(form);
|
||||||
|
|
@ -576,27 +627,51 @@ void handleConfigure() {
|
||||||
html = getHeader();
|
html = getHeader();
|
||||||
server.sendContent(html);
|
server.sendContent(html);
|
||||||
|
|
||||||
CHANGE_FORM = "<form class='w3-container' action='/updateconfig' method='get'><h2>Configuración:</h2>"
|
String uiLangOptions =
|
||||||
"<p><label>" + printerClient.getPrinterType() + " API Key (se obtiene de " + printerClient.getPrinterType() + ")</label>"
|
"<option value='en'>English</option>"
|
||||||
|
"<option value='es'>Español</option>"
|
||||||
|
"<option value='fr'>Français</option>"
|
||||||
|
"<option value='de'>Deutsch</option>"
|
||||||
|
"<option value='it'>Italiano</option>"
|
||||||
|
"<option value='zh'>中文</option>"
|
||||||
|
"<option value='ja'>日本語</option>"
|
||||||
|
"<option value='nl'>Nederlands</option>"
|
||||||
|
"<option value='no'>Norsk</option>"
|
||||||
|
"<option value='pt'>Português</option>"
|
||||||
|
"<option value='ru'>Русский</option>"
|
||||||
|
"<option value='uk'>Українська</option>"
|
||||||
|
"<option value='ko'>한국어</option>";
|
||||||
|
|
||||||
|
uiLangOptions.replace("value='" + UiLanguage + "'>",
|
||||||
|
"value='" + UiLanguage + "' selected>");
|
||||||
|
|
||||||
|
String uiLangBlock =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CHANGE_FORM = "<form class='w3-container' action='/updateconfig' method='get'><h2>{{cfg.header}}</h2>"
|
||||||
|
"<p><label>" + printerClient.getPrinterType() + " {{cfg.printer.api_key}} " + printerClient.getPrinterType() + ")</label>"
|
||||||
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='PrinterApiKey' id='PrinterApiKey' value='%OCTOKEY%' maxlength='60'></p>";
|
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='PrinterApiKey' id='PrinterApiKey' value='%OCTOKEY%' maxlength='60'></p>";
|
||||||
if (printerClient.getPrinterType() == "OctoPrint") {
|
if (printerClient.getPrinterType() == "OctoPrint") {
|
||||||
CHANGE_FORM += "<p><label>" + printerClient.getPrinterType() + " Nombre de host </label><input class='w3-input w3-border w3-margin-bottom' type='text' name='PrinterHostName' value='%OCTOHOST%' maxlength='60'></p>";
|
CHANGE_FORM += "<p><label>" + printerClient.getPrinterType() + " {{cfg.printer.hostname}} </label><input class='w3-input w3-border w3-margin-bottom' type='text' name='PrinterHostName' value='%OCTOHOST%' maxlength='60'></p>";
|
||||||
}
|
}
|
||||||
CHANGE_FORM += "<p><label>" + printerClient.getPrinterType() + " Dirección IP (sin http://)</label>"
|
CHANGE_FORM += "<p><label>" + printerClient.getPrinterType() + " {{cfg.printer.ip}}</label>"
|
||||||
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='PrinterAddress' id='PrinterAddress' value='%OCTOADDRESS%' maxlength='60'></p>"
|
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='PrinterAddress' id='PrinterAddress' value='%OCTOADDRESS%' maxlength='60'></p>"
|
||||||
"<p><label>" + printerClient.getPrinterType() + " Puerto</label>"
|
"<p><label>" + printerClient.getPrinterType() + " {{cfg.printer.port}}</label>"
|
||||||
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='PrinterPort' id='PrinterPort' value='%OCTOPORT%' maxlength='5' onkeypress='return isNumberKey(event)'></p>";
|
"<input class='w3-input w3-border w3-margin-bottom' type='text' name='PrinterPort' id='PrinterPort' value='%OCTOPORT%' maxlength='5' onkeypress='return isNumberKey(event)'></p>";
|
||||||
if (printerClient.getPrinterType() == "Repetier") {
|
if (printerClient.getPrinterType() == "Repetier") {
|
||||||
CHANGE_FORM += "<input type='button' value='Probar conexión' onclick='testRepetier()'>"
|
CHANGE_FORM += "<input type='button' value='{{cfg.test.conn}}' onclick='testRepetier()'>"
|
||||||
"<input type='hidden' id='selectedPrinter' value='" + printerClient.getPrinterName() + "'><p id='RepetierTest'></p>"
|
"<input type='hidden' id='selectedPrinter' value='" + printerClient.getPrinterName() + "'><p id='RepetierTest'></p>"
|
||||||
"<script>testRepetier();</script>";
|
"<script>testRepetier();</script>";
|
||||||
} else {
|
} else {
|
||||||
CHANGE_FORM += "<input type='button' value='Probar conexión y la respuesta API JSON' onclick='testOctoPrint()'><p id='OctoPrintTest'></p>";
|
CHANGE_FORM += "<input type='button' value='{{cfg.test.conn_json}}' onclick='testOctoPrint()'><p id='OctoPrintTest'></p>";
|
||||||
}
|
}
|
||||||
CHANGE_FORM += "<p><label>" + printerClient.getPrinterType() + " Usuario (solo si tienes haproxy o autentificado básico activado)</label><input class='w3-input w3-border w3-margin-bottom' type='text' name='octoUser' value='%OCTOUSER%' maxlength='30'></p>"
|
CHANGE_FORM += "<p><label>" + printerClient.getPrinterType() + " {{cfg.printer.user}}</label><input class='w3-input w3-border w3-margin-bottom' type='text' name='octoUser' value='%OCTOUSER%' maxlength='30'></p>"
|
||||||
"<p><label>" + printerClient.getPrinterType() + " Contraseña </label><input class='w3-input w3-border w3-margin-bottom' type='password' name='octoPass' value='%OCTOPASS%'></p>";
|
"<p><label>" + printerClient.getPrinterType() + " {{cfg.printer.pass}} </label><input class='w3-input w3-border w3-margin-bottom' type='password' name='octoPass' value='%OCTOPASS%'></p>";
|
||||||
|
CHANGE_FORM += "<p><label>{{cfg.settings.ui_language}} </label><select class='w3-option w3-padding' name='uilang'>" + uiLangOptions + "</select></p>";
|
||||||
|
|
||||||
|
I18N::apply(CHANGE_FORM);
|
||||||
|
|
||||||
|
|
||||||
if (printerClient.getPrinterType() == "Repetier") {
|
if (printerClient.getPrinterType() == "Repetier") {
|
||||||
html = "<script>function testRepetier(){var e=document.getElementById(\"RepetierTest\"),r=document.getElementById(\"PrinterAddress\").value,"
|
html = "<script>function testRepetier(){var e=document.getElementById(\"RepetierTest\"),r=document.getElementById(\"PrinterAddress\").value,"
|
||||||
|
|
@ -613,7 +688,7 @@ void handleConfigure() {
|
||||||
server.sendContent(html);
|
server.sendContent(html);
|
||||||
} else {
|
} else {
|
||||||
html = "<script>function testOctoPrint(){var e=document.getElementById(\"OctoPrintTest\"),t=document.getElementById(\"PrinterAddress\").value,"
|
html = "<script>function testOctoPrint(){var e=document.getElementById(\"OctoPrintTest\"),t=document.getElementById(\"PrinterAddress\").value,"
|
||||||
"n=document.getElementById(\"PrinterPort\").value;if(e.innerHTML=\"\",\"\"==t||\"\"==n)return e.innerHTML=\"* Dirección IP y puerto es obligatorio\","
|
"n=document.getElementById(\"PrinterPort\").value;if(e.innerHTML=\"\",\"\"==t||\"\"==n)return e.innerHTML=\"* Address and Port are required\","
|
||||||
"void(e.style.background=\"\");var r=\"http://\"+t+\":\"+n;r+=\"/api/job?apikey=\"+document.getElementById(\"PrinterApiKey\").value,window.open(r,\"_blank\").focus()}</script>";
|
"void(e.style.background=\"\");var r=\"http://\"+t+\":\"+n;r+=\"/api/job?apikey=\"+document.getElementById(\"PrinterApiKey\").value,window.open(r,\"_blank\").focus()}</script>";
|
||||||
server.sendContent(html);
|
server.sendContent(html);
|
||||||
}
|
}
|
||||||
|
|
@ -630,7 +705,7 @@ void handleConfigure() {
|
||||||
server.sendContent(form);
|
server.sendContent(form);
|
||||||
|
|
||||||
form = FPSTR(CLOCK_FORM);
|
form = FPSTR(CLOCK_FORM);
|
||||||
|
I18N::apply(form);
|
||||||
String isClockChecked = "";
|
String isClockChecked = "";
|
||||||
if (DISPLAYCLOCK) {
|
if (DISPLAYCLOCK) {
|
||||||
isClockChecked = "checked='checked'";
|
isClockChecked = "checked='checked'";
|
||||||
|
|
@ -664,8 +739,10 @@ void handleConfigure() {
|
||||||
server.sendContent(form);
|
server.sendContent(form);
|
||||||
|
|
||||||
form = FPSTR(THEME_FORM);
|
form = FPSTR(THEME_FORM);
|
||||||
|
I18N::apply(form);
|
||||||
|
|
||||||
String themeOptions = FPSTR(COLOR_THEMES);
|
String themeOptions = FPSTR(COLOR_THEMES);
|
||||||
|
I18N::apply(themeOptions);
|
||||||
themeOptions.replace(">"+String(themeColor)+"<", " selected>"+String(themeColor)+"<");
|
themeOptions.replace(">"+String(themeColor)+"<", " selected>"+String(themeColor)+"<");
|
||||||
form.replace("%THEME_OPTIONS%", themeOptions);
|
form.replace("%THEME_OPTIONS%", themeOptions);
|
||||||
form.replace("%UTCOFFSET%", String(UtcOffset));
|
form.replace("%UTCOFFSET%", String(UtcOffset));
|
||||||
|
|
@ -721,9 +798,10 @@ String getHeader() {
|
||||||
|
|
||||||
String getHeader(boolean refresh) {
|
String getHeader(boolean refresh) {
|
||||||
String menu = FPSTR(WEB_ACTIONS);
|
String menu = FPSTR(WEB_ACTIONS);
|
||||||
|
I18N::apply(menu);
|
||||||
|
|
||||||
String html = "<!DOCTYPE HTML>";
|
String html = "<!DOCTYPE HTML>";
|
||||||
html += "<html><head><title>Printer Monitor</title><link rel='icon' href='data:;base64,='>";
|
html += "<html><head><title>{{app.title}}</title><link rel='icon' href='data:;base64,='>";
|
||||||
html += "<meta charset='UTF-8'>";
|
html += "<meta charset='UTF-8'>";
|
||||||
html += "<meta name='viewport' content='width=device-width, initial-scale=1'>";
|
html += "<meta name='viewport' content='width=device-width, initial-scale=1'>";
|
||||||
if (refresh) {
|
if (refresh) {
|
||||||
|
|
@ -737,20 +815,21 @@ String getHeader(boolean refresh) {
|
||||||
html += "<div class='w3-container w3-theme-d2'>";
|
html += "<div class='w3-container w3-theme-d2'>";
|
||||||
html += "<span onclick='closeSidebar()' class='w3-button w3-display-topright w3-large'><i class='fa fa-times'></i></span>";
|
html += "<span onclick='closeSidebar()' class='w3-button w3-display-topright w3-large'><i class='fa fa-times'></i></span>";
|
||||||
html += "<div class='w3-cell w3-left w3-xxxlarge' style='width:60px'><i class='fa fa-cube'></i></div>";
|
html += "<div class='w3-cell w3-left w3-xxxlarge' style='width:60px'><i class='fa fa-cube'></i></div>";
|
||||||
html += "<div class='w3-padding'>Menu</div></div>";
|
html += "<div class='w3-padding'>{{ menu.title }}</div></div>";
|
||||||
html += menu;
|
html += menu;
|
||||||
html += "</nav>";
|
html += "</nav>";
|
||||||
html += "<header class='w3-top w3-bar w3-theme'><button class='w3-bar-item w3-button w3-xxxlarge w3-hover-theme' onclick='openSidebar()'><i class='fa fa-bars'></i></button><h2 class='w3-bar-item'>Printer Monitor</h2></header>";
|
html += "<header class='w3-top w3-bar w3-theme'><button class='w3-bar-item w3-button w3-xxxlarge w3-hover-theme' onclick='openSidebar()'><i class='fa fa-bars'></i></button><h2 class='w3-bar-item'>{{ printer.monitor }}</h2></header>";
|
||||||
html += "<script>";
|
html += "<script>";
|
||||||
html += "function openSidebar(){document.getElementById('mySidebar').style.display='block'}function closeSidebar(){document.getElementById('mySidebar').style.display='none'}closeSidebar();";
|
html += "function openSidebar(){document.getElementById('mySidebar').style.display='block'}function closeSidebar(){document.getElementById('mySidebar').style.display='none'}closeSidebar();";
|
||||||
html += "</script>";
|
html += "</script>";
|
||||||
html += "<br><div class='w3-container w3-large' style='margin-top:88px'>";
|
html += "<br><div class='w3-container w3-large' style='margin-top:88px'>";
|
||||||
|
I18N::apply(html);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
String getFooter() {
|
String getFooter() {
|
||||||
int8_t rssi = getWifiQuality();
|
int8_t rssi = getWifiQuality();
|
||||||
Serial.print("Intensidad de la señal (RSSI): ");
|
Serial.print(I18N::t("wifi.signal")+" (RSSI): ");
|
||||||
Serial.print(rssi);
|
Serial.print(rssi);
|
||||||
Serial.println("%");
|
Serial.println("%");
|
||||||
String html = "<br><br><br>";
|
String html = "<br><br><br>";
|
||||||
|
|
@ -759,11 +838,12 @@ String getFooter() {
|
||||||
if (lastReportStatus != "") {
|
if (lastReportStatus != "") {
|
||||||
html += "<i class='fa fa-external-link'></i> Report Status: " + lastReportStatus + "<br>";
|
html += "<i class='fa fa-external-link'></i> Report Status: " + lastReportStatus + "<br>";
|
||||||
}
|
}
|
||||||
html += "<i class='fa fa-paper-plane-o'></i> Version: " + String(VERSION) + "<br>";
|
html += "<i class='fa fa-paper-plane-o'></i> {{app.version}}: " + String(VERSION) + "<br>";
|
||||||
html += "<i class='fa fa-rss'></i> Intensidad de la señal: ";
|
html += "<i class='fa fa-rss'></i> {{wifi.signal}}: ";
|
||||||
html += String(rssi) + "%";
|
html += String(rssi) + "%";
|
||||||
html += "</footer>";
|
html += "</footer>";
|
||||||
html += "</body></html>";
|
html += "</body></html>";
|
||||||
|
I18N::apply(html);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -788,45 +868,45 @@ void displayPrinterStatus() {
|
||||||
html += "<div class='w3-cell-row' style='width:100%'><h2>" + printerClient.getPrinterType() + " Monitor</h2></div><div class='w3-cell-row'>";
|
html += "<div class='w3-cell-row' style='width:100%'><h2>" + printerClient.getPrinterType() + " Monitor</h2></div><div class='w3-cell-row'>";
|
||||||
html += "<div class='w3-cell w3-container' style='width:100%'><p>";
|
html += "<div class='w3-cell w3-container' style='width:100%'><p>";
|
||||||
if (printerClient.getPrinterType() == "Repetier") {
|
if (printerClient.getPrinterType() == "Repetier") {
|
||||||
html += "Printer Name: " + printerClient.getPrinterName() + " <a href='/configure' title='Configure'><i class='fa fa-cog'></i></a><br>";
|
html += "{{web.printername}}: " + printerClient.getPrinterName() + " <a href='/configure' title='Configure'><i class='fa fa-cog'></i></a><br>";
|
||||||
} else {
|
} else {
|
||||||
html += "Nombre de host: " + PrinterHostName + " <a href='/configure' title='Configure'><i class='fa fa-cog'></i></a><br>";
|
html += "{{web.hostname}}: " + PrinterHostName + " <a href='/configure' title='Configure'><i class='fa fa-cog'></i></a><br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (printerClient.getError() != "") {
|
if (printerClient.getError() != "") {
|
||||||
html += "Estado: Desconectado<br>";
|
html += "{{status}}: {{ state.disconnected }}<br>";
|
||||||
html += "Motivo: " + printerClient.getError() + "<br>";
|
html += "{{reason}}: " + printerClient.getError() + "<br>";
|
||||||
} else {
|
} else {
|
||||||
html += "Estado: " + printerClient.getState();
|
html += "{{status}}: " + printerClient.getState();
|
||||||
if (printerClient.isPSUoff() && HAS_PSU) {
|
if (printerClient.isPSUoff() && HAS_PSU) {
|
||||||
html += ", PSU off";
|
html += ", {{psu.off}}";
|
||||||
}
|
}
|
||||||
html += "<br>";
|
html += "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (printerClient.isPrinting()) {
|
if (printerClient.isPrinting()) {
|
||||||
html += "File: " + printerClient.getFileName() + "<br>";
|
html += "{{file}}: " + printerClient.getFileName() + "<br>";
|
||||||
float fileSize = printerClient.getFileSize().toFloat();
|
float fileSize = printerClient.getFileSize().toFloat();
|
||||||
if (fileSize > 0) {
|
if (fileSize > 0) {
|
||||||
fileSize = fileSize / 1024;
|
fileSize = fileSize / 1024;
|
||||||
html += "File Size: " + String(fileSize) + "KB<br>";
|
html += "{{file.size_kb}}: " + String(fileSize) + "KB<br>";
|
||||||
}
|
}
|
||||||
int filamentLength = printerClient.getFilamentLength().toInt();
|
int filamentLength = printerClient.getFilamentLength().toInt();
|
||||||
if (filamentLength > 0) {
|
if (filamentLength > 0) {
|
||||||
float fLength = float(filamentLength) / 1000;
|
float fLength = float(filamentLength) / 1000;
|
||||||
html += "Filamento: " + String(fLength) + "m<br>";
|
html += "{{filament.m}}: " + String(fLength) + "m<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "Temperatura boquilla: " + printerClient.getTempToolActual() + "° C<br>";
|
html += "{{ui.nozzle}: " + printerClient.getTempToolActual() + "° C<br>";
|
||||||
if ( printerClient.getTempBedActual() != 0 ) {
|
if ( printerClient.getTempBedActual() != 0 ) {
|
||||||
html += "Temperatura cama: " + printerClient.getTempBedActual() + "° C<br>";
|
html += "{{ui.bed}}: " + printerClient.getTempBedActual() + "° C<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
int val = printerClient.getProgressPrintTimeLeft().toInt();
|
int val = printerClient.getProgressPrintTimeLeft().toInt();
|
||||||
int hours = numberOfHours(val);
|
int hours = numberOfHours(val);
|
||||||
int minutes = numberOfMinutes(val);
|
int minutes = numberOfMinutes(val);
|
||||||
int seconds = numberOfSeconds(val);
|
int seconds = numberOfSeconds(val);
|
||||||
html += "Est. Print Time Left: " + zeroPad(hours) + ":" + zeroPad(minutes) + ":" + zeroPad(seconds) + "<br>";
|
html += "{{time.remaining}}: " + zeroPad(hours) + ":" + zeroPad(minutes) + ":" + zeroPad(seconds) + "<br>";
|
||||||
|
|
||||||
val = printerClient.getProgressPrintTime().toInt();
|
val = printerClient.getProgressPrintTime().toInt();
|
||||||
hours = numberOfHours(val);
|
hours = numberOfHours(val);
|
||||||
|
|
@ -841,17 +921,18 @@ void displayPrinterStatus() {
|
||||||
|
|
||||||
html += "</p></div></div>";
|
html += "</p></div></div>";
|
||||||
|
|
||||||
html += "<div class='w3-cell-row' style='width:100%'><h2>Hora: " + displayTime + "</h2></div>";
|
html += "<div class='w3-cell-row' style='width:100%'><h2>{{clock.time}}: " + displayTime + "</h2></div>";
|
||||||
|
I18N::apply(html);
|
||||||
server.sendContent(html); // spit out what we got
|
server.sendContent(html); // spit out what we got
|
||||||
html = "";
|
html = "";
|
||||||
|
|
||||||
if (DISPLAYWEATHER) {
|
if (DISPLAYWEATHER) {
|
||||||
if (weatherClient.getCity(0) == "") {
|
if (weatherClient.getCity(0) == "") {
|
||||||
html += "<p>Por favor <a href='/configureweather'>Configure clima</a> API</p>";
|
html += "<p>{{weather.please}} <a href='/configureweather'>{{weather.configure_link}}</a> API</p>";
|
||||||
if (weatherClient.getError() != "") {
|
if (weatherClient.getError() != "") {
|
||||||
html += "<p>Clima Error: <strong>" + weatherClient.getError() + "</strong></p>";
|
html += "<p>{{weather.error}}: <strong>" + weatherClient.getError() + "</strong></p>";
|
||||||
}
|
}
|
||||||
|
I18N::apply(html);
|
||||||
} else {
|
} else {
|
||||||
html += "<div class='w3-cell-row' style='width:100%'><h2>" + weatherClient.getCity(0) + ", " + weatherClient.getCountry(0) + "</h2></div><div class='w3-cell-row'>";
|
html += "<div class='w3-cell-row' style='width:100%'><h2>" + weatherClient.getCity(0) + ", " + weatherClient.getCountry(0) + "</h2></div><div class='w3-cell-row'>";
|
||||||
html += "<div class='w3-cell w3-left w3-medium' style='width:120px'>";
|
html += "<div class='w3-cell w3-left w3-medium' style='width:120px'>";
|
||||||
|
|
@ -859,16 +940,16 @@ void displayPrinterStatus() {
|
||||||
html += weatherClient.getIcon(0);
|
html += weatherClient.getIcon(0);
|
||||||
html += "@2x.png' alt='";
|
html += "@2x.png' alt='";
|
||||||
html += weatherClient.getDescription(0);
|
html += weatherClient.getDescription(0);
|
||||||
html += "'><br>";html += weatherClient.getHumidity(0) + "% Humedad<br>";
|
html += "'><br>";html += weatherClient.getHumidity(0) + "% {{weather.humidity}}<br>";
|
||||||
html += weatherClient.getWind(0) + " <span class='w3-tiny'>" + getSpeedSymbol() + "</span> Viento<br>";
|
html += weatherClient.getWind(0) + " <span class='w3-tiny'>" + getSpeedSymbol() + "</span> {{weather.wind}}<br>";
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
html += "<div class='w3-cell w3-container' style='width:100%'><p>";
|
html += "<div class='w3-cell w3-container' style='width:100%'><p>";
|
||||||
html += weatherClient.getCondition(0) + " (" + weatherClient.getDescription(0) + ")<br>";
|
html += weatherClient.getCondition(0) + " (" + weatherClient.getDescription(0) + ")<br>";
|
||||||
html += weatherClient.getTempRounded(0) + getTempSymbol(true) + "<br>";
|
html += weatherClient.getTempRounded(0) + getTempSymbol(true) + "<br>";
|
||||||
html += "<a href='https://www.google.com/maps/@" + weatherClient.getLat(0) + "," + weatherClient.getLon(0) + ",10000m/data=!3m1!1e3' target='_BLANK'><i class='fa fa-map-marker' style='color:red'></i> Map It!</a><br>";
|
html += "<a href='https://www.google.com/maps/@" + weatherClient.getLat(0) + "," + weatherClient.getLon(0) + ",10000m/data=!3m1!1e3' target='_BLANK'><i class='fa fa-map-marker' style='color:red'></i> {{map.it}}</a><br>";
|
||||||
html += "</p></div></div>";
|
html += "</p></div></div>";
|
||||||
|
I18N::apply(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
server.sendContent(html); // spit out what we got
|
server.sendContent(html); // spit out what we got
|
||||||
html = ""; // fresh start
|
html = ""; // fresh start
|
||||||
}
|
}
|
||||||
|
|
@ -880,24 +961,24 @@ void displayPrinterStatus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void configModeCallback (WiFiManager *myWiFiManager) {
|
void configModeCallback (WiFiManager *myWiFiManager) {
|
||||||
Serial.println("Modo configuración");
|
Serial.println(I18N::t("app.setup.mode"));
|
||||||
Serial.println(WiFi.softAPIP());
|
Serial.println(WiFi.softAPIP());
|
||||||
|
|
||||||
display.clear();
|
display.clear();
|
||||||
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display.setFont(ArialMT_Plain_10);
|
display.setFont(ArialMT_Plain_10);
|
||||||
display.drawString(64, 0, "Configure la Wifi");
|
display.drawString(64, 0, I18N::t("cfg.setup.wifi"));
|
||||||
display.drawString(64, 10, "Conecte al punto de acceso");
|
display.drawString(64, 10, I18N::t("cfg.setup.ap"));
|
||||||
display.setFont(ArialMT_Plain_16);
|
display.setFont(ArialMT_Plain_16);
|
||||||
display.drawString(64, 26, myWiFiManager->getConfigPortalSSID());
|
display.drawString(64, 26, myWiFiManager->getConfigPortalSSID());
|
||||||
display.setFont(ArialMT_Plain_10);
|
display.setFont(ArialMT_Plain_10);
|
||||||
display.drawString(64, 46, "y configure la wifi");
|
display.drawString(64, 46, I18N::t("cfg.setup.wifi2"));
|
||||||
display.display();
|
display.display();
|
||||||
|
|
||||||
Serial.println("Configure en Monitor");
|
Serial.println(I18N::t("cfg.setup.monitor"));
|
||||||
Serial.println("Conecte al punto de acceso");
|
Serial.println(I18N::t("cfg.setup.ap"));
|
||||||
Serial.println(myWiFiManager->getConfigPortalSSID());
|
Serial.println(myWiFiManager->getConfigPortalSSID());
|
||||||
Serial.println("y configure la wifi");
|
Serial.println(I18N::t("cfg.setup.wifi2"));
|
||||||
flashLED(20, 50);
|
flashLED(20, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -927,10 +1008,10 @@ void drawScreen1(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int
|
||||||
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display->setFont(ArialMT_Plain_16);
|
display->setFont(ArialMT_Plain_16);
|
||||||
if (bed != "0") {
|
if (bed != "0") {
|
||||||
display->drawString(29 + x, 0 + y, "Boquilla");
|
display->drawString(29 + x, 0 + y, I18N::t("ui.nozzle"));
|
||||||
display->drawString(89 + x, 0 + y, "Cama");
|
display->drawString(89 + x, 0 + y, I18N::t("ui.bed"));
|
||||||
} else {
|
} else {
|
||||||
display->drawString(64 + x, 0 + y, "Temperatura boquilla");
|
display->drawString(64 + x, 0 + y, I18N::t("ui.nozzle_temp_title"));
|
||||||
}
|
}
|
||||||
display->setTextAlignment(TEXT_ALIGN_LEFT);
|
display->setTextAlignment(TEXT_ALIGN_LEFT);
|
||||||
display->setFont(ArialMT_Plain_24);
|
display->setFont(ArialMT_Plain_24);
|
||||||
|
|
@ -948,7 +1029,7 @@ void drawScreen2(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int
|
||||||
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display->setFont(ArialMT_Plain_16);
|
display->setFont(ArialMT_Plain_16);
|
||||||
|
|
||||||
display->drawString(64 + x, 0 + y, "Tiempo restante");
|
display->drawString(64 + x, 0 + y, I18N::t("time.left"));
|
||||||
//display->setTextAlignment(TEXT_ALIGN_LEFT);
|
//display->setTextAlignment(TEXT_ALIGN_LEFT);
|
||||||
display->setFont(ArialMT_Plain_24);
|
display->setFont(ArialMT_Plain_24);
|
||||||
int val = printerClient.getProgressPrintTimeLeft().toInt();
|
int val = printerClient.getProgressPrintTimeLeft().toInt();
|
||||||
|
|
@ -964,7 +1045,7 @@ void drawScreen3(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int
|
||||||
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display->setFont(ArialMT_Plain_16);
|
display->setFont(ArialMT_Plain_16);
|
||||||
|
|
||||||
display->drawString(64 + x, 0 + y, "Tiempo impresión");
|
display->drawString(64 + x, 0 + y, I18N::t("time.printing"));
|
||||||
//display->setTextAlignment(TEXT_ALIGN_LEFT);
|
//display->setTextAlignment(TEXT_ALIGN_LEFT);
|
||||||
display->setFont(ArialMT_Plain_24);
|
display->setFont(ArialMT_Plain_24);
|
||||||
int val = printerClient.getProgressPrintTime().toInt();
|
int val = printerClient.getProgressPrintTime().toInt();
|
||||||
|
|
@ -986,7 +1067,7 @@ void drawClock(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16
|
||||||
displayTime = timeClient.getAmPmHours() + ":" + timeClient.getMinutes() + ":" + timeClient.getSeconds();
|
displayTime = timeClient.getAmPmHours() + ":" + timeClient.getMinutes() + ":" + timeClient.getSeconds();
|
||||||
}
|
}
|
||||||
String displayName = PrinterHostName;
|
String displayName = PrinterHostName;
|
||||||
if (printerClient.getPrinterType() == "Repetier") {
|
if (printerClient.getPrinterType() == I18N::t("cfg.setup.repetier_title")) {
|
||||||
displayName = printerClient.getPrinterName();
|
displayName = printerClient.getPrinterName();
|
||||||
}
|
}
|
||||||
display->setFont(ArialMT_Plain_16);
|
display->setFont(ArialMT_Plain_16);
|
||||||
|
|
@ -1083,24 +1164,24 @@ void drawClockHeaderOverlay(OLEDDisplay *display, OLEDDisplayUiState* state) {
|
||||||
display->drawString(0, 48, timeClient.getAmPm());
|
display->drawString(0, 48, timeClient.getAmPm());
|
||||||
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
display->setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
if (printerClient.isPSUoff()) {
|
if (printerClient.isPSUoff()) {
|
||||||
display->drawString(64, 47, "psu off");
|
display->drawString(64, 47, I18N::t("psu.off"));
|
||||||
} else if (printerClient.getState() == "Operational") {
|
} else if (printerClient.getState() == I18N::t("state.operational")) {
|
||||||
display->drawString(64, 47, "Conectado");
|
display->drawString(64, 47, I18N::t("state.connected"));
|
||||||
} else {
|
} else {
|
||||||
display->drawString(64, 47, "Desconectado");
|
display->drawString(64, 47, I18N::t("state.disconnected"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (printerClient.isPSUoff()) {
|
if (printerClient.isPSUoff()) {
|
||||||
display->drawString(0, 47, "psu off");
|
display->drawString(0, 47, I18N::t("psu.off"));
|
||||||
} else if (printerClient.getState() == "Operational") {
|
} else if (printerClient.getState() == I18N::t("state.operational")) {
|
||||||
display->drawString(0, 47, "Conectado");
|
display->drawString(0, 47, I18N::t("state.connected"));
|
||||||
} else {
|
} else {
|
||||||
display->drawString(0, 47, "Desconectado");
|
display->drawString(0, 47, I18N::t("state.disconnected"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
display->setTextAlignment(TEXT_ALIGN_LEFT);
|
display->setTextAlignment(TEXT_ALIGN_LEFT);
|
||||||
display->drawRect(0, 43, 128, 2);
|
display->drawRect(0, 43, 128, 2);
|
||||||
|
|
||||||
drawRssi(display);
|
drawRssi(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1134,9 +1215,9 @@ void writeSettings() {
|
||||||
// Save decoded message to SPIFFS file for playback on power up.
|
// Save decoded message to SPIFFS file for playback on power up.
|
||||||
File f = SPIFFS.open(CONFIG, "w");
|
File f = SPIFFS.open(CONFIG, "w");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
Serial.println("Falló al abrir el archivo!");
|
Serial.println(I18N::t("app.setup.file"));
|
||||||
} else {
|
} else {
|
||||||
Serial.println("Guardando configuración...");
|
Serial.println(I18N::t("app.setup.save.settings"));
|
||||||
f.println("UtcOffset=" + String(UtcOffset));
|
f.println("UtcOffset=" + String(UtcOffset));
|
||||||
f.println("printerApiKey=" + PrinterApiKey);
|
f.println("printerApiKey=" + PrinterApiKey);
|
||||||
f.println("printerHostName=" + PrinterHostName);
|
f.println("printerHostName=" + PrinterHostName);
|
||||||
|
|
@ -1160,6 +1241,7 @@ void writeSettings() {
|
||||||
f.println("isMetric=" + String(IS_METRIC));
|
f.println("isMetric=" + String(IS_METRIC));
|
||||||
f.println("language=" + String(WeatherLanguage));
|
f.println("language=" + String(WeatherLanguage));
|
||||||
f.println("hasPSU=" + String(HAS_PSU));
|
f.println("hasPSU=" + String(HAS_PSU));
|
||||||
|
f.println("uiLanguage=" + UiLanguage);
|
||||||
}
|
}
|
||||||
f.close();
|
f.close();
|
||||||
readSettings();
|
readSettings();
|
||||||
|
|
@ -1168,7 +1250,7 @@ void writeSettings() {
|
||||||
|
|
||||||
void readSettings() {
|
void readSettings() {
|
||||||
if (SPIFFS.exists(CONFIG) == false) {
|
if (SPIFFS.exists(CONFIG) == false) {
|
||||||
Serial.println("Settings File does not yet exists.");
|
Serial.println(I18N::t("app.file.setup.notexist"));
|
||||||
writeSettings();
|
writeSettings();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1283,6 +1365,12 @@ void readSettings() {
|
||||||
WeatherLanguage.trim();
|
WeatherLanguage.trim();
|
||||||
Serial.println("WeatherLanguage=" + WeatherLanguage);
|
Serial.println("WeatherLanguage=" + WeatherLanguage);
|
||||||
}
|
}
|
||||||
|
if (line.indexOf("uiLanguage=") >= 0) {
|
||||||
|
UiLanguage = line.substring(line.lastIndexOf("uiLanguage=") + 11);
|
||||||
|
UiLanguage.trim();
|
||||||
|
Serial.println("UiLanguage=" + UiLanguage);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
fr.close();
|
fr.close();
|
||||||
printerClient.updatePrintClient(PrinterApiKey, PrinterServer, PrinterPort, PrinterAuthUser, PrinterAuthPass, HAS_PSU);
|
printerClient.updatePrintClient(PrinterApiKey, PrinterServer, PrinterPort, PrinterAuthUser, PrinterAuthPass, HAS_PSU);
|
||||||
|
|
@ -1315,11 +1403,11 @@ void checkDisplay() {
|
||||||
display.setFont(ArialMT_Plain_16);
|
display.setFont(ArialMT_Plain_16);
|
||||||
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display.setContrast(255); // default is 255
|
display.setContrast(255); // default is 255
|
||||||
display.drawString(64, 5, "Apagando impresora\nModo hibernación...");
|
display.drawString(64, 5, I18N::t("ui.turning_off"));
|
||||||
display.display();
|
display.display();
|
||||||
delay(5000);
|
delay(5000);
|
||||||
enableDisplay(false);
|
enableDisplay(false);
|
||||||
Serial.println("Impresora apagada...");
|
Serial.println(I18N::t("ui.printer_off"));
|
||||||
return;
|
return;
|
||||||
} else if (!displayOn && !DISPLAYCLOCK) {
|
} else if (!displayOn && !DISPLAYCLOCK) {
|
||||||
if (printerClient.isOperational()) {
|
if (printerClient.isOperational()) {
|
||||||
|
|
@ -1330,15 +1418,15 @@ void checkDisplay() {
|
||||||
display.setFont(ArialMT_Plain_16);
|
display.setFont(ArialMT_Plain_16);
|
||||||
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
display.setTextAlignment(TEXT_ALIGN_CENTER);
|
||||||
display.setContrast(255); // default is 255
|
display.setContrast(255); // default is 255
|
||||||
display.drawString(64, 5, "Impresora encendido\nEncendiendo...");
|
display.drawString(64, 5, I18N::t("ui.turning_on"));
|
||||||
display.display();
|
display.display();
|
||||||
Serial.println("Impresora encendida...");
|
Serial.println(I18N::t("ui.printer_on"));
|
||||||
delay(5000);
|
delay(5000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (DISPLAYCLOCK) {
|
} else if (DISPLAYCLOCK) {
|
||||||
if ((!printerClient.isPrinting() || printerClient.isPSUoff()) && !isClockOn) {
|
if ((!printerClient.isPrinting() || printerClient.isPSUoff()) && !isClockOn) {
|
||||||
Serial.println("Modo reloj.");
|
Serial.println(I18N::t("ui.clock.mode"));
|
||||||
if (!DISPLAYWEATHER) {
|
if (!DISPLAYWEATHER) {
|
||||||
ui.disableAutoTransition();
|
ui.disableAutoTransition();
|
||||||
ui.setFrames(clockFrame, 1);
|
ui.setFrames(clockFrame, 1);
|
||||||
|
|
@ -1352,7 +1440,7 @@ void checkDisplay() {
|
||||||
ui.setOverlays(clockOverlay, numberOfOverlays);
|
ui.setOverlays(clockOverlay, numberOfOverlays);
|
||||||
isClockOn = true;
|
isClockOn = true;
|
||||||
} else if (printerClient.isPrinting() && !printerClient.isPSUoff() && isClockOn) {
|
} else if (printerClient.isPrinting() && !printerClient.isPSUoff() && isClockOn) {
|
||||||
Serial.println("Monito de impresora activado.");
|
Serial.println(I18N::t("cfg.monitor.activated"));
|
||||||
ui.setFrames(frames, numberOfFrames);
|
ui.setFrames(frames, numberOfFrames);
|
||||||
ui.setOverlays(overlays, numberOfOverlays);
|
ui.setOverlays(overlays, numberOfOverlays);
|
||||||
ui.enableAutoTransition();
|
ui.enableAutoTransition();
|
||||||
|
|
@ -1370,10 +1458,10 @@ void enableDisplay(boolean enable) {
|
||||||
displayOffEpoch = 0; // reset
|
displayOffEpoch = 0; // reset
|
||||||
}
|
}
|
||||||
display.displayOn();
|
display.displayOn();
|
||||||
Serial.println("Pantalla encendida: " + timeClient.getFormattedTime());
|
Serial.println(I18N::t("cfg.display.on")+": " + timeClient.getFormattedTime());
|
||||||
} else {
|
} else {
|
||||||
display.displayOff();
|
display.displayOff();
|
||||||
Serial.println("Pantalla apagada: " + timeClient.getFormattedTime());
|
Serial.println(I18N::t("cfg.display.off")+": " + timeClient.getFormattedTime());
|
||||||
displayOffEpoch = lastEpoch;
|
displayOffEpoch = lastEpoch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue