]> git.basschouten.com Git - openhab-addons.git/commitdiff
[netatmo] Add translations for config parameters (#12768)
authorlolodomo <lg.hc@free.fr>
Sat, 21 May 2022 08:20:34 +0000 (10:20 +0200)
committerGitHub <noreply@github.com>
Sat, 21 May 2022 08:20:34 +0000 (10:20 +0200)
* [netatmo] Add translations for config parameters

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.netatmo/src/main/resources/OH-INF/config/config.xml
bundles/org.openhab.binding.netatmo/src/main/resources/OH-INF/i18n/netatmo.properties

index 6be633ac237998f9353b7b404739f685b8308558..944d73fd016282fd774ba7c896a725e7f44231f4 100644 (file)
@@ -7,46 +7,46 @@
 
        <config-description uri="netatmo:api_bridge">
                <parameter name="clientId" type="text" required="true">
-                       <label>Client ID</label>
-                       <description>Client ID provided for the application you created on http://dev.netatmo.com/createapp</description>
+                       <label>@text/config.clientId.label</label>
+                       <description>@text/config.clientId.description</description>
                </parameter>
 
                <parameter name="clientSecret" type="text" required="true">
-                       <label>Client Secret</label>
-                       <description>Client Secret provided for the application you created.</description>
+                       <label>@text/config.clientSecret.label</label>
+                       <description>@text/config.clientSecret.description</description>
                        <context>password</context>
                </parameter>
 
                <parameter name="refreshToken" type="text">
-                       <label>Refresh Token</label>
-                       <description>Refresh token provided by the oAuth2 authentication process.</description>
+                       <label>@text/config.refreshToken.label</label>
+                       <description>@text/config.refreshToken.description</description>
                        <context>password</context>
                        <advanced>true</advanced>
                </parameter>
 
                <parameter name="webHookUrl" type="text" required="false">
-                       <label>Webhook Address</label>
-                       <description>Protocol, public IP or hostname and port to access openHAB server from Internet.</description>
+                       <label>@text/config.webHookUrl.label</label>
+                       <description>@text/config.webHookUrl.description</description>
                </parameter>
 
                <parameter name="reconnectInterval" type="integer" unit="s">
-                       <label>Reconnect Interval</label>
-                       <description>The reconnection interval to Netatmo API (in s).</description>
+                       <label>@text/config.reconnectInterval.label</label>
+                       <description>@text/config.reconnectInterval.description</description>
                        <default>300</default>
                </parameter>
        </config-description>
 
        <config-description uri="netatmo:sum_rain:config">
                <parameter name="period" type="text">
-                       <label>Period</label>
-                       <description>Observation period for summing rain quantities.</description>
+                       <label>@text/config.period.label</label>
+                       <description>@text/config.period.sum_rain.description</description>
                        <options>
-                               <option value="30min">30 minutes</option>
-                               <option value="1hour">hour</option>
-                               <option value="3hours">hours</option>
-                               <option value="1day">This day</option>
-                               <option value="1week">This week</option>
-                               <option value="1month">This month</option>
+                               <option value="30min">@text/config.period.option.30min</option>
+                               <option value="1hour">@text/config.period.option.1hour</option>
+                               <option value="3hours">@text/config.period.option.3hours</option>
+                               <option value="1day">@text/config.period.option.1day</option>
+                               <option value="1week">@text/config.period.option.1week</option>
+                               <option value="1month">@text/config.period.option.1month</option>
                        </options>
                        <default>1week</default>
                </parameter>
 
        <config-description uri="netatmo:measure:config">
                <parameter name="limit" type="text">
-                       <label>Boundary</label>
-                       <description>Defines the requested boundary.</description>
+                       <label>@text/config.limit.label</label>
+                       <description>@text/config.limit.description</description>
                        <options>
-                               <option value="MIN">Minimum</option>
-                               <option value="MAX">Maximum</option>
+                               <option value="MIN">@text/config.limit.option.MIN</option>
+                               <option value="MAX">@text/config.limit.option.MAX</option>
                        </options>
                        <default>MIN</default>
                </parameter>
                <parameter name="period" type="text">
-                       <label>Period</label>
-                       <description>Observation period for searched boundary.</description>
+                       <label>@text/config.period.label</label>
+                       <description>@text/config.period.measure.description</description>
                        <options>
-                               <option value="30min">30 minutes</option>
-                               <option value="1hour">hour</option>
-                               <option value="3hours">hours</option>
-                               <option value="1day">This day</option>
-                               <option value="1week">This week</option>
-                               <option value="1month">This month</option>
+                               <option value="30min">@text/config.period.option.30min</option>
+                               <option value="1hour">@text/config.period.option.1hour</option>
+                               <option value="3hours">@text/config.period.option.3hours</option>
+                               <option value="1day">@text/config.period.option.1day</option>
+                               <option value="1week">@text/config.period.option.1week</option>
+                               <option value="1month">@text/config.period.option.1month</option>
                        </options>
                        <default>1week</default>
                </parameter>
 
        <config-description uri="netatmo:timestamp:config">
                <parameter name="limit" type="text">
-                       <label>Boundary</label>
-                       <description>Defines the requested boundary.</description>
+                       <label>@text/config.limit.label</label>
+                       <description>@text/config.limit.description</description>
                        <options>
-                               <option value="DATE_MIN">Timestamp of minimum</option>
-                               <option value="DATE_MAX">Timestamp of maximum</option>
+                               <option value="DATE_MIN">@text/config.limit.option.DATE_MIN</option>
+                               <option value="DATE_MAX">@text/config.limit.option.DATE_MAX</option>
                        </options>
                        <default>DATE_MIN</default>
                </parameter>
                <parameter name="period" type="text">
-                       <label>Period</label>
-                       <description>Observation period for the queried value.</description>
+                       <label>@text/config.period.label</label>
+                       <description>@text/config.period.timestamp.description</description>
                        <options>
-                               <option value="1week">This week</option>
-                               <option value="1month">This month</option>
+                               <option value="1week">@text/config.period.option.1week</option>
+                               <option value="1month">@text/config.period.option.1month</option>
                        </options>
                        <default>1week</default>
                </parameter>
 
        <config-description uri="netatmo:device">
                <parameter name="id" type="text" pattern="([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})" required="true">
-                       <label>Equipment ID</label>
-                       <description>ID of the device (MAC address).</description>
+                       <label>@text/config.equipmentId.label</label>
+                       <description>@text/config.equipmentId.description</description>
                </parameter>
        </config-description>
 
        <config-description uri="netatmo:virtual">
                <parameter name="id" type="text" required="true">
-                       <label>Thing ID</label>
-                       <description>Unique identifier of the thing defined by Netatmo.</description>
+                       <label>@text/config.thingId.label</label>
+                       <description>@text/config.thingId.description</description>
                </parameter>
        </config-description>
 
        <config-description uri="netatmo:home">
                <parameter name="id" type="text" required="true">
-                       <label>Thing ID</label>
-                       <description>Unique identifier of the thing defined by Netatmo.</description>
+                       <label>@text/config.thingId.label</label>
+                       <description>@text/config.thingId.description</description>
                </parameter>
 
                <parameter name="refreshInterval" type="integer" min="20" unit="s">
-                       <label>Refresh Interval</label>
-                       <description>The refresh interval to poll Netatmo API (in seconds).</description>
+                       <label>@text/config.refreshInterval.label</label>
+                       <description>@text/config.refreshInterval.description</description>
                        <default>180</default>
                </parameter>
        </config-description>
 
        <config-description uri="netatmo:configurable">
                <parameter name="id" type="text" pattern="([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})" required="true">
-                       <label>Equipment ID</label>
-                       <description>ID of the device (MAC address).</description>
+                       <label>@text/config.equipmentId.label</label>
+                       <description>@text/config.equipmentId.description</description>
                </parameter>
 
                <parameter name="refreshInterval" type="integer" min="20" unit="s">
-                       <label>Refresh Interval</label>
-                       <description>The refresh interval to poll Netatmo API (in seconds).</description>
+                       <label>@text/config.refreshInterval.label</label>
+                       <description>@text/config.refreshInterval.description</description>
                        <default>180</default>
                </parameter>
        </config-description>
index 2d6165441417448f13be6c3ce2abfaba60b7b7cd..cd840b3f802a83ee28411368b7dc1738908d997d 100644 (file)
@@ -289,6 +289,25 @@ channel-type.config.netatmo.live-stream-url.quality.option.low = Low Quality
 channel-type.config.netatmo.live-stream-url.quality.option.poor = Poor Quality
 channel-type.config.netatmo.live-stream-url.quality.option.high = High Quality
 
+# channel types config
+
+config.limit.label = Boundary
+config.limit.description = Defines the requested boundary.
+config.limit.option.MIN = Minimum
+config.limit.option.MAX = Maximum
+config.limit.option.DATE_MIN = Timestamp of minimum
+config.limit.option.DATE_MAX = Timestamp of maximum
+config.period.label = Period
+config.period.measure.description = Observation period for searched boundary.
+config.period.sum_rain.description = Observation period for summing rain quantities.
+config.period.timestamp.description = Observation period for the queried value.
+config.period.option.30min = 30 minutes
+config.period.option.1hour = 1 hour
+config.period.option.3hours = 3 hours
+config.period.option.1day = This day
+config.period.option.1week = This week
+config.period.option.1month = This month
+
 # thing types
 
 thing-type.netatmo.account.label = Netatmo Account
@@ -326,6 +345,25 @@ thing-type.netatmo.welcome.description = The Netatmo Smart Indoor Camera (Welcom
 thing-type.netatmo.wind.label = Wind Gauge Module
 thing-type.netatmo.wind.description = Wind sensor reporting wind angle and strength.
 
+# thing configuration
+
+config.clientId.label = Client ID
+config.clientId.description = Client ID provided for the application you created on http://dev.netatmo.com/createapp
+config.clientSecret.label = Client Secret
+config.clientSecret.description = Client Secret provided for the application you created.
+config.refreshToken.label = Refresh Token
+config.refreshToken.description = Refresh token provided by the oAuth2 authentication process.
+config.webHookUrl.label = Webhook Address
+config.webHookUrl.description = Protocol, public IP or hostname and port to access openHAB server from Internet.
+config.reconnectInterval.label = Reconnect Interval
+config.reconnectInterval.description = The reconnection interval to Netatmo API (in s).
+config.equipmentId.label = Equipment ID
+config.equipmentId.description = ID of the device (MAC address).
+config.thingId.label = Thing ID
+config.thingId.description = Unique identifier of the thing defined by Netatmo.
+config.refreshInterval.label = Refresh Interval
+config.refreshInterval.description = The refresh interval to poll Netatmo API (in seconds).
+
 # error messages
 
 conf-error-no-client-id = Cannot connect to Netatmo bridge as no client id is available in the configuration