[tradfri] Internationalization of discovery results (#11498)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2021-11-03 22:07:28 +01:00 committed by GitHub
parent e37fabac67
commit d46e3bccb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -92,8 +92,9 @@ public class TradfriDiscoveryParticipant implements MDNSDiscoveryParticipant {
if (fwVersion != null) {
properties.put(PROPERTY_FIRMWARE_VERSION, fwVersion);
}
return DiscoveryResultBuilder.create(thingUID).withProperties(properties).withLabel("TRÅDFRI Gateway")
.withRepresentationProperty(GATEWAY_CONFIG_HOST).build();
return DiscoveryResultBuilder.create(thingUID).withProperties(properties)
.withLabel("@text/discovery.gateway.label").withRepresentationProperty(GATEWAY_CONFIG_HOST)
.build();
} else {
logger.warn("Discovered Tradfri gateway doesn't have an IP address: {}", service);
}

View File

@ -45,3 +45,7 @@ thing-type.config.tradfri.device.id.description = The identifier of the device o
channel-type.tradfri.position.label = Position
channel-type.tradfri.position.description = Control the position of the blind or curtain in percent from 0 (open) to 100 (closed).
# discovery result
discovery.gateway.label = TRÅDFRI Gateway