mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
First pass at scratch-style category menu
This commit is contained in:
parent
198a031bab
commit
79013d14fb
3 changed files with 143 additions and 605 deletions
|
@ -160,7 +160,7 @@ Blockly.Css.CONTENT = [
|
|||
'background-color: $colour_workspace;',
|
||||
'outline: none;',
|
||||
'overflow: hidden;', /* IE overflows by default. */
|
||||
'display: block;',
|
||||
'display: block;',
|
||||
'}',
|
||||
|
||||
/* Necessary to position the drag surface */
|
||||
|
@ -999,5 +999,8 @@ Blockly.Css.CONTENT = [
|
|||
'fill: blue',
|
||||
'}',
|
||||
|
||||
'.scratchCategoryMenu {',
|
||||
'width:100px',
|
||||
'}',
|
||||
''
|
||||
];
|
||||
|
|
373
core/toolbox.js
373
core/toolbox.js
|
@ -132,19 +132,7 @@ Blockly.Toolbox.prototype.width = 0;
|
|||
*/
|
||||
Blockly.Toolbox.prototype.height = 0;
|
||||
|
||||
/**
|
||||
* The SVG group currently selected.
|
||||
* @type {SVGGElement}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Toolbox.prototype.selectedOption_ = null;
|
||||
|
||||
/**
|
||||
* The tree node most recently selected.
|
||||
* @type {goog.ui.tree.BaseNode}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Toolbox.prototype.lastCategory_ = null;
|
||||
Blockly.Toolbox.prototype.selectedItem_ = null;
|
||||
|
||||
/**
|
||||
* Initializes the toolbox.
|
||||
|
@ -190,15 +178,13 @@ Blockly.Toolbox.prototype.init = function() {
|
|||
this.config_['cleardotPath'] = workspace.options.pathToMedia + '1x1.gif';
|
||||
this.config_['cssCollapsedFolderIcon'] =
|
||||
'blocklyTreeIconClosed' + (workspace.RTL ? 'Rtl' : 'Ltr');
|
||||
var tree = new Blockly.Toolbox.TreeControl(this, this.config_);
|
||||
var tree = {};//new Blockly.Toolbox.TreeControl(this, this.config_);
|
||||
this.tree_ = tree;
|
||||
tree.setShowRootNode(false);
|
||||
tree.setShowLines(false);
|
||||
tree.setShowExpandIcons(false);
|
||||
tree.setSelectedItem(null);
|
||||
this.categoryMenu_ = new Blockly.Toolbox.CategoryMenu(this, this.HtmlDiv);
|
||||
this.setSelectedItem(null);
|
||||
this.populate_(workspace.options.languageTree);
|
||||
tree.render(this.HtmlDiv);
|
||||
this.addColour_();
|
||||
//this.render(this.HtmlDiv);
|
||||
//this.addColour_();
|
||||
this.position();
|
||||
};
|
||||
|
||||
|
@ -269,24 +255,25 @@ Blockly.Toolbox.prototype.position = function() {
|
|||
* @private
|
||||
*/
|
||||
Blockly.Toolbox.prototype.populate_ = function(newTree) {
|
||||
this.tree_.removeChildren(); // Delete any existing content.
|
||||
this.tree_.blocks = [];
|
||||
this.hasColours_ = false;
|
||||
this.syncTrees_(newTree, this.tree_, this.iconic_,
|
||||
this.workspace_.options.pathToMedia);
|
||||
this.categoryMenu_.populate(newTree);
|
||||
|
||||
if (this.tree_.blocks.length) {
|
||||
throw 'Toolbox cannot have both blocks and categories in the root level.';
|
||||
}
|
||||
// this.tree_.blocks = [];
|
||||
// this.hasColours_ = false;
|
||||
// this.syncTrees_(newTree, this.tree_, this.iconic_,
|
||||
// this.workspace_.options.pathToMedia);
|
||||
|
||||
// if (this.tree_.blocks.length) {
|
||||
// throw 'Toolbox cannot have both blocks and categories in the root level.';
|
||||
// }
|
||||
|
||||
// Fire a resize event since the toolbox may have changed width and height.
|
||||
Blockly.resizeSvgContents(this.workspace_);
|
||||
// Blockly.resizeSvgContents(this.workspace_);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sync trees of the toolbox.
|
||||
* @param {Node} treeIn DOM tree of blocks, or null.
|
||||
* @param {Blockly.Toolbox.TreeControl} treeOut
|
||||
* @param {Blockly.Toolbox.Contents} treeOut
|
||||
* @param {string} pathToMedia
|
||||
* @private
|
||||
*/
|
||||
|
@ -397,7 +384,7 @@ Blockly.Toolbox.prototype.addColour_ = function(opt_tree) {
|
|||
* Unhighlight any previously specified option.
|
||||
*/
|
||||
Blockly.Toolbox.prototype.clearSelection = function() {
|
||||
this.tree_.setSelectedItem(null);
|
||||
this.setSelectedItem(null);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -441,222 +428,140 @@ Blockly.Toolbox.prototype.getClientRect = function() {
|
|||
* procedures.
|
||||
*/
|
||||
Blockly.Toolbox.prototype.refreshSelection = function() {
|
||||
var selectedItem = this.tree_.getSelectedItem();
|
||||
if (selectedItem && selectedItem.blocks) {
|
||||
this.flyout_.show(selectedItem.blocks);
|
||||
var selectedItem = this.getSelectedItem();
|
||||
if (selectedItem && selectedItem.getContents()) {
|
||||
this.flyout_.show(selectedItem.getContents());
|
||||
}
|
||||
};
|
||||
|
||||
// Extending Closure's Tree UI.
|
||||
|
||||
/**
|
||||
* Extention of a TreeControl object that uses a custom tree node.
|
||||
* @param {Blockly.Toolbox} toolbox The parent toolbox for this tree.
|
||||
* @param {Object} config The configuration for the tree. See
|
||||
* goog.ui.tree.TreeControl.DefaultConfig.
|
||||
* @constructor
|
||||
* @extends {goog.ui.tree.TreeControl}
|
||||
*/
|
||||
Blockly.Toolbox.TreeControl = function(toolbox, config) {
|
||||
this.toolbox_ = toolbox;
|
||||
goog.ui.tree.TreeControl.call(this, goog.html.SafeHtml.EMPTY, config);
|
||||
Blockly.Toolbox.prototype.getSelectedItem = function() {
|
||||
return this.selectedItem_;
|
||||
};
|
||||
goog.inherits(Blockly.Toolbox.TreeControl, goog.ui.tree.TreeControl);
|
||||
|
||||
/**
|
||||
* Adds touch handling to TreeControl.
|
||||
* @override
|
||||
*/
|
||||
Blockly.Toolbox.TreeControl.prototype.enterDocument = function() {
|
||||
Blockly.Toolbox.TreeControl.superClass_.enterDocument.call(this);
|
||||
|
||||
// Add touch handler.
|
||||
if (goog.events.BrowserFeature.TOUCH_ENABLED) {
|
||||
var el = this.getElement();
|
||||
Blockly.bindEvent_(el, goog.events.EventType.TOUCHSTART, this,
|
||||
this.handleTouchEvent_);
|
||||
Blockly.Toolbox.prototype.setSelectedItem = function(item) {
|
||||
// item is a category
|
||||
if (!item || item == this.selectedItem_) {
|
||||
this.selectedItem_ = null;
|
||||
this.flyout_.hide();
|
||||
} else {
|
||||
this.selectedItem_ = item;
|
||||
this.flyout_.show(item.getContents());
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles touch events.
|
||||
* @param {!goog.events.BrowserEvent} e The browser event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Toolbox.TreeControl.prototype.handleTouchEvent_ = function(e) {
|
||||
e.preventDefault();
|
||||
var node = this.getNodeFromEvent_(e);
|
||||
if (node && e.type === goog.events.EventType.TOUCHSTART) {
|
||||
// Fire asynchronously since onMouseDown takes long enough that the browser
|
||||
// would fire the default mouse event before this method returns.
|
||||
setTimeout(function() {
|
||||
node.onMouseDown(e); // Same behaviour for click and touch.
|
||||
}, 1);
|
||||
}
|
||||
Blockly.Toolbox.prototype.setSelectedItemFactory = function(item) {
|
||||
var selectedItem = item;
|
||||
return function() {
|
||||
this.setSelectedItem(selectedItem);
|
||||
};
|
||||
};
|
||||
|
||||
Blockly.Toolbox.CategoryMenu = function(parent, parentHtml) {
|
||||
this.parent_ = parent;
|
||||
this.parentHtml_ = parentHtml;
|
||||
this.createDom();
|
||||
this.categories_ = [];
|
||||
};
|
||||
|
||||
Blockly.Toolbox.CategoryMenu.prototype.createDom = function() {
|
||||
/*
|
||||
<table class="scratchCategoryMenu">
|
||||
</table>
|
||||
*/
|
||||
this.table = goog.dom.createDom('table', 'scratchCategoryMenu');
|
||||
this.parentHtml_.appendChild(this.table);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new tree node using a custom tree node.
|
||||
* @param {string=} opt_html The HTML content of the node label.
|
||||
* @param {string} icon The path to the icon for this category.
|
||||
* @return {!goog.ui.tree.TreeNode} The new item.
|
||||
* @override
|
||||
* Fill the toolbox with categories and blocks.
|
||||
* @param {Node} domTree DOM tree of blocks, or null.
|
||||
*/
|
||||
Blockly.Toolbox.TreeControl.prototype.createNode = function(opt_html, icon) {
|
||||
var icon_html =
|
||||
'<img src=\"' + icon + '\" alt=\"' + opt_html + '\" align=top>';
|
||||
var safe_opt_html = opt_html ?
|
||||
goog.html.SafeHtml.htmlEscape(opt_html) : goog.html.SafeHtml.EMPTY;
|
||||
var label_html = icon ? icon_html + ' ' + opt_html : safe_opt_html;
|
||||
return new Blockly.Toolbox.TreeNode(this.toolbox_, label_html,
|
||||
this.getConfig(), this.getDomHelper());
|
||||
};
|
||||
|
||||
/**
|
||||
* Display/hide the flyout when an item is selected.
|
||||
* @param {goog.ui.tree.BaseNode} node The item to select.
|
||||
* @override
|
||||
*/
|
||||
Blockly.Toolbox.TreeControl.prototype.setSelectedItem = function(node) {
|
||||
var toolbox = this.toolbox_;
|
||||
if (node == this.selectedItem_ || node == toolbox.tree_) {
|
||||
return;
|
||||
}
|
||||
if (toolbox.lastCategory_) {
|
||||
toolbox.lastCategory_.getRowElement().style.backgroundColor = '';
|
||||
}
|
||||
if (node) {
|
||||
var hexColour = node.hexColour || '#57e';
|
||||
node.getRowElement().style.backgroundColor = hexColour;
|
||||
// Add colours to child nodes which may have been collapsed and thus
|
||||
// not rendered.
|
||||
toolbox.addColour_(node);
|
||||
}
|
||||
var oldNode = this.getSelectedItem();
|
||||
goog.ui.tree.TreeControl.prototype.setSelectedItem.call(this, node);
|
||||
if (node && node.blocks && node.blocks.length) {
|
||||
toolbox.flyout_.show(node.blocks);
|
||||
// Scroll the flyout to the start if the category has changed.
|
||||
if (toolbox.lastCategory_ != node) {
|
||||
toolbox.flyout_.scrollToStart();
|
||||
Blockly.Toolbox.CategoryMenu.prototype.populate = function(domTree) {
|
||||
// TODO: Clean up/make sure things are clean.
|
||||
// TODO: Track last element, maybe.
|
||||
for (var i = 0, child; child = domTree.childNodes[i]; i++) {
|
||||
if (!child.tagName) {
|
||||
// skip it
|
||||
continue;
|
||||
}
|
||||
switch (child.tagName.toUpperCase()) {
|
||||
case 'CATEGORY':
|
||||
if (!(this.categories_.length % 2)) {
|
||||
var row = goog.dom.createDom('tr', 'scratchCategoryMenuRow');
|
||||
this.table.appendChild(row);
|
||||
}
|
||||
this.categories_.push(new Blockly.Toolbox.Category(this, row,
|
||||
child));
|
||||
break;
|
||||
case 'SEP':
|
||||
// TODO: deal with separators.
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Toolbox.Category = function(parent, parentHtml, domTree) {
|
||||
this.parent_ = parent;
|
||||
this.parentHtml_ = parentHtml;
|
||||
this.name_ = domTree.getAttribute('name');
|
||||
this.setColour(domTree);
|
||||
this.custom_ = domTree.getAttribute('custom');
|
||||
this.contents_ = [];
|
||||
if (!this.custom_) {
|
||||
this.parseContents_(domTree);
|
||||
}
|
||||
this.createDom();
|
||||
};
|
||||
|
||||
Blockly.Toolbox.Category.prototype.createDom = function() {
|
||||
// this.row_ = goog.dom.createDom('tr', 'scratchCategoryMenuRow');
|
||||
// this.parentHtml_.appendChild(this.row_);
|
||||
this.item_ = goog.dom.createDom('td',
|
||||
{'class': 'scratchCategoryMenuItem',
|
||||
'style': 'color:' + this.colour_
|
||||
},
|
||||
this.name_);
|
||||
this.parentHtml_.appendChild(this.item_);
|
||||
|
||||
// this.parent_.parent_ should be the toolbox. Don't leave this line in this
|
||||
// state.
|
||||
Blockly.bindEvent_(this.item_, 'mouseup', this.parent_.parent_,
|
||||
this.parent_.parent_.setSelectedItemFactory(this));
|
||||
};
|
||||
|
||||
Blockly.Toolbox.Category.prototype.parseContents_ = function(domTree) {
|
||||
for (var i = 0, child; child = domTree.childNodes[i]; i++) {
|
||||
if (!child.tagName) {
|
||||
// Skip
|
||||
continue;
|
||||
}
|
||||
switch (child.tagName.toUpperCase()) {
|
||||
case 'BLOCK':
|
||||
case 'SHADOW':
|
||||
case 'BUTTON':
|
||||
case 'TEXT':
|
||||
this.contents_.push(child);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.Toolbox.Category.prototype.getContents = function() {
|
||||
return this.custom_ ? this.custom_ : this.contents_;
|
||||
};
|
||||
|
||||
Blockly.Toolbox.Category.prototype.setColour = function(node) {
|
||||
var colour = node.getAttribute('colour');
|
||||
if (goog.isString(colour)) {
|
||||
if (colour.match(/^#[0-9a-fA-F]{6}$/)) {
|
||||
this.colour_ = colour;
|
||||
} else {
|
||||
this.colour_ = Blockly.hueToRgb(colour);
|
||||
}
|
||||
this.hasColours_ = true;
|
||||
} else {
|
||||
// Hide the flyout.
|
||||
toolbox.flyout_.hide();
|
||||
}
|
||||
if (oldNode != node && oldNode != this) {
|
||||
var event = new Blockly.Events.Ui(null, 'category',
|
||||
oldNode && oldNode.getHtml(), node && node.getHtml());
|
||||
event.workspaceId = toolbox.workspace_.id;
|
||||
Blockly.Events.fire(event);
|
||||
}
|
||||
if (node) {
|
||||
toolbox.lastCategory_ = node;
|
||||
this.colour_ = '#000000';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* A single node in the tree, customized for Blockly's UI.
|
||||
* @param {Blockly.Toolbox} toolbox The parent toolbox for this tree.
|
||||
* @param {!goog.html.SafeHtml} html The HTML content of the node label.
|
||||
* @param {Object=} opt_config The configuration for the tree. See
|
||||
* goog.ui.tree.TreeControl.DefaultConfig. If not specified, a default config
|
||||
* will be used.
|
||||
* @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper.
|
||||
* @constructor
|
||||
* @extends {goog.ui.tree.TreeNode}
|
||||
*/
|
||||
Blockly.Toolbox.TreeNode = function(toolbox, html, opt_config, opt_domHelper) {
|
||||
goog.ui.tree.TreeNode.call(this, html, opt_config, opt_domHelper);
|
||||
if (toolbox) {
|
||||
this.horizontalLayout_ = toolbox.horizontalLayout_;
|
||||
var resize = function() {
|
||||
// Even though the div hasn't changed size, the visible workspace
|
||||
// surface of the workspace has, so we may need to reposition everything.
|
||||
Blockly.svgResize(toolbox.workspace_);
|
||||
};
|
||||
// Fire a resize event since the toolbox may have changed width.
|
||||
goog.events.listen(toolbox.tree_,
|
||||
goog.ui.tree.BaseNode.EventType.EXPAND, resize);
|
||||
goog.events.listen(toolbox.tree_,
|
||||
goog.ui.tree.BaseNode.EventType.COLLAPSE, resize);
|
||||
|
||||
this.toolbox_ = toolbox;
|
||||
}
|
||||
};
|
||||
goog.inherits(Blockly.Toolbox.TreeNode, goog.ui.tree.TreeNode);
|
||||
|
||||
/**
|
||||
* Supress population of the +/- icon.
|
||||
* @return {!goog.html.SafeHtml} The source for the icon.
|
||||
* @override
|
||||
*/
|
||||
Blockly.Toolbox.TreeNode.prototype.getExpandIconSafeHtml = function() {
|
||||
return goog.html.SafeHtml.create('span');
|
||||
};
|
||||
|
||||
/**
|
||||
* Expand or collapse the node on mouse click.
|
||||
* @param {!goog.events.BrowserEvent} e The browser event.
|
||||
* @override
|
||||
*/
|
||||
Blockly.Toolbox.TreeNode.prototype.onMouseDown = function(e) {
|
||||
// Expand icon.
|
||||
if (this.hasChildren() && this.isUserCollapsible_) {
|
||||
this.toggle();
|
||||
this.select();
|
||||
} else if (this.isSelected()) {
|
||||
this.getTree().setSelectedItem(null);
|
||||
} else {
|
||||
this.select();
|
||||
}
|
||||
this.updateRow();
|
||||
};
|
||||
|
||||
/**
|
||||
* Supress the inherited double-click behaviour.
|
||||
* @param {!goog.events.BrowserEvent} e The browser event.
|
||||
* @override
|
||||
* @private
|
||||
*/
|
||||
Blockly.Toolbox.TreeNode.prototype.onDoubleClick_ = function(e) {
|
||||
// NOP.
|
||||
};
|
||||
|
||||
/**
|
||||
* Remap event.keyCode in horizontalLayout so that arrow
|
||||
* keys work properly and call original onKeyDown handler.
|
||||
* @param {!goog.events.BrowserEvent} e The browser event.
|
||||
* @return {boolean} The handled value.
|
||||
* @override
|
||||
* @private
|
||||
*/
|
||||
Blockly.Toolbox.TreeNode.prototype.onKeyDown = function(e) {
|
||||
if (this.horizontalLayout_) {
|
||||
var map = {};
|
||||
map[goog.events.KeyCodes.RIGHT] = goog.events.KeyCodes.DOWN;
|
||||
map[goog.events.KeyCodes.LEFT] = goog.events.KeyCodes.UP;
|
||||
map[goog.events.KeyCodes.UP] = goog.events.KeyCodes.LEFT;
|
||||
map[goog.events.KeyCodes.DOWN] = goog.events.KeyCodes.RIGHT;
|
||||
|
||||
var newKeyCode = map[e.keyCode];
|
||||
e.keyCode = newKeyCode || e.keyCode;
|
||||
}
|
||||
return Blockly.Toolbox.TreeNode.superClass_.onKeyDown.call(this, e);
|
||||
};
|
||||
|
||||
/**
|
||||
* A blank separator node in the tree.
|
||||
* @param {Object=} config The configuration for the tree. See
|
||||
* goog.ui.tree.TreeControl.DefaultConfig. If not specified, a default config
|
||||
* will be used.
|
||||
* @constructor
|
||||
* @param {Object=} config The configuration for the tree. See
|
||||
* goog.ui.tree.TreeControl.DefaultConfig. If not specified, a default config
|
||||
* will be used.
|
||||
* @extends {Blockly.Toolbox.TreeNode}
|
||||
*/
|
||||
Blockly.Toolbox.TreeSeparator = function(config) {
|
||||
Blockly.Toolbox.TreeNode.call(this, null, '', config);
|
||||
};
|
||||
goog.inherits(Blockly.Toolbox.TreeSeparator, Blockly.Toolbox.TreeNode);
|
||||
|
|
370
msg/json/en.json
370
msg/json/en.json
|
@ -1,370 +0,0 @@
|
|||
{
|
||||
"@metadata": {
|
||||
"author": "Ellen Spertus <ellen.spertus@gmail.com>",
|
||||
"lastupdated": "2016-08-16 18:03:26.694735",
|
||||
"locale": "en",
|
||||
"messagedocumentation" : "qqq"
|
||||
},
|
||||
"VARIABLES_DEFAULT_NAME": "item",
|
||||
"TODAY": "Today",
|
||||
"DUPLICATE_BLOCK": "Duplicate",
|
||||
"ADD_COMMENT": "Add Comment",
|
||||
"REMOVE_COMMENT": "Remove Comment",
|
||||
"EXTERNAL_INPUTS": "External Inputs",
|
||||
"INLINE_INPUTS": "Inline Inputs",
|
||||
"DELETE_BLOCK": "Delete Block",
|
||||
"DELETE_X_BLOCKS": "Delete %1 Blocks",
|
||||
"DELETE_ALL_BLOCKS": "Delete all %1 blocks?",
|
||||
"CLEAN_UP": "Clean up Blocks",
|
||||
"COLLAPSE_BLOCK": "Collapse Block",
|
||||
"COLLAPSE_ALL": "Collapse Blocks",
|
||||
"EXPAND_BLOCK": "Expand Block",
|
||||
"EXPAND_ALL": "Expand Blocks",
|
||||
"DISABLE_BLOCK": "Disable Block",
|
||||
"ENABLE_BLOCK": "Enable Block",
|
||||
"HELP": "Help",
|
||||
"UNDO": "Undo",
|
||||
"REDO": "Redo",
|
||||
"CHANGE_VALUE_TITLE": "Change value:",
|
||||
"NEW_VARIABLE": "New variable...",
|
||||
"NEW_VARIABLE_TITLE": "New variable name:",
|
||||
"RENAME_VARIABLE": "Rename variable...",
|
||||
"RENAME_VARIABLE_TITLE": "Rename all '%1' variables to:",
|
||||
"DELETE_VARIABLE_CONFIRMATION": "Delete %1 uses of the '%2' variable?",
|
||||
"DELETE_VARIABLE": "Delete the '%1' variable",
|
||||
"COLOUR_PICKER_HELPURL": "https://en.wikipedia.org/wiki/Color",
|
||||
"COLOUR_PICKER_TOOLTIP": "Choose a colour from the palette.",
|
||||
"COLOUR_RANDOM_HELPURL": "http://randomcolour.com",
|
||||
"COLOUR_RANDOM_TITLE": "random colour",
|
||||
"COLOUR_RANDOM_TOOLTIP": "Choose a colour at random.",
|
||||
"COLOUR_RGB_HELPURL": "http://www.december.com/html/spec/colorper.html",
|
||||
"COLOUR_RGB_TITLE": "colour with",
|
||||
"COLOUR_RGB_RED": "red",
|
||||
"COLOUR_RGB_GREEN": "green",
|
||||
"COLOUR_RGB_BLUE": "blue",
|
||||
"COLOUR_RGB_TOOLTIP": "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.",
|
||||
"COLOUR_BLEND_HELPURL": "http://meyerweb.com/eric/tools/color-blend/",
|
||||
"COLOUR_BLEND_TITLE": "blend",
|
||||
"COLOUR_BLEND_COLOUR1": "colour 1",
|
||||
"COLOUR_BLEND_COLOUR2": "colour 2",
|
||||
"COLOUR_BLEND_RATIO": "ratio",
|
||||
"COLOUR_BLEND_TOOLTIP": "Blends two colours together with a given ratio (0.0 - 1.0).",
|
||||
"CONTROLS_REPEAT_HELPURL": "https://en.wikipedia.org/wiki/For_loop",
|
||||
"CONTROLS_REPEAT_TITLE": "repeat %1 times",
|
||||
"CONTROLS_REPEAT_INPUT_DO": "do",
|
||||
"CONTROLS_REPEAT_TOOLTIP": "Do some statements several times.",
|
||||
"CONTROLS_WHILEUNTIL_HELPURL": "https://github.com/google/blockly/wiki/Loops#repeat",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "repeat while",
|
||||
"CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "repeat until",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "While a value is true, then do some statements.",
|
||||
"CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "While a value is false, then do some statements.",
|
||||
"CONTROLS_FOR_HELPURL": "https://github.com/google/blockly/wiki/Loops#count-with",
|
||||
"CONTROLS_FOR_TOOLTIP": "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.",
|
||||
"CONTROLS_FOR_TITLE": "count with %1 from %2 to %3 by %4",
|
||||
"CONTROLS_FOREACH_HELPURL": "https://github.com/google/blockly/wiki/Loops#for-each",
|
||||
"CONTROLS_FOREACH_TITLE": "for each item %1 in list %2",
|
||||
"CONTROLS_FOREACH_TOOLTIP": "For each item in a list, set the variable '%1' to the item, and then do some statements.",
|
||||
"CONTROLS_FLOW_STATEMENTS_HELPURL": "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "break out of loop",
|
||||
"CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "continue with next iteration of loop",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "Break out of the containing loop.",
|
||||
"CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "Skip the rest of this loop, and continue with the next iteration.",
|
||||
"CONTROLS_FLOW_STATEMENTS_WARNING": "Warning: This block may only be used within a loop.",
|
||||
"CONTROLS_IF_HELPURL": "https://github.com/google/blockly/wiki/IfElse",
|
||||
"CONTROLS_IF_TOOLTIP_1": "If a value is true, then do some statements.",
|
||||
"CONTROLS_IF_TOOLTIP_2": "If a value is true, then do the first block of statements. Otherwise, do the second block of statements.",
|
||||
"CONTROLS_IF_TOOLTIP_3": "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.",
|
||||
"CONTROLS_IF_TOOLTIP_4": "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.",
|
||||
"CONTROLS_IF_MSG_IF": "if",
|
||||
"CONTROLS_IF_MSG_ELSEIF": "else if",
|
||||
"CONTROLS_IF_MSG_ELSE": "else",
|
||||
"CONTROLS_IF_IF_TOOLTIP": "Add, remove, or reorder sections to reconfigure this if block.",
|
||||
"CONTROLS_IF_ELSEIF_TOOLTIP": "Add a condition to the if block.",
|
||||
"CONTROLS_IF_ELSE_TOOLTIP": "Add a final, catch-all condition to the if block.",
|
||||
"LOGIC_COMPARE_HELPURL": "https://en.wikipedia.org/wiki/Inequality_(mathematics)",
|
||||
"LOGIC_COMPARE_TOOLTIP_EQ": "Return true if both inputs equal each other.",
|
||||
"LOGIC_COMPARE_TOOLTIP_NEQ": "Return true if both inputs are not equal to each other.",
|
||||
"LOGIC_COMPARE_TOOLTIP_LT": "Return true if the first input is smaller than the second input.",
|
||||
"LOGIC_COMPARE_TOOLTIP_LTE": "Return true if the first input is smaller than or equal to the second input.",
|
||||
"LOGIC_COMPARE_TOOLTIP_GT": "Return true if the first input is greater than the second input.",
|
||||
"LOGIC_COMPARE_TOOLTIP_GTE": "Return true if the first input is greater than or equal to the second input.",
|
||||
"LOGIC_OPERATION_HELPURL": "https://github.com/google/blockly/wiki/Logic#logical-operations",
|
||||
"LOGIC_OPERATION_TOOLTIP_AND": "Return true if both inputs are true.",
|
||||
"LOGIC_OPERATION_AND": "and",
|
||||
"LOGIC_OPERATION_TOOLTIP_OR": "Return true if at least one of the inputs is true.",
|
||||
"LOGIC_OPERATION_OR": "or",
|
||||
"LOGIC_NEGATE_HELPURL": "https://github.com/google/blockly/wiki/Logic#not",
|
||||
"LOGIC_NEGATE_TITLE": "not %1",
|
||||
"LOGIC_NEGATE_TOOLTIP": "Returns true if the input is false. Returns false if the input is true.",
|
||||
"LOGIC_BOOLEAN_HELPURL": "https://github.com/google/blockly/wiki/Logic#values",
|
||||
"LOGIC_BOOLEAN_TRUE": "true",
|
||||
"LOGIC_BOOLEAN_FALSE": "false",
|
||||
"LOGIC_BOOLEAN_TOOLTIP": "Returns either true or false.",
|
||||
"LOGIC_NULL_HELPURL": "https://en.wikipedia.org/wiki/Nullable_type",
|
||||
"LOGIC_NULL": "null",
|
||||
"LOGIC_NULL_TOOLTIP": "Returns null.",
|
||||
"LOGIC_TERNARY_HELPURL": "https://en.wikipedia.org/wiki/%3F:",
|
||||
"LOGIC_TERNARY_CONDITION": "test",
|
||||
"LOGIC_TERNARY_IF_TRUE": "if true",
|
||||
"LOGIC_TERNARY_IF_FALSE": "if false",
|
||||
"LOGIC_TERNARY_TOOLTIP": "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.",
|
||||
"MATH_NUMBER_HELPURL": "https://en.wikipedia.org/wiki/Number",
|
||||
"MATH_NUMBER_TOOLTIP": "A number.",
|
||||
"MATH_ADDITION_SYMBOL": "+",
|
||||
"MATH_SUBTRACTION_SYMBOL": "-",
|
||||
"MATH_DIVISION_SYMBOL": "÷",
|
||||
"MATH_MULTIPLICATION_SYMBOL": "×",
|
||||
"MATH_POWER_SYMBOL": "^",
|
||||
"MATH_TRIG_SIN": "sin",
|
||||
"MATH_TRIG_COS": "cos",
|
||||
"MATH_TRIG_TAN": "tan",
|
||||
"MATH_TRIG_ASIN": "asin",
|
||||
"MATH_TRIG_ACOS": "acos",
|
||||
"MATH_TRIG_ATAN": "atan",
|
||||
"MATH_ARITHMETIC_HELPURL": "https://en.wikipedia.org/wiki/Arithmetic",
|
||||
"MATH_ARITHMETIC_TOOLTIP_ADD": "Return the sum of the two numbers.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_MINUS": "Return the difference of the two numbers.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_MULTIPLY": "Return the product of the two numbers.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_DIVIDE": "Return the quotient of the two numbers.",
|
||||
"MATH_ARITHMETIC_TOOLTIP_POWER": "Return the first number raised to the power of the second number.",
|
||||
"MATH_SINGLE_HELPURL": "https://en.wikipedia.org/wiki/Square_root",
|
||||
"MATH_SINGLE_OP_ROOT": "square root",
|
||||
"MATH_SINGLE_TOOLTIP_ROOT": "Return the square root of a number.",
|
||||
"MATH_SINGLE_OP_ABSOLUTE": "absolute",
|
||||
"MATH_SINGLE_TOOLTIP_ABS": "Return the absolute value of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_NEG": "Return the negation of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_LN": "Return the natural logarithm of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_LOG10": "Return the base 10 logarithm of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_EXP": "Return e to the power of a number.",
|
||||
"MATH_SINGLE_TOOLTIP_POW10": "Return 10 to the power of a number.",
|
||||
"MATH_TRIG_HELPURL": "https://en.wikipedia.org/wiki/Trigonometric_functions",
|
||||
"MATH_TRIG_TOOLTIP_SIN": "Return the sine of a degree (not radian).",
|
||||
"MATH_TRIG_TOOLTIP_COS": "Return the cosine of a degree (not radian).",
|
||||
"MATH_TRIG_TOOLTIP_TAN": "Return the tangent of a degree (not radian).",
|
||||
"MATH_TRIG_TOOLTIP_ASIN": "Return the arcsine of a number.",
|
||||
"MATH_TRIG_TOOLTIP_ACOS": "Return the arccosine of a number.",
|
||||
"MATH_TRIG_TOOLTIP_ATAN": "Return the arctangent of a number.",
|
||||
"MATH_CONSTANT_HELPURL": "https://en.wikipedia.org/wiki/Mathematical_constant",
|
||||
"MATH_CONSTANT_TOOLTIP": "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).",
|
||||
"MATH_IS_EVEN": "is even",
|
||||
"MATH_IS_ODD": "is odd",
|
||||
"MATH_IS_PRIME": "is prime",
|
||||
"MATH_IS_WHOLE": "is whole",
|
||||
"MATH_IS_POSITIVE": "is positive",
|
||||
"MATH_IS_NEGATIVE": "is negative",
|
||||
"MATH_IS_DIVISIBLE_BY": "is divisible by",
|
||||
"MATH_IS_TOOLTIP": "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.",
|
||||
"MATH_CHANGE_HELPURL": "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter",
|
||||
"MATH_CHANGE_TITLE": "change %1 by %2",
|
||||
"MATH_CHANGE_TOOLTIP": "Add a number to variable '%1'.",
|
||||
"MATH_ROUND_HELPURL": "https://en.wikipedia.org/wiki/Rounding",
|
||||
"MATH_ROUND_TOOLTIP": "Round a number up or down.",
|
||||
"MATH_ROUND_OPERATOR_ROUND": "round",
|
||||
"MATH_ROUND_OPERATOR_ROUNDUP": "round up",
|
||||
"MATH_ROUND_OPERATOR_ROUNDDOWN": "round down",
|
||||
"MATH_ONLIST_HELPURL": "",
|
||||
"MATH_ONLIST_OPERATOR_SUM": "sum of list",
|
||||
"MATH_ONLIST_TOOLTIP_SUM": "Return the sum of all the numbers in the list.",
|
||||
"MATH_ONLIST_OPERATOR_MIN": "min of list",
|
||||
"MATH_ONLIST_TOOLTIP_MIN": "Return the smallest number in the list.",
|
||||
"MATH_ONLIST_OPERATOR_MAX": "max of list",
|
||||
"MATH_ONLIST_TOOLTIP_MAX": "Return the largest number in the list.",
|
||||
"MATH_ONLIST_OPERATOR_AVERAGE": "average of list",
|
||||
"MATH_ONLIST_TOOLTIP_AVERAGE": "Return the average (arithmetic mean) of the numeric values in the list.",
|
||||
"MATH_ONLIST_OPERATOR_MEDIAN": "median of list",
|
||||
"MATH_ONLIST_TOOLTIP_MEDIAN": "Return the median number in the list.",
|
||||
"MATH_ONLIST_OPERATOR_MODE": "modes of list",
|
||||
"MATH_ONLIST_TOOLTIP_MODE": "Return a list of the most common item(s) in the list.",
|
||||
"MATH_ONLIST_OPERATOR_STD_DEV": "standard deviation of list",
|
||||
"MATH_ONLIST_TOOLTIP_STD_DEV": "Return the standard deviation of the list.",
|
||||
"MATH_ONLIST_OPERATOR_RANDOM": "random item of list",
|
||||
"MATH_ONLIST_TOOLTIP_RANDOM": "Return a random element from the list.",
|
||||
"MATH_MODULO_HELPURL": "https://en.wikipedia.org/wiki/Modulo_operation",
|
||||
"MATH_MODULO_TITLE": "remainder of %1 ÷ %2",
|
||||
"MATH_MODULO_TOOLTIP": "Return the remainder from dividing the two numbers.",
|
||||
"MATH_CONSTRAIN_HELPURL": "https://en.wikipedia.org/wiki/Clamping_%28graphics%29",
|
||||
"MATH_CONSTRAIN_TITLE": "constrain %1 low %2 high %3",
|
||||
"MATH_CONSTRAIN_TOOLTIP": "Constrain a number to be between the specified limits (inclusive).",
|
||||
"MATH_RANDOM_INT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation",
|
||||
"MATH_RANDOM_INT_TITLE": "random integer from %1 to %2",
|
||||
"MATH_RANDOM_INT_TOOLTIP": "Return a random integer between the two specified limits, inclusive.",
|
||||
"MATH_RANDOM_FLOAT_HELPURL": "https://en.wikipedia.org/wiki/Random_number_generation",
|
||||
"MATH_RANDOM_FLOAT_TITLE_RANDOM": "random fraction",
|
||||
"MATH_RANDOM_FLOAT_TOOLTIP": "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).",
|
||||
"TEXT_TEXT_HELPURL": "https://en.wikipedia.org/wiki/String_(computer_science)",
|
||||
"TEXT_TEXT_TOOLTIP": "A letter, word, or line of text.",
|
||||
"TEXT_JOIN_HELPURL": "https://github.com/google/blockly/wiki/Text#text-creation",
|
||||
"TEXT_JOIN_TITLE_CREATEWITH": "create text with",
|
||||
"TEXT_JOIN_TOOLTIP": "Create a piece of text by joining together any number of items.",
|
||||
"TEXT_CREATE_JOIN_TITLE_JOIN": "join",
|
||||
"TEXT_CREATE_JOIN_TOOLTIP": "Add, remove, or reorder sections to reconfigure this text block.",
|
||||
"TEXT_CREATE_JOIN_ITEM_TOOLTIP": "Add an item to the text.",
|
||||
"TEXT_APPEND_HELPURL": "https://github.com/google/blockly/wiki/Text#text-modification",
|
||||
"TEXT_APPEND_TO": "to",
|
||||
"TEXT_APPEND_APPENDTEXT": "append text",
|
||||
"TEXT_APPEND_TOOLTIP": "Append some text to variable '%1'.",
|
||||
"TEXT_LENGTH_HELPURL": "https://github.com/google/blockly/wiki/Text#text-modification",
|
||||
"TEXT_LENGTH_TITLE": "length of %1",
|
||||
"TEXT_LENGTH_TOOLTIP": "Returns the number of letters (including spaces) in the provided text.",
|
||||
"TEXT_ISEMPTY_HELPURL": "https://github.com/google/blockly/wiki/Text#checking-for-empty-text",
|
||||
"TEXT_ISEMPTY_TITLE": "%1 is empty",
|
||||
"TEXT_ISEMPTY_TOOLTIP": "Returns true if the provided text is empty.",
|
||||
"TEXT_INDEXOF_HELPURL": "https://github.com/google/blockly/wiki/Text#finding-text",
|
||||
"TEXT_INDEXOF_TOOLTIP": "Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found.",
|
||||
"TEXT_INDEXOF_INPUT_INTEXT": "in text",
|
||||
"TEXT_INDEXOF_OPERATOR_FIRST": "find first occurrence of text",
|
||||
"TEXT_INDEXOF_OPERATOR_LAST": "find last occurrence of text",
|
||||
"TEXT_INDEXOF_TAIL": "",
|
||||
"TEXT_CHARAT_HELPURL": "https://github.com/google/blockly/wiki/Text#extracting-text",
|
||||
"TEXT_CHARAT_INPUT_INTEXT": "in text",
|
||||
"TEXT_CHARAT_FROM_START": "get letter #",
|
||||
"TEXT_CHARAT_FROM_END": "get letter # from end",
|
||||
"TEXT_CHARAT_FIRST": "get first letter",
|
||||
"TEXT_CHARAT_LAST": "get last letter",
|
||||
"TEXT_CHARAT_RANDOM": "get random letter",
|
||||
"TEXT_CHARAT_TAIL": "",
|
||||
"TEXT_CHARAT_TOOLTIP": "Returns the letter at the specified position.",
|
||||
"TEXT_GET_SUBSTRING_TOOLTIP": "Returns a specified portion of the text.",
|
||||
"TEXT_GET_SUBSTRING_HELPURL": "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text",
|
||||
"TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "in text",
|
||||
"TEXT_GET_SUBSTRING_START_FROM_START": "get substring from letter #",
|
||||
"TEXT_GET_SUBSTRING_START_FROM_END": "get substring from letter # from end",
|
||||
"TEXT_GET_SUBSTRING_START_FIRST": "get substring from first letter",
|
||||
"TEXT_GET_SUBSTRING_END_FROM_START": "to letter #",
|
||||
"TEXT_GET_SUBSTRING_END_FROM_END": "to letter # from end",
|
||||
"TEXT_GET_SUBSTRING_END_LAST": "to last letter",
|
||||
"TEXT_GET_SUBSTRING_TAIL": "",
|
||||
"TEXT_CHANGECASE_HELPURL": "https://github.com/google/blockly/wiki/Text#adjusting-text-case",
|
||||
"TEXT_CHANGECASE_TOOLTIP": "Return a copy of the text in a different case.",
|
||||
"TEXT_CHANGECASE_OPERATOR_UPPERCASE": "to UPPER CASE",
|
||||
"TEXT_CHANGECASE_OPERATOR_LOWERCASE": "to lower case",
|
||||
"TEXT_CHANGECASE_OPERATOR_TITLECASE": "to Title Case",
|
||||
"TEXT_TRIM_HELPURL": "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces",
|
||||
"TEXT_TRIM_TOOLTIP": "Return a copy of the text with spaces removed from one or both ends.",
|
||||
"TEXT_TRIM_OPERATOR_BOTH": "trim spaces from both sides of",
|
||||
"TEXT_TRIM_OPERATOR_LEFT": "trim spaces from left side of",
|
||||
"TEXT_TRIM_OPERATOR_RIGHT": "trim spaces from right side of",
|
||||
"TEXT_PRINT_HELPURL": "https://github.com/google/blockly/wiki/Text#printing-text",
|
||||
"TEXT_PRINT_TITLE": "print %1",
|
||||
"TEXT_PRINT_TOOLTIP": "Print the specified text, number or other value.",
|
||||
"TEXT_PROMPT_HELPURL": "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user",
|
||||
"TEXT_PROMPT_TYPE_TEXT": "prompt for text with message",
|
||||
"TEXT_PROMPT_TYPE_NUMBER": "prompt for number with message",
|
||||
"TEXT_PROMPT_TOOLTIP_NUMBER": "Prompt for user for a number.",
|
||||
"TEXT_PROMPT_TOOLTIP_TEXT": "Prompt for user for some text.",
|
||||
"LISTS_CREATE_EMPTY_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-empty-list",
|
||||
"LISTS_CREATE_EMPTY_TITLE": "create empty list",
|
||||
"LISTS_CREATE_EMPTY_TOOLTIP": "Returns a list, of length 0, containing no data records",
|
||||
"LISTS_CREATE_WITH_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-list-with",
|
||||
"LISTS_CREATE_WITH_TOOLTIP": "Create a list with any number of items.",
|
||||
"LISTS_CREATE_WITH_INPUT_WITH": "create list with",
|
||||
"LISTS_CREATE_WITH_CONTAINER_TITLE_ADD": "list",
|
||||
"LISTS_CREATE_WITH_CONTAINER_TOOLTIP": "Add, remove, or reorder sections to reconfigure this list block.",
|
||||
"LISTS_CREATE_WITH_ITEM_TOOLTIP": "Add an item to the list.",
|
||||
"LISTS_REPEAT_HELPURL": "https://github.com/google/blockly/wiki/Lists#create-list-with",
|
||||
"LISTS_REPEAT_TOOLTIP": "Creates a list consisting of the given value repeated the specified number of times.",
|
||||
"LISTS_REPEAT_TITLE": "create list with item %1 repeated %2 times",
|
||||
"LISTS_LENGTH_HELPURL": "https://github.com/google/blockly/wiki/Lists#length-of",
|
||||
"LISTS_LENGTH_TITLE": "length of %1",
|
||||
"LISTS_LENGTH_TOOLTIP": "Returns the length of a list.",
|
||||
"LISTS_ISEMPTY_HELPURL": "https://github.com/google/blockly/wiki/Lists#is-empty",
|
||||
"LISTS_ISEMPTY_TITLE": "%1 is empty",
|
||||
"LISTS_ISEMPTY_TOOLTIP": "Returns true if the list is empty.",
|
||||
"LISTS_INLIST": "in list",
|
||||
"LISTS_INDEX_OF_HELPURL": "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list",
|
||||
"LISTS_INDEX_OF_FIRST": "find first occurrence of item",
|
||||
"LISTS_INDEX_OF_LAST": "find last occurrence of item",
|
||||
"LISTS_INDEX_OF_TOOLTIP": "Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found.",
|
||||
"LISTS_GET_INDEX_GET": "get",
|
||||
"LISTS_GET_INDEX_GET_REMOVE": "get and remove",
|
||||
"LISTS_GET_INDEX_REMOVE": "remove",
|
||||
"LISTS_GET_INDEX_FROM_START": "#",
|
||||
"LISTS_GET_INDEX_FROM_END": "# from end",
|
||||
"LISTS_GET_INDEX_FIRST": "first",
|
||||
"LISTS_GET_INDEX_LAST": "last",
|
||||
"LISTS_GET_INDEX_RANDOM": "random",
|
||||
"LISTS_GET_INDEX_TAIL": "",
|
||||
"LISTS_INDEX_FROM_START_TOOLTIP": "%1 is the first item.",
|
||||
"LISTS_INDEX_FROM_END_TOOLTIP": "%1 is the last item.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_FROM": "Returns the item at the specified position in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_FIRST": "Returns the first item in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_LAST": "Returns the last item in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_RANDOM": "Returns a random item in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM": "Removes and returns the item at the specified position in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST": "Removes and returns the first item in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST": "Removes and returns the last item in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM": "Removes and returns a random item in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM": "Removes the item at the specified position in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST": "Removes the first item in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST": "Removes the last item in a list.",
|
||||
"LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM": "Removes a random item in a list.",
|
||||
"LISTS_SET_INDEX_HELPURL": "https://github.com/google/blockly/wiki/Lists#in-list--set",
|
||||
"LISTS_SET_INDEX_SET": "set",
|
||||
"LISTS_SET_INDEX_INSERT": "insert at",
|
||||
"LISTS_SET_INDEX_INPUT_TO": "as",
|
||||
"LISTS_SET_INDEX_TOOLTIP_SET_FROM": "Sets the item at the specified position in a list.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_SET_FIRST": "Sets the first item in a list.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_SET_LAST": "Sets the last item in a list.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_SET_RANDOM": "Sets a random item in a list.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_INSERT_FROM": "Inserts the item at the specified position in a list.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST": "Inserts the item at the start of a list.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_INSERT_LAST": "Append the item to the end of a list.",
|
||||
"LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM": "Inserts the item randomly in a list.",
|
||||
"LISTS_GET_SUBLIST_HELPURL": "https://github.com/google/blockly/wiki/Lists#getting-a-sublist",
|
||||
"LISTS_GET_SUBLIST_START_FROM_START": "get sub-list from #",
|
||||
"LISTS_GET_SUBLIST_START_FROM_END": "get sub-list from # from end",
|
||||
"LISTS_GET_SUBLIST_START_FIRST": "get sub-list from first",
|
||||
"LISTS_GET_SUBLIST_END_FROM_START": "to #",
|
||||
"LISTS_GET_SUBLIST_END_FROM_END": "to # from end",
|
||||
"LISTS_GET_SUBLIST_END_LAST": "to last",
|
||||
"LISTS_GET_SUBLIST_TAIL": "",
|
||||
"LISTS_GET_SUBLIST_TOOLTIP": "Creates a copy of the specified portion of a list.",
|
||||
"LISTS_SORT_HELPURL": "https://github.com/google/blockly/wiki/Lists#sorting-a-list",
|
||||
"LISTS_SORT_TITLE": "sort %1 %2 %3",
|
||||
"LISTS_SORT_TOOLTIP": "Sort a copy of a list.",
|
||||
"LISTS_SORT_ORDER_ASCENDING": "ascending",
|
||||
"LISTS_SORT_ORDER_DESCENDING": "descending",
|
||||
"LISTS_SORT_TYPE_NUMERIC": "numeric",
|
||||
"LISTS_SORT_TYPE_TEXT": "alphabetic",
|
||||
"LISTS_SORT_TYPE_IGNORECASE": "alphabetic, ignore case",
|
||||
"LISTS_SPLIT_HELPURL": "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists",
|
||||
"LISTS_SPLIT_LIST_FROM_TEXT": "make list from text",
|
||||
"LISTS_SPLIT_TEXT_FROM_LIST": "make text from list",
|
||||
"LISTS_SPLIT_WITH_DELIMITER": "with delimiter",
|
||||
"LISTS_SPLIT_TOOLTIP_SPLIT": "Split text into a list of texts, breaking at each delimiter.",
|
||||
"LISTS_SPLIT_TOOLTIP_JOIN": "Join a list of texts into one text, separated by a delimiter.",
|
||||
"ORDINAL_NUMBER_SUFFIX": "",
|
||||
"VARIABLES_GET_HELPURL": "https://github.com/google/blockly/wiki/Variables#get",
|
||||
"VARIABLES_GET_TOOLTIP": "Returns the value of this variable.",
|
||||
"VARIABLES_GET_CREATE_SET": "Create 'set %1'",
|
||||
"VARIABLES_SET_HELPURL": "https://github.com/google/blockly/wiki/Variables#set",
|
||||
"VARIABLES_SET": "set %1 to %2",
|
||||
"VARIABLES_SET_TOOLTIP": "Sets this variable to be equal to the input.",
|
||||
"VARIABLES_SET_CREATE_GET": "Create 'get %1'",
|
||||
"PROCEDURES_DEFNORETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29",
|
||||
"PROCEDURES_DEFNORETURN_TITLE": "to",
|
||||
"PROCEDURES_DEFNORETURN_PROCEDURE": "do something",
|
||||
"PROCEDURES_BEFORE_PARAMS": "with:",
|
||||
"PROCEDURES_CALL_BEFORE_PARAMS": "with:",
|
||||
"PROCEDURES_DEFNORETURN_DO": "",
|
||||
"PROCEDURES_DEFNORETURN_TOOLTIP": "Creates a function with no output.",
|
||||
"PROCEDURES_DEFNORETURN_COMMENT": "Describe this function...",
|
||||
"PROCEDURES_DEFRETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29",
|
||||
"PROCEDURES_DEFRETURN_RETURN": "return",
|
||||
"PROCEDURES_DEFRETURN_TOOLTIP": "Creates a function with an output.",
|
||||
"PROCEDURES_ALLOW_STATEMENTS": "allow statements",
|
||||
"PROCEDURES_DEF_DUPLICATE_WARNING": "Warning: This function has duplicate parameters.",
|
||||
"PROCEDURES_CALLNORETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29",
|
||||
"PROCEDURES_CALLNORETURN_TOOLTIP": "Run the user-defined function '%1'.",
|
||||
"PROCEDURES_CALLRETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29",
|
||||
"PROCEDURES_CALLRETURN_TOOLTIP": "Run the user-defined function '%1' and use its output.",
|
||||
"PROCEDURES_MUTATORCONTAINER_TITLE": "inputs",
|
||||
"PROCEDURES_MUTATORCONTAINER_TOOLTIP": "Add, remove, or reorder inputs to this function.",
|
||||
"PROCEDURES_MUTATORARG_TITLE": "input name:",
|
||||
"PROCEDURES_MUTATORARG_TOOLTIP": "Add an input to the function.",
|
||||
"PROCEDURES_HIGHLIGHT_DEF": "Highlight function definition",
|
||||
"PROCEDURES_CREATE_DO": "Create '%1'",
|
||||
"PROCEDURES_IFRETURN_TOOLTIP": "If a value is true, then return a second value.",
|
||||
"PROCEDURES_IFRETURN_HELPURL": "http://c2.com/cgi/wiki?GuardClause",
|
||||
"PROCEDURES_IFRETURN_WARNING": "Warning: This block may be used only within a function definition."
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue