mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
Fix first letter not capitalized in Polish
This commit is contained in:
@@ -907,7 +907,7 @@ void Mqtt::publish_ha_sensor_config(DeviceValue & dv, const std::string & model,
|
||||
|
||||
if (create_device_config) {
|
||||
auto cap_name = strdup(device_type_name);
|
||||
cap_name[0] = toupper(cap_name[0]); // capitalize
|
||||
Helpers::CharToUpperUTF8(cap_name); // capitalize first letter
|
||||
dev_json["name"] = std::string("EMS-ESP ") + cap_name;
|
||||
dev_json["mf"] = brand;
|
||||
dev_json["mdl"] = model;
|
||||
@@ -1132,7 +1132,7 @@ void Mqtt::publish_ha_sensor_config(uint8_t type, // EMSdev
|
||||
// friendly name = <tag> <name>
|
||||
char ha_name[70];
|
||||
char * F_name = strdup(fullname);
|
||||
F_name[0] = toupper(F_name[0]); // capitalize first letter
|
||||
Helpers::CharToUpperUTF8(F_name); // capitalize first letter
|
||||
if (EMSdevice::tag_to_string(tag).empty()) {
|
||||
snprintf(ha_name, sizeof(ha_name), "%s", F_name); // no tag
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user