From 1ffb0ba89befd6fceef4b2aea0f709ea8849d970 Mon Sep 17 00:00:00 2001 From: foroae Date: Sun, 21 Jan 2024 23:31:56 +0100 Subject: [PATCH] Add Spanish locale --- src/Display_Graphic.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Display_Graphic.cpp b/src/Display_Graphic.cpp index 7f5d94c37..a1703eede 100644 --- a/src/Display_Graphic.cpp +++ b/src/Display_Graphic.cpp @@ -19,20 +19,23 @@ std::map #define I18N_LOCALE_EN 0 #define I18N_LOCALE_DE 1 #define I18N_LOCALE_FR 2 +#define I18N_LOCALE_ES 3 + // Languages supported. Note: the order is important and must match locale_translations.h const uint8_t languages[] = { I18N_LOCALE_EN, I18N_LOCALE_DE, - I18N_LOCALE_FR + I18N_LOCALE_FR, + I18N_LOCALE_ES }; -static const char* const i18n_offline[] = { "Offline", "Offline", "Offline" }; -static const char* const i18n_current_power_w[] = { "%.0f W", "%.0f W", "%.0f W" }; -static const char* const i18n_current_power_kw[] = { "%.1f kW", "%.1f kW", "%.1f kW" }; -static const char* const i18n_yield_today_wh[] = { "today: %4.0f Wh", "Heute: %4.0f Wh", "auj.: %4.0f Wh" }; -static const char* const i18n_yield_total_kwh[] = { "total: %.1f kWh", "Ges.: %.1f kWh", "total: %.1f kWh" }; -static const char* const i18n_date_format[] = { "%m/%d/%Y %H:%M", "%d.%m.%Y %H:%M", "%d/%m/%Y %H:%M" }; +static const char* const i18n_offline[] = { "Offline", "Offline", "Offline", "Apagado" }; +static const char* const i18n_current_power_w[] = { "%.0f W", "%.0f W", "%.0f W", "%.0f W" }; +static const char* const i18n_current_power_kw[] = { "%.1f kW", "%.1f kW", "%.1f kW", "%.1f kW" }; +static const char* const i18n_yield_today_wh[] = { "today: %4.0f Wh", "Heute: %4.0f Wh", "auj.: %4.0f Wh", "Hoy: %4.0f Wh" }; +static const char* const i18n_yield_total_kwh[] = { "total: %.1f kWh", "Ges.: %.1f kWh", "total: %.1f kWh", "Total: %.1f kWh" }; +static const char* const i18n_date_format[] = { "%m/%d/%Y %H:%M", "%d.%m.%Y %H:%M", "%d/%m/%Y %H:%M", "%d/%m/%Y %H:%M" }; DisplayGraphicClass::DisplayGraphicClass() : _loopTask(TASK_IMMEDIATE, TASK_FOREVER, std::bind(&DisplayGraphicClass::loop, this))