Skip to content

Commit 45b96ee

Browse files
committed
removed Ruby category.
1 parent 81af1ce commit 45b96ee

File tree

2 files changed

+2
-71
lines changed

2 files changed

+2
-71
lines changed

src/containers/blocks.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import makeToolboxXML from '../lib/make-toolbox-xml';
55
import PropTypes from 'prop-types';
66
import React from 'react';
77
import VMScratchBlocks from '../lib/blocks';
8-
import defineRubyBlocks from '../lib/define-ruby-blocks';
98
import VM from 'scratch-vm';
109

1110
import log from '../lib/log.js';
@@ -48,7 +47,7 @@ const DroppableBlocks = DropAreaHOC([
4847
class Blocks extends React.Component {
4948
constructor (props) {
5049
super(props);
51-
this.ScratchBlocks = defineRubyBlocks(VMScratchBlocks(props.vm));
50+
this.ScratchBlocks = VMScratchBlocks(props.vm);
5251
bindAll(this, [
5352
'attachVM',
5453
'detachVM',

src/lib/make-toolbox-xml.js

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -710,72 +710,6 @@ const myBlocks = function () {
710710
`;
711711
};
712712

713-
ScratchBlocks.Msg.CATEGORY_RUBY = 'Ruby';
714-
ScratchBlocks.ScratchMsgs.locales.en.CATEGORY_RUBY = 'Ruby';
715-
ScratchBlocks.ScratchMsgs.locales.ja.CATEGORY_RUBY = 'ルビー';
716-
ScratchBlocks.ScratchMsgs.locales['ja-Hira'].CATEGORY_RUBY = 'ルビー';
717-
718-
const ruby = function () {
719-
return `
720-
<category
721-
name="%{BKY_CATEGORY_RUBY}"
722-
id="ruby"
723-
colour="#CC0043"
724-
secondaryColour="#FF4D6A">
725-
<block type="ruby_statement">
726-
<value name="STATEMENT">
727-
<shadow type="text">
728-
<field name="TEXT"></field>
729-
</shadow>
730-
</value>
731-
</block>
732-
<block type="ruby_statement_with_block">
733-
<value name="STATEMENT">
734-
<shadow type="text">
735-
<field name="TEXT"></field>
736-
</shadow>
737-
</value>
738-
<value name="ARGS">
739-
<shadow type="text">
740-
<field name="TEXT"></field>
741-
</shadow>
742-
</value>
743-
</block>
744-
<block type="ruby_expression">
745-
<value name="EXPRESSION">
746-
<shadow type="text">
747-
<field name="TEXT"></field>
748-
</shadow>
749-
</value>
750-
</block>
751-
<block type="ruby_range">
752-
<value name="FROM">
753-
<shadow type="math_number">
754-
<field name="NUM">1</field>
755-
</shadow>
756-
</value>
757-
<value name="TO">
758-
<shadow type="math_number">
759-
<field name="NUM">10</field>
760-
</shadow>
761-
</value>
762-
</block>
763-
<block type="ruby_exclude_range">
764-
<value name="FROM">
765-
<shadow type="math_number">
766-
<field name="NUM">1</field>
767-
</shadow>
768-
</value>
769-
<value name="TO">
770-
<shadow type="math_number">
771-
<field name="NUM">10</field>
772-
</shadow>
773-
</value>
774-
</block>
775-
</category>
776-
`;
777-
};
778-
779713
const xmlOpen = '<xml style="display: none">';
780714
const xmlClose = '</xml>';
781715

@@ -818,7 +752,6 @@ const makeToolboxXML = function (isStage, targetId, categoriesXML = [],
818752
const operatorsXML = moveCategory('operators') || operators(isStage, targetId);
819753
const variablesXML = moveCategory('data') || variables(isStage, targetId);
820754
const myBlocksXML = moveCategory('procedures') || myBlocks(isStage, targetId);
821-
const rubyXML = moveCategory('ruby') || ruby(isStage, targetId);
822755

823756
const everything = [
824757
xmlOpen,
@@ -830,8 +763,7 @@ const makeToolboxXML = function (isStage, targetId, categoriesXML = [],
830763
sensingXML, gap,
831764
operatorsXML, gap,
832765
variablesXML, gap,
833-
myBlocksXML, gap,
834-
rubyXML
766+
myBlocksXML
835767
];
836768

837769
for (const extensionCategory of categoriesXML) {

0 commit comments

Comments
 (0)