From 194b4921005e3744c25dba734a427962ac3c79bc Mon Sep 17 00:00:00 2001 From: Cubester Date: Wed, 10 Jul 2024 22:18:15 -0400 Subject: [PATCH] Changes and Bug Fixes (scratch-blocks) --- blocks_vertical/default_toolbox.js | 4 ++-- blocks_vertical/json.js | 8 ++++---- msg/js/en.js | 1 + msg/json/en.json | 1 + msg/messages.js | 1 + 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/blocks_vertical/default_toolbox.js b/blocks_vertical/default_toolbox.js index 8a523771ed..579d6f1dcf 100644 --- a/blocks_vertical/default_toolbox.js +++ b/blocks_vertical/default_toolbox.js @@ -567,7 +567,7 @@ Blockly.Blocks.defaultToolbox = '' + + '' + '' + '' + '' + @@ -632,7 +632,7 @@ Blockly.Blocks.defaultToolbox = '' + + '' + '' + '' + '' + diff --git a/blocks_vertical/json.js b/blocks_vertical/json.js index b0a3c67b68..97d754d3bc 100644 --- a/blocks_vertical/json.js +++ b/blocks_vertical/json.js @@ -204,14 +204,14 @@ Blockly.Blocks['json_delete_key'] = { } }; -Blockly.Blocks['json_join_object'] = { +Blockly.Blocks['json_merge_object'] = { /** * Merges two Objects * @this Blockly.Block */ init: function() { this.jsonInit({ - "message0": Blockly.Msg.OPERATORS_JOIN, + "message0": Blockly.Msg.JSON_MERGE, "args0": [ { "type": "input_value", @@ -443,14 +443,14 @@ Blockly.Blocks['json_delete_all_occurrences'] = { } }; -Blockly.Blocks['json_join_array'] = { +Blockly.Blocks['json_merge_array'] = { /** * Merges two Arrays * @this Blockly.Block */ init: function() { this.jsonInit({ - "message0": Blockly.Msg.OPERATORS_JOIN, + "message0": Blockly.Msg.JSON_MERGE, "args0": [ { "type": "input_value", diff --git a/msg/js/en.js b/msg/js/en.js index 3dde3a6d1d..3e3cfd4e6d 100644 --- a/msg/js/en.js +++ b/msg/js/en.js @@ -62,6 +62,7 @@ Blockly.Msg["JSON_REPLACE_INDEX"] = "replace index %1 in %2 with %3"; Blockly.Msg["JSON_DELETE_INDEX"] = "delete index %1 from %2"; Blockly.Msg["JSON_DELETE_ALL_OCCURRENCES"] = "delete all %1 from %2"; Blockly.Msg["JSON_HAS_ITEM"] = "%1 has item %2?"; +Blockly.Msg["JSON_MERGE"] = "merge %1 %2"; Blockly.Msg["JSON_OBJECT"] = '{"key":"value"}'; Blockly.Msg["JSON_ARRAY"] = '["foo","bar"]'; Blockly.Msg["JSON_KEY"] = "key"; diff --git a/msg/json/en.json b/msg/json/en.json index 79648c5cb3..6507f27f6b 100644 --- a/msg/json/en.json +++ b/msg/json/en.json @@ -56,6 +56,7 @@ "JSON_DELETE_INDEX": "delete index %1 from %2", "JSON_DELETE_ALL_OCCURRENCES": "delete all %1 from %2", "JSON_HAS_ITEM": "%1 has item %2?", + "JSON_MERGE": "merge %1 %2", "JSON_KEY": "key", "JSON_BAR": "bar", "JSON_BAZ": "baz", diff --git a/msg/messages.js b/msg/messages.js index c6a148844c..d5dca3f2f4 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -95,6 +95,7 @@ Blockly.Msg.JSON_REPLACE_INDEX = 'replace index %1 in %2 with %3'; Blockly.Msg.JSON_DELETE_INDEX = 'delete index %1 from %2'; Blockly.Msg.JSON_DELETE_ALL_OCCURRENCES = 'delete all %1 from %2'; Blockly.Msg.JSON_HAS_ITEM = '%1 has item %2?'; +Blockly.Msg.JSON_MERGE = 'merge %1 %2'; Blockly.Msg.JSON_OBJECT = '{"key":"value"}'; Blockly.Msg.JSON_ARRAY = '["foo","bar"]'; Blockly.Msg.JSON_KEY = 'key';