[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 <florianh_dev@icloud.com>
This commit is contained in:
Florian Hotze 2023-07-30 20:26:51 +02:00 committed by GitHub
parent f5a0b37b3d
commit c4fb71fcc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 22 deletions

View File

@ -84,13 +84,13 @@ public class ScriptModuleTypeProvider extends AbstractProvider<ModuleType> imple
List<Output> outputs = new ArrayList<>(); List<Output> outputs = new ArrayList<>();
Output result = new Output("result", "java.lang.Object", "result", "the script result", null, null, null); Output result = new Output("result", "java.lang.Object", "result", "the script result", null, null, null);
outputs.add(result); 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); "Allows the execution of a user-defined script.", null, Visibility.VISIBLE, null, outputs);
} }
private ModuleType getScriptConditionType(@Nullable Locale locale) { private ModuleType getScriptConditionType(@Nullable Locale locale) {
return new ConditionType(ScriptConditionHandler.TYPE_ID, getConfigDescriptions(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); Visibility.VISIBLE, null);
} }

View File

@ -2,14 +2,14 @@
"actions": [ "actions": [
{ {
"uid": "core.RuleEnablementAction", "uid": "core.RuleEnablementAction",
"label": "enables or disables rules", "label": "enable or disable scenes, scripts & rules",
"description": "Enables or disables a rule or a group of rules specified by their UIDs.", "description": "Enables or disables a single one or a group of those specified by their UIDs.",
"configDescriptions": [ "configDescriptions": [
{ {
"name": "enable", "name": "enable",
"type": "BOOLEAN", "type": "BOOLEAN",
"label": "Enable rules", "label": "Enable/Disable",
"description": "'true' enables all specified rules, 'false' disables them.", "description": "'true' enables all specified ones, 'false' disables them.",
"required": true, "required": true,
"options": [ "options": [
{ {
@ -25,8 +25,8 @@
{ {
"name": "ruleUIDs", "name": "ruleUIDs",
"type": "TEXT", "type": "TEXT",
"label": "Rules", "label": "Scenes, scripts & rules",
"description": "Specifies the rules that should be enabled or disabled.", "description": "Specifies those that should be enabled or disabled.",
"required": true, "required": true,
"multiple": true, "multiple": true,
"context":"rule" "context":"rule"

View File

@ -2,14 +2,14 @@
"actions": [ "actions": [
{ {
"uid": "core.RunRuleAction", "uid": "core.RunRuleAction",
"label": "run rules", "label": "run scenes, scripts & rules",
"description": "runs/executes a rule or a group of rules specified by their UIDs.", "description": "Runs/Executes a single one or a group of those specified by their UIDs.",
"configDescriptions": [ "configDescriptions": [
{ {
"name": "ruleUIDs", "name": "ruleUIDs",
"type": "TEXT", "type": "TEXT",
"label": "Rules", "label": "Scenes, scripts & rules",
"description": "Specifies the target rule(s) that should be executed.", "description": "Specifies the target scene(s), script(s) & rule(s) that should be executed.",
"required": true, "required": true,
"multiple": true, "multiple": true,
"context": "rule" "context": "rule"

View File

@ -255,21 +255,21 @@ module-type.core.ItemStateUpdateTrigger.output.event.description = The event whi
# core.RuleEnablementAction # core.RuleEnablementAction
module-type.core.RuleEnablementAction.label = enables or disables rules module-type.core.RuleEnablementAction.label = enable or disable scenes, scripts & rules
module-type.core.RuleEnablementAction.description = Enables or disables a rule or a group of rules specified by their UIDs. 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 rules module-type.core.RuleEnablementAction.config.enable.label = Enable/Disable
module-type.core.RuleEnablementAction.config.enable.description = 'true' enables all specified rules, 'false' disables them. 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.true = Enable
module-type.core.RuleEnablementAction.config.enable.option.false = Disable module-type.core.RuleEnablementAction.config.enable.option.false = Disable
module-type.core.RuleEnablementAction.config.ruleUIDs.label = Rules module-type.core.RuleEnablementAction.config.ruleUIDs.label = Scenes, scripts & rules
module-type.core.RuleEnablementAction.config.ruleUIDs.description = Specifies the rules that should be enabled or disabled. module-type.core.RuleEnablementAction.config.ruleUIDs.description = Specifies those that should be enabled or disabled.
# core.RunRuleAction # core.RunRuleAction
module-type.core.RunRuleAction.label = run rules module-type.core.RunRuleAction.label = run scenes, scripts & rules
module-type.core.RunRuleAction.description = runs/executes a rule or a group of rules specified by their UIDs. 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 = Rules module-type.core.RunRuleAction.config.ruleUIDs.label = Scenes, scripts & rules
module-type.core.RunRuleAction.config.ruleUIDs.description = Specifies the target rule(s) that should be executed. 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.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.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 module-type.core.RunRuleAction.config.considerConditions.option.true = Yes