From 3b120c788e4672e18c6f39191cb3588271613e73 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sat, 23 Oct 2021 15:09:59 +0200 Subject: [PATCH] [linky] Add all default translations to properties file (#11426) Allows translating the linky binding strings with Crowdin. Signed-off-by: Laurent Garnier --- .../linky/internal/handler/LinkyHandler.java | 2 +- .../resources/OH-INF/i18n/linky.properties | 46 +++++++++++++++++++ .../resources/OH-INF/thing/thing-types.xml | 6 +-- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 bundles/org.openhab.binding.linky/src/main/resources/OH-INF/i18n/linky.properties diff --git a/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/handler/LinkyHandler.java b/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/handler/LinkyHandler.java index 724bd5dd0..6b325f037 100644 --- a/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/handler/LinkyHandler.java +++ b/bundles/org.openhab.binding.linky/src/main/java/org/openhab/binding/linky/internal/handler/LinkyHandler.java @@ -184,7 +184,7 @@ public class LinkyHandler extends BaseThingHandler { }); } else { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, - "Username, password and authId are mandatory"); + "@text/offline.config-error-mandatory-settings"); } } diff --git a/bundles/org.openhab.binding.linky/src/main/resources/OH-INF/i18n/linky.properties b/bundles/org.openhab.binding.linky/src/main/resources/OH-INF/i18n/linky.properties new file mode 100644 index 000000000..33e37a02f --- /dev/null +++ b/bundles/org.openhab.binding.linky/src/main/resources/OH-INF/i18n/linky.properties @@ -0,0 +1,46 @@ +# binding + +binding.linky.name = Linky Binding +binding.linky.description = Retrieves your energy consumption data from Enedis website + +# thing types + +thing-type.linky.linky.label = Linky +thing-type.linky.linky.description = Provides your energy consumption data. In order to receive the data, you must activate your account at https://espace-client-particuliers.enedis.fr/web/espace-particuliers/compteur-linky. + +# thing types config + +thing-type.config.linky.linky.internalAuthId.label = Auth ID +thing-type.config.linky.linky.internalAuthId.description = Authentication ID delivered after the captcha (see documentation). +thing-type.config.linky.linky.password.label = Password +thing-type.config.linky.linky.password.description = Your Enedis Password +thing-type.config.linky.linky.username.label = Username +thing-type.config.linky.linky.username.description = Your Enedis Username + +# channel group types + +channel-group-type.linky.daily.label = Daily consumption +channel-group-type.linky.daily.channel.timestamp.label = Peak Timestamp +channel-group-type.linky.daily.channel.timestamp.description = Maximum power usage timestamp +channel-group-type.linky.daily.channel.yesterday.label = Yesterday Consumption +channel-group-type.linky.monthly.label = Monthly consumption +channel-group-type.linky.monthly.channel.lastMonth.label = Last Month Consumption +channel-group-type.linky.monthly.channel.thisMonth.label = This Month Consumption +channel-group-type.linky.weekly.label = Weekly consumption +channel-group-type.linky.weekly.channel.lastWeek.label = Last Week Consumption +channel-group-type.linky.weekly.channel.thisWeek.label = This Week Consumption +channel-group-type.linky.yearly.label = Yearly consumption +channel-group-type.linky.yearly.channel.lastYear.label = Last Year Consumption +channel-group-type.linky.yearly.channel.thisYear.label = This Year Consumption + +# channel types + +channel-type.linky.consumption.label = Total Consumption +channel-type.linky.consumption.description = Consumption at given time interval +channel-type.linky.power.label = Yesterday Peak Power +channel-type.linky.power.description = Maximum power usage yesterday +channel-type.linky.timestamp.label = Timestamp + +# Thing status descriptions + +offline.config-error-mandatory-settings = Username, password and authId are mandatory. diff --git a/bundles/org.openhab.binding.linky/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.linky/src/main/resources/OH-INF/thing/thing-types.xml index 5aa9e7fcd..cfacffdab 100644 --- a/bundles/org.openhab.binding.linky/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.linky/src/main/resources/OH-INF/thing/thing-types.xml @@ -43,9 +43,7 @@ - - - + Maximum power usage timestamp @@ -99,7 +97,7 @@ Number:Power - + Maximum power usage yesterday