mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[openuv] Add all default translations to properties file (#11435)
Allows translating the openuv binding strings with Crowdin. Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
54fa0f1091
commit
fb2263622b
@ -76,7 +76,7 @@ public class OpenUVBridgeHandler extends BaseBridgeHandler {
|
||||
BridgeConfiguration config = getConfigAs(BridgeConfiguration.class);
|
||||
if (config.apikey.isEmpty()) {
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
|
||||
"Parameter 'apikey' must be configured.");
|
||||
"@text/offline.config-error-unknown-apikey");
|
||||
return;
|
||||
}
|
||||
header.put("x-access-token", config.apikey);
|
||||
@ -127,9 +127,8 @@ public class OpenUVBridgeHandler extends BaseBridgeHandler {
|
||||
LocalDate tomorrow = today.plusDays(1);
|
||||
LocalDateTime tomorrowMidnight = tomorrow.atStartOfDay().plusMinutes(2);
|
||||
|
||||
String message = "Quota Exceeded, going OFFLINE for today, will retry at : "
|
||||
+ tomorrowMidnight.toString();
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, message);
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, String
|
||||
.format("@text/offline.comm-error-quota-exceeded [ \"%s\" ]", tomorrowMidnight.toString()));
|
||||
|
||||
reconnectJob = scheduler.schedule(this::initiateConnexion,
|
||||
Duration.between(LocalDateTime.now(), tomorrowMidnight).toMinutes(), TimeUnit.MINUTES);
|
||||
|
@ -86,11 +86,11 @@ public class OpenUVReportHandler extends BaseThingHandler {
|
||||
|
||||
if (config.refresh < 3) {
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
|
||||
"Parameter 'refresh' must be higher than 3 minutes to stay in free API plan");
|
||||
"@text/offline.config-error-invalid-refresh");
|
||||
} else {
|
||||
Bridge bridge = getBridge();
|
||||
if (bridge == null) {
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Invalid bridge");
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_UNINITIALIZED);
|
||||
} else {
|
||||
bridgeHandler = (OpenUVBridgeHandler) bridge.getHandler();
|
||||
updateStatus(ThingStatus.UNKNOWN);
|
||||
|
@ -0,0 +1,66 @@
|
||||
# binding
|
||||
|
||||
binding.openuv.name = OpenUV Binding
|
||||
binding.openuv.description = Global Real-Time UV Index Forecast API
|
||||
|
||||
# thing types
|
||||
|
||||
thing-type.openuv.openuvapi.label = Open UV API
|
||||
thing-type.openuv.openuvapi.description = Bridge to the OpenUV Project API. In order to receive the data, you must register an account on https://www.openuv.io/auth/google and get your API token.
|
||||
thing-type.openuv.uvreport.label = UV Report
|
||||
thing-type.openuv.uvreport.description = Provides various UV data from the OpenUV Project for a given location.
|
||||
|
||||
# thing types config
|
||||
|
||||
thing-type.config.openuv.openuvapi.apikey.label = API Key
|
||||
thing-type.config.openuv.openuvapi.apikey.description = Data-platform token to access the OpenUV API service
|
||||
thing-type.config.openuv.uvreport.location.label = Location
|
||||
thing-type.config.openuv.uvreport.location.description = Your geo coordinates separated with comma (e.g. "37.8,-122.4,177").
|
||||
thing-type.config.openuv.uvreport.refresh.label = Refresh Interval
|
||||
thing-type.config.openuv.uvreport.refresh.description = Specifies the refresh interval in minutes.
|
||||
|
||||
# channel types
|
||||
|
||||
channel-type.openuv.Alert.label = UV Alert
|
||||
channel-type.openuv.Alert.state.option.0 = Low
|
||||
channel-type.openuv.Alert.state.option.1 = Medium
|
||||
channel-type.openuv.Alert.state.option.2 = High
|
||||
channel-type.openuv.Alert.state.option.3 = Very high
|
||||
channel-type.openuv.Alert.state.option.4 = Extreme
|
||||
channel-type.openuv.Ozone.label = Ozone
|
||||
channel-type.openuv.Ozone.description = Ozone level from OMI data
|
||||
channel-type.openuv.SafeExposure.label = Safe Exposure
|
||||
channel-type.openuv.SafeExposure.description = Safe exposure duration for Fitzpatrick Skin Types.
|
||||
channel-type.openuv.UVColor.label = Alert Color
|
||||
channel-type.openuv.UVColor.description = Color associated to given UV Index alert level.
|
||||
channel-type.openuv.UVIndex.label = UV Index
|
||||
channel-type.openuv.UVIndex.description = UV Index
|
||||
channel-type.openuv.UVMax.label = UV Max
|
||||
channel-type.openuv.UVMax.description = Max UV Index for the day (at solar noon)
|
||||
channel-type.openuv.UVMaxEvent.label = UV Max Event
|
||||
channel-type.openuv.UVMaxEvent.description = Triggers when current UV Index reaches maximum of the day
|
||||
channel-type.openuv.elevation.label = Elevation
|
||||
channel-type.openuv.elevation.description = The elevation of the sun (should FOLLOW appropriate item).
|
||||
channel-type.openuv.timestamp.label = Timestamp
|
||||
channel-type.openuv.timestamp.state.pattern = %1$tF %1$tR
|
||||
|
||||
# channel types config
|
||||
|
||||
channel-type.config.openuv.SafeExposure.index.label = Skin Type
|
||||
channel-type.config.openuv.SafeExposure.index.description = Fitzpatrick Skin Type.
|
||||
channel-type.config.openuv.SafeExposure.index.option.I = Pale
|
||||
channel-type.config.openuv.SafeExposure.index.option.II = White
|
||||
channel-type.config.openuv.SafeExposure.index.option.III = Light brown
|
||||
channel-type.config.openuv.SafeExposure.index.option.IV = Moderate brown
|
||||
channel-type.config.openuv.SafeExposure.index.option.V = Dark brown
|
||||
channel-type.config.openuv.SafeExposure.index.option.VI = Black
|
||||
|
||||
# Thing status descriptions
|
||||
|
||||
offline.config-error-unknown-apikey = Parameter 'apikey' must be configured.
|
||||
offline.config-error-invalid-refresh = Parameter 'refresh' must be higher than 3 minutes to stay in free API plan.
|
||||
offline.comm-error-quota-exceeded = Quota Exceeded, going OFFLINE for today, will retry at : {0}
|
||||
|
||||
# Discovery result
|
||||
|
||||
discovery.openuv.uvreport.local.label = Local UV Report
|
@ -1,10 +1,11 @@
|
||||
# binding
|
||||
|
||||
binding.openuv.name = Extension OpenUV
|
||||
binding.openuv.description = Service de prévision globale de l'indice UV en temps réel.
|
||||
|
||||
# thing types
|
||||
|
||||
thing-type.openuv.openuvapi.label = Bridge OpenUV
|
||||
thing-type.openuv.openuvapi.description = Passerelle vers le service du projet OpenUV. Pour recevoir des données vous devez créer votre compte à l'adresse https://www.openuv.io/auth/google et obtenir votre clef API.
|
||||
|
||||
thing-type.openuv.uvreport.label = Rapport UV
|
||||
thing-type.openuv.uvreport.description = Fournit diverses information pour un emplacement donnée.
|
||||
|
Loading…
Reference in New Issue
Block a user