mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
fix for d72d2b3 (Polish boolean option "wł./wył.")
Because of compiler error, in Polish translation, we don't use uppercase boolean option "WŁĄCZONO/WYŁĄCZONO" but "wł./wył." instead.
This commit is contained in:
@@ -596,15 +596,15 @@ bool Helpers::value2bool(const char * value, bool & value_b) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string bool_str = value;
|
||||
std::string bool_str = toLower(value);
|
||||
|
||||
if ((bool_str == std::string(Helpers::translated_word(FL_(on)))) || (bool_str == std::string(Helpers::translated_word(FL_(ON))))
|
||||
if ((bool_str == std::string(Helpers::translated_word(FL_(on)))) || (bool_str == toLower(Helpers::translated_word(FL_(ON))))
|
||||
|| (bool_str == "on") || (bool_str == "1") || (bool_str == "true")) {
|
||||
value_b = true;
|
||||
return true; // is a bool
|
||||
}
|
||||
|
||||
if ((bool_str == std::string(Helpers::translated_word(FL_(off)))) || (bool_str == std::string(Helpers::translated_word(FL_(OFF))))
|
||||
if ((bool_str == std::string(Helpers::translated_word(FL_(off)))) || (bool_str == toLower(Helpers::translated_word(FL_(OFF))))
|
||||
|| (bool_str == "off") || (bool_str == "0") || (bool_str == "false")) {
|
||||
value_b = false;
|
||||
return true; // is a bool
|
||||
|
||||
Reference in New Issue
Block a user