mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[weathercompany] Internationalization of discovery result (#11486)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
745bf76569
commit
a75ef85ece
@ -42,7 +42,6 @@ import org.slf4j.LoggerFactory;
|
||||
public class WeatherCompanyDiscoveryService extends AbstractDiscoveryService {
|
||||
// Thing for local weather created during discovery
|
||||
private static final String LOCAL = "local";
|
||||
private static final String LOCAL_WEATHER = "Local Forecast";
|
||||
|
||||
private static final int DISCOVER_TIMEOUT_SECONDS = 4;
|
||||
private static final int DISCOVERY_INTERVAL_SECONDS = 1200;
|
||||
@ -119,7 +118,7 @@ public class WeatherCompanyDiscoveryService extends AbstractDiscoveryService {
|
||||
properties.put(CONFIG_LANGUAGE, WeatherCompanyAbstractHandler.lookupLanguage(localeProvider.getLocale()));
|
||||
ThingUID bridgeUID = bridgeHandler.getThing().getUID();
|
||||
ThingUID localWeatherThing = new ThingUID(THING_TYPE_WEATHER_FORECAST, bridgeUID, LOCAL);
|
||||
thingDiscovered(DiscoveryResultBuilder.create(localWeatherThing).withBridge(bridgeUID).withLabel(LOCAL_WEATHER)
|
||||
.withProperties(properties).build());
|
||||
thingDiscovered(DiscoveryResultBuilder.create(localWeatherThing).withBridge(bridgeUID)
|
||||
.withLabel("@text/discovery.weather-forecast.local.label").withProperties(properties).build());
|
||||
}
|
||||
}
|
||||
|
@ -256,3 +256,7 @@ offline.comm-error-timeout = TimeoutException: Call to Weather Company API timed
|
||||
offline.comm-error-parsing-daily-forecast = Error parsing daily forecast
|
||||
offline.comm-error-parsing-daypart-forecast = Error parsing daypart forecast
|
||||
offline.comm-error-parsing-pws-forecast = Error parsing PWS observations
|
||||
|
||||
# discovery result
|
||||
|
||||
discovery.weather-forecast.local.label = Local Forecast
|
||||
|
Loading…
Reference in New Issue
Block a user