mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
add EMSESP_EN_ONLY and EMSESP_DE_ONLY to be safe
This commit is contained in:
@@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
|
||||||
// Define languages here
|
// Define language codes here and add to languages[] in system.cpp
|
||||||
// Makes sure they are also added in same order to languages[] in system.cpp
|
|
||||||
#define EMSESP_LOCALE_EN "en"
|
#define EMSESP_LOCALE_EN "en"
|
||||||
#define EMSESP_LOCALE_DE "de"
|
#define EMSESP_LOCALE_DE "de"
|
||||||
#define EMSESP_LOCALE_NL "nl"
|
#define EMSESP_LOCALE_NL "nl"
|
||||||
@@ -30,8 +29,11 @@
|
|||||||
#define EMSESP_LOCALE_FR "fr"
|
#define EMSESP_LOCALE_FR "fr"
|
||||||
#define EMSESP_LOCALE_TR "tr"
|
#define EMSESP_LOCALE_TR "tr"
|
||||||
|
|
||||||
// translations are in order en, de, nl, sv, pl, no, fr, tr, ....
|
// IMPORTANT!
|
||||||
|
// translations are in the order: en, de, nl, sv, pl, no, fr, tr
|
||||||
|
//
|
||||||
// if there is no translation, it will default to en
|
// if there is no translation, it will default to en
|
||||||
|
//
|
||||||
|
|
||||||
// device types, as display in Web and Console
|
// device types, as display in Web and Console
|
||||||
MAKE_TRANSLATION(boiler_device, "Boiler", "Kessel", "Boiler", "Värmepanna", "Kocioł", "", "", "Kazan")
|
MAKE_TRANSLATION(boiler_device, "Boiler", "Kessel", "Boiler", "Värmepanna", "Kocioł", "", "", "Kazan")
|
||||||
|
|||||||
@@ -54,9 +54,11 @@ Adafruit_NeoPixel pixels(1, 7, NEO_GRB + NEO_KHZ800);
|
|||||||
namespace emsesp {
|
namespace emsesp {
|
||||||
|
|
||||||
// Languages supported. Note: the order is important and must match locale_translations.h
|
// Languages supported. Note: the order is important and must match locale_translations.h
|
||||||
#if defined(EMSESP_TEST)
|
#if defined(EMSESP_TEST) || defined(EMSESP_EN_ONLY)
|
||||||
// in Debug mode use one language (en) to save flash memory needed for the tests
|
// in Debug mode use one language (en) to save flash memory needed for the tests
|
||||||
const char * const languages[] = {EMSESP_LOCALE_EN};
|
const char * const languages[] = {EMSESP_LOCALE_EN};
|
||||||
|
#elif defined(EMSESP_DE_ONLY)
|
||||||
|
const char * const languages[] = {EMSESP_LOCALE_DE};
|
||||||
#else
|
#else
|
||||||
const char * const languages[] =
|
const char * const languages[] =
|
||||||
{EMSESP_LOCALE_EN, EMSESP_LOCALE_DE, EMSESP_LOCALE_NL, EMSESP_LOCALE_SV, EMSESP_LOCALE_PL, EMSESP_LOCALE_NO, EMSESP_LOCALE_FR, EMSESP_LOCALE_TR};
|
{EMSESP_LOCALE_EN, EMSESP_LOCALE_DE, EMSESP_LOCALE_NL, EMSESP_LOCALE_SV, EMSESP_LOCALE_PL, EMSESP_LOCALE_NO, EMSESP_LOCALE_FR, EMSESP_LOCALE_TR};
|
||||||
|
|||||||
Reference in New Issue
Block a user