]> git.basschouten.com Git - openhab-addons.git/commitdiff
[rotel] Add all default translations to properties file (#11394)
authorlolodomo <lg.hc@free.fr>
Sat, 23 Oct 2021 13:18:00 +0000 (15:18 +0200)
committerGitHub <noreply@github.com>
Sat, 23 Oct 2021 13:18:00 +0000 (15:18 +0200)
Allows translating the rotel binding strings with Crowdin.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.rotel/README.md
bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelException.java
bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/RotelHandlerFactory.java
bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelConnector.java
bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelDsp.java
bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelIpConnector.java
bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/communication/RotelSerialConnector.java
bundles/org.openhab.binding.rotel/src/main/java/org/openhab/binding/rotel/internal/handler/RotelHandler.java
bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/config/config.xml
bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/i18n/rotel.properties [new file with mode: 0644]
bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/thing/channels.xml

index f9a99b07c3c778fe7e5d72b5dcc6a6109e8e465e..1204fc80497f70d34f8fc27aaa8e088d467bf8d1 100644 (file)
@@ -150,7 +150,7 @@ The following channels are available:
 | power, mainZone#power, zone2#power, zone3#power, zone4#power | Power               | Switch    | Power ON/OFF the equipment or the zone | ON, OFF                            |
 | source, mainZone#source, zone2#source, zone3#source, zone4#source | Source Input        | String    | Select the source input               | CD, TUNER, TAPE, VIDEO1, VIDEO2, VIDEO3, VIDEO4, VIDEO5, VIDEO6, VIDEO7, VIDEO8, USB, PCUSB, MULTI, PHONO, BLUETOOTH, AUX, AUX1, AUX2, AUX1_COAX, AUX1_OPTICAL, COAX1, COAX2, COAX3, OPTICAL1, OPTICAL2, OPTICAL3, XLR, RCD, FM, DAB, PLAYFI, IRADIO, NETWORK |
 | mainZone#recordSource | Record Source       | String    | Select the source to be recorded      | CD, TUNER, TAPE, VIDEO1, VIDEO2, VIDEO3, VIDEO4, VIDEO5, VIDEO6, USB, MAIN |
-| dsp, mainZone#dsp | DSP Mode            | String    | Select the DSP mode                   | NONE, STEREO3, STEREO5, STEREO7, STEREO9, STEREO11, MUSIC1, MUSIC2, MUSIC3, MUSIC4, PROLOGIC, PLIICINEMA, PLIIMUSIC, PLIIGAME, PLIIZ, NEO6MUSIC, NEO6CINEMA, ATMOS, NEURALX, BYPASS |
+| dsp, mainZone#dsp | DSP Mode            | String    | Select the DSP mode                   | NONE, STEREO3, STEREO5, STEREO7, STEREO9, STEREO11, MUSIC1, MUSIC2, MUSIC3, MUSIC4, PROLOGIC, PLIICINEMA, PLIIMUSIC, PLIIGAME, PLIIXCINEMA, PLIIXMUSIC, PLIIXGAME, PLIIZ, NEO6MUSIC, NEO6CINEMA, ATMOS, NEURALX, BYPASS |
 | mainZone#volumeUpDown, zone2#volumeUpDown | Volume              | Number    | Increase or decrease the volume       | INCREASE, DECREASE, value |
 | volume, mainZone#volume, zone2#volume, zone3#volume, zone4#volume | Volume              | Dimmer    | Adjust the volume                     | value between 0 and 100 |
 | mute, mainZone#mute, zone2#mute, zone3#mute, zone4#mute | Mute                | Switch    | Mute/unmute the sound                 | ON, OFF                            |
index af1a37fedc4fbf116694f6c0d3d51399e4f1b61b..9360c5ddced36c6cdbd4059e80bc9b34bf478cec 100644 (file)
@@ -23,10 +23,11 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
 public class RotelException extends Exception {
     private static final long serialVersionUID = 1L;
 
-    public RotelException() {
-    }
-
     public RotelException(String message) {
         super(message);
     }
+
+    public RotelException(String message, Throwable cause) {
+        super(message, cause);
+    }
 }
index 096fcf7e1c8803efa243d880caaca27293990c7c..376f9dad181d9c8af4100712887b2dbed8b09f52 100644 (file)
@@ -22,6 +22,8 @@ import java.util.stream.Stream;
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 import org.openhab.binding.rotel.internal.handler.RotelHandler;
+import org.openhab.core.i18n.LocaleProvider;
+import org.openhab.core.i18n.TranslationProvider;
 import org.openhab.core.io.transport.serial.SerialPortManager;
 import org.openhab.core.thing.Thing;
 import org.openhab.core.thing.ThingTypeUID;
@@ -54,14 +56,18 @@ public class RotelHandlerFactory extends BaseThingHandlerFactory {
             .collect(Collectors.toSet()));
 
     private final SerialPortManager serialPortManager;
-
     private final RotelStateDescriptionOptionProvider stateDescriptionProvider;
+    private final TranslationProvider i18nProvider;
+    private final LocaleProvider localeProvider;
 
     @Activate
     public RotelHandlerFactory(final @Reference SerialPortManager serialPortManager,
-            final @Reference RotelStateDescriptionOptionProvider stateDescriptionProvider) {
+            final @Reference RotelStateDescriptionOptionProvider stateDescriptionProvider,
+            final @Reference TranslationProvider i18nProvider, final @Reference LocaleProvider localeProvider) {
         this.serialPortManager = serialPortManager;
         this.stateDescriptionProvider = stateDescriptionProvider;
+        this.i18nProvider = i18nProvider;
+        this.localeProvider = localeProvider;
     }
 
     @Override
@@ -74,7 +80,7 @@ public class RotelHandlerFactory extends BaseThingHandlerFactory {
         ThingTypeUID thingTypeUID = thing.getThingTypeUID();
 
         if (SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID)) {
-            return new RotelHandler(thing, stateDescriptionProvider, serialPortManager);
+            return new RotelHandler(thing, stateDescriptionProvider, serialPortManager, i18nProvider, localeProvider);
         }
 
         return null;
index 03a30b7d7cc80f7747ef1e7915c3916e18a690e1..0531c3a6de6f0c17bf64ea48f77a190d2bcca218 100644 (file)
@@ -347,7 +347,7 @@ public abstract class RotelConnector {
             return dataIn.read(dataBuffer);
         } catch (IOException e) {
             logger.debug("readInput failed: {}", e.getMessage());
-            throw new RotelException("readInput failed: " + e.getMessage());
+            throw new RotelException("readInput failed", e);
         }
     }
 
@@ -489,7 +489,7 @@ public abstract class RotelConnector {
             dataOut.flush();
         } catch (IOException e) {
             logger.debug("Send command \"{}\" failed: {}", cmd.getName(), e.getMessage());
-            throw new RotelException("Send command \"" + cmd.getName() + "\" failed: " + e.getMessage());
+            throw new RotelException("Send command \"" + cmd.getName() + "\" failed", e);
         }
         logger.debug("Send command \"{}\" succeeded", cmd.getName());
     }
