From c960db5180d0a4590ac27a46f66a40e1632c59b7 Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 11 Mar 2023 17:23:41 +0100 Subject: [PATCH] added compile flag -DEMSESP_DE_ONLY --- pio_local.ini_example | 1 + src/common.h | 2 ++ src/locale_translations.h | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pio_local.ini_example b/pio_local.ini_example index 6e919359e..e8850a979 100644 --- a/pio_local.ini_example +++ b/pio_local.ini_example @@ -9,6 +9,7 @@ ; -DEMSESP_DEBUG_SENSOR ; additional debug for the dallas sensors ; -DCORE_DEBUG_LEVEL=5 ; verbose core level debugging 5=verbose, 4=debug, 3=info ; -DEMSESP_TEST ; enable the tests. EN language only +; -DEMSESP_DE_ONLY ; only DE translated entity names ; my_build_flags = -DEMSESP_DEBUG [env:esp32_4M] diff --git a/src/common.h b/src/common.h index a5f59dadc..e1c987df5 100644 --- a/src/common.h +++ b/src/common.h @@ -55,6 +55,8 @@ using string_vector = std::vector; #if defined(EMSESP_TEST) // In testing just take one language (en) to save on Flash space #define MAKE_TRANSLATION(list_name, shortname, en, ...) static const char * const __pstr__L_##list_name[] = {shortname, en, nullptr}; +#elif defined(EMSESP_DE_ONLY) +#define MAKE_TRANSLATION(list_name, shortname, en, de, ...) static const char * const __pstr__L_##list_name[] = {shortname, de, nullptr}; #else #define MAKE_TRANSLATION(list_name, ...) static const char * const __pstr__L_##list_name[] = {__VA_ARGS__, nullptr}; #endif diff --git a/src/locale_translations.h b/src/locale_translations.h index 648821f25..ebdac3a9a 100644 --- a/src/locale_translations.h +++ b/src/locale_translations.h @@ -252,7 +252,7 @@ MAKE_TRANSLATION(outside_basepoint, "outside basepoint", "Basispunkt Außentemp. MAKE_TRANSLATION(functioning_mode, "functioning mode", "Funktionsweise", "Functiemodus", "Driftläge", "tryb pracy", "driftsmodus", "mode de fonctionnement", "işletme konumu") // MQTT Discovery - this is special device entity for 'climate' -MAKE_TRANSLATION(haclimate, "haclimate", "Discovery current room temperature") // TODO translate +MAKE_TRANSLATION(haclimate, "haclimate", "Discovery current room temperature", "Discovery Temperatur") // TODO translate // mixer MAKE_TRANSLATION(stopped, "stopped", "gestoppt", "gestopt", "stoppad", "zatrzymany", "stoppet", "arrêté", "durdu")