From c4fb71fcc6c97cbf687d0163016a0fd1b5e5bea4 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Sun, 30 Jul 2023 20:26:51 +0200 Subject: [PATCH] [automation] Update texts for rule-based actions (#3733) Core part of https://github.com/openhab/openhab-webui/issues/1921. With UI-support for scenes & scripts, the texts (labels, descriptions etc.) for rule-based actions should be updated to mention scenes & scripts as well. This improves the UI experience. Signed-off-by: Florian Hotze --- .../provider/ScriptModuleTypeProvider.java | 4 ++-- .../moduletypes/RuleEnablementAction.json | 12 +++++------ .../automation/moduletypes/RunRuleAction.json | 8 ++++---- .../OH-INF/i18n/automation.properties | 20 +++++++++---------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/provider/ScriptModuleTypeProvider.java b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/provider/ScriptModuleTypeProvider.java index 233d0c941..630a2b27a 100644 --- a/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/provider/ScriptModuleTypeProvider.java +++ b/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/provider/ScriptModuleTypeProvider.java @@ -84,13 +84,13 @@ public class ScriptModuleTypeProvider extends AbstractProvider imple List outputs = new ArrayList<>(); Output result = new Output("result", "java.lang.Object", "result", "the script result", null, null, null); outputs.add(result); - return new ActionType(ScriptActionHandler.TYPE_ID, getConfigDescriptions(locale), "execute a given script", + return new ActionType(ScriptActionHandler.TYPE_ID, getConfigDescriptions(locale), "execute an inline script", "Allows the execution of a user-defined script.", null, Visibility.VISIBLE, null, outputs); } private ModuleType getScriptConditionType(@Nullable Locale locale) { return new ConditionType(ScriptConditionHandler.TYPE_ID, getConfigDescriptions(locale), - "a given script evaluates to true", "Allows the definition of a condition through a script.", null, + "an inline script evaluates to true", "Allows the definition of a condition through a script.", null, Visibility.VISIBLE, null); } diff --git a/bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/RuleEnablementAction.json b/bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/RuleEnablementAction.json index 916077ad7..ba517146e 100644 --- a/bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/RuleEnablementAction.json +++ b/bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/RuleEnablementAction.json @@ -2,14 +2,14 @@ "actions": [ { "uid": "core.RuleEnablementAction", - "label": "enables or disables rules", - "description": "Enables or disables a rule or a group of rules specified by their UIDs.", + "label": "enable or disable scenes, scripts & rules", + "description": "Enables or disables a single one or a group of those specified by their UIDs.", "configDescriptions": [ { "name": "enable", "type": "BOOLEAN", - "label": "Enable rules", - "description": "'true' enables all specified rules, 'false' disables them.", + "label": "Enable/Disable", + "description": "'true' enables all specified ones, 'false' disables them.", "required": true, "options": [ { @@ -25,8 +25,8 @@ { "name": "ruleUIDs", "type": "TEXT", - "label": "Rules", - "description": "Specifies the rules that should be enabled or disabled.", + "label": "Scenes, scripts & rules", + "description": "Specifies those that should be enabled or disabled.", "required": true, "multiple": true, "context":"rule" diff --git a/bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/RunRuleAction.json b/bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/RunRuleAction.json index 8b2163171..fa400f238 100644 --- a/bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/RunRuleAction.json +++ b/bundles/org.openhab.core.automation/src/main/resources/OH-INF/automation/moduletypes/RunRuleAction.json @@ -2,14 +2,14 @@ "actions": [ { "uid": "core.RunRuleAction", - "label": "run rules", - "description": "runs/executes a rule or a group of rules specified by their UIDs.", + "label": "run scenes, scripts & rules", + "description": "Runs/Executes a single one or a group of those specified by their UIDs.", "configDescriptions": [ { "name": "ruleUIDs", "type": "TEXT", - "label": "Rules", - "description": "Specifies the target rule(s) that should be executed.", + "label": "Scenes, scripts & rules", + "description": "Specifies the target scene(s), script(s) & rule(s) that should be executed.", "required": true, "multiple": true, "context": "rule" diff --git a/bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation.properties b/bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation.properties index 23059910c..282f321d3 100644 --- a/bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation.properties +++ b/bundles/org.openhab.core.automation/src/main/resources/OH-INF/i18n/automation.properties @@ -255,21 +255,21 @@ module-type.core.ItemStateUpdateTrigger.output.event.description = The event whi # core.RuleEnablementAction -module-type.core.RuleEnablementAction.label = enables or disables rules -module-type.core.RuleEnablementAction.description = Enables or disables a rule or a group of rules specified by their UIDs. -module-type.core.RuleEnablementAction.config.enable.label = Enable rules -module-type.core.RuleEnablementAction.config.enable.description = 'true' enables all specified rules, 'false' disables them. +module-type.core.RuleEnablementAction.label = enable or disable scenes, scripts & rules +module-type.core.RuleEnablementAction.description = Enables or disables a single one or a group of those specified by their UIDs. +module-type.core.RuleEnablementAction.config.enable.label = Enable/Disable +module-type.core.RuleEnablementAction.config.enable.description = 'true' enables all specified ones, 'false' disables them. module-type.core.RuleEnablementAction.config.enable.option.true = Enable module-type.core.RuleEnablementAction.config.enable.option.false = Disable -module-type.core.RuleEnablementAction.config.ruleUIDs.label = Rules -module-type.core.RuleEnablementAction.config.ruleUIDs.description = Specifies the rules that should be enabled or disabled. +module-type.core.RuleEnablementAction.config.ruleUIDs.label = Scenes, scripts & rules +module-type.core.RuleEnablementAction.config.ruleUIDs.description = Specifies those that should be enabled or disabled. # core.RunRuleAction -module-type.core.RunRuleAction.label = run rules -module-type.core.RunRuleAction.description = runs/executes a rule or a group of rules specified by their UIDs. -module-type.core.RunRuleAction.config.ruleUIDs.label = Rules -module-type.core.RunRuleAction.config.ruleUIDs.description = Specifies the target rule(s) that should be executed. +module-type.core.RunRuleAction.label = run scenes, scripts & rules +module-type.core.RunRuleAction.description = Runs/Executes a single one or a group of those specified by their UIDs. +module-type.core.RunRuleAction.config.ruleUIDs.label = Scenes, scripts & rules +module-type.core.RunRuleAction.config.ruleUIDs.description = Specifies the target scene(s), script(s) & rule(s) that should be executed. module-type.core.RunRuleAction.config.considerConditions.label = Consider Conditions module-type.core.RunRuleAction.config.considerConditions.description = Specifies whether the conditions of the target rule(s) to be executed should be considered or not. module-type.core.RunRuleAction.config.considerConditions.option.true = Yes