From 046b0fb745df4bc62c37e5e3dad858bdb07cd122 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sun, 24 Oct 2021 10:38:01 +0200 Subject: [PATCH] [volvooncall] Add all default translations to properties file (#11431) Allows translating the Volvo On Call binding strings with Crowdin. Signed-off-by: Laurent Garnier --- .../handler/VolvoOnCallBridgeHandler.java | 3 +- .../OH-INF/i18n/volvooncall.properties | 145 ++++++++++++++++++ .../OH-INF/i18n/volvooncall_fr.properties | 19 ++- .../main/resources/OH-INF/thing/vehicle.xml | 1 + 4 files changed, 162 insertions(+), 6 deletions(-) create mode 100644 bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/i18n/volvooncall.properties diff --git a/bundles/org.openhab.binding.volvooncall/src/main/java/org/openhab/binding/volvooncall/internal/handler/VolvoOnCallBridgeHandler.java b/bundles/org.openhab.binding.volvooncall/src/main/java/org/openhab/binding/volvooncall/internal/handler/VolvoOnCallBridgeHandler.java index aa3d98822a..83a9768cd1 100644 --- a/bundles/org.openhab.binding.volvooncall/src/main/java/org/openhab/binding/volvooncall/internal/handler/VolvoOnCallBridgeHandler.java +++ b/bundles/org.openhab.binding.volvooncall/src/main/java/org/openhab/binding/volvooncall/internal/handler/VolvoOnCallBridgeHandler.java @@ -68,7 +68,8 @@ public class VolvoOnCallBridgeHandler extends BaseBridgeHandler { updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE, account.username); this.api = vocApi; } else { - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "Incorrect login credentials"); + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, + "@text/offline.config-error-invalid-credentials"); } } catch (VolvoOnCallException e) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage()); diff --git a/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/i18n/volvooncall.properties b/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/i18n/volvooncall.properties new file mode 100644 index 0000000000..dac5332934 --- /dev/null +++ b/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/i18n/volvooncall.properties @@ -0,0 +1,145 @@ +# binding + +binding.volvooncall.name = VolvoOnCall Binding +binding.volvooncall.description = This binding enables the access to VolvoOnCall services. + +# thing types + +thing-type.volvooncall.vehicle.label = Volvo Vehicle +thing-type.volvooncall.vehicle.description = Provides all data available on a Volvo vehicle. +thing-type.volvooncall.vocapi.label = VolvoOnCall API +thing-type.volvooncall.vocapi.description = This bridge represents the gateway to Volvo On Call API. + +# thing types config + +thing-type.config.volvooncall.vehicle.refresh.label = Refresh Interval +thing-type.config.volvooncall.vehicle.refresh.description = Specifies the refresh interval in minutes. +thing-type.config.volvooncall.vehicle.vin.label = Vehicle Identification Number +thing-type.config.volvooncall.vehicle.vin.description = VIN of the vehicle associated with this Thing +thing-type.config.volvooncall.vocapi.password.label = Password +thing-type.config.volvooncall.vocapi.password.description = Your VOC password +thing-type.config.volvooncall.vocapi.username.label = Username +thing-type.config.volvooncall.vocapi.username.description = Your VOC username (email) + +# channel group types + +channel-group-type.volvooncall.battery.label = Plugin Hybrid / Twin Engine info +channel-group-type.volvooncall.battery.channel.batteryDistanceToEmpty.label = Distance Left (Battery) +channel-group-type.volvooncall.battery.channel.chargingEnd.label = Charging End +channel-group-type.volvooncall.doors.label = Doors Opening Status +channel-group-type.volvooncall.doors.channel.frontLeft.label = Front Left Door +channel-group-type.volvooncall.doors.channel.frontRight.label = Front Right Door +channel-group-type.volvooncall.doors.channel.hood.label = Hood +channel-group-type.volvooncall.doors.channel.rearLeft.label = Rear Left Door +channel-group-type.volvooncall.doors.channel.rearRight.label = Rear Right Door +channel-group-type.volvooncall.doors.channel.tailgate.label = Tailgate +channel-group-type.volvooncall.lasttrip.label = Last Trip +channel-group-type.volvooncall.lasttrip.channel.endPosition.label = Trip To +channel-group-type.volvooncall.lasttrip.channel.endPosition.description = Stopping location of the car +channel-group-type.volvooncall.lasttrip.channel.startPosition.label = Trip From +channel-group-type.volvooncall.lasttrip.channel.startPosition.description = Starting location of the car +channel-group-type.volvooncall.lasttrip.channel.tripConsumption.label = Trip Consumption +channel-group-type.volvooncall.lasttrip.channel.tripConsumption.description = Indicates the quantity of fuel consumed by the trip +channel-group-type.volvooncall.lasttrip.channel.tripDistance.label = Trip Distance +channel-group-type.volvooncall.lasttrip.channel.tripDistance.description = Distance traveled +channel-group-type.volvooncall.lasttrip.channel.tripEndTime.label = Trip End Time +channel-group-type.volvooncall.lasttrip.channel.tripEndTime.description = Trip end time +channel-group-type.volvooncall.lasttrip.channel.tripStartOdometer.label = Trip Start Odometer +channel-group-type.volvooncall.lasttrip.channel.tripStartTime.label = Trip Start Time +channel-group-type.volvooncall.lasttrip.channel.tripStartTime.description = Trip start time +channel-group-type.volvooncall.lasttrip.channel.tripStopOdometer.label = Trip Stop Odometer +channel-group-type.volvooncall.odometer.label = Trip Meters +channel-group-type.volvooncall.odometer.channel.tripmeter1.label = Tripmeter 1 +channel-group-type.volvooncall.odometer.channel.tripmeter2.label = Tripmeter 2 +channel-group-type.volvooncall.other.label = Other +channel-group-type.volvooncall.other.channel.brakeFluidLevel.label = Brake Fluid Level +channel-group-type.volvooncall.other.channel.brakeFluidLevel.description = Level of available brake fluid quantity. +channel-group-type.volvooncall.other.channel.washerFluidLevel.label = Washer Fluid Level +channel-group-type.volvooncall.other.channel.washerFluidLevel.description = Level of available washer fluid quantity. +channel-group-type.volvooncall.position.label = Location Info +channel-group-type.volvooncall.position.channel.location.label = Current Location +channel-group-type.volvooncall.position.channel.location.description = The position of the vehicle +channel-group-type.volvooncall.position.channel.locationTimestamp.label = Location Timestamp +channel-group-type.volvooncall.position.channel.locationTimestamp.description = Timestamp of location value update +channel-group-type.volvooncall.tank.label = Tank Info +channel-group-type.volvooncall.tank.channel.distanceToEmpty.label = Distance Left +channel-group-type.volvooncall.tank.channel.distanceToEmpty.description = Distance left with given quantity of fuel +channel-group-type.volvooncall.tank.channel.fuelAmount.label = Fuel Amount +channel-group-type.volvooncall.tank.channel.fuelAmount.description = Indicates the quantity of fuel available in the tank +channel-group-type.volvooncall.tyrePressure.label = Tyre pressure status +channel-group-type.volvooncall.tyrePressure.channel.frontLeftTyre.label = Front Left Tyre +channel-group-type.volvooncall.tyrePressure.channel.frontRightTyre.label = Front Right Tyre +channel-group-type.volvooncall.tyrePressure.channel.rearLeftTyre.label = Rear Left Tyre +channel-group-type.volvooncall.tyrePressure.channel.rearRightTyre.label = Rear Right Tyre +channel-group-type.volvooncall.windows.label = Windows Opening Status +channel-group-type.volvooncall.windows.channel.frontLeftWnd.label = Front Left Window +channel-group-type.volvooncall.windows.channel.frontRightWnd.label = Front Right Window +channel-group-type.volvooncall.windows.channel.rearLeftWnd.label = Rear Left Window +channel-group-type.volvooncall.windows.channel.rearRightWnd.label = Rear Right Window + +# channel types + +channel-type.volvooncall.averageSpeed.label = Average Speed +channel-type.volvooncall.averageSpeed.description = Average speed of the vehicle +channel-type.volvooncall.batteryLevel.label = Battery Level +channel-type.volvooncall.batteryLevel.description = Indicates the level of power in the battery, or unknown in situations the API is misleading (in case of PHEV / Twin Engine) +channel-type.volvooncall.batteryLevelRaw.label = Battery Level (Raw) +channel-type.volvooncall.batteryLevelRaw.description = Indicates the level of power in the battery taken straight from the API, which can be misleading (in case of PHEV / Twin Engine) +channel-type.volvooncall.bulbFailure.label = Bulb Failure +channel-type.volvooncall.bulbFailure.description = At least one bulb is reported as dead +channel-type.volvooncall.calculatedLocation.label = Calculated Location +channel-type.volvooncall.calculatedLocation.description = Indicates if the location is actual or calculated +channel-type.volvooncall.carEvent.label = Car Event +channel-type.volvooncall.carLocked.label = Locked +channel-type.volvooncall.carLocked.description = Lock status +channel-type.volvooncall.chargeStatus.label = Charging Status +channel-type.volvooncall.chargeStatus.description = Status of charging (in case of PHEV / Twin Engine) +channel-type.volvooncall.chargeStatusCable.label = Plugged In +channel-type.volvooncall.chargeStatusCable.description = Indicates if the charging cable is connected +channel-type.volvooncall.chargeStatusCharging.label = Charging +channel-type.volvooncall.chargeStatusCharging.description = Indicates if the car is currently charging +channel-type.volvooncall.chargeStatusFullyCharged.label = Fully Charged +channel-type.volvooncall.chargeStatusFullyCharged.description = Indicates if the car is fully charged +channel-type.volvooncall.door.label = Door +channel-type.volvooncall.door.description = Indicates if the door is opened +channel-type.volvooncall.engineRunning.label = Engine Started +channel-type.volvooncall.engineRunning.description = Engine status (running or not) +channel-type.volvooncall.engineStart.label = Start Engine +channel-type.volvooncall.engineStart.description = Starts the vehicle engine +channel-type.volvooncall.fluidLevel.label = Fluid Level +channel-type.volvooncall.fluidLevel.description = Level of available fluid quantity. +channel-type.volvooncall.fluidLevel.state.option.0 = Normal +channel-type.volvooncall.fluidLevel.state.option.1 = Low +channel-type.volvooncall.fluidLevel.state.option.2 = Very Low +channel-type.volvooncall.fuelAlert.label = Fuel Alarm +channel-type.volvooncall.fuelAlert.description = Set to 'ON' when the tank level is low +channel-type.volvooncall.fuelConsumption.label = Average Consumption +channel-type.volvooncall.fuelConsumption.description = Indicates the average fuel consumption in l/100km +channel-type.volvooncall.fuelLevel.label = Fuel Level +channel-type.volvooncall.fuelLevel.description = Indicates the level of fuel in the tank +channel-type.volvooncall.fuelQuantity.label = Fuel Quantity +channel-type.volvooncall.heading.label = Heading +channel-type.volvooncall.location.label = Location +channel-type.volvooncall.odometer.label = Odometer +channel-type.volvooncall.odometer.description = Odometer of the vehicle +channel-type.volvooncall.preclimatization.label = Preclimatization +channel-type.volvooncall.preclimatization.description = Starts pre-climatization +channel-type.volvooncall.remoteHeater.label = Remote Heater +channel-type.volvooncall.remoteHeater.description = (De)Activates remote heater +channel-type.volvooncall.serviceWarningStatus.label = Service Warning +channel-type.volvooncall.serviceWarningStatus.description = Is a car service needed? +channel-type.volvooncall.timeToHVBatteryFullyCharged.label = Remaining Charging Time +channel-type.volvooncall.timeToHVBatteryFullyCharged.description = Time in seconds until the battery is fully charged (in case of PHEV / Twin Engine) +channel-type.volvooncall.timestamp.label = Timestamp +channel-type.volvooncall.timestamp.description = Data timestamp +channel-type.volvooncall.tripDuration.label = Duration +channel-type.volvooncall.tripDuration.description = Trip Duration +channel-type.volvooncall.tyrePressure.label = Tyre Pressure +channel-type.volvooncall.tyrePressure.state.option.0 = Normal +channel-type.volvooncall.tyrePressure.state.option.1 = Low Soft +channel-type.volvooncall.window.label = Window +channel-type.volvooncall.window.description = Indicates if the window is opened + +# Thing status descriptions + +offline.config-error-invalid-credentials = Incorrect login credentials diff --git a/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/i18n/volvooncall_fr.properties b/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/i18n/volvooncall_fr.properties index 49781e3b55..c267774ad8 100644 --- a/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/i18n/volvooncall_fr.properties +++ b/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/i18n/volvooncall_fr.properties @@ -1,14 +1,23 @@ # binding + binding.volvooncall.name = Extension VolvoOnCall binding.volvooncall.description = Cette extension fournit l'accès aux services de Volvo On Call. # thing types + +thing-type.volvooncall.vehicle.label = Véhicule +thing-type.volvooncall.vehicle.description = Fournit toutes les informations disponibles sur le véhicule Volvo. thing-type.volvooncall.vocapi.label = API Volvo On Call thing-type.volvooncall.vocapi.description = Fournit l'interface avec le service en ligne Volvo On Call. Pour recevoir les données, vous devez vous munir de vos informations de connection (nom d'utilisateur, mot de passe). -thing-type.volvooncall.vehicle.label = Véhicule -thing-type.volvooncall.vehicle.description = Toutes les informations disponibles sur le véhicule Volvo. +# thing types config + + +# channel group types + + +# channel types -channel-type.volvooncall.fluidLevel.state.options.0=Normal -channel-type.volvooncall.fluidLevel.state.options.1=Bas -channel-type.volvooncall.fluidLevel.state.options.2=Très bas +channel-type.volvooncall.fluidLevel.state.option.0=Normal +channel-type.volvooncall.fluidLevel.state.option.1=Bas +channel-type.volvooncall.fluidLevel.state.option.2=Très bas diff --git a/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/thing/vehicle.xml b/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/thing/vehicle.xml index 6fc3a6b44f..f1ed7962fa 100644 --- a/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/thing/vehicle.xml +++ b/bundles/org.openhab.binding.volvooncall/src/main/resources/OH-INF/thing/vehicle.xml @@ -11,6 +11,7 @@ + Provides all data available on a Volvo vehicle. -- 2.47.3