index 392fb3c34b33dcc425bd6f2e364b8655757e65f2..42b0162ad29e69c4d097bb98b708996f0979119d 100644 (file)
@@ -27,93 +27,92 @@ import org.openhab.core.types.StateOption;
 @NonNullByDefault
 public enum RotelDsp {
 
-    CAT1_NONE(1, "NONE", "No DSP", RotelCommand.STEREO, "stereo"),
-    CAT1_STEREO3(1, "STEREO3", "Dolby 3 Stereo", RotelCommand.STEREO3, "dolby_3_stereo"),
-    CAT1_STEREO5(1, "STEREO5", "5 Channel Stereo", RotelCommand.STEREO5, "5_channel_stereo"),
-    CAT1_STEREO7(1, "STEREO7", "7 Channel Stereo", RotelCommand.STEREO7, "7_channel_stereo"),
-    CAT1_MUSIC1(1, "MUSIC1", "Music 1", RotelCommand.DSP1, "dsp1"),
-    CAT1_MUSIC2(1, "MUSIC2", "Music 2", RotelCommand.DSP2, "dsp2"),
-    CAT1_MUSIC3(1, "MUSIC3", "Music 3", RotelCommand.DSP3, "dsp3"),
-    CAT1_MUSIC4(1, "MUSIC4", "Music 4", RotelCommand.DSP4, "dsp4"),
-    CAT1_PROLOGIC(1, "PROLOGIC", "Dolby Pro Logic", RotelCommand.PROLOGIC, "dolby_prologic"),
-    CAT1_PLII_CINEMA(1, "PLIICINEMA", "Dolby PLII Cinema", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
-    CAT1_PLII_MUSIC(1, "PLIIMUSIC", "Dolby PLII Music", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
-    CAT1_NEO6_CINEMA(1, "NEO6CINEMA", "dts Neo:6 Cinema", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
-    CAT1_NEO6_MUSIC(1, "NEO6MUSIC", "dts Neo:6 Music", RotelCommand.NEO6_MUSIC, "dts_neo:6_music"),
-
-    CAT2_NONE(2, "NONE", "No DSP", RotelCommand.STEREO, "stereo"),
-    CAT2_STEREO3(2, "STEREO3", "Dolby 3 Stereo", RotelCommand.STEREO3, "dolby_3_stereo"),
-    CAT2_STEREO5(2, "STEREO5", "5 Channel Stereo", RotelCommand.STEREO5, "5_channel_stereo"),
-    CAT2_STEREO7(2, "STEREO7", "7 Channel Stereo", RotelCommand.STEREO7, "7_channel_stereo"),
-    CAT2_MUSIC1(2, "MUSIC1", "Music 1", RotelCommand.DSP1, "dsp1"),
-    CAT2_MUSIC2(2, "MUSIC2", "Music 2", RotelCommand.DSP2, "dsp2"),
-    CAT2_MUSIC3(2, "MUSIC3", "Music 3", RotelCommand.DSP3, "dsp3"),
-    CAT2_MUSIC4(2, "MUSIC4", "Music 4", RotelCommand.DSP4, "dsp4"),
-    CAT2_PROLOGIC(2, "PROLOGIC", "Dolby Pro Logic", RotelCommand.PROLOGIC, "dolby_prologic"),
-    CAT2_PLII_CINEMA(2, "PLIICINEMA", "Dolby PLII Cinema", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
-    CAT2_PLII_MUSIC(2, "PLIIMUSIC", "Dolby PLII Music", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
-    CAT2_PLII_GAME(2, "PLIIGAME", "Dolby PLII Game", RotelCommand.PLII_GAME, "dolby_plii_game"),
-    CAT2_NEO6_CINEMA(2, "NEO6CINEMA", "dts Neo:6 Cinema", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
-    CAT2_NEO6_MUSIC(2, "NEO6MUSIC", "dts Neo:6 Music", RotelCommand.NEO6_MUSIC, "dts_neo:6_music"),
-
-    CAT3_BYPASS(3, "BYPASS", "Analog Bypass", RotelCommand.BYPASS, "analog_bypass"),
-    CAT3_NONE(3, "NONE", "No DSP", RotelCommand.STEREO, "stereo"),
-    CAT3_STEREO3(3, "STEREO3", "Dolby 3 Stereo", RotelCommand.STEREO3, "dolby_3_stereo"),
-    CAT3_STEREO5(3, "STEREO5", "5 Channel Stereo", RotelCommand.STEREO5, "5_channel_stereo"),
-    CAT3_STEREO7(3, "STEREO7", "7 Channel Stereo", RotelCommand.STEREO7, "7_channel_stereo"),
-    CAT3_DSP1(3, "DSP1", "DSP 1", RotelCommand.DSP1, "dsp1"),
-    CAT3_DSP2(3, "DSP2", "DSP 2", RotelCommand.DSP2, "dsp2"),
-    CAT3_DSP3(3, "DSP3", "DSP 3", RotelCommand.DSP3, "dsp3"),
-    CAT3_DSP4(3, "DSP4", "DSP 4", RotelCommand.DSP4, "dsp4"),
-    CAT3_PROLOGIC(3, "PROLOGIC", "Dolby Pro Logic", RotelCommand.PROLOGIC, "dolby_prologic"),
-    CAT3_PLII_CINEMA(3, "PLIICINEMA", "Dolby PLII/PLIIx Cinema", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
-    CAT3_PLII_MUSIC(3, "PLIIMUSIC", "Dolby PLII/PLIIx Music", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
-    CAT3_PLII_GAME(3, "PLIIGAME", "Dolby PLII/PLIIx Game", RotelCommand.PLII_GAME, "dolby_plii_game"),
-    CAT3_NEO6_CINEMA(3, "NEO6CINEMA", "dts Neo:6 Cinema", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
-    CAT3_NEO6_MUSIC(3, "NEO6MUSIC", "dts Neo:6 Music", RotelCommand.NEO6_MUSIC, "dts_neo:6_music"),
-
-    CAT4_BYPASS(4, "BYPASS", "Analog Bypass", RotelCommand.BYPASS, "analog_bypass"),
-    CAT4_NONE(4, "NONE", "No DSP", RotelCommand.STEREO, "stereo"),
-    CAT4_STEREO3(4, "STEREO3", "Dolby 3 Stereo", RotelCommand.STEREO3, "dolby_3_stereo"),
-    CAT4_STEREO5(4, "STEREO5", "5 Channel Stereo", RotelCommand.STEREO5, "5_channel_stereo"),
-    CAT4_STEREO7(4, "STEREO7", "7 Channel Stereo", RotelCommand.STEREO7, "7_channel_stereo"),
-    CAT4_DSP1(4, "DSP1", "DSP 1", RotelCommand.DSP1, "dsp1"),
-    CAT4_DSP2(4, "DSP2", "DSP 2", RotelCommand.DSP2, "dsp2"),
-    CAT4_DSP3(4, "DSP3", "DSP 3", RotelCommand.DSP3, "dsp3"),
-    CAT4_DSP4(4, "DSP4", "DSP 4", RotelCommand.DSP4, "dsp4"),
-    CAT4_PROLOGIC(4, "PROLOGIC", "Dolby Pro Logic", RotelCommand.PROLOGIC, "dolby_prologic"),
-    CAT4_PLII_CINEMA(4, "PLIICINEMA", "Dolby PLII/PLIIx Cinema", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
-    CAT4_PLII_MUSIC(4, "PLIIMUSIC", "Dolby PLII/PLIIx Music", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
-    CAT4_PLII_GAME(4, "PLIIGAME", "Dolby PLII/PLIIx Game", RotelCommand.PLII_GAME, "dolby_plii_game"),
-    CAT4_PLIIZ(4, "PLIIZ", "Dolby PLIIz", RotelCommand.PLIIZ, "dolby_pliiz"),
-    CAT4_NEO6_CINEMA(4, "NEO6CINEMA", "dts Neo:6 Cinema", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
-    CAT4_NEO6_MUSIC(4, "NEO6MUSIC", "dts Neo:6 Music", RotelCommand.NEO6_MUSIC, "dts_neo:6_music"),
-
-    CAT5_BYPASS(5, "BYPASS", "Analog Bypass", RotelCommand.BYPASS, "analog_bypass"),
-    CAT5_NONE(5, "NONE", "No DSP", RotelCommand.STEREO, "stereo"),
-    CAT5_STEREO3(5, "STEREO3", "Dolby 3 Stereo", RotelCommand.STEREO3, "dolby_3_stereo"),
-    CAT5_STEREO5(5, "STEREO5", "5 Channel Stereo", RotelCommand.STEREO5, "5_channel_stereo"),
-    CAT5_STEREO7(5, "STEREO7", "7 Channel Stereo", RotelCommand.STEREO7, "7_channel_stereo"),
-    CAT5_STEREO9(5, "STEREO9", "9 Channel Stereo", RotelCommand.STEREO9, "9_channel_stereo"),
-    CAT5_STEREO11(5, "STEREO11", "11 Channel Stereo", RotelCommand.STEREO11, "11_channel_stereo"),
-    CAT5_ATMOS(5, "ATMOS", "Dolby Atmos", RotelCommand.ATMOS, "dolby atmos surround"),
-    CAT5_NEURAL_X(5, "NEURALX", "dts Neural:X", RotelCommand.NEURAL_X, "dts neural:x"),
-
-    CAT6_BYPASS(6, "BYPASS", "Analog Bypass", RotelCommand.BYPASS, "analog_bypass"),
-    CAT6_NONE(6, "NONE", "No DSP", RotelCommand.STEREO, "stereo"),
-    CAT6_STEREO3(6, "STEREO3", "Dolby 3 Stereo", RotelCommand.STEREO3, "dolby_3_stereo"),
-    CAT6_STEREO5(6, "STEREO5", "5 Channel Stereo", RotelCommand.STEREO5, "5_channel_stereo"),
-    CAT6_STEREO7(6, "STEREO7", "7 Channel Stereo", RotelCommand.STEREO7, "7_channel_stereo"),
-    CAT6_PLII_CINEMA(6, "PLIICINEMA", "Dolby PLII/PLIIx Cinema", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
-    CAT6_PLII_MUSIC(6, "PLIIMUSIC", "Dolby PLII/PLIIx Music", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
-    CAT6_PLII_GAME(6, "PLIIGAME", "Dolby PLII/PLIIx Game", RotelCommand.PLII_GAME, "dolby_plii_game"),
-    CAT6_PLIIZ(6, "PLIIZ", "Dolby PLIIz", RotelCommand.PLIIZ, "dolby_pliiz"),
-    CAT6_NEO6_CINEMA(6, "NEO6CINEMA", "dts Neo:6 Cinema", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
-    CAT6_NEO6_MUSIC(6, "NEO6MUSIC", "dts Neo:6 Music", RotelCommand.NEO6_MUSIC, "dts_neo:6_music");
+    CAT1_NONE(1, "NONE", RotelCommand.STEREO, "stereo"),
+    CAT1_STEREO3(1, "STEREO3", RotelCommand.STEREO3, "dolby_3_stereo"),
+    CAT1_STEREO5(1, "STEREO5", RotelCommand.STEREO5, "5_channel_stereo"),
+    CAT1_STEREO7(1, "STEREO7", RotelCommand.STEREO7, "7_channel_stereo"),
+    CAT1_MUSIC1(1, "MUSIC1", RotelCommand.DSP1, "dsp1"),
+    CAT1_MUSIC2(1, "MUSIC2", RotelCommand.DSP2, "dsp2"),
+    CAT1_MUSIC3(1, "MUSIC3", RotelCommand.DSP3, "dsp3"),
+    CAT1_MUSIC4(1, "MUSIC4", RotelCommand.DSP4, "dsp4"),
+    CAT1_PROLOGIC(1, "PROLOGIC", RotelCommand.PROLOGIC, "dolby_prologic"),
+    CAT1_PLII_CINEMA(1, "PLIICINEMA", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
+    CAT1_PLII_MUSIC(1, "PLIIMUSIC", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
+    CAT1_NEO6_CINEMA(1, "NEO6CINEMA", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
+    CAT1_NEO6_MUSIC(1, "NEO6MUSIC", RotelCommand.NEO6_MUSIC, "dts_neo:6_music"),
+
+    CAT2_NONE(2, "NONE", RotelCommand.STEREO, "stereo"),
+    CAT2_STEREO3(2, "STEREO3", RotelCommand.STEREO3, "dolby_3_stereo"),
+    CAT2_STEREO5(2, "STEREO5", RotelCommand.STEREO5, "5_channel_stereo"),
+    CAT2_STEREO7(2, "STEREO7", RotelCommand.STEREO7, "7_channel_stereo"),
+    CAT2_MUSIC1(2, "MUSIC1", RotelCommand.DSP1, "dsp1"),
+    CAT2_MUSIC2(2, "MUSIC2", RotelCommand.DSP2, "dsp2"),
+    CAT2_MUSIC3(2, "MUSIC3", RotelCommand.DSP3, "dsp3"),
+    CAT2_MUSIC4(2, "MUSIC4", RotelCommand.DSP4, "dsp4"),
+    CAT2_PROLOGIC(2, "PROLOGIC", RotelCommand.PROLOGIC, "dolby_prologic"),
+    CAT2_PLII_CINEMA(2, "PLIICINEMA", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
+    CAT2_PLII_MUSIC(2, "PLIIMUSIC", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
+    CAT2_PLII_GAME(2, "PLIIGAME", RotelCommand.PLII_GAME, "dolby_plii_game"),
+    CAT2_NEO6_CINEMA(2, "NEO6CINEMA", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
+    CAT2_NEO6_MUSIC(2, "NEO6MUSIC", RotelCommand.NEO6_MUSIC, "dts_neo:6_music"),
+
+    CAT3_BYPASS(3, "BYPASS", RotelCommand.BYPASS, "analog_bypass"),
+    CAT3_NONE(3, "NONE", RotelCommand.STEREO, "stereo"),
+    CAT3_STEREO3(3, "STEREO3", RotelCommand.STEREO3, "dolby_3_stereo"),
+    CAT3_STEREO5(3, "STEREO5", RotelCommand.STEREO5, "5_channel_stereo"),
+    CAT3_STEREO7(3, "STEREO7", RotelCommand.STEREO7, "7_channel_stereo"),
+    CAT3_DSP1(3, "DSP1", RotelCommand.DSP1, "dsp1"),
+    CAT3_DSP2(3, "DSP2", RotelCommand.DSP2, "dsp2"),
+    CAT3_DSP3(3, "DSP3", RotelCommand.DSP3, "dsp3"),
+    CAT3_DSP4(3, "DSP4", RotelCommand.DSP4, "dsp4"),
+    CAT3_PROLOGIC(3, "PROLOGIC", RotelCommand.PROLOGIC, "dolby_prologic"),
+    CAT3_PLII_CINEMA(3, "PLIIXCINEMA", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
+    CAT3_PLII_MUSIC(3, "PLIIXMUSIC", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
+    CAT3_PLII_GAME(3, "PLIIXGAME", RotelCommand.PLII_GAME, "dolby_plii_game"),
+    CAT3_NEO6_CINEMA(3, "NEO6CINEMA", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
+    CAT3_NEO6_MUSIC(3, "NEO6MUSIC", RotelCommand.NEO6_MUSIC, "dts_neo:6_music"),
+
+    CAT4_BYPASS(4, "BYPASS", RotelCommand.BYPASS, "analog_bypass"),
+    CAT4_NONE(4, "NONE", RotelCommand.STEREO, "stereo"),
+    CAT4_STEREO3(4, "STEREO3", RotelCommand.STEREO3, "dolby_3_stereo"),
+    CAT4_STEREO5(4, "STEREO5", RotelCommand.STEREO5, "5_channel_stereo"),
+    CAT4_STEREO7(4, "STEREO7", RotelCommand.STEREO7, "7_channel_stereo"),
+    CAT4_DSP1(4, "DSP1", RotelCommand.DSP1, "dsp1"),
+    CAT4_DSP2(4, "DSP2", RotelCommand.DSP2, "dsp2"),
+    CAT4_DSP3(4, "DSP3", RotelCommand.DSP3, "dsp3"),
+    CAT4_DSP4(4, "DSP4", RotelCommand.DSP4, "dsp4"),
+    CAT4_PROLOGIC(4, "PROLOGIC", RotelCommand.PROLOGIC, "dolby_prologic"),
+    CAT4_PLII_CINEMA(4, "PLIIXCINEMA", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
+    CAT4_PLII_MUSIC(4, "PLIIXMUSIC", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
+    CAT4_PLII_GAME(4, "PLIIXGAME", RotelCommand.PLII_GAME, "dolby_plii_game"),
+    CAT4_PLIIZ(4, "PLIIZ", RotelCommand.PLIIZ, "dolby_pliiz"),
+    CAT4_NEO6_CINEMA(4, "NEO6CINEMA", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
+    CAT4_NEO6_MUSIC(4, "NEO6MUSIC", RotelCommand.NEO6_MUSIC, "dts_neo:6_music"),
+
+    CAT5_BYPASS(5, "BYPASS", RotelCommand.BYPASS, "analog_bypass"),
+    CAT5_NONE(5, "NONE", RotelCommand.STEREO, "stereo"),
+    CAT5_STEREO3(5, "STEREO3", RotelCommand.STEREO3, "dolby_3_stereo"),
+    CAT5_STEREO5(5, "STEREO5", RotelCommand.STEREO5, "5_channel_stereo"),
+    CAT5_STEREO7(5, "STEREO7", RotelCommand.STEREO7, "7_channel_stereo"),
+    CAT5_STEREO9(5, "STEREO9", RotelCommand.STEREO9, "9_channel_stereo"),
+    CAT5_STEREO11(5, "STEREO11", RotelCommand.STEREO11, "11_channel_stereo"),
+    CAT5_ATMOS(5, "ATMOS", RotelCommand.ATMOS, "dolby atmos surround"),
+    CAT5_NEURAL_X(5, "NEURALX", RotelCommand.NEURAL_X, "dts neural:x"),
+
+    CAT6_BYPASS(6, "BYPASS", RotelCommand.BYPASS, "analog_bypass"),
+    CAT6_NONE(6, "NONE", RotelCommand.STEREO, "stereo"),
+    CAT6_STEREO3(6, "STEREO3", RotelCommand.STEREO3, "dolby_3_stereo"),
+    CAT6_STEREO5(6, "STEREO5", RotelCommand.STEREO5, "5_channel_stereo"),
+    CAT6_STEREO7(6, "STEREO7", RotelCommand.STEREO7, "7_channel_stereo"),
+    CAT6_PLII_CINEMA(6, "PLIIXCINEMA", RotelCommand.PLII_CINEMA, "dolby_plii_movie"),
+    CAT6_PLII_MUSIC(6, "PLIIXMUSIC", RotelCommand.PLII_MUSIC, "dolby_plii_music"),
+    CAT6_PLII_GAME(6, "PLIIXGAME", RotelCommand.PLII_GAME, "dolby_plii_game"),
+    CAT6_PLIIZ(6, "PLIIZ", RotelCommand.PLIIZ, "dolby_pliiz"),
+    CAT6_NEO6_CINEMA(6, "NEO6CINEMA", RotelCommand.NEO6_CINEMA, "dts_neo:6_cinema"),
+    CAT6_NEO6_MUSIC(6, "NEO6MUSIC", RotelCommand.NEO6_MUSIC, "dts_neo:6_music");
 
     private int category;
     private String name;
-    private String label;
     private RotelCommand command;
     private String feedback;
 
@@ -122,14 +121,12 @@ public enum RotelDsp {
      *
      * @param category a category of models for which the DSP mode is available
      * @param name the name of the DSP mode
-     * @param label the label of the DSP mode
      * @param command the command to select the DSP mode
      * @param feedback the feedback message identifying the DSP mode
      */
-    private RotelDsp(int category, String name, String label, RotelCommand command, String feedback) {
+    private RotelDsp(int category, String name, RotelCommand command, String feedback) {
         this.category = category;
         this.name = name;
-        this.label = label;
         this.command = command;
         this.feedback = feedback;
     }
@@ -152,15 +149,6 @@ public enum RotelDsp {
         return name;
     }
 
-    /**
-     * Get the label of the current DSP mode
-     *
-     * @return the label
-     */
-    public String getLabel() {
-        return label;
-    }
-
     /**
      * Get the command to select the current DSP mode
      *
@@ -190,7 +178,7 @@ public enum RotelDsp {
         List<StateOption> options = new ArrayList<>();
         for (RotelDsp value : RotelDsp.values()) {
             if (value.getCategory() == category) {
-                options.add(new StateOption(value.getName(), value.getLabel()));
+                options.add(new StateOption(value.getName(), value.getName()));
             }
         }
         return options;
index 99c33c4dbe0413fdac2be7b01c2c05036b64dbae..e9df82602d6b3ab018416bbab4392c0e4ecbeeca 100644 (file)
@@ -81,8 +81,7 @@ public class RotelIpConnector extends RotelConnector {
             logger.debug("IP connection opened");
         } catch (IOException | SecurityException | IllegalArgumentException e) {
             setConnected(false);
-            logger.debug("Opening IP connection failed: {}", e.getMessage());
-            throw new RotelException("Opening IP connection failed: " + e.getMessage());
+            throw new RotelException("Opening IP connection failed", e);
         }
     }
 
@@ -129,7 +128,7 @@ public class RotelIpConnector extends RotelConnector {
             return 0;
         } catch (IOException e) {
             logger.debug("readInput failed: {}", e.getMessage());
-            throw new RotelException("readInput failed: " + e.getMessage());
+            throw new RotelException("readInput failed", e);
         }
     }
 }
index 632ac3f1a26ffb5bbb84672a541fa1d80f693b7b..63083d10eb490e4ee2604cbbc5fa2399e6f5f6a0 100644 (file)
@@ -15,7 +15,6 @@ package org.openhab.binding.rotel.internal.communication;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
 import java.util.Map;
 
 import org.eclipse.jdt.annotation.NonNullByDefault;
@@ -69,8 +68,7 @@ public class RotelSerialConnector extends RotelConnector {
             SerialPortIdentifier portIdentifier = serialPortManager.getIdentifier(serialPortName);
             if (portIdentifier == null) {
                 setConnected(false);
-                logger.debug("Opening serial connection failed: No Such Port: {}", serialPortName);
-                throw new RotelException("Opening serial connection failed: No Such Port");
+                throw new RotelException("Opening serial connection failed: no port " + serialPortName);
             }
 
             SerialPort commPort = portIdentifier.open(this.getClass().getName(), 2000);
@@ -105,23 +103,9 @@ public class RotelSerialConnector extends RotelConnector {
             setConnected(true);
 
             logger.debug("Serial connection opened");
-        } catch (PortInUseException e) {
+        } catch (PortInUseException | UnsupportedCommOperationException | IOException e) {
             setConnected(false);
-            logger.debug("Opening serial connection failed: Port in Use Exception: {}", e.getMessage(), e);
-            throw new RotelException("Opening serial connection failed: Port in Use Exception");
-        } catch (UnsupportedCommOperationException e) {
-            setConnected(false);
-            logger.debug("Opening serial connection failed: Unsupported Comm Operation Exception: {}", e.getMessage(),
-                    e);
-            throw new RotelException("Opening serial connection failed: Unsupported Comm Operation Exception");
-        } catch (UnsupportedEncodingException e) {
-            setConnected(false);
-            logger.debug("Opening serial connection failed: Unsupported Encoding Exception: {}", e.getMessage(), e);
-            throw new RotelException("Opening serial connection failed: Unsupported Encoding Exception");
-        } catch (IOException e) {
-            setConnected(false);
-            logger.debug("Opening serial connection failed: IO Exception: {}", e.getMessage(), e);
-            throw new RotelException("Opening serial connection failed: IO Exception");
+            throw new RotelException("Opening serial connection failed", e);
         }
     }
 
index 062c1ad6b36e40fd1ed8218d53d904a16cd40d95..b28a7843fae6bc4bfb11eb3e5e065c9e60be08ba 100644 (file)
@@ -41,6 +41,8 @@ import org.openhab.binding.rotel.internal.communication.RotelSerialConnector;
 import org.openhab.binding.rotel.internal.communication.RotelSimuConnector;
 import org.openhab.binding.rotel.internal.communication.RotelSource;
 import org.openhab.binding.rotel.internal.configuration.RotelThingConfiguration;
+import org.openhab.core.i18n.LocaleProvider;
+import org.openhab.core.i18n.TranslationProvider;
 import org.openhab.core.io.transport.serial.SerialPortManager;
 import org.openhab.core.library.types.DecimalType;
 import org.openhab.core.library.types.IncreaseDecreaseType;
@@ -59,6 +61,8 @@ import org.openhab.core.types.RefreshType;
 import org.openhab.core.types.State;
 import org.openhab.core.types.StateOption;
 import org.openhab.core.types.UnDefType;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -85,6 +89,9 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
 
     private RotelStateDescriptionOptionProvider stateDescriptionProvider;
     private SerialPortManager serialPortManager;
+    private TranslationProvider i18nProvider;
+    private LocaleProvider localeProvider;
+    private Bundle bundle;
 
     private RotelConnector connector = new RotelSimuConnector(DEFAULT_MODEL, RotelProtocol.HEX, new HashMap<>(),
             "OH-binding-rotel");
@@ -132,10 +139,13 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
      * Constructor
      */
     public RotelHandler(Thing thing, RotelStateDescriptionOptionProvider stateDescriptionProvider,
-            SerialPortManager serialPortManager) {
+            SerialPortManager serialPortManager, TranslationProvider i18nProvider, LocaleProvider localeProvider) {
         super(thing);
         this.stateDescriptionProvider = stateDescriptionProvider;
         this.serialPortManager = serialPortManager;
+        this.i18nProvider = i18nProvider;
+        this.localeProvider = localeProvider;
+        this.bundle = FrameworkUtil.getBundle(this.getClass()).getBundleContext().getBundle();
     }
 
     @Override
@@ -290,6 +300,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
         }
         logger.debug("rotelProtocol {}", rotelProtocol.getName());
 
+        Map<RotelSource, String> sourcesCustomLabels = new HashMap<>();
         Map<RotelSource, String> sourcesLabels = new HashMap<>();
 
         String readerThreadName = "OH-binding-" + getThing().getUID().getAsString();
@@ -316,16 +327,16 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
         String configError = null;
         if ((config.serialPort == null || config.serialPort.isEmpty())
                 && (config.host == null || config.host.isEmpty())) {
-            configError = "undefined serialPort and host configuration settings; please set one of them";
+            configError = "@text/offline.config-error-unknown-serialport-and-host";
         } else if (config.host == null || config.host.isEmpty()) {
             if (config.serialPort.toLowerCase().startsWith("rfc2217")) {
-                configError = "use host and port configuration settings for a serial over IP connection";
+                configError = "@text/offline.config-error-invalid-serial-over-ip";
             }
         } else {
             if (config.port == null) {
-                configError = "undefined port configuration setting";
+                configError = "@text/offline.config-error-unknown-port";
             } else if (config.port <= 0) {
-                configError = "invalid port configuration setting";
+                configError = "@text/offline.config-error-invalid-port";
             }
         }
 
@@ -375,6 +386,9 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
                     default:
                         break;
                 }
+                if (label != null && !label.isEmpty()) {
+                    sourcesCustomLabels.put(src, label);
+                }
                 sourcesLabels.put(src, (label == null || label.isEmpty()) ? src.getLabel() : label);
             }
 
@@ -390,24 +404,24 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
 
             if (rotelModel.hasSourceControl()) {
                 stateDescriptionProvider.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_SOURCE),
-                        getStateOptions(rotelModel.getSources(), sourcesLabels));
+                        getStateOptions(rotelModel.getSources(), sourcesCustomLabels));
                 stateDescriptionProvider.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_MAIN_SOURCE),
-                        getStateOptions(rotelModel.getSources(), sourcesLabels));
+                        getStateOptions(rotelModel.getSources(), sourcesCustomLabels));
                 stateDescriptionProvider.setStateOptions(
                         new ChannelUID(getThing().getUID(), CHANNEL_MAIN_RECORD_SOURCE),
-                        getStateOptions(rotelModel.getRecordSources(), sourcesLabels));
+                        getStateOptions(rotelModel.getRecordSources(), sourcesCustomLabels));
             }
             if (rotelModel.hasZone2SourceControl()) {
                 stateDescriptionProvider.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_ZONE2_SOURCE),
-                        getStateOptions(rotelModel.getZone2Sources(), sourcesLabels));
+                        getStateOptions(rotelModel.getZone2Sources(), sourcesCustomLabels));
             }
             if (rotelModel.hasZone3SourceControl()) {
                 stateDescriptionProvider.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_ZONE3_SOURCE),
-                        getStateOptions(rotelModel.getZone3Sources(), sourcesLabels));
+                        getStateOptions(rotelModel.getZone3Sources(), sourcesCustomLabels));
             }
             if (rotelModel.hasZone4SourceControl()) {
                 stateDescriptionProvider.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_ZONE4_SOURCE),
-                        getStateOptions(rotelModel.getZone4Sources(), sourcesLabels));
+                        getStateOptions(rotelModel.getZone4Sources(), sourcesCustomLabels));
             }
             if (rotelModel.hasDspControl()) {
                 stateDescriptionProvider.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_DSP),
@@ -441,7 +455,12 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
         List<StateOption> options = new ArrayList<>();
         for (RotelSource item : list) {
             String label = sourcesLabels.get(item);
-            options.add(new StateOption(item.getName(), label == null ? item.getLabel() : label));
+            String key = "source." + item.getName();
+            String label2 = i18nProvider.getText(bundle, key, key, localeProvider.getLocale());
+            if (label2 == null || label2.isEmpty()) {
+                label2 = key;
+            }
+            options.add(new StateOption(item.getName(), label == null ? label2 : label));
         }
         return options;
     }
@@ -853,7 +872,8 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
                 }
             } catch (RotelException e) {
                 logger.debug("Command {} from channel {} failed: {}", command, channel, e.getMessage());
-                updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Sending command failed");
+                updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
+                        "@text/offline.comm-error-sending-command");
                 closeConnection();
                 scheduleReconnectJob();
             } catch (InterruptedException e) {
@@ -1066,7 +1086,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
         try {
             connector.open();
         } catch (RotelException e) {
-            logger.debug("openConnection() failed: {}", e.getMessage());
+            logger.debug("openConnection() failed", e);
         }
         logger.debug("openConnection(): {}", connector.isConnected() ? "connected" : "disconnected");
         return connector.isConnected();
@@ -1097,7 +1117,8 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
             switch (key) {
                 case RotelConnector.KEY_ERROR:
                     logger.debug("Reading feedback message failed");
-                    updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Reading thread ended");
+                    updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
+                            "@text/offline.comm-error-reading-thread");
                     closeConnection();
                     break;
                 case RotelConnector.KEY_LINE1:
@@ -1683,7 +1704,8 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
                     }
                 } catch (RotelException e) {
                     logger.debug("Init sequence failed: {}", e.getMessage());
-                    updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Init sequence failed");
+                    updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
+                            "@text/offline.comm-error-init-sequence");
                     closeConnection();
                 } catch (InterruptedException e) {
                     logger.debug("Init sequence interrupted: {}", e.getMessage());
@@ -1727,7 +1749,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
                 } catch (RotelException e) {
                     logger.debug("Init sequence zone 2 failed: {}", e.getMessage());
                     updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
-                            "Init sequence zone 2 failed");
+                            "@text/offline.comm-error-init-sequence-zone [\"2\"]");
                     closeConnection();
                 } catch (InterruptedException e) {
                     logger.debug("Init sequence zone 2 interrupted: {}", e.getMessage());
@@ -1771,7 +1793,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
                 } catch (RotelException e) {
                     logger.debug("Init sequence zone 3 failed: {}", e.getMessage());
                     updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
-                            "Init sequence zone 3 failed");
+                            "@text/offline.comm-error-init-sequence-zone [\"3\"]");
                     closeConnection();
                 } catch (InterruptedException e) {
                     logger.debug("Init sequence zone 3 interrupted: {}", e.getMessage());
@@ -1815,7 +1837,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
                 } catch (RotelException e) {
                     logger.debug("Init sequence zone 4 failed: {}", e.getMessage());
                     updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
-                            "Init sequence zone 4 failed");
+                            "@text/offline.comm-error-init-sequence-zone [\"4\"]");
                     closeConnection();
                 } catch (InterruptedException e) {
                     logger.debug("Init sequence zone 4 interrupted: {}", e.getMessage());
@@ -1854,14 +1876,14 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
                         try {
                             connector.sendCommand(connector.getModel().getPowerStateCmd());
                         } catch (RotelException e) {
-                            error = "First command after connection failed";
-                            logger.debug("{}: {}", error, e.getMessage());
+                            error = "@text/offline.comm-error-first-command-after-reconnection";
+                            logger.debug("First command after connection failed", e);
                             cancelPowerOffJob();
                             closeConnection();
                         }
                     }
                 } else {
-                    error = "Reconnection failed";
+                    error = "@text/offline.comm-error-reconnection";
                 }
                 if (error != null) {
                     handlePowerOff();
index a8e433f62f3c95959f84e2f6ae27f8af7d5dc1e6..91e83b6f741eec4c4dc0f1d16ef679ec9d234b35 100644 (file)
@@ -9,17 +9,17 @@
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the machine connected to the Rotel device (serial over IP)</description>
+                       <label>@text/config.hostOverIp.label</label>
+                       <description>@text/config.hostOverIp.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (serial over IP)</description>
+                       <label>@text/config.portOverIp.label</label>
+                       <description>@text/config.portOverIp.description</description>
                </parameter>
        </config-description>
 
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the Rotel device (IP connection) or the machine connected to the Rotel device
-                               (serial over IP)</description>
+                       <label>@text/config.host.label</label>
+                       <description>@text/config.host.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (IP or serial over IP). For IP connection to the Rotel device, keep the default port
-                               9590</description>
+                       <label>@text/config.port.label</label>
+                       <description>@text/config.port.description</description>
                        <default>9590</default>
                </parameter>
        </config-description>
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the Rotel device (IP connection) or the machine connected to the Rotel device
-                               (serial over IP)</description>
+                       <label>@text/config.host.label</label>
+                       <description>@text/config.host.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (IP or serial over IP). For IP connection to the Rotel device, keep the default port
-                               9590</description>
+                       <label>@text/config.port.label</label>
+                       <description>@text/config.port.description</description>
                        <default>9596</default>
                </parameter>
        </config-description>
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the Rotel device (IP connection) or the machine connected to the Rotel device
-                               (serial over IP)</description>
+                       <label>@text/config.host.label</label>
+                       <description>@text/config.host.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (IP or serial over IP). For IP connection to the Rotel device, keep the default port
-                               9590</description>
+                       <label>@text/config.port.label</label>
+                       <description>@text/config.port.description</description>
                        <default>9590</default>
                </parameter>
                <parameter name="protocol" type="text" required="false">
-                       <label>Protocol Version</label>
-                       <description>Choose one of the two protocol versions (depends on your device firmware)</description>
+                       <label>@text/config.protocol.label</label>
+                       <description>@text/config.protocol.description</description>
                        <limitToOptions>true</limitToOptions>
                        <options>
-                               <option value="ASCII_V1">ASCII V1</option>
-                               <option value="ASCII_V2">ASCII V2</option>
+                               <option value="ASCII_V1">@text/config.protocol.option.ASCII_V1</option>
+                               <option value="ASCII_V2">@text/config.protocol.option.ASCII_V2</option>
                        </options>
                        <default>ASCII_V2</default>
                        <advanced>true</advanced>
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the machine connected to the Rotel device (serial over IP)</description>
+                       <label>@text/config.hostOverIp.label</label>
+                       <description>@text/config.hostOverIp.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (serial over IP)</description>
+                       <label>@text/config.portOverIp.label</label>
+                       <description>@text/config.portOverIp.description</description>
                </parameter>
                <parameter name="protocol" type="text" required="false">
-                       <label>Protocol Version</label>
-                       <description>Choose one of the two protocol versions (depends on your device firmware)</description>
+                       <label>@text/config.protocol.label</label>
+                       <description>@text/config.protocol.description</description>
                        <limitToOptions>true</limitToOptions>
                        <options>
-                               <option value="ASCII_V1">ASCII V1</option>
-                               <option value="ASCII_V2">ASCII V2</option>
+                               <option value="ASCII_V1">@text/config.protocol.option.ASCII_V1</option>
+                               <option value="ASCII_V2">@text/config.protocol.option.ASCII_V2</option>
                        </options>
                        <default>ASCII_V2</default>
                        <advanced>true</advanced>
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the machine connected to the Rotel device (serial over IP)</description>
+                       <label>@text/config.hostOverIp.label</label>
+                       <description>@text/config.hostOverIp.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (serial over IP)</description>
+                       <label>@text/config.portOverIp.label</label>
+                       <description>@text/config.portOverIp.description</description>
                </parameter>
                <parameter name="inputLabelVideo1" type="text" required="false">
-                       <label>Input Label Video 1</label>
-                       <description>Label setup for the source Video 1</description>
+                       <label>@text/config.inputLabelVideo1.label</label>
+                       <description>@text/config.inputLabelVideo1.description</description>
                </parameter>
                <parameter name="inputLabelVideo2" type="text" required="false">
-                       <label>Input Label Video 2</label>
-                       <description>Label setup for the source Video 2</description>
+                       <label>@text/config.inputLabelVideo2.label</label>
+                       <description>@text/config.inputLabelVideo2.description</description>
                </parameter>
                <parameter name="inputLabelVideo3" type="text" required="false">
-                       <label>Input Label Video 3</label>
-                       <description>Label setup for the source Video 3</description>
+                       <label>@text/config.inputLabelVideo3.label</label>
+                       <description>@text/config.inputLabelVideo3.description</description>
                </parameter>
                <parameter name="inputLabelVideo4" type="text" required="false">
-                       <label>Input Label Video 4</label>
-                       <description>Label setup for the source Video 4</description>
+                       <label>@text/config.inputLabelVideo4.label</label>
+                       <description>@text/config.inputLabelVideo4.description</description>
                </parameter>
                <parameter name="inputLabelVideo5" type="text" required="false">
-                       <label>Input Label Video 5</label>
-                       <description>Label setup for the source Video 5</description>
+                       <label>@text/config.inputLabelVideo5.label</label>
+                       <description>@text/config.inputLabelVideo5.description</description>
                </parameter>
        </config-description>
 
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the machine connected to the Rotel device (serial over IP)</description>
+                       <label>@text/config.hostOverIp.label</label>
+                       <description>@text/config.hostOverIp.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (serial over IP)</description>
+                       <label>@text/config.portOverIp.label</label>
+                       <description>@text/config.portOverIp.description</description>
                </parameter>
                <parameter name="inputLabelCd" type="text" required="false">
-                       <label>Input Label CD</label>
-                       <description>Label setup for the source CD</description>
+                       <label>@text/config.inputLabelCd.label</label>
+                       <description>@text/config.inputLabelCd.description</description>
                </parameter>
                <parameter name="inputLabelTuner" type="text" required="false">
-                       <label>Input Label Tuner</label>
-                       <description>Label setup for the source Tuner</description>
+                       <label>@text/config.inputLabelTuner.label</label>
+                       <description>@text/config.inputLabelTuner.description</description>
                </parameter>
                <parameter name="inputLabelTape" type="text" required="false">
-                       <label>Input Label Tape</label>
-                       <description>Label setup for the source Tape</description>
+                       <label>@text/config.inputLabelTape.label</label>
+                       <description>@text/config.inputLabelTape.description</description>
                </parameter>
                <parameter name="inputLabelVideo1" type="text" required="false">
-                       <label>Input Label Video 1</label>
-                       <description>Label setup for the source Video 1</description>
+                       <label>@text/config.inputLabelVideo1.label</label>
+                       <description>@text/config.inputLabelVideo1.description</description>
                </parameter>
                <parameter name="inputLabelVideo2" type="text" required="false">
-                       <label>Input Label Video 2</label>
-                       <description>Label setup for the source Video 2</description>
+                       <label>@text/config.inputLabelVideo2.label</label>
+                       <description>@text/config.inputLabelVideo2.description</description>
                </parameter>
                <parameter name="inputLabelVideo3" type="text" required="false">
-                       <label>Input Label Video 3</label>
-                       <description>Label setup for the source Video 3</description>
+                       <label>@text/config.inputLabelVideo3.label</label>
+                       <description>@text/config.inputLabelVideo3.description</description>
                </parameter>
                <parameter name="inputLabelVideo4" type="text" required="false">
-                       <label>Input Label Video 4</label>
-                       <description>Label setup for the source Video 4</description>
+                       <label>@text/config.inputLabelVideo4.label</label>
+                       <description>@text/config.inputLabelVideo4.description</description>
                </parameter>
                <parameter name="inputLabelVideo5" type="text" required="false">
-                       <label>Input Label Video 5</label>
-                       <description>Label setup for the source Video 5</description>
+                       <label>@text/config.inputLabelVideo5.label</label>
+                       <description>@text/config.inputLabelVideo5.description</description>
                </parameter>
        </config-description>
 
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the machine connected to the Rotel device (serial over IP)</description>
+                       <label>@text/config.hostOverIp.label</label>
+                       <description>@text/config.hostOverIp.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (serial over IP)</description>
+                       <label>@text/config.portOverIp.label</label>
+                       <description>@text/config.portOverIp.description</description>
                </parameter>
                <parameter name="inputLabelCd" type="text" required="false">
-                       <label>Input Label CD</label>
-                       <description>Label setup for the source CD</description>
+                       <label>@text/config.inputLabelCd.label</label>
+                       <description>@text/config.inputLabelCd.description</description>
                </parameter>
                <parameter name="inputLabelTuner" type="text" required="false">
-                       <label>Input Label Tuner</label>
-                       <description>Label setup for the source Tuner</description>
+                       <label>@text/config.inputLabelTuner.label</label>
+                       <description>@text/config.inputLabelTuner.description</description>
                </parameter>
                <parameter name="inputLabelTape" type="text" required="false">
-                       <label>Input Label Tape</label>
-                       <description>Label setup for the source Tape</description>
+                       <label>@text/config.inputLabelTape.label</label>
+                       <description>>@text/config.inputLabelTape.description</description>
                </parameter>
                <parameter name="inputLabelVideo1" type="text" required="false">
-                       <label>Input Label Video 1</label>
-                       <description>Label setup for the source Video 1</description>
+                       <label>@text/config.inputLabelVideo1.label</label>
+                       <description>@text/config.inputLabelVideo1.description</description>
                </parameter>
                <parameter name="inputLabelVideo2" type="text" required="false">
-                       <label>Input Label Video 2</label>
-                       <description>Label setup for the source Video 2</description>
+                       <label>@text/config.inputLabelVideo2.label</label>
+                       <description>@text/config.inputLabelVideo2.description</description>
                </parameter>
                <parameter name="inputLabelVideo3" type="text" required="false">
-                       <label>Input Label Video 3</label>
-                       <description>Label setup for the source Video 3</description>
+                       <label>@text/config.inputLabelVideo3.label</label>
+                       <description>@text/config.inputLabelVideo3.description</description>
                </parameter>
                <parameter name="inputLabelVideo4" type="text" required="false">
-                       <label>Input Label Video 4</label>
-                       <description>Label setup for the source Video 4</description>
+                       <label>@text/config.inputLabelVideo4.label</label>
+                       <description>@text/config.inputLabelVideo4.description</description>
                </parameter>
                <parameter name="inputLabelVideo5" type="text" required="false">
-                       <label>Input Label Video 5</label>
-                       <description>Label setup for the source Video 5</description>
+                       <label>@text/config.inputLabelVideo5.label</label>
+                       <description>@text/config.inputLabelVideo5.description</description>
                </parameter>
                <parameter name="inputLabelMulti" type="text" required="false">
-                       <label>Input Label Multi Input</label>
-                       <description>Label setup for the source Multi Input</description>
+                       <label>@text/config.inputLabelMulti.label</label>
+                       <description>@text/config.inputLabelMulti.description</description>
                </parameter>
        </config-description>
 
                <parameter name="serialPort" type="text" required="false">
                        <context>serial-port</context>
                        <limitToOptions>false</limitToOptions>
-                       <label>Serial Port</label>
-                       <description>Serial port to use for connecting to the Rotel device</description>
+                       <label>@text/config.serialPort.label</label>
+                       <description>@text/config.serialPort.description</description>
                </parameter>
                <parameter name="host" type="text" required="false">
                        <context>network-address</context>
-                       <label>Address</label>
-                       <description>Host name or IP address of the machine connected to the Rotel device (serial over IP)</description>
+                       <label>@text/config.hostOverIp.label</label>
+                       <description>@text/config.hostOverIp.description</description>
                </parameter>
                <parameter name="port" type="integer" required="false">
-                       <label>Port</label>
-                       <description>Communication port (serial over IP)</description>
+                       <label>@text/config.portOverIp.label</label>
+                       <description>@text/config.portOverIp.description</description>
                </parameter>
                <parameter name="inputLabelCd" type="text" required="false">
-                       <label>Input Label CD</label>
-                       <description>Label setup for the source CD</description>
+                       <label>@text/config.inputLabelCd.label</label>
+                       <description>@text/config.inputLabelCd.description</description>
                </parameter>
                <parameter name="inputLabelTuner" type="text" required="false">
-                       <label>Input Label Tuner</label>
-                       <description>Label setup for the source Tuner</description>
+                       <label>@text/config.inputLabelTuner.label</label>
+                       <description>@text/config.inputLabelTuner.description</description>
                </parameter>
                <parameter name="inputLabelUsb" type="text" required="false">
-                       <label>Input Label USB</label>
-                       <description>Label setup for the source USB</description>
+                       <label>@text/config.inputLabelUsb.label</label>
+                       <description>@text/config.inputLabelUsb.description</description>
                </parameter>
                <parameter name="inputLabelVideo1" type="text" required="false">
-                       <label>Input Label Video 1</label>
-                       <description>Label setup for the source Video 1</description>
+                       <label>@text/config.inputLabelVideo1.label</label>
+                       <description>@text/config.inputLabelVideo1.description</description>
                </parameter>
                <parameter name="inputLabelVideo2" type="text" required="false">
-                       <label>Input Label Video 2</label>
-                       <description>Label setup for the source Video 2</description>
+                       <label>@text/config.inputLabelVideo2.label</label>
+                       <description>@text/config.inputLabelVideo2.description</description>
                </parameter>
                <parameter name="inputLabelVideo3" type="text" required="false">
-                       <label>Input Label Video 3</label>
-                       <description>Label setup for the source Video 3</description>
+                       <label>@text/config.inputLabelVideo3.label</label>
+                       <description>@text/config.inputLabelVideo3.description</description>
                </parameter>
                <parameter name="inputLabelVideo4" type="text" required="false">
-                       <label>Input Label Video 4</label>
-                       <description>Label setup for the source Video 4</description>
+                       <label>@text/config.inputLabelVideo4.label</label>
+                       <description>@text/config.inputLabelVideo4.description</description>
                </parameter>
                <parameter name="inputLabelVideo5" type="text" required="false">
-                       <label>Input Label Video 5</label>
-                       <description>Label setup for the source Video 5</description>
+                       <label>@text/config.inputLabelVideo5.label</label>
+                       <description>@text/config.inputLabelVideo5.description</description>
                </parameter>
                <parameter name="inputLabelVideo6" type="text" required="false">
-                       <label>Input Label Video 6</label>
-                       <description>Label setup for the source Video 6</description>
+                       <label>@text/config.inputLabelVideo6.label</label>
+                       <description>config.inputLabelVideo6.description</description>
                </parameter>
                <parameter name="inputLabelMulti" type="text" required="false">
-                       <label>Input Label Multi Input</label>
-                       <description>Label setup for the source Multi Input</description>
+                       <label>@text/config.inputLabelMulti.label</label>
+                       <description>@text/config.inputLabelMulti.description</description>
                </parameter>
        </config-description>
 </config-description:config-descriptions>
diff --git a/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/i18n/rotel.properties b/bundles/org.openhab.binding.rotel/src/main/resources/OH-INF/i18n/rotel.properties
new file mode 100644 (file)
index 0000000..81b2d3f
--- /dev/null
@@ -0,0 +1,308 @@
+# binding
+
+binding.rotel.name = Rotel Binding
+binding.rotel.description = The Rotel binding controls a Rotel audio device like a surround processor, a surround receiver, a stereo preamplifier, an integrated amplifier, a CD player or a tuner.
+
+# thing types
+
+thing-type.rotel.a11.label = A11 Integrated Amplifier
+thing-type.rotel.a11.description = Connection to the Rotel A11 integrated amplifier
+
+thing-type.rotel.a12.label = A12 Integrated Amplifier
+thing-type.rotel.a12.description = Connection to the Rotel A12 integrated amplifier
+
+thing-type.rotel.a14.label = A14 Integrated Amplifier
+thing-type.rotel.a14.description = Connection to the Rotel A14 integrated amplifier
+
+thing-type.rotel.cd11.label = CD11 CD Player
+thing-type.rotel.cd11.description = Connection to the Rotel CD11 CD player
+
+thing-type.rotel.cd14.label = CD14 CD Player
+thing-type.rotel.cd14.description = Connection to the Rotel CD14 CD player
+
+thing-type.rotel.ra11.label = RA-11 Integrated Amplifier
+thing-type.rotel.ra11.description = Connection to the Rotel RA-11 integrated amplifier
+
+thing-type.rotel.ra12.label = RA-12 Integrated Amplifier
+thing-type.rotel.ra12.description = Connection to the Rotel RA-12 integrated amplifier
+
+thing-type.rotel.ra1570.label = RA-1570 Integrated Amplifier
+thing-type.rotel.ra1570.description = Connection to the Rotel RA-1570 integrated amplifier
+
+thing-type.rotel.ra1572.label = RA-1572 Integrated Amplifier
+thing-type.rotel.ra1572.description = Connection to the Rotel RA-1572 integrated amplifier
+
+thing-type.rotel.ra1592.label = RA-1592 Integrated Amplifier
+thing-type.rotel.ra1592.description = Connection to the Rotel RA-1592 integrated amplifier
+
+thing-type.rotel.rap1580.label = RAP-1580 Surround Amplified Processor
+thing-type.rotel.rap1580.description = Connection to the Rotel RAP-1580 surround amplified processor
+
+thing-type.rotel.rc1570.label = RC-1570 Stereo Preamplifier
+thing-type.rotel.rc1570.description = Connection to the Rotel RC-1570 stereo preamplifier
+
+thing-type.rotel.rc1572.label = RC-1572 Stereo Preamplifier
+thing-type.rotel.rc1572.description = Connection to the Rotel RC-1572 stereo preamplifier
+
+thing-type.rotel.rc1590.label = RC-1590 Stereo Preamplifier
+thing-type.rotel.rc1590.description = Connection to the Rotel RC-1590 stereo preamplifier
+
+thing-type.rotel.rcd1570.label = RCD-1570 CD Player
+thing-type.rotel.rcd1570.description = Connection to the Rotel RCD-1570 CD player
+
+thing-type.rotel.rcd1572.label = RCD-1572 CD Player
+thing-type.rotel.rcd1572.description = Connection to the Rotel RCD-1572 CD player
+
+thing-type.rotel.rcx1500.label = RCX-1500 Stereo Receiver
+thing-type.rotel.rcx1500.description = Connection to the Rotel RCX-1500 stereo receiver
+
+thing-type.rotel.rdd1580.label = RDD-1580 Stereo DAC
+thing-type.rotel.rdd1580.description = Connection to the Rotel RDD-1580 stereo DAC
+
+thing-type.rotel.rdg1520.label = RDG-1520 Tuner
+thing-type.rotel.rdg1520.description = Connection to the Rotel RDG-1520 tuner
+
+thing-type.rotel.rsp1066.label = RSP-1066 Surround Processor
+thing-type.rotel.rsp1066.description = Connection to the Rotel RSP-1066 surround processor
+
+thing-type.rotel.rsp1068.label = RSP-1068 Surround Processor
+thing-type.rotel.rsp1068.description = Connection to the Rotel RSP-1068 surround processor
+
+thing-type.rotel.rsp1069.label = RSP-1069 Surround Processor
+thing-type.rotel.rsp1069.description = Connection to the Rotel RSP-1069 surround processor
+
+thing-type.rotel.rsp1098.label = RSP-1098 Surround Processor
+thing-type.rotel.rsp1098.description = Connection to the Rotel RSP-1098 surround processor
+
+thing-type.rotel.rsp1570.label = RSP-1570 Surround Processor
+thing-type.rotel.rsp1570.description = Connection to the Rotel RSP-1570 surround processor
+
+thing-type.rotel.rsp1572.label = RSP-1572 Surround Processor
+thing-type.rotel.rsp1572.description = Connection to the Rotel RSP-1572 surround processor
+
+thing-type.rotel.rsp1576.label = RSP-1576 Surround Processor
+thing-type.rotel.rsp1576.description = Connection to the Rotel RSP-1576 surround processor
+
+thing-type.rotel.rsp1582.label = RSP-1582 Surround Processor
+thing-type.rotel.rsp1582.description = Connection to the Rotel RSP-1582 surround processor
+
+thing-type.rotel.rsx1055.label = RSX-1055 Surround Receiver
+thing-type.rotel.rsx1055.description = Connection to the Rotel RSX-1055 surround receiver
+
+thing-type.rotel.rsx1056.label = RSX-1056 Surround Receiver
+thing-type.rotel.rsx1056.description = Connection to the Rotel RSX-1056 surround receiver
+
+thing-type.rotel.rsx1057.label = RSX-1057 Surround Receiver
+thing-type.rotel.rsx1057.description = Connection to the Rotel RSX-1057 surround receiver
+
+thing-type.rotel.rsx1058.label = RSX-1058 Surround Receiver
+thing-type.rotel.rsx1058.description = Connection to the Rotel RSX-1058 surround receiver
+
+thing-type.rotel.rsx1065.label = RSX-1065 Surround Receiver
+thing-type.rotel.rsx1065.description = Connection to the Rotel RSX-1065 surround receiver
+
+thing-type.rotel.rsx1067.label = RSX-1067 Surround Receiver
+thing-type.rotel.rsx1067.description = Connection to the Rotel RSX-1067 surround receiver
+
+thing-type.rotel.rsx1550.label = RSX-1550 Surround Receiver
+thing-type.rotel.rsx1550.description = Connection to the Rotel RSX-1550 surround receiver
+
+thing-type.rotel.rsx1560.label = RSX-1560 Surround Receiver
+thing-type.rotel.rsx1560.description = Connection to the Rotel RSX-1560 surround receiver
+
+thing-type.rotel.rsx1562.label = RSX-1562 Surround Receiver
+thing-type.rotel.rsx1562.description = Connection to the Rotel RSX-1562 surround receiver
+
+thing-type.rotel.rt09.label = RT-09 Tuner
+thing-type.rotel.rt09.description = Connection to the Rotel RT-09 tuner
+
+thing-type.rotel.rt11.label = RT-11 Tuner
+thing-type.rotel.rt11.description = Connection to the Rotel RT-11 tuner
+
+thing-type.rotel.rt1570.label = RT-1570 Tuner
+thing-type.rotel.rt1570.description = Connection to the Rotel RT-1570 tuner
+
+thing-type.rotel.t11.label = T11 Tuner
+thing-type.rotel.t11.description = Connection to the Rotel T11 tuner
+
+thing-type.rotel.t14.label = T14 Tuner
+thing-type.rotel.t14.description = Connection to the Rotel T14 tuner
+
+# thing type configuration
+
+config.serialPort.label = Serial Port
+config.serialPort.description = Serial port to use for connecting to the Rotel device
+
+config.protocol.label = Protocol Version
+config.protocol.description = Choose one of the two protocol versions (depends on your device firmware)
+config.protocol.option.ASCII_V1 = ASCII V1
+config.protocol.option.ASCII_V2 = ASCII V2
+
+config.host.label = Address
+config.host.description = Host name or IP address of the Rotel device (IP connection) or the machine connected to the Rotel device (serial over IP)
+
+config.port.label = Port
+config.port.description = Communication port (IP or serial over IP). For IP connection to the Rotel device, keep the default port 9590
+
+config.hostOverIp.label = Address
+config.hostOverIp.description = Host name or IP address of the machine connected to the Rotel device (serial over IP)
+
+config.portOverIp.label = Port
+config.portOverIp.description = Communication port (serial over IP)
+
+config.inputLabelCd.label = Input Label CD
+config.inputLabelCd.description = Label setup for the source CD
+
+config.inputLabelTuner.label = Input Label Tuner
+config.inputLabelTuner.description = Label setup for the source Tuner
+
+config.inputLabelTape.label = Input Label Tape
+config.inputLabelTape.description = Label setup for the source Tape
+
+config.inputLabelUsb.label = Input Label USB
+config.inputLabelUsb.description = Label setup for the source USB
+
+config.inputLabelVideo1.label = Input Label Video 1
+config.inputLabelVideo1.description = Label setup for the source Video 1
+
+config.inputLabelVideo2.label = Input Label Video 2
+config.inputLabelVideo2.description = Label setup for the source Video 2
+
+config.inputLabelVideo3.label = Input Label Video 3
+config.inputLabelVideo3.description = Label setup for the source Video 3
+
+config.inputLabelVideo4.label = Input Label Video 4
+config.inputLabelVideo4.description = Label setup for the source Video 4
+
+config.inputLabelVideo5.label = Input Label Video 5
+config.inputLabelVideo5.description = Label setup for the source Video 5
+
+config.inputLabelVideo6.label = Input Label Video 6
+config.inputLabelVideo6.description = Label setup for the source Video 6
+
+config.inputLabelMulti.label = Input Label Multi Input
+config.inputLabelMulti.description = Label setup for the source Multi Input
+
+# channel group types
+
+channel-group.mainZone.label = Main Zone
+channel-group.mainZone.description = The controls of the main zone
+
+channel-group.zone2.label = Zone 2
+channel-group.zone2.description = The controls of the zone 2
+
+channel-group.zone3.label = Zone 3
+channel-group.zone3.description = The controls of the zone 3
+
+channel-group.zone4.label = Zone 4
+channel-group.zone4.description = The controls of the zone 4
+
+# channel types
+
+channel-type.rotel.source.label = Source Input
+channel-type.rotel.source.description = Select the source input
+
+channel-type.rotel.recordSource.label = Record Source
+channel-type.rotel.recordSource.description = Select the source to be recorded
+
+channel-type.rotel.dsp.label = DSP Mode
+channel-type.rotel.dsp.description = Select the DSP mode
+channel-type.rotel.dsp.state.option.NONE = No DSP
+channel-type.rotel.dsp.state.option.STEREO3 = Dolby 3 Stereo
+channel-type.rotel.dsp.state.option.STEREO5 = 5 Channel Stereo
+channel-type.rotel.dsp.state.option.STEREO7 = 7 Channel Stereo
+channel-type.rotel.dsp.state.option.STEREO9 = 9 Channel Stereo
+channel-type.rotel.dsp.state.option.STEREO11 = 11 Channel Stereo
+channel-type.rotel.dsp.state.option.MUSIC1 = Music 1
+channel-type.rotel.dsp.state.option.MUSIC2 = Music 2
+channel-type.rotel.dsp.state.option.MUSIC3 = Music 3
+channel-type.rotel.dsp.state.option.MUSIC4 = Music 4
+channel-type.rotel.dsp.state.option.DSP1 = DSP 1
+channel-type.rotel.dsp.state.option.DSP2 = DSP 2
+channel-type.rotel.dsp.state.option.DSP3 = DSP 3
+channel-type.rotel.dsp.state.option.DSP4 = DSP 4
+channel-type.rotel.dsp.state.option.PROLOGIC = Dolby Pro Logic
+channel-type.rotel.dsp.state.option.PLIICINEMA = Dolby PLII Cinema
+channel-type.rotel.dsp.state.option.PLIIMUSIC = Dolby PLII Music
+channel-type.rotel.dsp.state.option.PLIIGAME = Dolby PLII Game
+channel-type.rotel.dsp.state.option.PLIIXCINEMA = Dolby PLII/PLIIx Cinema
+channel-type.rotel.dsp.state.option.PLIIXMUSIC = Dolby PLII/PLIIx Music
+channel-type.rotel.dsp.state.option.PLIIXGAME = Dolby PLII/PLIIx Game
+channel-type.rotel.dsp.state.option.PLIIZ = Dolby PLIIz
+channel-type.rotel.dsp.state.option.NEO6CINEMA = dts Neo:6 Cinema
+channel-type.rotel.dsp.state.option.NEO6MUSIC = dts Neo:6 Music
+channel-type.rotel.dsp.state.option.BYPASS = Analog Bypass
+channel-type.rotel.dsp.state.option.ATMOS = Dolby Atmos
+channel-type.rotel.dsp.state.option.NEURALX = dts Neural:X
+
+channel-type.rotel.volumeUpDown.label = Volume
+channel-type.rotel.volumeUpDown.description = Increase or decrease the volume
+
+channel-type.rotel.bass.label = Bass Adjustment
+channel-type.rotel.bass.description = Adjust the bass
+
+channel-type.rotel.treble.label = Treble Adjustment
+channel-type.rotel.treble.description = Adjust the treble
+
+channel-type.rotel.track.label = Current Track
+channel-type.rotel.track.description = The current CD track number
+
+channel-type.rotel.frequency.label = Current Frequency
+channel-type.rotel.frequency.description = The current frequency (in kHz) for digital source input
+
+channel-type.rotel.frontPanelLine.label = Front Panel Line
+channel-type.rotel.frontPanelLine.description = The line content displayed on the device front panel
+
+channel-type.rotel.brightness.label = Front Panel Display Brightness
+channel-type.rotel.brightness.description = The backlight brightness level (in %) of the device front panel
+
+# Thing status descriptions
+
+offline.config-error-unknown-serialport-and-host = Undefined serialPort and host configuration settings; please set one of them
+offline.config-error-unknown-port = Undefined port configuration setting
+offline.config-error-invalid-port = Invalid port configuration setting
+offline.config-error-invalid-serial-over-ip = Use host and port configuration settings for a serial over IP connection
+offline.comm-error-init-sequence = Init sequence failed
+offline.comm-error-init-sequence-zone = Init sequence zone {0} failed
+offline.comm-error-reading-thread = Reading thread ended
+offline.comm-error-sending-command = Sending command failed
+offline.comm-error-reconnection = Reconnection failed
+offline.comm-error-first-command-after-reconnection = First command after connection failed
+
+# Source labels
+
+source.CD = CD
+source.TUNER = Tuner
+source.TAPE = Tape
+source.VIDEO1 = Video 1
+source.VIDEO2 = Video 2
+source.VIDEO3 = Video 3
+source.VIDEO4 = Video 4
+source.VIDEO5 = Video 5
+source.VIDEO6 = Video 6
+source.VIDEO7 = Video 7
+source.VIDEO8 = Video 8
+source.PHONO = Phono
+source.AUX = Aux
+source.AUX1 = Aux 1
+source.AUX2 = Aux 2
+source.AUX1_COAX = Aux 1 Coax
+source.AUX1_OPTICAL = Aux 1 Optical
+source.COAX1 = Coax 1
+source.COAX2 = Coax 2
+source.COAX3 = Coax 3
+source.OPTICAL1 = Optical 1
+source.OPTICAL2 = Optical 2
+source.OPTICAL3 = Optical 3
+source.USB = USB
+source.PCUSB = PC USB
+source.BLUETOOTH = Bluetooth
+source.MULTI = MULTI
+source.XLR = XLR
+source.MAIN = Follow Main Zone Source
+source.RCD = Rotel CD
+source.FM = FM
+source.DAB = DAB
+source.PLAYFI = PlayFi
+source.IRADIO = iRadio
+source.NETWORK = Network
index 26cd52c2d0f457e2a1596573edec434ff87f4da4..41164fdaeeeffac10f0d440ec8f4f45e38ac95ef 100644 (file)
@@ -5,8 +5,8 @@
        xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
 
        <channel-group-type id="mainZoneType1">
-               <label>Main Zone</label>
-               <description>The controls of the main zone</description>
+               <label>@text/channel-group.mainZone.label</label>
+               <description>@text/channel-group.mainZone.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>
@@ -22,8 +22,8 @@
        </channel-group-type>
 
        <channel-group-type id="mainZoneType2">
-               <label>Main Zone</label>
-               <description>The controls of the main zone</description>
+               <label>@text/channel-group.mainZone.label</label>
+               <description>@text/channel-group.mainZone.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>
@@ -37,8 +37,8 @@
        </channel-group-type>
 
        <channel-group-type id="mainZoneType3">
-               <label>Main Zone</label>
-               <description>The controls of the main zone</description>
+               <label>@text/channel-group.mainZone.label</label>
+               <description>@text/channel-group.mainZone.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>
@@ -53,8 +53,8 @@
        </channel-group-type>
 
        <channel-group-type id="mainZoneType4">
-               <label>Main Zone</label>
-               <description>The controls of the main zone</description>
+               <label>@text/channel-group.mainZone.label</label>
+               <description>@text/channel-group.mainZone.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>
@@ -70,8 +70,8 @@
        </channel-group-type>
 
        <channel-group-type id="mainZoneType5">
-               <label>Main Zone</label>
-               <description>The controls of the main zone</description>
+               <label>@text/channel-group.mainZone.label</label>
+               <description>@text/channel-group.mainZone.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>
@@ -86,8 +86,8 @@
        </channel-group-type>
 
        <channel-group-type id="zone2type1">
-               <label>Zone 2</label>
-               <description>The controls of the zone 2</description>
+               <label>@text/channel-group.zone2.label</label>
+               <description>@text/channel-group.zone2.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>
@@ -97,8 +97,8 @@
        </channel-group-type>
 
        <channel-group-type id="zone2type2">
-               <label>Zone 2</label>
-               <description>The controls of the zone 2</description>
+               <label>@text/channel-group.zone2.label</label>
+               <description>@text/channel-group.zone2.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>
        </channel-group-type>
 
        <channel-group-type id="zone3">
-               <label>Zone 3</label>
-               <description>The controls of the zone 3</description>
+               <label>@text/channel-group.zone3.label</label>
+               <description>T@text/channel-group.zone3.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>
        </channel-group-type>
 
        <channel-group-type id="zone4">
-               <label>Zone 4</label>
-               <description>The controls of the zone 4</description>
+               <label>@text/channel-group.zone4.label</label>
+               <description>@text/channel-group.zone4.description</description>
                <channels>
                        <channel id="power" typeId="system.power"/>
                        <channel id="source" typeId="source"/>