fix Polish boolean option "wł./wył." not working

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:
pswid
2023-01-10 12:04:27 +01:00
parent d15fbe7801
commit d72d2b33bd

View File

@@ -596,14 +596,16 @@ bool Helpers::value2bool(const char * value, bool & value_b) {
return false; return false;
} }
std::string bool_str = toLower(value); // convert to lower case std::string bool_str = value;
if ((bool_str == std::string(Helpers::translated_word(FL_(on)))) || (bool_str == "on") || (bool_str == "1") || (bool_str == "true")) { if ((bool_str == std::string(Helpers::translated_word(FL_(on)))) || (bool_str == std::string(Helpers::translated_word(FL_(ON))))
|| (bool_str == "on") || (bool_str == "1") || (bool_str == "true")) {
value_b = true; value_b = true;
return true; // is a bool return true; // is a bool
} }
if ((bool_str == std::string(Helpers::translated_word(FL_(off)))) || (bool_str == "off") || (bool_str == "0") || (bool_str == "false")) { if ((bool_str == std::string(Helpers::translated_word(FL_(off)))) || (bool_str == std::string(Helpers::translated_word(FL_(OFF))))
|| (bool_str == "off") || (bool_str == "0") || (bool_str == "false")) {
value_b = false; value_b = false;
return true; // is a bool return true; // is a bool
} }