]> git.basschouten.com Git - openhab-addons.git/commitdiff
[windcentrale] Add default translations (#11596)
authorMarcel <marcel@verpaalen.com>
Tue, 16 Nov 2021 20:19:50 +0000 (21:19 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Nov 2021 20:19:50 +0000 (21:19 +0100)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/config/MillConfig.java
bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/handler/WindcentraleHandler.java
bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale.properties [new file with mode: 0644]
bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale_nl.properties

index cc47a05fa896c857f095b9a10928e289ca50ee80..fefe629c5bf50ecb967d2abd85d0b0cc40be4e4d 100644 (file)
@@ -17,7 +17,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
 /**
  * The configuration of a Mill thing.
  *
- * @author Wouter Born - Add Mill configuration object
+ * @author Wouter Born - Initial contribution, add Mill configuration object
  */
 @NonNullByDefault
 public class MillConfig {
index 03cd2dcc4c284a251978394d39068421cfd08d64..81562f2d4680f612961a8818ea739f2eeda52f32 100644 (file)
@@ -109,9 +109,10 @@ public class WindcentraleHandler extends BaseThingHandler {
     @Override
     public void dispose() {
         logger.debug("Disposing Windcentrale handler '{}'", getThing().getUID());
+        final ScheduledFuture<?> pollingJob = this.pollingJob;
         if (pollingJob != null) {
             pollingJob.cancel(true);
-            pollingJob = null;
+            this.pollingJob = null;
         }
     }
 
@@ -159,7 +160,7 @@ public class WindcentraleHandler extends BaseThingHandler {
         } catch (final RuntimeException e) {
             logger.debug("Failed to process windmill data", e);
             updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR,
-                    "Failed to process mill data");
+                    "@text/offline.mill-data-error");
         }
     }
 }
diff --git a/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale.properties b/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale.properties
new file mode 100644 (file)
index 0000000..e2b38a1
--- /dev/null
@@ -0,0 +1,45 @@
+# binding
+
+binding.windcentrale.name = Windcentrale Binding
+binding.windcentrale.description = Binding for Windcentrale windmills
+
+# thing types
+
+thing-type.windcentrale.mill.label = Windcentrale Windmill
+
+# thing types config
+
+thing-type.config.windcentrale.mill.millId.label = Windmill
+thing-type.config.windcentrale.mill.millId.option.1 = De Grote Geert
+thing-type.config.windcentrale.mill.millId.option.2 = De Jonge Held
+thing-type.config.windcentrale.mill.millId.option.31 = Het Rode Hert
+thing-type.config.windcentrale.mill.millId.option.41 = De Ranke Zwaan
+thing-type.config.windcentrale.mill.millId.option.51 = De Witte Juffer
+thing-type.config.windcentrale.mill.millId.option.111 = De Bonte Hen
+thing-type.config.windcentrale.mill.millId.option.121 = De Trouwe Wachter
+thing-type.config.windcentrale.mill.millId.option.131 = De Blauwe Reiger
+thing-type.config.windcentrale.mill.millId.option.141 = De Vier Winden
+thing-type.config.windcentrale.mill.millId.option.201 = De Boerenzwaluw
+thing-type.config.windcentrale.mill.refreshInterval.label = Refresh Interval
+thing-type.config.windcentrale.mill.refreshInterval.description = Refresh interval for refreshing the data in seconds
+thing-type.config.windcentrale.mill.wd.label = Wind Shares
+thing-type.config.windcentrale.mill.wd.description = Number of wind shares ("Winddelen")
+
+# channel types
+
+channel-type.windcentrale.kwh.label = Energy
+channel-type.windcentrale.kwhForecast.label = Energy Forecast
+channel-type.windcentrale.powerAbsTot.label = Total Power
+channel-type.windcentrale.powerAbsWd.label = Wind Shares Power
+channel-type.windcentrale.powerRel.label = Relative Power
+channel-type.windcentrale.runPercentage.label = Run Percentage
+channel-type.windcentrale.runPercentage.description = Run percentage this year
+channel-type.windcentrale.runTime.label = Run Time
+channel-type.windcentrale.runTime.description = Run time this year
+channel-type.windcentrale.timestamp.label = Last Updated
+channel-type.windcentrale.windDirection.label = Wind Direction
+channel-type.windcentrale.windSpeed.label = Wind Speed
+
+# status messages
+
+offline.mill-data-error = Failed to process mill data
index 8e4a355dbb0eaf824f561cebaf0963fb67523d08..a11c948b43eb9b09973f303676d7cdb8f53aaff6 100644 (file)
@@ -4,6 +4,17 @@ binding.windcentrale.description = Binding voor Windcentrale windmolens
 
 # thing types
 thing-type.windcentrale.mill.label = Windcentrale windmolen
+thing-type.config.windcentrale.mill.millId.option.1 = De Grote Geert
+thing-type.config.windcentrale.mill.millId.option.2 = De Jonge Held
+thing-type.config.windcentrale.mill.millId.option.31 = Het Rode Hert
+thing-type.config.windcentrale.mill.millId.option.41 = De Ranke Zwaan
+thing-type.config.windcentrale.mill.millId.option.51 = De Witte Juffer
+thing-type.config.windcentrale.mill.millId.option.111 = De Bonte Hen
+thing-type.config.windcentrale.mill.millId.option.121 = De Trouwe Wachter
+thing-type.config.windcentrale.mill.millId.option.131 = De Blauwe Reiger
+thing-type.config.windcentrale.mill.millId.option.141 = De Vier Winden
+thing-type.config.windcentrale.mill.millId.option.201 = De Boerenzwaluw
+
 thing-type.config.windcentrale.mill.millId.label = Windmolen
 thing-type.config.windcentrale.mill.wd.label = Aantal Winddelen
 thing-type.config.windcentrale.mill.wd.description = Aantal Winddelen in bezit
@@ -23,3 +34,7 @@ channel.windcentrale.runPercentage.description = Molen productie percentage dit
 channel.windcentrale.runTime.label = Molen productietijd
 channel.windcentrale.runTime.description = Molen productietijd dit jaar
 channel.windcentrale.timestamp.label = Ververs tijdstip
+
+# status messages
+
+offline.mill-data-error = Fout bij het verwerken van de molen data