]> git.basschouten.com Git - openhab-addons.git/commitdiff
[tradfri] Internationalization of discovery results (#11498)
authorlolodomo <lg.hc@free.fr>
Wed, 3 Nov 2021 21:07:28 +0000 (22:07 +0100)
committerGitHub <noreply@github.com>
Wed, 3 Nov 2021 21:07:28 +0000 (22:07 +0100)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.tradfri/src/main/java/org/openhab/binding/tradfri/internal/discovery/TradfriDiscoveryParticipant.java
bundles/org.openhab.binding.tradfri/src/main/resources/OH-INF/i18n/tradfri.properties

index c02b540f5cf97fa5cd0b18d435ec0adf08dda0e1..74f7c0bfbc725712d886a6c74eba8f3b8cedc820 100644 (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);
             }
index 9386e63aa2ffd172c1ebe158e3991d04b009f826..a2a0245f6e86397936d0d6a9629a7babe93042fd 100644 (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