From aad04cf94be9c6768f64582c15accff4bbc682bf Mon Sep 17 00:00:00 2001 From: openhab-bot Date: Mon, 19 Jul 2021 13:48:51 +0200 Subject: [PATCH 1/2] New Crowdin updates (#2420) * New translations sitemap.properties (Finnish) * New translations hli.properties (Swedish) * New translations lsp.properties (Swedish) * New translations sitemap.properties (Dutch) --- .../src/main/resources/OH-INF/i18n/lsp_sv.properties | 4 ++++ .../resources/OH-INF/i18n/hli_sv.properties | 4 ++++ .../src/main/resources/OH-INF/i18n/sitemap_fi.properties | 7 +++++++ .../src/main/resources/OH-INF/i18n/sitemap_nl.properties | 7 +++++++ 4 files changed, 22 insertions(+) create mode 100644 bundles/org.openhab.core.model.lsp/src/main/resources/OH-INF/i18n/lsp_sv.properties create mode 100644 bundles/org.openhab.core.model.script/resources/OH-INF/i18n/hli_sv.properties create mode 100644 bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/sitemap_fi.properties create mode 100644 bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/sitemap_nl.properties diff --git a/bundles/org.openhab.core.model.lsp/src/main/resources/OH-INF/i18n/lsp_sv.properties b/bundles/org.openhab.core.model.lsp/src/main/resources/OH-INF/i18n/lsp_sv.properties new file mode 100644 index 0000000000..3008b5aafa --- /dev/null +++ b/bundles/org.openhab.core.model.lsp/src/main/resources/OH-INF/i18n/lsp_sv.properties @@ -0,0 +1,4 @@ +misc.config.lsp.port.label = Port +misc.config.lsp.port.description = Porten som språkservern lyssnar på. + +service.misc.lsp.label = Språkserver (LSP) diff --git a/bundles/org.openhab.core.model.script/resources/OH-INF/i18n/hli_sv.properties b/bundles/org.openhab.core.model.script/resources/OH-INF/i18n/hli_sv.properties new file mode 100644 index 0000000000..a829304e15 --- /dev/null +++ b/bundles/org.openhab.core.model.script/resources/OH-INF/i18n/hli_sv.properties @@ -0,0 +1,4 @@ +voice.config.rulehli.item.label = Item för röstkommando +voice.config.rulehli.item.description = Sträng-Item att skicka röstkommandon till. + +service.voice.rulehli.label = Rösttolkare för regler diff --git a/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/sitemap_fi.properties b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/sitemap_fi.properties new file mode 100644 index 0000000000..bf83ffad2a --- /dev/null +++ b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/sitemap_fi.properties @@ -0,0 +1,7 @@ +system.config.sitemap.groupMembersSorting.label = Ryhmän jäsenten lajittelu +system.config.sitemap.groupMembersSorting.description = Määrittää, miten ryhmän jäsenet lajitellaan UI\:ssa. +system.config.sitemap.groupMembersSorting.option.NONE = Ei lajittelua +system.config.sitemap.groupMembersSorting.option.LABEL = Järjestetty otsikon mukaan +system.config.sitemap.groupMembersSorting.option.NAME = Järjestetty nimen mukaan + +service.system.sitemap.label = Sitemap diff --git a/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/sitemap_nl.properties b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/sitemap_nl.properties new file mode 100644 index 0000000000..1ccea51934 --- /dev/null +++ b/bundles/org.openhab.core.ui/src/main/resources/OH-INF/i18n/sitemap_nl.properties @@ -0,0 +1,7 @@ +system.config.sitemap.groupMembersSorting.label = Groepslid Sortering +system.config.sitemap.groupMembersSorting.description = Definieert hoe de leden van een groep worden gesorteerd in de UI. +system.config.sitemap.groupMembersSorting.option.NONE = Geen sortering +system.config.sitemap.groupMembersSorting.option.LABEL = Sorteren op label +system.config.sitemap.groupMembersSorting.option.NAME = Sorteren op naam + +service.system.sitemap.label = Sitemap From e5e62d15a388ea188eccb4250257ec4a44479d39 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Mon, 19 Jul 2021 13:52:11 +0200 Subject: [PATCH 2/2] [semantics] Add semantics to default system channel types (#2428) * Add semantics to default system channel types Fix #2427 Signed-off-by: Laurent Garnier --- .../DefaultSystemChannelTypeProvider.java | 57 +++++++++++-------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/DefaultSystemChannelTypeProvider.java b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/DefaultSystemChannelTypeProvider.java index 4dab5d6412..a0bedc6194 100644 --- a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/DefaultSystemChannelTypeProvider.java +++ b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/DefaultSystemChannelTypeProvider.java @@ -109,7 +109,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { new StateOption("2", "average"), new StateOption("3", "good"), new StateOption("4", "excellent"))) .build()) - .build(); + .withTags(List.of("Measurement", "Level")).build(); /** * Low battery default system wide {@link ChannelType}. Represents a low battery warning with possible values @@ -118,7 +118,8 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { public static final ChannelType SYSTEM_CHANNEL_LOW_BATTERY = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_LOW_BATTERY, "Low Battery", CoreItemFactory.SWITCH) .withCategory("LowBattery") - .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true).build()).build(); + .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true).build()) + .withTags(List.of("LowBattery", "Energy")).build(); /** * Battery level default system wide {@link ChannelType}. Represents the battery level as a percentage. @@ -129,7 +130,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withMinimum(BigDecimal.ZERO) .withMaximum(new BigDecimal(100)).withStep(BigDecimal.ONE).withReadOnly(true).withPattern("%.0f %%") .build()) - .build(); + .withTags(List.of("Measurement", "Energy")).build(); /** * System wide trigger {@link ChannelType} without event options. @@ -173,7 +174,8 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { */ public static final ChannelType SYSTEM_POWER = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_POWER, "Power", CoreItemFactory.SWITCH) - .withDescription("Device is operable when channel has state ON").withCategory("Switch").build(); + .withDescription("Device is operable when channel has state ON").withCategory("Switch") + .withTags(List.of("Switch", "Power")).build(); /** * Location: default system wide {@link ChannelType} which displays a location @@ -183,7 +185,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withDescription("Location in lat./lon./height coordinates") .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true) .withPattern("%2$s°N %3$s°E %1$sm").build()) - .build(); + .withTag("Measurement").build(); /** * Motion: default system wide {@link ChannelType} which indications whether motion was detected (state ON) @@ -191,7 +193,8 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { public static final ChannelType SYSTEM_MOTION = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_MOTION, "Motion", CoreItemFactory.SWITCH) .withDescription("Motion detected by the device").withCategory("Motion") - .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true).build()).build(); + .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true).build()) + .withTags(List.of("Status", "Presence")).build(); /** * Brightness: default system wide {@link ChannelType} which allows changing the brightness from 0-100% @@ -201,14 +204,15 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withDescription("Controls the brightness and switches the light on and off").withCategory("Light") .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withMinimum(BigDecimal.ZERO) .withMaximum(new BigDecimal(100)).withPattern("%d %%").build()) - .build(); + .withTags(List.of("Control", "Light")).build(); /** * Color: default system wide {@link ChannelType} which allows changing the color */ public static final ChannelType SYSTEM_COLOR = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_COLOR, "Color", CoreItemFactory.COLOR) - .withDescription("Controls the color of the light").withCategory("ColorLight").build(); + .withDescription("Controls the color of the light").withCategory("ColorLight") + .withTags(List.of("Control", "Light")).build(); /** * Color-temperature: default system wide {@link ChannelType} which allows changing the color temperature in percent @@ -216,9 +220,10 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { public static final ChannelType SYSTEM_COLOR_TEMPERATURE = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_COLOR_TEMPERATURE, "Color Temperature", CoreItemFactory.DIMMER) .withDescription("Controls the color temperature of the light from 0 (cold) to 100 (warm)") - .withCategory("ColorLight").withStateDescriptionFragment(StateDescriptionFragmentBuilder.create() - .withMinimum(BigDecimal.ZERO).withMaximum(new BigDecimal(100)).withPattern("%.0f").build()) - .build(); + .withCategory("ColorLight") + .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withMinimum(BigDecimal.ZERO) + .withMaximum(new BigDecimal(100)).withPattern("%.0f").build()) + .withTags(List.of("Control", "ColorTemperature")).build(); /** * Color-temperature: default system wide {@link ChannelType} which allows changing the color temperature in Kelvin @@ -226,9 +231,10 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { public static final ChannelType SYSTEM_COLOR_TEMPERATURE_ABS = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_COLOR_TEMPERATURE_ABS, "Color Temperature", CoreItemFactory.NUMBER) .withDescription("Controls the color temperature of the light in Kelvin").withCategory("ColorLight") - .isAdvanced(true).withStateDescriptionFragment(StateDescriptionFragmentBuilder.create() - .withMinimum(new BigDecimal(1000)).withMaximum(new BigDecimal(10000)).withPattern("%.0f K").build()) - .build(); + .isAdvanced(true) + .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withMinimum(new BigDecimal(1000)) + .withMaximum(new BigDecimal(10000)).withPattern("%.0f K").build()) + .withTags(List.of("Control", "ColorTemperature")).build(); // media channels @@ -240,21 +246,22 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withDescription("Change the sound volume of a device") .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withMinimum(BigDecimal.ZERO) .withMaximum(new BigDecimal(100)).withPattern("%d %%").build()) - .withCategory("SoundVolume").build(); + .withCategory("SoundVolume").withTags(List.of("Control", "SoundVolume")).build(); /** * Mute: default system wide {@link ChannelType} which allows muting and un-muting audio */ public static final ChannelType SYSTEM_MUTE = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_MUTE, "Mute", CoreItemFactory.SWITCH) - .withDescription("Mute audio of the device").withCategory("SoundVolume").build(); + .withDescription("Mute audio of the device").withCategory("SoundVolume") + .withTags(List.of("Switch", "SoundVolume")).build(); /** * Media-control: system wide {@link ChannelType} which controls a media player */ public static final ChannelType SYSTEM_MEDIA_CONTROL = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_MEDIA_CONTROL, "Media Control", CoreItemFactory.PLAYER) - .withCategory("MediaControl").build(); + .withCategory("MediaControl").withTag("Control").build(); /** * Media-title: default system wide {@link ChannelType} which displays the title of a (played) song @@ -262,7 +269,8 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { public static final ChannelType SYSTEM_MEDIA_TITLE = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_MEDIA_TITLE, "Media Title", CoreItemFactory.STRING) .withDescription("Title of a (played) media file") - .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true).build()).build(); + .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true).build()) + .withTag("Status").build(); /** * Media-artist: default system wide {@link ChannelType} which displays the artist of a (played) song @@ -270,7 +278,8 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { public static final ChannelType SYSTEM_MEDIA_ARTIST = ChannelTypeBuilder .state(SYSTEM_CHANNEL_TYPE_UID_MEDIA_ARTIST, "Media Artist", CoreItemFactory.STRING) .withDescription("Artist of a (played) media file") - .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true).build()).build(); + .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withReadOnly(true).build()) + .withTag("Status").build(); // weather channels @@ -282,7 +291,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withDescription("Current wind direction expressed as an angle").withCategory("Wind") .withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withMinimum(BigDecimal.ZERO) .withMaximum(new BigDecimal(360)).withReadOnly(true).withPattern("%.0f %unit%").build()) - .build(); + .withTags(List.of("Measurement", "Wind")).build(); /** * Wind-speed: system wide {@link ChannelType} which shows the wind speed @@ -292,7 +301,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withDescription("Current wind speed").withCategory("Wind") .withStateDescriptionFragment( StateDescriptionFragmentBuilder.create().withReadOnly(true).withPattern("%.1f %unit%").build()) - .build(); + .withTags(List.of("Measurement", "Wind")).build(); /** * Outdoor-temperature: system wide {@link ChannelType} which shows the outdoor temperature @@ -302,7 +311,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withDescription("Current outdoor temperature").withCategory("Temperature") .withStateDescriptionFragment( StateDescriptionFragmentBuilder.create().withReadOnly(true).withPattern("%.1f %unit%").build()) - .build(); + .withTags(List.of("Measurement", "Temperature")).build(); /** * Atmospheric-humidity: system wide {@link ChannelType} which shows the atmospheric humidity @@ -312,7 +321,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withDescription("Current atmospheric relative humidity").withCategory("Humidity") .withStateDescriptionFragment( StateDescriptionFragmentBuilder.create().withReadOnly(true).withPattern("%.0f %%").build()) - .build(); + .withTags(List.of("Measurement", "Humidity")).build(); /** * Barometric-pressure: system wide {@link ChannelType} which shows the barometric pressure @@ -322,7 +331,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider { .withDescription("Current barometric pressure").withCategory("Pressure") .withStateDescriptionFragment( StateDescriptionFragmentBuilder.create().withReadOnly(true).withPattern("%.3f %unit%").build()) - .build(); + .withTags(List.of("Measurement", "Pressure")).build(); private static final Collection CHANNEL_TYPES = List.of(SYSTEM_CHANNEL_SIGNAL_STRENGTH, SYSTEM_CHANNEL_LOW_BATTERY, SYSTEM_CHANNEL_BATTERY_LEVEL, SYSTEM_TRIGGER, SYSTEM_RAWBUTTON, SYSTEM_BUTTON,