Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facilitate translation of "device status" screen. #928

Draft
wants to merge 1 commit into
base: beta
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions airrohr-firmware/airrohr-firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1625,12 +1625,12 @@ static void webserver_status() {
#endif
versionHtml.replace("/", FPSTR(BR_TAG));
add_table_row_from_value(page_content, FPSTR(INTL_FIRMWARE), versionHtml);
add_table_row_from_value(page_content, F("Free Memory"), String(ESP.getFreeHeap()));
add_table_row_from_value(page_content, F(INTL_FREE_MEMORY), String(ESP.getFreeHeap()));
#if defined(ESP8266)
add_table_row_from_value(page_content, F("Heap Fragmentation"), String(ESP.getHeapFragmentation()), "%");
add_table_row_from_value(page_content, F(INTL_HEAP_FRAGMENTATION), String(ESP.getHeapFragmentation()), "%");
#endif
if (cfg::auto_update) {
add_table_row_from_value(page_content, F("Last OTA"), delayToString(millis() - last_update_attempt));
add_table_row_from_value(page_content, F(INTL_LAST_OVER_THE_AIR), delayToString(millis() - last_update_attempt));
}
#if defined(ESP8266)
add_table_row_from_value(page_content, F("NTP Sync"), String(sntp_time_set));
Expand All @@ -1644,17 +1644,17 @@ static void webserver_status() {
ntpinfo.print(FPSTR(BR_TAG));
}
ntpinfo.printf_P(PSTR("%s (%s)"), IPAddress(*sntp).toString().c_str(), name ? name : "?");
ntpinfo.printf_P(PSTR(" reachable: %s"), sntp_getreachability(i) ? "Yes" : "No");
ntpinfo.printf_P(PSTR(" %s: %s"), F(INTL_REACHABLE), sntp_getreachability(i) ? F(INTL_YES) : F(INTL_NO));
}
}
add_table_row_from_value(page_content, F("NTP Info"), ntpinfo);
#endif

time_t now = time(nullptr);
add_table_row_from_value(page_content, FPSTR(INTL_TIME_UTC), ctime(&now));
add_table_row_from_value(page_content, F("Uptime"), delayToString(millis() - time_point_device_start_ms));
add_table_row_from_value(page_content, F(INTL_UPTIME), delayToString(millis() - time_point_device_start_ms));
#if defined(ESP8266)
add_table_row_from_value(page_content, F("Reset Reason"), ESP.getResetReason());
add_table_row_from_value(page_content, F(INTL_RESET_REASON), ESP.getResetReason());
#endif
if (cfg::sds_read) {
page_content += FPSTR(EMPTY_ROW);
Expand Down Expand Up @@ -1696,7 +1696,7 @@ static void webserver_status() {
}

if (last_sendData_returncode != 0) {
add_table_row_from_value(page_content, F("Data Send Return"),
add_table_row_from_value(page_content, F(INTL_DATA_SEND_RETURN_CODE),
last_sendData_returncode > 0 ? String(last_sendData_returncode) : HTTPClient::errorToString(last_sendData_returncode));
}
if (cfg::sds_read) {
Expand Down
9 changes: 9 additions & 0 deletions airrohr-firmware/intl_de.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,14 @@ const char INTL_SIGNAL_QUALITY[] PROGMEM = "Qualität";
#define INTL_SENSOR "Sensor"
#define INTL_PARAMETER "Parameter"
#define INTL_VALUE "Wert"
#define INTL_DATA_SEND_RETURN_CODE "Daten senden Return Code"
#define INTL_UPTIME "Aktiv seit"
#define INTL_RESET_REASON "Grund des Zurücksetzens"
#define INTL_HEAP_FRAGMENTATION "Heap Fragmentierung"
#define INTL_FREE_MEMORY "Freier Speicher"
#define INTL_REACHABLE "erreichbar"
#define INTL_YES "Ja"
#define INTL_NO "Nein"
#define INTL_LAST_OVER_THE_AIR "Letzter OTA"

#include "./airrohr-logo-common.h"
9 changes: 9 additions & 0 deletions airrohr-firmware/intl_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,14 @@ const char INTL_SIGNAL_QUALITY[] PROGMEM = "signal quality";
#define INTL_SENSOR "Sensor"
#define INTL_PARAMETER "Parameter"
#define INTL_VALUE "Value"
#define INTL_DATA_SEND_RETURN_CODE "Data Send Return"
#define INTL_UPTIME "Uptime"
#define INTL_RESET_REASON "Reset Reason"
#define INTL_HEAP_FRAGMENTATION "Heap Fragmentation"
#define INTL_FREE_MEMORY "Free Memory"
#define INTL_REACHABLE "reachable"
#define INTL_YES "Yes"
#define INTL_NO "No"
#define INTL_LAST_OVER_THE_AIR "Last OTA"

#include "./airrohr-logo-common.h"