From 0e318e42121b45394336114109b77248df4c8afa Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Wed, 27 May 2015 15:07:08 -0400 Subject: [PATCH 01/84] Upgrade FieldTextArea to latest Blockly version Refactored FieldTextArea to be based on FieldTextInput instead of Field in order to allow it to utilize the editing from FieldTextInput Updated code to latest version of Blockly including RTL usage --- blocks/text.js | 22 ++++ core/blockly.js | 1 + core/field_textarea.js | 228 ++++++++++++++++++++++++++++++++++ demos/code/index.html | 3 +- generators/dart/text.js | 9 ++ generators/javascript/text.js | 10 ++ generators/python/text.js | 10 ++ 7 files changed, 282 insertions(+), 1 deletion(-) create mode 100644 core/field_textarea.js diff --git a/blocks/text.js b/blocks/text.js index 9457258a6e6..6cbcc62a09f 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -639,3 +639,25 @@ Blockly.Blocks['text_prompt_ext'] = { }); } }; + + +Blockly.Blocks['text_comment'] = { + /** + * Block for adding in comments. + * @this Blockly.Block + */ + init: function() { + + this.setColour(160); + //this.setHelpUrl(Blockly.Msg.TEXT_PROMPT_HELPURL); + this.appendDummyInput() + .appendField('Comment:'); + this.appendDummyInput() + .appendField(new Blockly.FieldTextArea(''), 'COMMENT') + ; + this.setPreviousStatement(true); + this.setNextStatement(true); + // this.setTooltip(Blockly.Msg.TEXT_TEXT_TOOLTIP); + } +}; + diff --git a/core/blockly.js b/core/blockly.js index 7ef8e789cbf..f62726e3319 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -38,6 +38,7 @@ goog.require('Blockly.FieldColour'); goog.require('Blockly.FieldDropdown'); goog.require('Blockly.FieldImage'); goog.require('Blockly.FieldTextInput'); +goog.require('Blockly.FieldTextArea'); goog.require('Blockly.FieldVariable'); goog.require('Blockly.Generator'); goog.require('Blockly.Msg'); diff --git a/core/field_textarea.js b/core/field_textarea.js new file mode 100644 index 00000000000..3f6080be281 --- /dev/null +++ b/core/field_textarea.js @@ -0,0 +1,228 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Text input field. + * @author primary.edw@gmail.com (Andrew Mee) + * based on work in field_textinput by fraser@google.com (Neil Fraser) + * refactored by toebes@extremenetworks.com (John Toebes) + */ +'use strict'; + +goog.provide('Blockly.FieldTextArea'); + +goog.require('Blockly.FieldTextInput'); +goog.require('Blockly.Msg'); +goog.require('goog.asserts'); +goog.require('goog.dom'); +goog.require('goog.userAgent'); + + +/** + * Class for an editable text field. + * @param {string} text The initial content of the field. + * @param {Function} opt_changeHandler An optional function that is called + * to validate any constraints on what the user entered. Takes the new + * text as an argument and returns either the accepted text, a replacement + * text, or null to abort the change. + * @extends {Blockly.Field} + * @constructor + */ +Blockly.FieldTextArea = function(text, opt_changeHandler) { + Blockly.FieldTextArea.superClass_.constructor.call(this, + text, opt_changeHandler); +}; +goog.inherits(Blockly.FieldTextArea, Blockly.FieldTextInput); + +/** + * Update the text node of this field to display the current text. + * @private + */ +Blockly.FieldTextArea.prototype.updateTextNode_ = function() { + if (!this.textElement_) { + // Not rendered yet. + return; + } + var text = this.text_; + + // Empty the text element. + goog.dom.removeChildren(/** @type {!Element} */ (this.textElement_)); + + // Replace whitespace with non-breaking spaces so the text doesn't collapse. + text = text.replace(/ /g, Blockly.Field.NBSP); + if (this.sourceBlock_.RTL && text) { + // The SVG is LTR, force text to be RTL. + text += '\u200F'; + } + if (!text) { + // Prevent the field from disappearing if empty. + text = Blockly.Field.NBSP; + } + + var lines = text.split('\n'); + var dy = '0em'; + for (var i = 0; i < lines.length; i++) { + var tspanElement = Blockly.createSvgElement('tspan', + {'dy': dy, 'x': 0}, this.textElement_); + dy = '1em'; + var textNode = document.createTextNode(lines[i]); + tspanElement.appendChild(textNode); + } + + // Cached width is obsolete. Clear it. + this.size_.width = 0; +}; + +/** + * Draws the border with the correct width. + * Saves the computed width in a property. + * @private + */ +Blockly.FieldTextArea.prototype.render_ = function() { + this.size_.width = this.textElement_.getBBox().width + 5; + this.size_.height = (this.text_.split(/\n/).length ||1)*20 + + (Blockly.BlockSvg.SEP_SPACE_Y+5) ; + + if (this.borderRect_) { + this.borderRect_.setAttribute('width', + this.size_.width + Blockly.BlockSvg.SEP_SPACE_X); + this.borderRect_.setAttribute('height', + this.size_.height - (Blockly.BlockSvg.SEP_SPACE_Y+5)); + } + +}; + +/** + * Show the inline free-text editor on top of the text. + * @param {boolean=} opt_quietInput True if editor should be created without + * focus. Defaults to false. + * @private + */ +Blockly.FieldTextArea.prototype.showEditor_ = function(opt_quietInput) { + var quietInput = opt_quietInput || false; + if (!quietInput && (goog.userAgent.MOBILE || goog.userAgent.ANDROID || + goog.userAgent.IPAD)) { + // Mobile browsers have issues with in-line textareas (focus & keyboards). + var newValue = window.prompt(Blockly.Msg.CHANGE_VALUE_TITLE, this.text_); + if (this.changeHandler_) { + var override = this.changeHandler_(newValue); + if (override !== undefined) { + newValue = override; + } + } + if (newValue !== null) { + this.setText(newValue); + } + return; + } + + Blockly.WidgetDiv.show(this, this.sourceBlock_.RTL, this.widgetDispose_()); + var div = Blockly.WidgetDiv.DIV; + // Create the input. + var htmlInput = goog.dom.createDom('textarea', 'blocklyHtmlInput'); + Blockly.FieldTextInput.htmlInput_ = htmlInput; + htmlInput.style.resize = 'none'; + htmlInput.style['line-height'] = '20px'; + htmlInput.style.height = '100%'; + div.appendChild(htmlInput); + + htmlInput.value = htmlInput.defaultValue = this.text_; + htmlInput.oldValue_ = null; + this.validate_(); + this.resizeEditor_(); + if (!quietInput) { + htmlInput.focus(); + htmlInput.select(); + } + + // Bind to keydown -- trap Enter without IME and Esc to hide. + htmlInput.onKeyDownWrapper_ = + Blockly.bindEvent_(htmlInput, 'keydown', this, this.onHtmlInputKeyDown_); + // Bind to keyup -- trap Enter; resize after every keystroke. + htmlInput.onKeyUpWrapper_ = + Blockly.bindEvent_(htmlInput, 'keyup', this, this.onHtmlInputChange_); + // Bind to keyPress -- repeatedly resize when holding down a key. + htmlInput.onKeyPressWrapper_ = + Blockly.bindEvent_(htmlInput, 'keypress', this, this.onHtmlInputChange_); + var workspaceSvg = this.sourceBlock_.workspace.getCanvas(); + htmlInput.onWorkspaceChangeWrapper_ = + Blockly.bindEvent_(workspaceSvg, 'blocklyWorkspaceChange', this, + this.resizeEditor_); +}; + +/** + * Handle key down to the editor. + * @param {!Event} e Keyboard event. + * @private + */ +Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_ = function(e) { + var htmlInput = Blockly.FieldTextInput.htmlInput_; + var escKey = 27; + if (e.keyCode == escKey) { + this.setText(htmlInput.defaultValue); + Blockly.WidgetDiv.hide(); + } +}; + +/** + * Handle a change to the editor. + * @param {!Event} e Keyboard event. + * @private + */ +Blockly.FieldTextArea.prototype.onHtmlInputChange_ = function(e) { + Blockly.FieldTextInput.prototype.onHtmlInputChange_.call(this, e); + + var htmlInput = Blockly.FieldTextInput.htmlInput_; + if (e.keyCode == 27) { + // Esc + this.setText(htmlInput.defaultValue); + Blockly.WidgetDiv.hide(); + } else { + Blockly.FieldTextInput.prototype.onHtmlInputChange_.call(this, e); + this.resizeEditor_(); + } +}; + +/** + * Resize the editor and the underlying block to fit the text. + * @private + */ +Blockly.FieldTextArea.prototype.resizeEditor_ = function() { + var div = Blockly.WidgetDiv.DIV; + var bBox = this.fieldGroup_.getBBox(); + div.style.width = bBox.width + 'px'; + div.style.height = bBox.height + 'px'; + var xy = this.getAbsoluteXY_(); + // In RTL mode block fields and LTR input fields the left edge moves, + // whereas the right edge is fixed. Reposition the editor. + if (this.RTL) { + var borderBBox = this.borderRect_.getBBox(); + xy.x += borderBBox.width; + xy.x -= div.offsetWidth; + } + // Shift by a few pixels to line up exactly. + xy.y += 1; + if (goog.userAgent.WEBKIT) { + xy.y -= 3; + } + div.style.left = xy.x + 'px'; + div.style.top = xy.y + 'px'; +}; + diff --git a/demos/code/index.html b/demos/code/index.html index 9b3b22c56f2..dbea8d6d22c 100644 --- a/demos/code/index.html +++ b/demos/code/index.html @@ -186,7 +186,8 @@

Blockly‏ > - + + diff --git a/generators/dart/text.js b/generators/dart/text.js index 41c90058c71..3b1b5f6b121 100644 --- a/generators/dart/text.js +++ b/generators/dart/text.js @@ -275,3 +275,12 @@ Blockly.Dart['text_prompt_ext'] = function(block) { } return [code, Blockly.Dart.ORDER_UNARY_POSTFIX]; }; + +Blockly.Dart['text_comment'] = function(block) { + // Display comment + + var comment = block.getFieldValue('COMMENT') || ''; + var code = '/*\n' + comment + '\n*/\n'; + + return [code, Blockly.Dart.ORDER_UNARY_POSTFIX]; +}; diff --git a/generators/javascript/text.js b/generators/javascript/text.js index 20bbaacb29c..7504f534fe2 100644 --- a/generators/javascript/text.js +++ b/generators/javascript/text.js @@ -255,3 +255,13 @@ Blockly.JavaScript['text_prompt_ext'] = function(block) { } return [code, Blockly.JavaScript.ORDER_FUNCTION_CALL]; }; + + +Blockly.JavaScript['text_comment'] = function(block) { + // Display comment + + var comment = block.getFieldValue('COMMENT') || ''; + var code = '/*\n' + comment + '\n*/\n'; + + return [code, Blockly.JavaScript.ORDER_FUNCTION_CALL]; +}; diff --git a/generators/python/text.js b/generators/python/text.js index 3ab807ff184..3bae80526ed 100644 --- a/generators/python/text.js +++ b/generators/python/text.js @@ -270,3 +270,13 @@ Blockly.Python['text_prompt_ext'] = function(block) { } return [code, Blockly.Python.ORDER_FUNCTION_CALL]; }; + + +Blockly.Python['text_comment'] = function(block) { + // Display comment + + var comment = block.getFieldValue('COMMENT') || ''; + var code = '/*\n' + comment + '\n*/\n'; + + return [code, Blockly.Python.ORDER_FUNCTION_CALL]; +}; From c9eedf6796fdda662419823d996800747ad8eb43 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Tue, 30 Jun 2015 11:08:36 -0400 Subject: [PATCH 02/84] Updated to latest code Integrated Typeblock capability from AppInventor Added support for Java generators Eliminated mutators for procedures and lists --- core/drawer.js | 460 ++++++++++++++++++++ core/field_clickimage.js | 125 ++++++ core/field_scope_variable.js | 266 ++++++++++++ core/scopevariables.js | 191 ++++++++ core/typeblock.js | 695 ++++++++++++++++++++++++++++++ generators/java.js | 334 ++++++++++++++ generators/java/colour.js | 86 ++++ generators/java/lists.js | 334 ++++++++++++++ generators/java/logic.js | 128 ++++++ generators/java/loops.js | 165 +++++++ generators/java/math.js | 384 +++++++++++++++++ generators/java/procedures.js | 109 +++++ generators/java/text.js | 304 +++++++++++++ generators/java/variables.js | 119 +++++ java_compressed.js | 98 +++++ tests/generators/unittest_java.js | 160 +++++++ 16 files changed, 3958 insertions(+) create mode 100644 core/drawer.js create mode 100644 core/field_clickimage.js create mode 100644 core/field_scope_variable.js create mode 100644 core/scopevariables.js create mode 100644 core/typeblock.js create mode 100644 generators/java.js create mode 100644 generators/java/colour.js create mode 100644 generators/java/lists.js create mode 100644 generators/java/logic.js create mode 100644 generators/java/loops.js create mode 100644 generators/java/math.js create mode 100644 generators/java/procedures.js create mode 100644 generators/java/text.js create mode 100644 generators/java/variables.js create mode 100644 java_compressed.js create mode 100644 tests/generators/unittest_java.js diff --git a/core/drawer.js b/core/drawer.js new file mode 100644 index 00000000000..52208a752af --- /dev/null +++ b/core/drawer.js @@ -0,0 +1,460 @@ +// -*- mode: java; c-basic-offset: 2; -*- +// Copyright 2013-2014 MIT, All rights reserved +// Released under the Apache License, Version 2.0 +// http://www.apache.org/licenses/LICENSE-2.0 +/** + * @license + * @fileoverview Visual blocks editor for App Inventor + * Set of drawers for holding factory blocks (blocks that create + * other blocks when dragged onto the workspace). The set of drawers + * includes the built-in drawers that we get from the blocks language, as + * well as a drawer per component instance that was added to this workspace. + * + * @author mckinney@mit.edu (Andrew F. McKinney) + * @author Sharon Perl (sharon@google.com) + */ + +'use strict'; + +goog.provide('Blockly.Drawer'); + +goog.require('Blockly.Flyout'); + +// Some block drawers need to be initialized after all the javascript source is loaded because they +// use utility functions that may not yet be defined at the time their source is read in. They +// can do this by adding a field to Blockly.DrawerInit whose value is their initialization function. +// For example, see language/common/math.js. + +/** + * Create the dom for the drawer. Creates a flyout Blockly.Drawer.flyout_, + * and initializes its dom. + */ +Blockly.Drawer.createDom = function() { + Blockly.Drawer.flyout_ = new Blockly.Flyout(); + // insert the flyout after the main workspace (except, there's no + // svg.insertAfter method, so we need to insert before the thing following + // the main workspace. Neil Fraser says: this is "less hacky than it looks". + var flyoutGroup = Blockly.Drawer.flyout_.createDom(); + Blockly.svg.insertBefore(flyoutGroup, Blockly.mainWorkspace.svgGroup_.nextSibling); +}; + +/** + * Initializes the drawer by initializing the flyout and creating the + * language tree. Call after calling createDom. + */ +Blockly.Drawer.init = function() { + Blockly.Drawer.flyout_.init(Blockly.mainWorkspace, true); + for (var name in Blockly.DrawerInit) { + Blockly.DrawerInit[name](); + } + + Blockly.Drawer.languageTree = Blockly.Drawer.buildTree_(); +}; + +/** + * String to prefix on categories of each potential block in the drawer. + * Used to prevent collisions with built-in properties like 'toString'. + * @private + */ +Blockly.Drawer.PREFIX_ = 'cat_'; + +/** + * Build the hierarchical tree of block types. + * Note: taken from Blockly's toolbox.js + * @return {!Object} Tree object. + * @private + */ +Blockly.Drawer.buildTree_ = function() { + var tree = {}; + // Populate the tree structure. + for (var name in Blockly.Blocks) { + var block = Blockly.Blocks[name]; + // Blocks without a category are fragments used by the mutator dialog. + if (block.category) { + var cat = Blockly.Drawer.PREFIX_ + window.encodeURI(block.category); + if (cat in tree) { + tree[cat].push(name); + } else { + tree[cat] = [name]; + } + } + } + return tree; +}; + +/** + * Show the contents of the built-in drawer named drawerName. drawerName + * should be one of Blockly.MSG_VARIABLE_CATEGORY, + * Blockly.MSG_PROCEDURE_CATEGORY, or one of the built-in block categories. + * @param drawerName + */ +Blockly.Drawer.showBuiltin = function(drawerName) { + drawerName = Blockly.Drawer.PREFIX_ + drawerName; + var blockSet = Blockly.Drawer.languageTree[drawerName]; + if(drawerName == "cat_Procedures") { + var newBlockSet = []; + for(var i=0;i'; + if(mutatorAttributes) { + xmlString += Blockly.Drawer.mutatorAttributesToXMLString(mutatorAttributes); + } + xmlString += ''; + } + } + var xmlBlockArray = []; + var xmlFromString = Blockly.Xml.textToDom(xmlString); + // [lyn, 11/10/13] Use goog.dom.getChildren rather than .children or .childNodes + // to make this code work across browsers. + var children = goog.dom.getChildren(xmlFromString); + for(var i=0;i +// p2 +// +// +// +// +// +Blockly.Drawer.procedureCallerBlockString = function(procDeclBlock) { + var declType = procDeclBlock.type; + var callerType = (declType == 'procedures_defreturn') ? 'procedures_callreturn' : 'procedures_callnoreturn'; + var blockString = '' + var procName = procDeclBlock.getFieldValue('NAME'); + blockString += '' + procName + ''; + var mutationDom = procDeclBlock.mutationToDom(); + mutationDom.setAttribute('name', procName); // Decl doesn't have name attribute, but caller does + var mutationXmlString = Blockly.Xml.domToText(mutationDom); + blockString += mutationXmlString; + blockString += ''; + return blockString; +} + +/** + * Given the blockType and a dictionary of the mutator attributes + * either return the xml string associated with the default block + * or return null, since there are no default blocks associated with the blockType. + */ +Blockly.Drawer.getDefaultXMLString = function(blockType,mutatorAttributes) { + //return null if the + if(Blockly.Drawer.defaultBlockXMLStrings[blockType] == null) { + return null; + } + + if(Blockly.Drawer.defaultBlockXMLStrings[blockType].xmlString != null) { + //return xml string associated with block type + return Blockly.Drawer.defaultBlockXMLStrings[blockType].xmlString; + } else if(Blockly.Drawer.defaultBlockXMLStrings[blockType].length != null){ + var possibleMutatorDefaults = Blockly.Drawer.defaultBlockXMLStrings[blockType]; + var matchingAttributes; + var allMatch; + //go through each of the possible matching cases + for(var i=0;i' + + '' + + '1' + + '5' + + '1' + + '' + + '' }, + + math_random_int: {xmlString: + '' + + '' + + '1' + + '100' + + '' + + ''}, + color_make_color: {xmlString: + '' + + '' + + '' + + '' + + '' + + '255' + + '0' + + '0' + + '' + + '' + + '' + + ''}, + lists_create_with: {xmlString: + '' + + '' + + '' + + '' + + '' + + '' + + '' + + ''}, + lists_lookup_in_pairs: {xmlString: + '' + + '' + + 'not found' + + '' + + ''}, + + component_method: [ + {matchingMutatorAttributes:{component_type:"TinyDB", method_name:"GetValue"}, + mutatorXMLStringFunction: function(mutatorAttributes) { + return '' + + '' + + '' + + //mutator generator + Blockly.Drawer.mutatorAttributesToXMLString(mutatorAttributes) + + '' + + '' + + '';}}, + + // Notifer.ShowTextDialog has cancelable default to TRUE + {matchingMutatorAttributes:{component_type:"Notifier", method_name:"ShowTextDialog"}, + mutatorXMLStringFunction: function(mutatorAttributes) { + return '' + + '' + + '' + + //mutator generator + Blockly.Drawer.mutatorAttributesToXMLString(mutatorAttributes) + + 'TRUE' + + '' + + '';}}, + + // Notifer.ShowChooseDialog has cancelable default to TRUE + {matchingMutatorAttributes:{component_type:"Notifier", method_name:"ShowChooseDialog"}, + mutatorXMLStringFunction: function(mutatorAttributes) { + return '' + + '' + + '' + + //mutator generator + Blockly.Drawer.mutatorAttributesToXMLString(mutatorAttributes) + + 'TRUE' + + '' + + '';}}, + + // Canvas.DrawCircle has fill default to TRUE + {matchingMutatorAttributes:{component_type:"Canvas", method_name:"DrawCircle"}, + mutatorXMLStringFunction: function(mutatorAttributes) { + return '' + + '' + + '' + + //mutator generator + Blockly.Drawer.mutatorAttributesToXMLString(mutatorAttributes) + + 'TRUE' + + '' + + '';}} + ] +}; diff --git a/core/field_clickimage.js b/core/field_clickimage.js new file mode 100644 index 00000000000..14c67d03fdb --- /dev/null +++ b/core/field_clickimage.js @@ -0,0 +1,125 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview clickable image field. + * @author toebes@extremenetworks.com (John Toebes) + */ +'use strict'; + +goog.provide('Blockly.FieldClickImage'); + +goog.require('Blockly.FieldImage'); + +/** + * Class for a clickable image. + * @param {string} src The URL of the image. + * @param {number} width Width of the image. + * @param {number} height Height of the image. + * @param {?string} opt_alt Optional alt text for when block is collapsed. + * @param {?Function} handler A function that is executed when the + * image is selected. + * @extends {Blockly.FieldImage} + * @constructor + */ +Blockly.FieldClickImage = function(src, width, height, opt_alt, handler) { + Blockly.FieldClickImage.superClass_.constructor.call(this, + src, width, height, ''); + + this.handler_ = handler; +}; + +goog.inherits(Blockly.FieldClickImage, Blockly.FieldImage); + +/** + * Editable fields are saved by the XML renderer, non-editable fields are not. + * However we don't want to serialize it even if it is present + */ +Blockly.FieldClickImage.prototype.EDITABLE = true; +Blockly.FieldLabel.prototype.SERIALIZABLE = false; + +/** + * Mouse cursor style when over the hotspot that initiates the editor. + */ +Blockly.FieldClickImage.prototype.CURSOR = 'default'; + +/** + * Add or remove the UI indicating if this image may be clicked or not. + */ +Blockly.FieldClickImage.prototype.updateEditable = function() { + if (this.sourceBlock_.isInFlyout || !this.EDITABLE) { + Blockly.addClass_(/** @type {!Element} */ (this.fieldGroup_), + 'blocklyIconGroupReadonly'); + } else { + Blockly.removeClass_(/** @type {!Element} */ (this.fieldGroup_), + 'blocklyIconGroupReadonly'); + } +}; + +/** + * Install this field on a block. + * @param {!Blockly.Block} block The block containing this field. + */ +Blockly.FieldClickImage.prototype.init = function(block) { + if (this.sourceBlock_) { + // Image has already been initialized once. + return; + } + Blockly.FieldClickImage.superClass_.init.call(this, block); + + // We want to use the styling of an Icon to indicate clickability + Blockly.addClass_(/** @type {!Element} */ (this.fieldGroup_), + 'blocklyIconGroup'); + // + // Update the classes for this to appear editable + this.updateEditable(); + // And bind to the mouseup so that we can get called for a click + this.mouseUpWrapper_ = + Blockly.bindEvent_(this.fieldGroup_, 'mouseup', this, this.onMouseUp_); + // Force a render. + this.updateTextNode_(); +} + +/** + * Clone this FieldClickImage. + * @return {!Blockly.FieldClickImage} The result of calling the constructor again + * with the current values of the arguments used during construction. + */ +Blockly.FieldClickImage.prototype.clone = function() { + return new Blockly.FieldClickImage(this.handler_, + this.rootBlock_, this.name_, this.pos_); +}; + +/** + * Take the action of the block + * Note that this does swap out the dragMode_ variable because we know that + * We only get invoked when we aren't actually dragging (otherwise the click + * would be consumed by the drag code). Once we return, there is a small amount + * of cleanup which needs to complete + * @private + */ +Blockly.FieldClickImage.prototype.showEditor_ = function() { + if (this.handler_) { + var saveDragMode = Blockly.dragMode_; + Blockly.dragMode_ = 0; + this.handler_(this, this.sourceBlock_); + Blockly.dragMode_ = saveDragMode; + } +}; diff --git a/core/field_scope_variable.js b/core/field_scope_variable.js new file mode 100644 index 00000000000..1d3ebf3cc5d --- /dev/null +++ b/core/field_scope_variable.js @@ -0,0 +1,266 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Variable input field. + * @author toebes@extremenetworks.com + * based on field_variable.js by fraser@google.com (Neil Fraser) + */ +'use strict'; + +goog.provide('Blockly.FieldScopeVariable'); + +goog.require('Blockly.FieldDropdown'); +goog.require('Blockly.Msg'); +goog.require('Blockly.ScopeVariables'); +goog.require('goog.string'); + + +/** + * Class for a variable's dropdown field. + * @param {?string} varclass The default name for the variable. If null, + * a unique variable name will be generated. + * @param {Function} opt_changeHandler A function that is executed when a new + * option is selected. Its sole argument is the new option value. Its + * return value is ignored. + * @extends {Blockly.FieldDropdown} + * @constructor + */ +Blockly.FieldScopeVariable = function(varclass, opt_changeHandler) { + var changeHandler; + if (opt_changeHandler) { + // Wrap the user's change handler together with the variable rename handler. + var thisObj = this; + changeHandler = function(value) { + var retVal = Blockly.FieldScopeVariable.dropdownChange.call(thisObj, value); + var newVal; + if (retVal === undefined) { + newVal = value; // Existing variable selected. + } else if (retVal === null) { + newVal = thisObj.getValue(); // Abort, no change. + } else { + newVal = retVal; // Variable name entered. + } + opt_changeHandler.call(thisObj, newVal); + return retVal; + }; + } else { + changeHandler = Blockly.FieldScopeVariable.dropdownChange; + } + this.msgRename_ = Blockly.Msg.RENAME_SCOPE_VARIABLE; + this.msgRenameTitle_ = Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE; + this.msgNew_ = Blockly.Msg.NEW_SCOPE_VARIABLE; + this.msgNewTitle_ = Blockly.Msg.NEW_SCOPE_VARIABLE_TITLE; + this.msgEmpty_ = null; + + this.setVarClass(varclass); + this.setValue(this.getVarClass()[0]); + + Blockly.FieldScopeVariable.superClass_.constructor.call(this, + Blockly.FieldScopeVariable.dropdownCreate, changeHandler); + +}; +goog.inherits(Blockly.FieldScopeVariable, Blockly.FieldDropdown); + +Blockly.FieldScopeVariable.prototype.init +/** + * Install this dropdown on a block. + * @param {!Blockly.Block} block The block containing this text. + */ +Blockly.FieldScopeVariable.prototype.init = function(block) { + if (this.sourceBlock_) { + // Dropdown has already been initialized once. + return; + } + + if (!this.getValue()) { + // Variables without names get uniquely named for this workspace. + if (block.isInFlyout) { + var workspace = block.workspace.targetWorkspace; + } else { + var workspace = block.workspace; + } + this.setValue(Blockly.ScopeVariables.generateUniqueName(workspace, + this.getVarClass())); + } + Blockly.FieldScopeVariable.superClass_.init.call(this, block); +}; + +/** + * Clone this FieldScopeVariable. + * @return {!Blockly.FieldScopeVariable} The result of calling the constructor again + * with the current values of the arguments used during construction. + */ +Blockly.FieldScopeVariable.prototype.clone = function() { + return new Blockly.FieldScopeVariable(this.getValue(), this.changeHandler_); +}; + +/** + * Get the variable's name (use a variableDB to convert into a real name). + * Unline a regular dropdown, variables are literal and have no neutral value. + * @return {string} Current text. + */ +Blockly.FieldScopeVariable.prototype.getValue = function() { + var result = this.getText(); + if (result === this.msgEmpty_) { + result = ''; + } + return result; +}; + +/** + * Set the variable name. + * @param {string} text New text. + */ +Blockly.FieldScopeVariable.prototype.setValue = function(text) { + this.value_ = text; + this.setText(text); +}; + +/** + * Get the variable's name (use a variableDB to convert into a real name). + * Unline a regular dropdown, variables are literal and have no neutral value. + * @return {array} Array of classes + */ +Blockly.FieldScopeVariable.prototype.getVarClass = function() { + return this.varClass_; +}; + +/** + * Set the variable name. + * @param {string} text New text. + */ +Blockly.FieldScopeVariable.prototype.setVarClass = function(varclass) { + if (typeof varclass === "string") { + this.varClass_ = [ varclass ]; + } else { + this.varClass_ = varclass; + } +}; + +/** + * Set the variable prompt titles. + * @param {string} text New text. + */ +Blockly.FieldScopeVariable.prototype.setMsgStrings = function( + msgRename, msgRenameTitle, msgNew, msgNewTitle) { + this.msgRename_ = msgRename; + this.msgRenameTitle_ = msgRenameTitle; + this.msgNew_ = msgNew; + this.msgNewTitle_ = msgNewTitle; +}; + +Blockly.FieldScopeVariable.prototype.setMsgEmpty = function( + msgEmpty) { + this.msgEmpty_ = msgEmpty; +}; + +/** + * Return a sorted list of variable names for variable dropdown menus. + * Include a special option at the end for creating a new variable name. + * @return {!Array.} Array of variable names. + * @this {!Blockly.FieldScopeVariable} + */ +Blockly.FieldScopeVariable.dropdownCreate = function() { + if (this.sourceBlock_ && this.sourceBlock_.workspace) { + var variableList = + Blockly.ScopeVariables.allVariables(this.sourceBlock_.workspace, + this.getVarClass()); + } else { + var variableList = []; + } + // Ensure that the currently selected variable is an option. + var name = this.getText(); + if (name && variableList.indexOf(name) == -1) { + variableList.push(name); + } + variableList.sort(goog.string.caseInsensitiveCompare); + if (name && this.msgRename_) { + variableList.push(this.msgRename_); + } + if (this.msgNew_) { + variableList.push(this.msgNew_); + } + // Never leave an empty array. The callers expect at least one item + if (goog.array.isEmpty(variableList)) { + variableList.push(''); + } + + // Variables are not language-specific, use the name as both the user-facing + // text and the internal representation. + var options = []; + if (this.msgEmpty_) { + options.push([this.msgEmpty_, '']); + } + for (var x = 0; x < variableList.length; x++) { + options.push([variableList[x], variableList[x]]); + } + return options; +}; + +/** + * Event handler for a change in variable name. + * Special case the 'New variable...' and 'Rename variable...' options. + * In both of these special cases, prompt the user for a new name. + * @param {string} text The selected dropdown menu option. + * @return {null|undefined|string} An acceptable new variable name, or null if + * change is to be either aborted (cancel button) or has been already + * handled (rename), or undefined if an existing variable was chosen. + * @this {!Blockly.FieldScopeVariable} + */ +Blockly.FieldScopeVariable.dropdownChange = function(text) { + var me = this; + function promptName(promptText, defaultText) { + Blockly.hideChaff(); + var newVar = window.prompt(promptText, defaultText); + // Merge runs of whitespace. Strip leading and trailing whitespace. + // Beyond this, all names are legal. + if (newVar) { + newVar = newVar.replace(/[\s\xa0]+/g, ' ').replace(/^ | $/g, ''); + if (newVar === me.msgRename_ || + newVar === me.msgNew_) { + // Ok, not ALL names are legal... + newVar = null; + } + } + return newVar; + } + var workspace = this.sourceBlock_.workspace; + if (text === this.msgRename_) { + var oldVar = this.getText(); + text = promptName(this.msgRenameTitle_.replace('%1', oldVar), oldVar); + if (text) { + Blockly.ScopeVariables.renameVariable(oldVar, text, workspace, + this.getVarClass()); + } + return null; + } else if (text === this.msgNew_) { + text = promptName(this.msgNewTitle_, ''); + // Since variables are case-insensitive, ensure that if the new variable + // matches with an existing variable, the new case prevails throughout. + if (text) { + Blockly.ScopeVariables.renameVariable(text, text, workspace, + this.getVarClass()); + return text; + } + return null; + } + return undefined; +}; diff --git a/core/scopevariables.js b/core/scopevariables.js new file mode 100644 index 00000000000..a8af56f04e2 --- /dev/null +++ b/core/scopevariables.js @@ -0,0 +1,191 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Utility functions for handling variables. + * @author fraser@google.com (Neil Fraser) + */ +'use strict'; + +goog.provide('Blockly.ScopeVariables'); + +// TODO(scr): Fix circular dependencies +// goog.require('Blockly.Block'); +goog.require('Blockly.Workspace'); +goog.require('goog.string'); + + +/** + * Category to separate variable names from procedures and generated functions. + */ +Blockly.ScopeVariables.NAME_TYPE = 'SCOPEVARIABLE'; + +/** + * Find all user-created variables. + * @param {!Blockly.Block|!Blockly.Workspace} root Root block or workspace. + * @return {!Array.} Array of variable names. + */ +Blockly.ScopeVariables.allVariables = function(root, varclass) { + var blocks; + if (root.getDescendants) { + // Root is Block. + blocks = root.getDescendants(); + } else if (root.getAllBlocks) { + // Root is Workspace. + blocks = root.getAllBlocks(); + } else { + throw 'Not Block or Workspace: ' + root; + } + var variableHash = Object.create(null); + // Iterate through every block and add each variable to the hash. + for (var x = 0; x < blocks.length; x++) { + var func = blocks[x].getScopeVars; + if (func) { + for(var i = 0; i < varclass.length; i++) { + var blockVariables = func.call(blocks[x], varclass[i]); + for (var y = 0; y < blockVariables.length; y++) { + var varName = blockVariables[y]; + // Variable name may be null if the block is only half-built. + if (varName) { + variableHash[varName.toLowerCase()] = varName; + } + } + } + } + } + // Flatten the hash into a list. + var variableList = []; + for (var name in variableHash) { + variableList.push(variableHash[name]); + } + return variableList; +}; + +/** + * Find all instances of the specified variable and rename them. + * @param {string} oldName Variable to rename. + * @param {string} newName New variable name. + * @param {!Blockly.Workspace} workspace Workspace rename variables in. + */ +Blockly.ScopeVariables.renameVariable = function(oldName, newName, + workspace, varclass) { + var blocks = workspace.getAllBlocks(); + // Iterate through every block. + for (var x = 0; x < blocks.length; x++) { + var func = blocks[x].renameScopeVar; + if (func) { + for (var i = 0; i < varclass.length; i++) { + func.call(blocks[x], oldName, newName, varclass[i]); + } + } + } +}; + +/** + * Construct the blocks required by the flyout for the variable category. + * @param {!Array.} blocks List of blocks to show. + * @param {!Array.} gaps List of widths between blocks. + * @param {number} margin Standard margin width for calculating gaps. + * @param {!Blockly.Workspace} workspace The flyout's workspace. + */ +Blockly.ScopeVariables.flyoutCategory = function(blocks, gaps, margin, + workspace, varclass) { + var variableList = Blockly.ScopeVariables.allVariables(workspace.targetWorkspace, + varclass); + variableList.sort(); // goog.string.caseInsensitiveCompare); + // In addition to the user's variables, we also want to display the default + // variable name at the top. We also don't want this duplicated if the + // user has created a variable of the same name. + variableList.unshift(null); + var defaultVariable = undefined; + for (var i = 0; i < variableList.length; i++) { + if (variableList[i] === defaultVariable) { + continue; + } + var getBlock = Blockly.Blocks['variables_get'] ? + Blockly.Block.obtain(workspace, 'variables_get') : null; + getBlock && getBlock.initSvg(); + var setBlock = Blockly.Blocks['variables_set'] ? + Blockly.Block.obtain(workspace, 'variables_set') : null; + setBlock && setBlock.initSvg(); + if (variableList[i] === null) { + defaultVariable = (getBlock || setBlock).getVars()[0]; + } else { + getBlock && getBlock.setFieldValue(variableList[i], 'VAR'); + setBlock && setBlock.setFieldValue(variableList[i], 'VAR'); + } + setBlock && blocks.push(setBlock); + getBlock && blocks.push(getBlock); + if (getBlock && setBlock) { + gaps.push(margin, margin * 3); + } else { + gaps.push(margin * 2); + } + } +}; + +/** +* Return a new variable name that is not yet being used. This will try to +* generate single letter variable names in the range 'i' to 'z' to start with. +* If no unique name is located it will try 'i' to 'z', 'a' to 'h', +* then 'i2' to 'z2' etc. Skip 'l'. + * @param {!Blockly.Workspace} workspace The workspace to be unique in. +* @return {string} New variable name. +*/ +Blockly.ScopeVariables.generateUniqueName = function(workspace, varclass) { + var variableList = Blockly.ScopeVariables.allVariables(workspace,varclass); + var newName = ''; + if (variableList.length) { + var nameSuffix = 1; + var letters = 'ijkmnopqrstuvwxyzabcdefgh'; // No 'l'. + var letterIndex = -1; + var potName = varclass[0]; + while (!newName) { + var inUse = false; + for (var i = 0; i < variableList.length; i++) { + if (variableList[i].toLowerCase() == potName) { + // This potential name is already used. + inUse = true; + break; + } + } + if (inUse) { + // Try the next potential name. + letterIndex++; + if (letterIndex == letters.length) { + // Reached the end of the character sequence so back to 'i'. + // a new suffix. + letterIndex = 0; + nameSuffix++; + } + potName = varclass[0]+letters.charAt(letterIndex); + if (nameSuffix > 1) { + potName += nameSuffix; + } + } else { + // We can use the current potential name. + newName = potName; + } + } + } else { + newName = 'i'; + } + return newName; +}; diff --git a/core/typeblock.js b/core/typeblock.js new file mode 100644 index 00000000000..092039419f8 --- /dev/null +++ b/core/typeblock.js @@ -0,0 +1,695 @@ +//Copyright 2013 Massachusetts Institute of Technology. All rights reserved. + +/** + * @fileoverview File to handle 'Type Blocking'. When the user starts typing the + * name of a Block in the workspace, a series of suggestions will appear. Upon + * selecting one (enter key), the chosen block will be created in the workspace + * This file needs additional configuration through the inject method. + * @author josmasflores@gmail.com (Jose Dominguez) + */ +'use strict'; + +goog.provide('Blockly.TypeBlock'); +goog.require('Blockly.Xml'); + +goog.require('goog.events'); +goog.require('goog.events.KeyCodes'); +goog.require('goog.events.KeyHandler'); +goog.require('goog.ui.ac'); +goog.require('goog.style'); +goog.require('Blockly.Drawer'); + +goog.require('goog.ui.ac.ArrayMatcher'); +goog.require('goog.ui.ac.AutoComplete'); +goog.require('goog.ui.ac.InputHandler'); +goog.require('goog.ui.ac.Renderer'); + +/** + * Main Type Block function for configuration. + * @param {Object} htmlConfig an object of the type: + { + typeBlockDiv: 'ai_type_block', + inputText: 'ac_input_text' + } + * stating the ids of the attributes to be used in the html enclosing page + * create a new block + */ +Blockly.TypeBlock = function( htmlConfig ){ + Blockly.TypeBlock.typeBlockDiv_ = + goog.dom.getElement(htmlConfig['typeBlockDiv']); + Blockly.TypeBlock.inputText_ = + goog.dom.getElement(htmlConfig['inputText']); + Blockly.TypeBlock.createAutoComplete_(); +}; + +/** + * DOM Element for the Div where the type block panel will be rendered + * @private + */ +Blockly.TypeBlock.typeBlockDiv_ = null; + +/** + * DOM Element for the input text contained in the type block panel + * @private + */ +Blockly.TypeBlock.inputText_ = null; + +/** + * Is the Type Block panel currently showing? + */ +Blockly.TypeBlock.visible = false; + +/** + * Mapping of options to show in the auto-complete panel. This maps the + * canonical name of the block, needed to create a new Blockly.Block, with the + * internationalised word or sentence used in typeblocks. Certain blocks do not + * only need the canonical block representation, but also values for dropdowns + * (name and value) + * - No dropdowns: this.typeblock: [{ translatedName: Blockly.LANG_VAR }] + * - With dropdowns: this.typeblock: [{ translatedName: Blockly.LANG_VAR }, + * dropdown: { + * titleName: 'TITLE', value: 'value' + * }] + * - Additional types can be used to mark a block as isProcedure or + * isGlobalVar. These are only used to manage the loading of options in the + * auto-complete matcher. + * @private + */ +Blockly.TypeBlock.TBOptions_ = {}; + +/** + * This array contains only the Keys of Blockly.TypeBlock.TBOptions_ to be used + * as options in the autocomplete widget. + * @private + */ +Blockly.TypeBlock.TBOptionsNames_ = []; + +/** + * pointer to the automcomplete widget to be able to change its contents when + * the Language tree is modified (additions, renaming, or deletions) + * @private + */ +Blockly.TypeBlock.ac_ = null; + +/** + * We keep a listener pointer in case of needing to unlisten to it. We only want + * one listener at a time, and a reload could create a second one, so we + * unlisten first and then listen back + * @private + */ +Blockly.TypeBlock.currentListener_ = null; + +Blockly.TypeBlock.onKeyDown_ = function(e){ + if (!Blockly.TypeBlock.typeBlockDiv_) { + return; + } + if (e.altKey || e.ctrlKey || e.metaKey || e.keycode === 9) { // 9 is tab + return; + } + + // A way to know if the user is editing a block or trying to type a new one +// if (e.target.id === '') return; + if (goog.style.isElementShown(Blockly.TypeBlock.typeBlockDiv_)) { + // Pressing esc closes the context menu. + if (e.keyCode == 27) { + Blockly.TypeBlock.hide(); + } + // Enter in the panel makes it select an option + if (e.keyCode === 13) { + Blockly.TypeBlock.hide(); + } + } else if (isCharacterKey(e.charCode)) { + Blockly.TypeBlock.show(); + // Can't seem to make Firefox display first character, so keep all browsers + // from automatically displaying the first character and add it manually. + e.preventDefault(); + if (typeof e.key === 'undefined' || e.key === 'MozPrintableKey') { + Blockly.TypeBlock.inputText_.value = + String.fromCharCode(e.charCode !== 0 ? e.charCode : e.keyCode); +// goog.events.KeyCodes.normalizeKeyCode(e.keyCode)); + } else { + Blockly.TypeBlock.inputText_.value = e.key; + } + } +}; + +/** + * function to hide the autocomplete panel. Also used from hideChaff in + * Blockly.js + */ +Blockly.TypeBlock.hide = function(){ + if (Blockly.TypeBlock.visible) { + Blockly.TypeBlock.visible = false; + Blockly.TypeBlock.ac_.dismiss(); + goog.style.showElement(Blockly.TypeBlock.typeBlockDiv_, false); + } +}; + +/** + * function to show the auto-complete panel to start typing block names + */ +Blockly.TypeBlock.show = function(){ + if (!Blockly.TypeBlock.visible) { + Blockly.TypeBlock.lazyLoadOfOptions_(); + + var inputHandler = Blockly.TypeBlock.ac_.getSelectionHandler(); + var svg = Blockly.getMainWorkspace().options.svg; + var svgPosition = goog.style.getPageOffset(svg); + + var x = Blockly.latestClick.x - svgPosition.x; + var y = Blockly.latestClick.y - svgPosition.y; + + goog.style.setPosition(Blockly.TypeBlock.typeBlockDiv_, x, y); + goog.style.showElement(Blockly.TypeBlock.typeBlockDiv_, true); + Blockly.TypeBlock.inputText_.value = ''; + Blockly.TypeBlock.inputText_.focus(); + inputHandler.processFocus(Blockly.TypeBlock.inputText_); + Blockly.TypeBlock.visible = true; + } +}; + +/** + * Used as an optimisation trick to avoid reloading components and built-ins + * unless there is a real need to do so. needsReload.components can be set to + * true when a component changes. + * Defaults to true so that it loads the first time (set to null after loading + * in lazyLoadOfOptions_()) + * @type {{components: boolean}} + */ +Blockly.TypeBlock.needsReload = { + components: true +}; + +/** + * Lazily loading options because some of them are not available during + * bootstrapping, and some users will never use this functionality, so we avoid + * having to deal with changes such as handling renaming of variables and + * procedures (leaving it until the moment they are used, if ever). + * @private + */ +Blockly.TypeBlock.lazyLoadOfOptions_ = function () { + + // Optimisation to avoid reloading all components and built-in objects unless + // it is needed. + // needsReload.components is setup when adding/renaming/removing a component + // in components.js + if (this.needsReload.components){ + Blockly.TypeBlock.generateOptions(); + this.needsReload.components = null; + } + Blockly.TypeBlock.loadGlobalVariables_(); + Blockly.TypeBlock.loadProcedures_(); + this.reloadOptionsAfterChanges_(); +}; + +/** + * This function traverses the Language tree and re-creates all the options + * available for type blocking. It's needed in the case of modifying the + * Language tree after its creation (adding or renaming components, for instance). + * It also loads all the built-in blocks. + * + * call 'reloadOptionsAfterChanges_' after calling this. The function + * lazyLoadOfOptions_ is an example of how to call this function. + */ +Blockly.TypeBlock.generateOptions = function() { + + var buildListOfOptions = function() { + var listOfOptions = {}; + var typeblockArray; + for (var name in Blockly.Blocks) { + var block = Blockly.Blocks[name]; + if(block.typeblock){ + typeblockArray = block.typeblock; + if(typeof block.typeblock == "function") { + typeblockArray = block.typeblock(); + } + createOption(typeblockArray, name); + } + } + + function createOption(tb, canonicName){ + if (tb){ + goog.array.forEach(tb, function(dd){ + var dropDownValues = {}; + var mutatorAttributes = {}; + if (dd.dropDown){ + if (dd.dropDown.titleName && dd.dropDown.value){ + dropDownValues.titleName = dd.dropDown.titleName; + dropDownValues.value = dd.dropDown.value; + } + else { + throw new Error('TypeBlock not correctly set up for ' + canonicName); + } + } + if(dd.mutatorAttributes) { + mutatorAttributes = dd.mutatorAttributes; + } + listOfOptions[dd.translatedName] = { + canonicName: canonicName, + dropDown: dropDownValues, + mutatorAttributes: mutatorAttributes + }; + }); + } + } + + return listOfOptions; + }; + + // This is called once on startup, and it will contain all built-in blocks. + // After that, it can be called on demand + // (for instance in the function lazyLoadOfOptions_) + Blockly.TypeBlock.TBOptions_ = buildListOfOptions(); +}; + +/** + * This function reloads all the latest changes that might have occurred in the + * language tree or the structures containing procedures and variables. It only + * needs to be called once even if different sources are being updated at the + * same time (call on load proc, load vars, and generate options, only needs + * one call of this function; and example of that is lazyLoadOfOptions_ + * @private + */ +Blockly.TypeBlock.reloadOptionsAfterChanges_ = function () { + Blockly.TypeBlock.TBOptionsNames_ = goog.object.getKeys(Blockly.TypeBlock.TBOptions_); + goog.array.sort(Blockly.TypeBlock.TBOptionsNames_); + Blockly.TypeBlock.ac_.matcher_.setRows(Blockly.TypeBlock.TBOptionsNames_); +}; + +/** + * Loads all procedure names as options for TypeBlocking. It is used lazily + * from show(). + * Call 'reloadOptionsAfterChanges_' after calling this one. The function + * lazyLoadOfOptions_ is an example of how to call this function. + * @private + */ +Blockly.TypeBlock.loadProcedures_ = function(){ + // Clean up any previous procedures in the list. + Blockly.TypeBlock.TBOptions_ = goog.object.filter(Blockly.TypeBlock.TBOptions_, + function(opti){ return !opti.isProcedure;}); + + var procsNoReturn = createTypeBlockForProcedures_(false); + goog.array.forEach(procsNoReturn, function(pro){ + Blockly.TypeBlock.TBOptions_[pro.translatedName] = { + canonicName: 'procedures_callnoreturn', + dropDown: pro.dropDown, + isProcedure: true // this attribute is used to clean up before reloading + }; + }); + + var procsReturn = createTypeBlockForProcedures_(true); + goog.array.forEach(procsReturn, function(pro){ + Blockly.TypeBlock.TBOptions_[pro.translatedName] = { + canonicName: 'procedures_callreturn', + dropDown: pro.dropDown, + isProcedure: true + }; + }); + + /** + * Procedure names can be collected for both 'with return' and 'no return' + * varieties from getProcedureNames() + * @param {boolean} withReturn indicates if the query us for 'with':true + * or 'no':false return + * @returns {Array} array of the procedures requested + * @private + */ + function createTypeBlockForProcedures_(withReturn) { + var options = []; + var procNamesArray = Blockly.Procedures.allProcedures(Blockly.mainWorkspace); + var procNames; + if (withReturn) { + procNames = procNamesArray[0]; + } else { + procNames = procNamesArray[1]; + } + goog.array.forEach(procNames, function(proc){ + options.push( + { + translatedName: Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL + ' ' + proc[0], + dropDown: { + titleName: 'PROCNAME', + value: proc[0] + } + } + ); + }); + return options; + } +}; + +/** + * Loads all global variable names as options for TypeBlocking. It is used + * lazily from show(). + * Call 'reloadOptionsAfterChanges_' after calling this one. The function + * lazyLoadOfOptions_ is an example of how to call this function. + */ +Blockly.TypeBlock.loadGlobalVariables_ = function () { + //clean up any previous procedures in the list + Blockly.TypeBlock.TBOptions_ = goog.object.filter(Blockly.TypeBlock.TBOptions_, + function(opti){ return !opti.isGlobalvar;}); + + var globalVarNames = createTypeBlockForVariables_(); + goog.array.forEach(globalVarNames, function(varName){ + var canonicalN; + if (varName.translatedName.substring(0,3) === 'get') + canonicalN = 'lexical_variable_get'; + else + canonicalN = 'lexical_variable_set'; + Blockly.TypeBlock.TBOptions_[varName.translatedName] = { + canonicName: canonicalN, + dropDown: varName.dropDown, + isGlobalvar: true + }; + }); + + /** + * Create TypeBlock options for global variables (a setter and a getter for each). + * @returns {Array} array of global var options + */ + function createTypeBlockForVariables_() { + var options = []; +// var varNames = Blockly.FieldLexicalVariable.getGlobalNames(); + var varNames = Blockly.Variables.allVariables(Blockly.mainWorkspace); + // Make a setter and a getter for each of the names + goog.array.forEach(varNames, function(varName){ + options.push( + { + translatedName: 'get global ' + varName, + dropDown: { + titleName: 'VAR', + value: 'global ' + varName + } + } + ); + options.push( + { + translatedName: 'set global ' + varName, + dropDown: { + titleName: 'VAR', + value: 'global ' + varName + } + } + ); + }); + return options; + } +}; + +Blockly.TypeBlock.autoCompleteSelected = function() { + var blockName = Blockly.TypeBlock.inputText_.value; + var blockToCreate = goog.object.get(Blockly.TypeBlock.TBOptions_, blockName); + if (!blockToCreate) { + //If the input passed is not a block, check if it is a number + // or a pre-populated text block + var numberReg = new RegExp('^-?[0-9]\\d*(\.\\d+)?$', 'g'); + var numberMatch = numberReg.exec(blockName); + var textReg = new RegExp('^[\"|\']+', 'g'); + var textMatch = textReg.exec(blockName); + if (numberMatch && numberMatch.length > 0){ + blockToCreate = { + canonicName: 'math_number', + dropDown: { + titleName: 'NUM', + value: blockName + } + }; + } + else if (textMatch && textMatch.length === 1){ + blockToCreate = { + canonicName: 'text', + dropDown: { + titleName: 'TEXT', + value: blockName.substring(1) + } + }; + } + else + return; // block does not exist: return + } + + var blockToCreateName = ''; + var block; + if (blockToCreate.dropDown){ + //All blocks should have a dropDown property, even if empty + blockToCreateName = blockToCreate.canonicName; + // components have mutator attributes we need to deal with. + // We can also add these for special blocks + // e.g., this is done for create empty list + var xmlString = Blockly.Drawer.getDefaultXMLString( + blockToCreate.canonicName, + blockToCreate.mutatorAttributes); + var xml; + if (xmlString === null) { + var blockType = blockToCreate.canonicName; + if (blockType == 'procedures_callnoreturn' || + blockType == 'procedures_callreturn') { + xmlString = Blockly.Drawer.procedureCallersXMLString( + blockType == 'procedures_callreturn'); + } else { + xmlString = ''; + if(!goog.object.isEmpty(blockToCreate.mutatorAttributes)) { + xmlString += Blockly.Drawer.mutatorAttributesToXMLString( + blockToCreate.mutatorAttributes); + } + xmlString += ''; + } + } + xml = Blockly.Xml.textToDom(xmlString); + var xmlBlock = xml.firstChild; + if (xml.childNodes.length > 1 && + Blockly.TypeBlock.inputText_.value === 'make a list') + xmlBlock = xml.childNodes[1]; + block = Blockly.Xml.domToBlock(Blockly.mainWorkspace, xmlBlock); + + if (blockToCreate.dropDown.titleName && blockToCreate.dropDown.value){ + block.setFieldValue(blockToCreate.dropDown.value, + blockToCreate.dropDown.titleName); + // change type checking for split blocks + if(blockToCreate.dropDown.value == 'SPLITATFIRST' || + blockToCreate.dropDown.value == 'SPLIT') { + block.getInput("AT").setCheck('String'); + } else if(blockToCreate.dropDown.value == 'SPLITATFIRSTOFANY' || + blockToCreate.dropDown.value == 'SPLITATANY') { + block.getInput("AT").setCheck('Array'); + } + } + } else { + throw new Error('Type Block not correctly set up for: ' + blockToCreateName); + } + // Blockly.WarningHandler.checkAllBlocksForWarningsAndErrors(); + block.render(); + var blockSelected = Blockly.selected; + var selectedX, selectedY, selectedXY; + if (blockSelected) { + selectedXY = blockSelected.getRelativeToSurfaceXY(); + selectedX = selectedXY.x; + selectedY = selectedXY.y; + Blockly.TypeBlock.connectIfPossible(blockSelected, block); + if(!block.parentBlock_){ + //Place it close but a bit out of the way from the one we created. + block.moveBy(Blockly.selected.getRelativeToSurfaceXY().x + 110, + Blockly.selected.getRelativeToSurfaceXY().y + 50); + } + block.select(); + } + else { + //calculate positions relative to the view and the latest click + var svg = Blockly.getMainWorkspace().options.svg; + var svgPosition = goog.style.getPageOffset(svg); + var tbwidth = Blockly.getMainWorkspace().toolbox_.width; + + var left = Blockly.mainWorkspace.getMetrics().viewLeft + + Blockly.latestClick.x - svgPosition.x - tbwidth; + var top = Blockly.mainWorkspace.getMetrics().viewTop + + Blockly.latestClick.y - svgPosition.y; + block.moveBy(left, top); + block.select(); + } + Blockly.TypeBlock.hide(); +} + +/** + * Creates the auto-complete panel, powered by Google Closure's ac widget + * @private + */ +Blockly.TypeBlock.createAutoComplete_ = function(){ + Blockly.TypeBlock.TBOptionsNames_ = + goog.object.getKeys( Blockly.TypeBlock.TBOptions_ ); + goog.array.sort(Blockly.TypeBlock.TBOptionsNames_); + //if there is a key, unlisten + goog.events.unlistenByKey(Blockly.TypeBlock.currentListener_); + if (Blockly.TypeBlock.ac_) { + Blockly.TypeBlock.ac_.dispose(); //Make sure we only have 1 at a time + } + + // 3 objects needed to create a goog.ui.ac.AutoComplete instance + var matcher = new Blockly.TypeBlock.ac.AIArrayMatcher( + Blockly.TypeBlock.TBOptionsNames_, false); + var renderer = new goog.ui.ac.Renderer(); + var inputHandler = new goog.ui.ac.InputHandler(null, null, false); + + Blockly.TypeBlock.ac_ = new goog.ui.ac.AutoComplete(matcher, renderer, + inputHandler); + Blockly.TypeBlock.ac_.setMaxMatches(100); + inputHandler.attachAutoComplete(Blockly.TypeBlock.ac_); + inputHandler.attachInputs(Blockly.TypeBlock.inputText_); + + Blockly.TypeBlock.currentListener_ = + goog.events.listen(Blockly.TypeBlock.ac_, + goog.ui.ac.AutoComplete.EventType.UPDATE, + Blockly.TypeBlock.autoCompleteSelected + ); + goog.events.listen(Blockly.TypeBlock.ac_, + goog.ui.ac.AutoComplete.EventType.DISMISS, + Blockly.TypeBlock.hide); +}; + +/** + * Blocks connect in different ways; a block with an outputConnection such as + * a number will connect in one of its parent's input connection (inputLis). . + * A block with no outputConnection could be connected to its parent's next + * connection. + */ +Blockly.TypeBlock.connectIfPossible = function(blockSelected, createdBlock) { + var i = 0, + inputList = blockSelected.inputList, + ilLength = inputList.length; + + //If createdBlock has an output connection, we need to: + // connect to parent (eg: connect equals into if) + //else we need to: + // connect its previousConnection to parent (eg: connect if to if) + for (i = 0; i < ilLength; i++) { + try { + if (createdBlock.outputConnection != null) { + //Check for type validity (connect does not do it) + if (inputList[i].connection && + inputList[i].connection.checkType_(createdBlock.outputConnection)) { + // is connection empty? + if (!inputList[i].connection.targetConnection){ + createdBlock.outputConnection.connect(inputList[i].connection); + break; + } + } + } else { + createdBlock.previousConnection.connect(inputList[i].connection); + } + } catch(e) { + // We can ignore these exceptions; they happen when connecting two blocks + // that should not be connected. + } + } + if (createdBlock.parentBlock_ !== null) return; //Already connected --> return + + // Are both blocks statement blocks? + // If so, connect created block below the selected block + if (blockSelected.outputConnection == null && + createdBlock.outputConnection == null) { + createdBlock.previousConnection.connect(blockSelected.nextConnection); + return; + } + + // No connections? Try the parent (if it exists) + if (blockSelected.parentBlock_) { + //Is the parent block a statement? + if (blockSelected.parentBlock_.outputConnection == null) { + // Is the created block a statment? + // If so, connect it below the parent block, which is a statement + if(createdBlock.outputConnection == null) { + blockSelected.parentBlock_.nextConnection.connect( + createdBlock.previousConnection); + return; + //If it's not, no connections should be made + } else return; + } else { + // try the parent for other connections + Blockly.TypeBlock.connectIfPossible(blockSelected.parentBlock_, + createdBlock); + // recursive call: creates the inner functions again, + // but should not be much overhead; if it is, optimise! + } + } +}; + +//-------------------------------------- +// A custom matcher for the auto-complete widget that can handle numbers as well +// as the default functionality of goog.ui.ac.ArrayMatcher +goog.provide('Blockly.TypeBlock.ac.AIArrayMatcher'); + +goog.require('goog.iter'); +goog.require('goog.string'); + +/** + * Extension of goog.ui.ac.ArrayMatcher so that it can handle + * any number or string typed in. + * @constructor + * @param {Array} rows Dictionary of items to match. Can be objects if they + * have a toString method that returns the value to match against. + * @param {boolean=} opt_noSimilar if true, do not do similarity matches for the + * input token against the dictionary. + * @extends {goog.ui.ac.ArrayMatcher} + */ +Blockly.TypeBlock.ac.AIArrayMatcher = function(rows, opt_noSimilar) { + goog.ui.ac.ArrayMatcher.call(rows, opt_noSimilar); + this.rows_ = rows; + this.useSimilar_ = !opt_noSimilar; +}; +goog.inherits(Blockly.TypeBlock.ac.AIArrayMatcher, goog.ui.ac.ArrayMatcher); + +/** + * @inheritDoc + */ +Blockly.TypeBlock.ac.AIArrayMatcher.prototype.requestMatchingRows = function( + token, maxMatches, matchHandler, opt_fullString) { + + var matches = this.getPrefixMatches(token, maxMatches); + + // Because we allow for similar matches, Button.Text will always appear + // before Text. So we handle the 'text' case as a special case here + if (token === 'text' || token === 'Text'){ + goog.array.remove(matches, 'Text'); + goog.array.insertAt(matches, 'Text', 0); + } + + // Added code to handle any number typed in the widget + // (including negatives and decimals) + var reg = new RegExp('^-?[0-9]\\d*(\.\\d+)?$', 'g'); + var match = reg.exec(token); + if (match && match.length > 0){ + matches.push(token); + } + + // Added code to handle default values for text fields (they start with " or ') + var textReg = new RegExp('^[\"|\']+', 'g'); + var textMatch = textReg.exec(token); + if (textMatch && textMatch.length === 1){ + matches.push(token); + } + + if (matches.length === 0 && this.useSimilar_) { + matches = this.getSimilarRows(token, maxMatches); + } + + matchHandler(token, matches); +}; + +var isCharacterKey = function(charCode) { + // NOTE: The following regex was generated from http://apps.timwhitlock.info/js/regex# + var regex = new RegExp("[\"\'$+0-9<->A-Za-z|~¢-¥ª¬±-³µ¹-º¼-¾À-ˁˆ-ˑˠ-ˤˬˮ\u0300-ʹͶ-ͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ҁ\u0483-ԣԱ-Ֆՙա-և\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7א-תװ-ײ؆-؈؋\u0610-\u061aء-\u065e٠-٩ٮ-ۓە-\u06dc\u06de-\u06e8\u06ea-ۼۿܐ-\u074aݍ-ޱ߀-ߵߺ\u0901-ह\u093c-\u094dॐ-\u0954क़-\u0963०-९ॱ-ॲॻ-ॿ\u0981-\u0983অ-ঌএ-ঐও-নপ-রলশ-হ\u09bc-\u09c4\u09c7-\u09c8\u09cb-ৎ\u09d7ড়-ঢ়য়-\u09e3০-৹\u0a01-\u0a03ਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹ\u0a3c\u0a3e-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51ਖ਼-ੜਫ਼੦-\u0a75\u0a81-\u0a83અ-ઍએ-ઑઓ-નપ-રલ-ળવ-હ\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acdૐૠ-\u0ae3૦-૯૱\u0b01-\u0b03ଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହ\u0b3c-\u0b44\u0b47-\u0b48\u0b4b-\u0b4d\u0b56-\u0b57ଡ଼-ଢ଼ୟ-\u0b63୦-୯ୱ\u0b82-ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹ\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcdௐ\u0bd7௦-௲௹\u0c01-\u0c03అ-ఌఎ-ఐఒ-నప-ళవ-హఽ-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56ౘ-ౙౠ-\u0c63౦-౯౸-౾\u0c82-\u0c83ಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5-\u0cd6ೞೠ-\u0ce3೦-೯\u0d02-\u0d03അ-ഌഎ-ഐഒ-നപ-ഹഽ-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57ൠ-\u0d63൦-൵ൺ-ൿ\u0d82-\u0d83අ-ඖක-නඳ-රලව-ෆ\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2-\u0df3ก-\u0e3a฿-\u0e4e๐-๙ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-\u0eb9\u0ebb-ຽເ-ໄໆ\u0ec8-\u0ecd໐-໙ໜ-ໝༀ\u0f18-\u0f19༠-༳\u0f35\u0f37\u0f39\u0f3e-ཇཉ-ཬ\u0f71-\u0f84\u0f86-ྋ\u0f90-\u0f97\u0f99-\u0fbc\u0fc6က-၉ၐ-႙Ⴀ-Ⴥა-ჺჼᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ\u135f፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪ\u16ee-\u16f0ᜀ-ᜌᜎ-\u1714ᜠ-\u1734ᝀ-\u1753ᝠ-ᝬᝮ-ᝰ\u1772-\u1773ក-ឳ\u17b6-\u17d3ៗ៛-\u17dd០-៩៰-៹\u180b-\u180d᠐-᠙ᠠ-ᡷᢀ-ᢪᤀ-ᤜ\u1920-\u192b\u1930-\u193b᥆-ᥭᥰ-ᥴᦀ-ᦩ\u19b0-\u19c9᧐-᧙ᨀ-\u1a1b\u1b00-ᭋ᭐-᭙\u1b6b-\u1b73\u1b80-\u1baaᮮ-᮹ᰀ-\u1c37᱀-᱉ᱍ-ᱽᴀ-\u1de6\u1dfe-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ\u2000-\u206e⁰-ⁱ⁴-⁼ⁿ-₌ₐ-ₔ₠-₵\u20d0-\u20f0ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ⅉ⅋ⅎ⅓-\u2188←-↔↚-↛↠↣↦↮⇎-⇏⇒⇔⇴-⋿⌈-⌋⌠-⌡⍼⎛-⎳⏜-⏡①-⒛⓪-⓿▷◁◸-◿♯❶-➓⟀-⟄⟇-⟊⟌⟐-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌Ⰰ-Ⱞⰰ-ⱞⱠ-Ɐⱱ-ⱽⲀ-ⳤ⳽ⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ\u2de0-\u2dffⸯ々-\u3007\u3021-\u302f〱-〵\u3038-〼ぁ-ゖ\u3099-\u309aゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆒-㆕ㆠ-ㆷㇰ-ㇿ㈠-㈩㉑-㉟㊀-㊉㊱-㊿㐀-䶵一-鿃ꀀ-ꒌꔀ-ꘌꘐ-ꘫꙀ-ꙟꙢ-\ua672\ua67c-\ua67dꙿ-ꚗꜗ-ꜟꜢ-ꞈꞋ-ꞌꟻ-\ua827ꡀ-ꡳ\ua880-\ua8c4꣐-꣙꤀-\ua92dꤰ-\ua953ꨀ-\uaa36ꩀ-\uaa4d꩐-꩙가-힣豈-鶴侮-頻並-龎ff-stﬓ-ﬗיִ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼\ufe00-\ufe0f\ufe20-\ufe26﹢﹤-﹦﹩ﹰ-ﹴﹶ-ﻼ$+0-9<->A-Za-z|~ヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ¢-¬¥-₩←-↓]|[\ud840-\ud868][\udc00-\udfff]|\ud800[\udc00-\udc0b\udc0d-\udc26\udc28-\udc3a\udc3c-\udc3d\udc3f-\udc4d\udc50-\udc5d\udc80-\udcfa\udd07-\udd33\udd40-\udd78\udd8a\uddfd\ude80-\ude9c\udea0-\uded0\udf00-\udf1e\udf20-\udf23\udf30-\udf4a\udf80-\udf9d\udfa0-\udfc3\udfc8-\udfcf\udfd1-\udfd5]|\ud801[\udc00-\udc9d\udca0-\udca9]|\ud802[\udc00-\udc05\udc08\udc0a-\udc35\udc37-\udc38\udc3c\udc3f\udd00-\udd19\udd20-\udd39\ude00-\ude03\ude05-\ude06\ude0c-\ude13\ude15-\ude17\ude19-\ude33\ude38-\ude3a\ude3f-\ude47]|\ud808[\udc00-\udf6e]|\ud809[\udc00-\udc62]|\ud834[\udd65-\udd69\udd6d-\udd72\udd7b-\udd82\udd85-\udd8b\uddaa-\uddad\ude42-\ude44\udf60-\udf71]|\ud835[\udc00-\udc54\udc56-\udc9c\udc9e-\udc9f\udca2\udca5-\udca6\udca9-\udcac\udcae-\udcb9\udcbb\udcbd-\udcc3\udcc5-\udd05\udd07-\udd0a\udd0d-\udd14\udd16-\udd1c\udd1e-\udd39\udd3b-\udd3e\udd40-\udd44\udd46\udd4a-\udd50\udd52-\udea5\udea8-\udfcb\udfce-\udfff]|\ud869[\udc00-\uded6]|\ud87e[\udc00-\ude1d]|\udb40[\udd00-\uddef]"); + + //var regex = new RegExp(" + +//"); + + + + // NOTE: if the regex above ever gives trouble, we can use the simpler one. + //var regex = new RegExp("[0-9A-Za-z]"); + + if (regex.test(String.fromCharCode(charCode))) { + return true; + } else { + return false; + } +}; diff --git a/generators/java.js b/generators/java.js new file mode 100644 index 00000000000..210c9a57dcc --- /dev/null +++ b/generators/java.js @@ -0,0 +1,334 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Helper functions for generating Java for blocks. + * @author toebes@extremenetworks.com (John Toebes) + * Loosely based on Python version by fraser@google.com (Neil Fraser) + */ +'use strict'; + +goog.provide('Blockly.Java'); + +goog.require('Blockly.Generator'); + + +/** + * Java code generator. + * @type !Blockly.Generator + */ +Blockly.Java = new Blockly.Generator('Java'); + +/** + * List of illegal variable names. + * This is not intended to be a security feature. Blockly is 100% client-side, + * so bypassing this list is trivial. This is intended to prevent users from + * accidentally clobbering a built-in object or function. + * @private + */ +Blockly.Java.addReservedWords( + // import keyword + // print ','.join(keyword.kwlist) + // http://en.wikipedia.org/wiki/List_of_Java_keywords + 'abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,' + + //http://en.wikipedia.org/wiki/List_of_Java_keywords#Reserved_words_for_literal_values + 'false,null,true,' + + // http://docs.Java.org/library/functions.html + 'abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern'); + +/** + * Order of operation ENUMs. + * https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html + */ +Blockly.Java.ORDER_ATOMIC = 0; // 0 "" ... +Blockly.Java.ORDER_COLLECTION = 1; // tuples, lists, dictionaries +Blockly.Java.ORDER_STRING_CONVERSION = 1; // `expression...` + +Blockly.Java.ORDER_MEMBER = 2; // . [] +Blockly.Java.ORDER_FUNCTION_CALL = 2; // () + +Blockly.Java.ORDER_POSTFIX = 3; // expr++ expr-- +Blockly.Java.ORDER_EXPONENTIATION = 3; // ** TODO: Replace this + +Blockly.Java.ORDER_LOGICAL_NOT = 3; // not +Blockly.Java.ORDER_UNARY_SIGN = 4; // ++expr --expr +expr -expr ~ ! +Blockly.Java.ORDER_MULTIPLICATIVE = 5; // * / % +Blockly.Java.ORDER_ADDITIVE = 6; // + - +Blockly.Java.ORDER_BITWISE_SHIFT = 7; // << >> >>> +Blockly.Java.ORDER_RELATIONAL = 8; // < > <= >= instanceof +Blockly.Java.ORDER_EQUALITY = 9; // == != +Blockly.Java.ORDER_BITWISE_AND = 10; // & +Blockly.Java.ORDER_BITWISE_XOR = 11; // ^ +Blockly.Java.ORDER_BITWISE_OR = 12; // | +Blockly.Java.ORDER_LOGICAL_AND = 13; // && +Blockly.Java.ORDER_LOGICAL_OR = 14; // || +Blockly.Java.ORDER_CONDITIONAL = 15; // ? : + +Blockly.Java.ORDER_ASSIGNMENT = 16; // = += -= *= /= %= &= ^= |= <<= >>= >>>= + +Blockly.Java.ORDER_NONE = 99; // (...) + +/** + * Empty loops or conditionals are not allowed in Java. + */ +Blockly.Java.PASS = ' {}\n'; + +/** + * Closure code for a section + */ +Blockly.Java.POSTFIX = ''; +/** + * Any extra indent to be added to the currently generating code block + */ +Blockly.Java.EXTRAINDENT = ''; +/** + * List of all known variable types. Only set after a call to workspaceToCode + */ +Blockly.Java.VariableTypes_ = {}; +/** + * Default Name of the application for use by all generated classes + */ +Blockly.Java.AppName_ = 'MyApp'; +/** + * List of libraries used globally by the generated java code. These are + * Processed by Blockly.Java.addImport + */ +Blockly.Java.needImports_ = ['javax.json.Json', + 'javax.json.JsonArray', + 'javax.json.JsonObject', + 'javax.json.JsonReader', + 'javax.json.stream.JsonParsingException', + 'java.io.IOException', + 'java.io.StringReader' + ]; + +/** + * Set the application name for generated classes + * @param {string} name Name for the application for any generated code + */ +Blockly.Java.SetAppName = function(name) { + if (!name || name === '') { + name = 'MyApp'; + } + this.AppName_ = name; + console.log(this.AppName_+' --- <'+name+ '>'); +} + +/** + * Get the application name for generated classes + * @return {string} name Name for the application for any generated code + */ +Blockly.Java.GetAppName = function() { + return this.AppName_; +} + +/** + * Get the Java type of a variable by name + * @param {string} variable Name of the variable to get the type for + * @return {string} type Java type for the variablee + */ +Blockly.Java.GetVariableType = function(variable) { + var type = Blockly.Java.VariableTypes_[variable]; + if (!type) { + type = 'string/*UNKNOWN_TYPE*/'; + } + return type; +}; + +/** + * Add a reference to a library to import + * @param {string} importlib Name of the library to add to the import list + */ +Blockly.Java.addImport = function(importlib) { + var importStr = 'import '+importlib+';'; + Blockly.Java.imports_[importStr] = importStr; +}; + +/** + * Get the list of all libraries to import + * @param {!Array} imports Array of libraries to add to the list + * @return {string} code Java code for importing all libraries referenced + */ +Blockly.Java.getImports = function(imports) { + // Add any of the imports that the top level code needs + if (imports) { + for(var i = 0; i < imports.length; i++) { + Blockly.Java.addImport(imports[i]); + } + } + + var keys = goog.object.getValues(Blockly.Java.imports_); + goog.array.sort(keys); + return (keys.join("\n")); +}; + +/** + * Initialise the database of variable names. + * @param {!Blockly.Workspace} workspace Workspace to generate code from. + */ +Blockly.Java.init = function(workspace, imports) { + // Create a dictionary of definitions to be printed before the code. + Blockly.Java.definitions_ = Object.create(null); + // Create a dictionary mapping desired function names in definitions_ + // to actual function names (to avoid collisions with user functions). + Blockly.Java.functionNames_ = Object.create(null); + // Create a dictionary of all the libraries which would be needed + Blockly.Java.imports_ = Object.create(null); + // Start with the defaults that all the code depends on + for(var i = 0; i < Blockly.Java.needImports_.length; i++) { + Blockly.Java.addImport(Blockly.Java.needImports_[i]); + } + if (!Blockly.Java.variableDB_) { + Blockly.Java.variableDB_ = + new Blockly.Names(Blockly.Java.RESERVED_WORDS_); + } else { + Blockly.Java.variableDB_.reset(); + } + + var defvars = []; + var variables = Blockly.Variables.allVariables(workspace); + var vartypes = Blockly.Variables.allVariablesTypes(workspace); + + for (var x = 0; x < variables.length; x++) { + var key = variables[x]; + var type = vartypes[key]; + if (type === 'JSON') { + type = 'JsonObject'; + } else if (type === 'Array') { + type = 'JsonArray'; + } else if (type === 'Boolean') { + type = 'Boolean'; + } else if (type === 'String') { + type = 'String'; + } else if (type === 'Number') { + type = 'int'; + } else if (type !== '') { + if (Blockly.Blocks[type] && Blockly.Blocks[type].GBPClass ) { + type = Blockly.Blocks[type].GBPClass; + } else { + console.log('Unknown type for '+key+' using String for'+type); + type = 'Object/*UNKNOWN_TYPE for '+type+'*/'; + } + } else { + // Unknown type + console.log('Unknown type for '+key+' using String'); + type = 'String/*UNKNOWN_TYPE*/'; + } + + Blockly.Java.VariableTypes_[key] = type; + + defvars.push('protected ' + + type + ' '+ + Blockly.Java.variableDB_.getName(variables[x], + Blockly.Variables.NAME_TYPE) + + ';'); + } + Blockly.Java.definitions_['variables'] = defvars.join('\n'); +}; + +/** + * Prepend the generated code with the variable definitions. + * @param {string} code Generated code. + * @return {string} Completed code. + */ +Blockly.Java.finish = function(code) { + // Convert the definitions dictionary into a list. + var imports = []; + var definitions = []; + for (var name in Blockly.Java.definitions_) { + var def = Blockly.Java.definitions_[name]; + if (def.match(/^(from\s+\S+\s+)?import\s+\S+/)) { + imports.push(def); + } else { + definitions.push(def); + } + } + var allDefs = imports.join('\n') + '\n\n' + definitions.join('\n\n'); + return allDefs.replace(/\n\n+/g, '\n\n').replace(/\n*$/, '\n\n\n') + code; +}; + +/** + * Naked values are top-level blocks with outputs that aren't plugged into + * anything. + * @param {string} line Line of generated code. + * @return {string} Legal line of code. + */ +Blockly.Java.scrubNakedValue = function(line) { + return line + '\n'; +}; + +/** + * Encode a string as a properly escaped Java string, complete with quotes. + * @param {string} string Text to encode. + * @return {string} Java string. + * @private + */ +Blockly.Java.quote_ = function(string) { + // TODO: This is a quick hack. Replace with goog.string.quote + string = string.replace(/\\/g, '\\\\') + .replace(/\n/g, '\\\n') + .replace(/\%/g, '\\%') + .replace(/"/g, '\\"'); + return '"' + string + '"'; +}; + +/** + * Common tasks for generating Java from blocks. + * Handles comments for the specified block and any connected value blocks. + * Calls any statements following this block. + * @param {!Blockly.Block} block The current block. + * @param {string} code The Java code created for this block. + * @return {string} Java code with comments and subsequent blocks added. + * @private + */ +Blockly.Java.scrub_ = function(block, code, parms) { + var commentCode = ''; + // Only collect comments for blocks that aren't inline. + if (!block.outputConnection || !block.outputConnection.targetConnection) { + // Collect comment for this block. + var comment = block.getCommentText(); + if (comment) { + commentCode += Blockly.Java.prefixLines(comment, '// ') + '\n'; + } + // Collect comments for all value arguments. + // Don't collect comments for nested statements. + for (var x = 0; x < block.inputList.length; x++) { + if (block.inputList[x].type == Blockly.INPUT_VALUE) { + var childBlock = block.inputList[x].connection.targetBlock(); + if (childBlock) { + var comment = Blockly.Java.allNestedComments(childBlock); + if (comment) { + commentCode += Blockly.Java.prefixLines(comment, '// '); + } + } + } + } + } + var postFix = Blockly.Java.POSTFIX; + Blockly.Java.POSTFIX = ''; + var extraIndent = Blockly.Java.EXTRAINDENT; + Blockly.Java.EXTRAINDENT = ''; + var nextBlock = block.nextConnection && block.nextConnection.targetBlock(); + var nextCode = Blockly.Java.blockToCode(nextBlock, parms); + if (extraIndent != '') { + nextCode = Blockly.Java.prefixLines(nextCode, extraIndent); + } + return commentCode + code + nextCode + postFix; +}; diff --git a/generators/java/colour.js b/generators/java/colour.js new file mode 100644 index 00000000000..05166054563 --- /dev/null +++ b/generators/java/colour.js @@ -0,0 +1,86 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for colour blocks. + * @author fraser@google.com (Neil Fraser) + */ +'use strict'; + +goog.provide('Blockly.Java.colour'); + +goog.require('Blockly.Java'); + + +Blockly.Java['colour_picker'] = function(block) { + // Colour picker. + var code = '\'' + block.getFieldValue('COLOUR') + '\''; + return [code, Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['colour_random'] = function(block) { + // Generate a random colour. + Blockly.Java.definitions_['import_random'] = 'import random'; + var code = '\'#%06x\' % random.randint(0, 2**24 - 1)'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['colour_rgb'] = function(block) { + // Compose a colour from RGB components expressed as percentages. + var functionName = Blockly.Java.provideFunction_( + 'colour_rgb', + [ 'def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(r, g, b):', + ' r = round(min(100, max(0, r)) * 2.55)', + ' g = round(min(100, max(0, g)) * 2.55)', + ' b = round(min(100, max(0, b)) * 2.55)', + ' return \'#%02x%02x%02x\' % (r, g, b)']); + var r = Blockly.Java.valueToCode(block, 'RED', + Blockly.Java.ORDER_NONE) || 0; + var g = Blockly.Java.valueToCode(block, 'GREEN', + Blockly.Java.ORDER_NONE) || 0; + var b = Blockly.Java.valueToCode(block, 'BLUE', + Blockly.Java.ORDER_NONE) || 0; + var code = functionName + '(' + r + ', ' + g + ', ' + b + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['colour_blend'] = function(block) { + // Blend two colours together. + var functionName = Blockly.Java.provideFunction_( + 'colour_blend', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(colour1, colour2, ratio):', + ' r1, r2 = int(colour1[1:3], 16), int(colour2[1:3], 16)', + ' g1, g2 = int(colour1[3:5], 16), int(colour2[3:5], 16)', + ' b1, b2 = int(colour1[5:7], 16), int(colour2[5:7], 16)', + ' ratio = min(1, max(0, ratio))', + ' r = round(r1 * (1 - ratio) + r2 * ratio)', + ' g = round(g1 * (1 - ratio) + g2 * ratio)', + ' b = round(b1 * (1 - ratio) + b2 * ratio)', + ' return \'#%02x%02x%02x\' % (r, g, b)']); + var colour1 = Blockly.Java.valueToCode(block, 'COLOUR1', + Blockly.Java.ORDER_NONE) || '\'#000000\''; + var colour2 = Blockly.Java.valueToCode(block, 'COLOUR2', + Blockly.Java.ORDER_NONE) || '\'#000000\''; + var ratio = Blockly.Java.valueToCode(block, 'RATIO', + Blockly.Java.ORDER_NONE) || 0; + var code = functionName + '(' + colour1 + ', ' + colour2 + ', ' + ratio + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; diff --git a/generators/java/lists.js b/generators/java/lists.js new file mode 100644 index 00000000000..873618722ff --- /dev/null +++ b/generators/java/lists.js @@ -0,0 +1,334 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for list blocks. + * @author q.neutron@gmail.com (Quynh Neutron) + */ +'use strict'; + +goog.provide('Blockly.Java.lists'); + +goog.require('Blockly.Java'); + + +Blockly.Java['lists_create_empty'] = function(block) { + // Create an empty list. + return ['[]', Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['lists_create_with'] = function(block) { + // Create a list with any number of elements of any type. + var code = new Array(block.itemCount_); + for (var n = 0; n < block.itemCount_; n++) { + code[n] = Blockly.Java.valueToCode(block, 'ADD' + n, + Blockly.Java.ORDER_NONE) || 'None'; + } + code = '[' + code.join(', ') + ']'; + return [code, Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['lists_repeat'] = function(block) { + // Create a list with one element repeated. + var argument0 = Blockly.Java.valueToCode(block, 'ITEM', + Blockly.Java.ORDER_NONE) || 'None'; + var argument1 = Blockly.Java.valueToCode(block, 'NUM', + Blockly.Java.ORDER_MULTIPLICATIVE) || '0'; + var code = '[' + argument0 + '] * ' + argument1; + return [code, Blockly.Java.ORDER_MULTIPLICATIVE]; +}; + +Blockly.Java['lists_length'] = function(block) { + // List length. + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '[]'; + return ['len(' + argument0 + ')', Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['lists_isEmpty'] = function(block) { + // Is the list empty? + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '[]'; + var code = 'not len(' + argument0 + ')'; + return [code, Blockly.Java.ORDER_LOGICAL_NOT]; +}; + +Blockly.Java['lists_indexOf'] = function(block) { + // Find an item in the list. + var argument0 = Blockly.Java.valueToCode(block, 'FIND', + Blockly.Java.ORDER_NONE) || '[]'; + var argument1 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_MEMBER) || '\'\''; + var code; + if (block.getFieldValue('END') == 'FIRST') { + var functionName = Blockly.Java.provideFunction_( + 'first_index', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList, elem):', + ' try: theIndex = myList.index(elem) + 1', + ' except: theIndex = 0', + ' return theIndex']); + code = functionName + '(' + argument1 + ', ' + argument0 + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else { + var functionName = Blockly.Java.provideFunction_( + 'last_index', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList, elem):', + ' try: theIndex = len(myList) - myList[::-1].index(elem)', + ' except: theIndex = 0', + ' return theIndex']); + code = functionName + '(' + argument1 + ', ' + argument0 + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } +}; + +Blockly.Java['lists_getIndex'] = function(block) { + // Get element at index. + // Note: Until January 2013 this block did not have MODE or WHERE inputs. + var mode = block.getFieldValue('MODE') || 'GET'; + var where = block.getFieldValue('WHERE') || 'FROM_START'; + var at = Blockly.Java.valueToCode(block, 'AT', + Blockly.Java.ORDER_UNARY_SIGN) || '1'; + var list = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_MEMBER) || '[]'; + + if (where == 'FIRST') { + if (mode == 'GET') { + var code = list + '.getJsonObject(0)'; + return [code, Blockly.Java.ORDER_MEMBER]; + } else { + var code = list + '.pop(0)'; + if (mode == 'GET_REMOVE') { + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + return code + '\n'; + } + } + } else if (where == 'LAST') { + if (mode == 'GET') { + var code = list + '[-1]'; + return [code, Blockly.Java.ORDER_MEMBER]; + } else { + var code = list + '.pop()'; + if (mode == 'GET_REMOVE') { + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + return code + '\n'; + } + } + } else if (where == 'FROM_START') { + // Blockly uses one-based indicies. + if (Blockly.isNumber(at)) { + // If the index is a naked number, decrement it right now. + at = parseInt(at, 10) - 1; + } else { + // If the index is dynamic, decrement it in code. + at = 'int(' + at + ' - 1)'; + } + if (mode == 'GET') { + var code = list + '.getJsonElement(' + at + ')'; + return [code, Blockly.Java.ORDER_MEMBER]; + } else { + var code = list + '.pop(' + at + ')'; + if (mode == 'GET_REMOVE') { + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + return code + '\n'; + } + } + } else if (where == 'FROM_END') { + if (mode == 'GET') { + var code = list + '[-' + at + ']'; + return [code, Blockly.Java.ORDER_MEMBER]; + } else { + var code = list + '.pop(-' + at + ')'; + if (mode == 'GET_REMOVE') { + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + return code + '\n'; + } + } + } else if (where == 'RANDOM') { + Blockly.Java.definitions_['import_random'] = 'import random'; + if (mode == 'GET') { + code = 'random.choice(' + list + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else { + var functionName = Blockly.Java.provideFunction_( + 'lists_remove_random_item', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList):', + ' x = int(random.random() * len(myList))', + ' return myList.pop(x)']); + code = functionName + '(' + list + ')'; + if (mode == 'GET_REMOVE') { + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + return code + '\n'; + } + } + } + throw 'Unhandled combination (lists_getIndex).'; +}; + +Blockly.Java['lists_setIndex'] = function(block) { + // Set element at index. + // Note: Until February 2013 this block did not have MODE or WHERE inputs. + var list = Blockly.Java.valueToCode(block, 'LIST', + Blockly.Java.ORDER_MEMBER) || '[]'; + var mode = block.getFieldValue('MODE') || 'GET'; + var where = block.getFieldValue('WHERE') || 'FROM_START'; + var at = Blockly.Java.valueToCode(block, 'AT', + Blockly.Java.ORDER_NONE) || '1'; + var value = Blockly.Java.valueToCode(block, 'TO', + Blockly.Java.ORDER_NONE) || 'None'; + // Cache non-trivial values to variables to prevent repeated look-ups. + // Closure, which accesses and modifies 'list'. + function cacheList() { + if (list.match(/^\w+$/)) { + return ''; + } + var listVar = Blockly.Java.variableDB_.getDistinctName( + 'tmp_list', Blockly.Variables.NAME_TYPE); + var code = listVar + ' = ' + list + '\n'; + list = listVar; + return code; + } + if (where == 'FIRST') { + if (mode == 'SET') { + return list + '[0] = ' + value + '\n'; + } else if (mode == 'INSERT') { + return list + '.insert(0, ' + value + ')\n'; + } + } else if (where == 'LAST') { + if (mode == 'SET') { + return list + '[-1] = ' + value + '\n'; + } else if (mode == 'INSERT') { + return list + '.append(' + value + ')\n'; + } + } else if (where == 'FROM_START') { + // Blockly uses one-based indicies. + if (Blockly.isNumber(at)) { + // If the index is a naked number, decrement it right now. + at = parseInt(at, 10) - 1; + } else { + // If the index is dynamic, decrement it in code. + at = 'int(' + at + ' - 1)'; + } + if (mode == 'SET') { + return list + '[' + at + '] = ' + value + '\n'; + } else if (mode == 'INSERT') { + return list + '.insert(' + at + ', ' + value + ')\n'; + } + } else if (where == 'FROM_END') { + if (mode == 'SET') { + return list + '[-' + at + '] = ' + value + '\n'; + } else if (mode == 'INSERT') { + return list + '.insert(-' + at + ', ' + value + ')\n'; + } + } else if (where == 'RANDOM') { + Blockly.Java.definitions_['import_random'] = 'import random'; + var code = cacheList(); + var xVar = Blockly.Java.variableDB_.getDistinctName( + 'tmp_x', Blockly.Variables.NAME_TYPE); + code += xVar + ' = int(random.random() * len(' + list + '))\n'; + if (mode == 'SET') { + code += list + '[' + xVar + '] = ' + value + '\n'; + return code; + } else if (mode == 'INSERT') { + code += list + '.insert(' + xVar + ', ' + value + ')\n'; + return code; + } + } + throw 'Unhandled combination (lists_setIndex).'; +}; + +Blockly.Java['lists_getSublist'] = function(block) { + // Get sublist. + var list = Blockly.Java.valueToCode(block, 'LIST', + Blockly.Java.ORDER_MEMBER) || '[]'; + var where1 = block.getFieldValue('WHERE1'); + var where2 = block.getFieldValue('WHERE2'); + var at1 = Blockly.Java.valueToCode(block, 'AT1', + Blockly.Java.ORDER_ADDITIVE) || '1'; + var at2 = Blockly.Java.valueToCode(block, 'AT2', + Blockly.Java.ORDER_ADDITIVE) || '1'; + if (where1 == 'FIRST' || (where1 == 'FROM_START' && at1 == '1')) { + at1 = ''; + } else if (where1 == 'FROM_START') { + // Blockly uses one-based indicies. + if (Blockly.isNumber(at1)) { + // If the index is a naked number, decrement it right now. + at1 = parseInt(at1, 10) - 1; + } else { + // If the index is dynamic, decrement it in code. + at1 = 'int(' + at1 + ' - 1)'; + } + } else if (where1 == 'FROM_END') { + if (Blockly.isNumber(at1)) { + at1 = -parseInt(at1, 10); + } else { + at1 = '-int(' + at1 + ')'; + } + } + if (where2 == 'LAST' || (where2 == 'FROM_END' && at2 == '1')) { + at2 = ''; + } else if (where1 == 'FROM_START') { + if (Blockly.isNumber(at2)) { + at2 = parseInt(at2, 10); + } else { + at2 = 'int(' + at2 + ')'; + } + } else if (where1 == 'FROM_END') { + if (Blockly.isNumber(at2)) { + // If the index is a naked number, increment it right now. + // Add special case for -0. + at2 = 1 - parseInt(at2, 10); + if (at2 == 0) { + at2 = ''; + } + } else { + // If the index is dynamic, increment it in code. + Blockly.Java.definitions_['import_sys'] = 'import sys'; + at2 = 'int(1 - ' + at2 + ') or sys.maxsize'; + } + } + var code = list + '[' + at1 + ' : ' + at2 + ']'; + return [code, Blockly.Java.ORDER_MEMBER]; +}; + +Blockly.Java['lists_split'] = function(block) { + // Block for splitting text into a list, or joining a list into text. + var mode = block.getFieldValue('MODE'); + if (mode == 'SPLIT') { + var value_input = Blockly.Java.valueToCode(block, 'INPUT', + Blockly.Java.ORDER_MEMBER) || '\'\''; + var value_delim = Blockly.Java.valueToCode(block, 'DELIM', + Blockly.Java.ORDER_NONE); + var code = value_input + '.split(' + value_delim + ')'; + } else if (mode == 'JOIN') { + var value_input = Blockly.Java.valueToCode(block, 'INPUT', + Blockly.Java.ORDER_NONE) || '[]'; + var value_delim = Blockly.Java.valueToCode(block, 'DELIM', + Blockly.Java.ORDER_MEMBER) || '\'\''; + var code = value_delim + '.join(' + value_input + ')'; + } else { + throw 'Unknown mode: ' + mode; + } + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; diff --git a/generators/java/logic.js b/generators/java/logic.js new file mode 100644 index 00000000000..a9c94f6c480 --- /dev/null +++ b/generators/java/logic.js @@ -0,0 +1,128 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for logic blocks. + * @author toebes@extremenetworks.com (John Toebes) + * Based on Python version by q.neutron@gmail.com (Quynh Neutron) + */ +'use strict'; + +goog.provide('Blockly.Java.logic'); + +goog.require('Blockly.Java'); + +Blockly.Java['controls_if'] = function(block) { + // If/elseif/else condition. + var n = 0; + var argument = Blockly.Java.valueToCode(block, 'IF' + n, + Blockly.Java.ORDER_NONE) || 'false'; + var branch = Blockly.Java.statementToCode(block, 'DO' + n) || + Blockly.Java.PASS; + var code = 'if (' + argument + ') {\n' + branch; + for (n = 1; n <= block.elseifCount_; n++) { + argument = Blockly.Java.valueToCode(block, 'IF' + n, + Blockly.Java.ORDER_NONE) || 'false'; + branch = Blockly.Java.statementToCode(block, 'DO' + n) || + Blockly.Java.PASS; + code += '} else if (' + argument + ') {\n' + branch; + } + if (block.elseCount_) { + branch = Blockly.Java.statementToCode(block, 'ELSE') || + Blockly.Java.PASS; + code += '} else {\n' + branch; + } + code += '}\n'; + return code; +}; + +Blockly.Java['logic_compare'] = function(block) { + // Comparison operator. + var OPERATORS = { + 'EQ': '==', + 'NEQ': '!=', + 'LT': '<', + 'LTE': '<=', + 'GT': '>', + 'GTE': '>=' + }; + var operator = OPERATORS[block.getFieldValue('OP')]; + var order = Blockly.Java.ORDER_RELATIONAL; + var argument0 = Blockly.Java.valueToCode(block, 'A', order) || '0'; + var argument1 = Blockly.Java.valueToCode(block, 'B', order) || '0'; + var code = argument0 + ' ' + operator + ' ' + argument1; + return [code, order]; +}; + +Blockly.Java['logic_operation'] = function(block) { + // Operations 'and', 'or'. + var operator = (block.getFieldValue('OP') == 'AND') ? ' && ' : ' || '; + var order = (operator == 'and') ? Blockly.Java.ORDER_LOGICAL_AND : + Blockly.Java.ORDER_LOGICAL_OR; + var argument0 = Blockly.Java.valueToCode(block, 'A', order); + var argument1 = Blockly.Java.valueToCode(block, 'B', order); + if (!argument0 && !argument1) { + // If there are no arguments, then the return value is false. + argument0 = 'false'; + argument1 = 'false'; + } else { + // Single missing arguments have no effect on the return value. + var defaultArgument = (operator == ' && ') ? 'true' : 'false'; + if (!argument0) { + argument0 = defaultArgument; + } + if (!argument1) { + argument1 = defaultArgument; + } + } + var code = argument0 + operator + argument1; + return [code, order]; +}; + +Blockly.Java['logic_negate'] = function(block) { + // Negation. + var argument0 = Blockly.Java.valueToCode(block, 'BOOL', + Blockly.Java.ORDER_LOGICAL_NOT) || 'true'; + var code = '!(' + argument0 + ')'; + return [code, Blockly.Java.ORDER_LOGICAL_NOT]; +}; + +Blockly.Java['logic_boolean'] = function(block) { + // Boolean values true and false. + var code = (block.getFieldValue('BOOL') == 'TRUE') ? 'true' : 'false'; + return [code, Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['logic_null'] = function(block) { + // Null data type. + return ['null', Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['logic_ternary'] = function(block) { + // Ternary operator. + var value_if = Blockly.Java.valueToCode(block, 'IF', + Blockly.Java.ORDER_CONDITIONAL) || 'false'; + var value_then = Blockly.Java.valueToCode(block, 'THEN', + Blockly.Java.ORDER_CONDITIONAL) || 'null'; + var value_else = Blockly.Java.valueToCode(block, 'ELSE', + Blockly.Java.ORDER_CONDITIONAL) || 'null'; + var code = value_if + ' ? ' + value_then + ' : ' + value_else; + return [code, Blockly.Java.ORDER_CONDITIONAL]; +}; diff --git a/generators/java/loops.js b/generators/java/loops.js new file mode 100644 index 00000000000..1b52eeedaf5 --- /dev/null +++ b/generators/java/loops.js @@ -0,0 +1,165 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for loop blocks. + * @author toebes@extremenetworks.com (John Toebes) + * Based on Python version by q.neutron@gmail.com (Quynh Neutron) + */ +'use strict'; + +goog.provide('Blockly.Java.loops'); + +goog.require('Blockly.Java'); + +Blockly.Java['controls_repeat'] = function(block) { + // Repeat n times (internal number). + var repeats = parseInt(block.getFieldValue('TIMES'), 10); + var branch = Blockly.Java.statementToCode(block, 'DO'); + branch = Blockly.Java.addLoopTrap(branch, block.id) || + Blockly.Java.PASS; + var loopVar = Blockly.Java.variableDB_.getDistinctName( + 'count', Blockly.Variables.NAME_TYPE); + var code = 'for (int ' + loopVar + '=0; '+ + loopVar+' < ' + repeats + ';'+ + loopVar+'++) {\n' + + branch + + '} // end for\n'; + return code; +}; + +Blockly.Java['controls_repeat_ext'] = function(block) { + // Repeat n times (external number). + var repeats = Blockly.Java.valueToCode(block, 'TIMES', + Blockly.Java.ORDER_NONE) || '0'; + if (Blockly.isNumber(repeats)) { + repeats = parseInt(repeats, 10); + } else { + repeats = 'int(' + repeats + ')'; + } + var branch = Blockly.Java.statementToCode(block, 'DO'); + branch = Blockly.Java.addLoopTrap(branch, block.id) || + Blockly.Java.PASS; + var loopVar = Blockly.Java.variableDB_.getDistinctName( + 'count', Blockly.Variables.NAME_TYPE); + var code = 'for (int ' + loopVar + '=0; '+ + loopVar +' < ' + repeats + ';'+ + loopVar + '++) {\n' + + branch + + '} // end for\n'; + return code; +}; + +Blockly.Java['controls_whileUntil'] = function(block) { + // Do while/until loop. + var until = block.getFieldValue('MODE') == 'UNTIL'; + var argument0 = Blockly.Java.valueToCode(block, 'BOOL', + until ? Blockly.Java.ORDER_LOGICAL_NOT : + Blockly.Java.ORDER_NONE) || 'false'; + var branch = Blockly.Java.statementToCode(block, 'DO'); + branch = Blockly.Java.addLoopTrap(branch, block.id) || + Blockly.Java.PASS; + if (until) { + argument0 = '!' + argument0; + } + return 'while (' + argument0 + ') {\n' + + branch + + '} // end while\n'; +}; + +Blockly.Java['controls_for'] = function(block) { + // For loop. + var variable0 = Blockly.Java.variableDB_.getName( + block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE); + var vartype0 = Blockly.Java.GetVariableType(block.getFieldValue('VAR')); + var argument0 = Blockly.Java.valueToCode(block, 'FROM', + Blockly.Java.ORDER_NONE) || '0'; + var argument1 = Blockly.Java.valueToCode(block, 'TO', + Blockly.Java.ORDER_NONE) || '0'; + var increment = Blockly.Java.valueToCode(block, 'BY', + Blockly.Java.ORDER_NONE) || '1'; + var branch = Blockly.Java.statementToCode(block, 'DO'); + branch = Blockly.Java.addLoopTrap(branch, block.id) || + Blockly.Java.PASS; + + var code = ''; + var range; + + if (Blockly.isNumber(argument0) && + Blockly.isNumber(argument1) && + Blockly.isNumber(increment)) { + // All parameters are simple numbers. + argument0 = parseFloat(argument0); + argument1 = parseFloat(argument1); + increment = Math.abs(parseFloat(increment)); + var direction = '<='; + var doincrement = '++'; + // All parameters are integers. + if (argument0 > argument1) { + // Count down. + direction = '>='; + increment = -increment; + } + if (increment < 0) { + doincrement = ' -= ' + Math.abs(increment); + } else if (increment != 1) { + doincrement = ' += ' + increment; + } + code += 'for (' + variable0 + ' = ' + argument0 + '; ' + + variable0 + direction + argument1 + '; ' + + variable0 + doincrement + ')'; + } else { + code += 'for (' + variable0 + ' = ' + argument0 + '; ' + + variable0 + '<=' + argument1 + '; ' + + variable0 + ' += ' + increment + ')'; + + } + code += ' {\n' + + branch + + '} // end for\n'; + return code; +}; + +Blockly.Java['controls_forEach'] = function(block) { + // For each loop. + var variable0 = Blockly.Java.variableDB_.getName( + block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE); + var vartype0 = Blockly.Java.GetVariableType(block.getFieldValue('VAR')); + var argument0 = Blockly.Java.valueToCode(block, 'LIST', + Blockly.Java.ORDER_RELATIONAL) || '[]'; + var branch = Blockly.Java.statementToCode(block, 'DO'); + branch = Blockly.Java.addLoopTrap(branch, block.id) || + Blockly.Java.PASS; + var code = 'for (' +vartype0 + ' ' + variable0 + ' :' + argument0 + ') {\n' + + branch + '} // end for\n'; + return code; +}; + + +Blockly.Java['controls_flow_statements'] = function(block) { + // Flow statements: continue, break. + switch (block.getFieldValue('FLOW')) { + case 'BREAK': + return 'break;\n'; + case 'CONTINUE': + return 'continue;\n'; + } + throw 'Unknown flow statement.'; +}; diff --git a/generators/java/math.js b/generators/java/math.js new file mode 100644 index 00000000000..25de2622bb6 --- /dev/null +++ b/generators/java/math.js @@ -0,0 +1,384 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for math blocks. + * @author q.neutron@gmail.com (Quynh Neutron) + */ +'use strict'; + +goog.provide('Blockly.Java.math'); + +goog.require('Blockly.Java'); + + +// If any new block imports any library, add that library name here. +Blockly.Java.addReservedWords('math,random'); + +Blockly.Java['math_number'] = function(block) { + // Numeric value. + var code = parseFloat(block.getFieldValue('NUM')); + var order = code < 0 ? Blockly.Java.ORDER_UNARY_SIGN : + Blockly.Java.ORDER_ATOMIC; + return [code, order]; +}; + +Blockly.Java['math_arithmetic'] = function(block) { + // Basic arithmetic operators, and power. + var OPERATORS = { + 'ADD': [' + ', Blockly.Java.ORDER_ADDITIVE], + 'MINUS': [' - ', Blockly.Java.ORDER_ADDITIVE], + 'MULTIPLY': [' * ', Blockly.Java.ORDER_MULTIPLICATIVE], + 'DIVIDE': [' / ', Blockly.Java.ORDER_MULTIPLICATIVE], + 'POWER': [' ** ', Blockly.Java.ORDER_EXPONENTIATION] + }; + var tuple = OPERATORS[block.getFieldValue('OP')]; + var operator = tuple[0]; + var order = tuple[1]; + var argument0 = Blockly.Java.valueToCode(block, 'A', order) || '0'; + var argument1 = Blockly.Java.valueToCode(block, 'B', order) || '0'; + var code = argument0 + operator + argument1; + return [code, order]; + // In case of 'DIVIDE', division between integers returns different results + // in Java 2 and 3. However, is not an issue since Blockly does not + // guarantee identical results in all languages. To do otherwise would + // require every operator to be wrapped in a function call. This would kill + // legibility of the generated code. +}; + +Blockly.Java['math_single'] = function(block) { + // Math operators with single operand. + var operator = block.getFieldValue('OP'); + var code; + var arg; + if (operator == 'NEG') { + // Negation is a special case given its different operator precedence. + var code = Blockly.Java.valueToCode(block, 'NUM', + Blockly.Java.ORDER_UNARY_SIGN) || '0'; + return ['-' + code, Blockly.Java.ORDER_UNARY_SIGN]; + } + Blockly.Java.definitions_['import_math'] = 'import math'; + if (operator == 'SIN' || operator == 'COS' || operator == 'TAN') { + arg = Blockly.Java.valueToCode(block, 'NUM', + Blockly.Java.ORDER_MULTIPLICATIVE) || '0'; + } else { + arg = Blockly.Java.valueToCode(block, 'NUM', + Blockly.Java.ORDER_NONE) || '0'; + } + // First, handle cases which generate values that don't need parentheses + // wrapping the code. + switch (operator) { + case 'ABS': + code = 'Math.fabs(' + arg + ')'; + break; + case 'ROOT': + code = 'Math.sqrt(' + arg + ')'; + break; + case 'LN': + code = 'Math.log(' + arg + ')'; + break; + case 'LOG10': + code = 'Math.log10(' + arg + ')'; + break; + case 'EXP': + code = 'Math.exp(' + arg + ')'; + break; + case 'POW10': + code = 'Math.pow(10,' + arg + ')'; + break; + case 'ROUND': + code = 'round(' + arg + ')'; + break; + case 'ROUNDUP': + code = 'Math.ceil(' + arg + ')'; + break; + case 'ROUNDDOWN': + code = 'Math.floor(' + arg + ')'; + break; + case 'SIN': + code = 'Math.sin(' + arg + ' / 180.0 * Math.pi)'; + break; + case 'COS': + code = 'Math.cos(' + arg + ' / 180.0 * Math.pi)'; + break; + case 'TAN': + code = 'Math.tan(' + arg + ' / 180.0 * Math.pi)'; + break; + } + if (code) { + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } + // Second, handle cases which generate values that may need parentheses + // wrapping the code. + switch (operator) { + case 'ASIN': + code = 'Math.asin(' + arg + ') / Math.pi * 180'; + break; + case 'ACOS': + code = 'Math.acos(' + arg + ') / Math.pi * 180'; + break; + case 'ATAN': + code = 'Math.atan(' + arg + ') / Math.pi * 180'; + break; + default: + throw 'Unknown math operator: ' + operator; + } + return [code, Blockly.Java.ORDER_MULTIPLICATIVE]; +}; + +Blockly.Java['math_constant'] = function(block) { + // Constants: PI, E, the Golden Ratio, sqrt(2), 1/sqrt(2), INFINITY. + var CONSTANTS = { + 'PI': ['Math.pi', Blockly.Java.ORDER_MEMBER], + 'E': ['Math.e', Blockly.Java.ORDER_MEMBER], + 'GOLDEN_RATIO': ['(1 + Math.sqrt(5)) / 2', + Blockly.Java.ORDER_MULTIPLICATIVE], + 'SQRT2': ['Math.sqrt(2)', Blockly.Java.ORDER_MEMBER], + 'SQRT1_2': ['Math.sqrt(1.0 / 2)', Blockly.Java.ORDER_MEMBER], + 'INFINITY': ['float(\'inf\')', Blockly.Java.ORDER_ATOMIC] + }; + var constant = block.getFieldValue('CONSTANT'); + if (constant != 'INFINITY') { + Blockly.Java.definitions_['import_math'] = 'import math'; + } + return CONSTANTS[constant]; +}; + +Blockly.Java['math_number_property'] = function(block) { + // Check if a number is even, odd, prime, whole, positive, or negative + // or if it is divisible by certain number. Returns true or false. + var number_to_check = Blockly.Java.valueToCode(block, 'NUMBER_TO_CHECK', + Blockly.Java.ORDER_MULTIPLICATIVE) || '0'; + var dropdown_property = block.getFieldValue('PROPERTY'); + var code; + if (dropdown_property == 'PRIME') { + Blockly.Java.definitions_['import_math'] = 'import math'; + var functionName = Blockly.Java.provideFunction_( + 'math_isPrime', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(n):', + ' # https://en.wikipedia.org/wiki/Primality_test#Naive_methods', + ' # If n is not a number but a string, try parsing it.', + ' if type(n) not in (int, float, long):', + ' try:', + ' n = float(n)', + ' except:', + ' return False', + ' if n == 2 or n == 3:', + ' return True', + ' # False if n is negative, is 1, or not whole,' + + ' or if n is divisible by 2 or 3.', + ' if n <= 1 or n % 1 != 0 or n % 2 == 0 or n % 3 == 0:', + ' return False', + ' # Check all the numbers of form 6k +/- 1, up to sqrt(n).', + ' for x in range(6, int(Math.sqrt(n)) + 2, 6):', + ' if n % (x - 1) == 0 or n % (x + 1) == 0:', + ' return False', + ' return True']); + code = functionName + '(' + number_to_check + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } + switch (dropdown_property) { + case 'EVEN': + code = number_to_check + ' % 2 == 0'; + break; + case 'ODD': + code = number_to_check + ' % 2 == 1'; + break; + case 'WHOLE': + code = number_to_check + ' % 1 == 0'; + break; + case 'POSITIVE': + code = number_to_check + ' > 0'; + break; + case 'NEGATIVE': + code = number_to_check + ' < 0'; + break; + case 'DIVISIBLE_BY': + var divisor = Blockly.Java.valueToCode(block, 'DIVISOR', + Blockly.Java.ORDER_MULTIPLICATIVE); + // If 'divisor' is some code that evals to 0, Java will raise an error. + if (!divisor || divisor == '0') { + return ['False', Blockly.Java.ORDER_ATOMIC]; + } + code = number_to_check + ' % ' + divisor + ' == 0'; + break; + } + return [code, Blockly.Java.ORDER_RELATIONAL]; +}; + +Blockly.Java['math_change'] = function(block) { + // Add to a variable in place. + var argument0 = Blockly.Java.valueToCode(block, 'DELTA', + Blockly.Java.ORDER_ADDITIVE) || '0'; + var varName = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), + Blockly.Variables.NAME_TYPE); + return varName + ' = (' + varName + ' if type(' + varName + + ') in (int, float, long) else 0) + ' + argument0 + '\n'; +}; + +// Rounding functions have a single operand. +Blockly.Java['math_round'] = Blockly.Java['math_single']; +// Trigonometry functions have a single operand. +Blockly.Java['math_trig'] = Blockly.Java['math_single']; + +Blockly.Java['math_on_list'] = function(block) { + // Math functions for lists. + var func = block.getFieldValue('OP'); + var list = Blockly.Java.valueToCode(block, 'LIST', + Blockly.Java.ORDER_NONE) || '[]'; + var code; + switch (func) { + case 'SUM': + code = 'sum(' + list + ')'; + break; + case 'MIN': + code = 'min(' + list + ')'; + break; + case 'MAX': + code = 'max(' + list + ')'; + break; + case 'AVERAGE': + var functionName = Blockly.Java.provideFunction_( + 'math_mean', + // This operation excludes null and values that aren't int or float:', + // math_mean([null, null, "aString", 1, 9]) == 5.0.', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList):', + ' localList = [e for e in myList if type(e) in (int, float, long)]', + ' if not localList: return', + ' return float(sum(localList)) / len(localList)']); + code = functionName + '(' + list + ')'; + break; + case 'MEDIAN': + var functionName = Blockly.Java.provideFunction_( + 'math_median', + // This operation excludes null values: + // math_median([null, null, 1, 3]) == 2.0. + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList):', + ' localList = sorted([e for e in myList ' + + 'if type(e) in (int, float, long)])', + ' if not localList: return', + ' if len(localList) % 2 == 0:', + ' return (localList[len(localList) / 2 - 1] + ' + + 'localList[len(localList) / 2]) / 2.0', + ' else:', + ' return localList[(len(localList) - 1) / 2]']); + code = functionName + '(' + list + ')'; + break; + case 'MODE': + var functionName = Blockly.Java.provideFunction_( + 'math_modes', + // As a list of numbers can contain more than one mode, + // the returned result is provided as an array. + // Mode of [3, 'x', 'x', 1, 1, 2, '3'] -> ['x', 1]. + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(some_list):', + ' modes = []', + ' # Using a lists of [item, count] to keep count rather than dict', + ' # to avoid "unhashable" errors when the counted item is ' + + 'itself a list or dict.', + ' counts = []', + ' maxCount = 1', + ' for item in some_list:', + ' found = False', + ' for count in counts:', + ' if count[0] == item:', + ' count[1] += 1', + ' maxCount = max(maxCount, count[1])', + ' found = True', + ' if not found:', + ' counts.append([item, 1])', + ' for counted_item, item_count in counts:', + ' if item_count == maxCount:', + ' modes.append(counted_item)', + ' return modes']); + code = functionName + '(' + list + ')'; + break; + case 'STD_DEV': + Blockly.Java.definitions_['import_math'] = 'import math'; + var functionName = Blockly.Java.provideFunction_( + 'math_standard_deviation', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(numbers):', + ' n = len(numbers)', + ' if n == 0: return', + ' mean = float(sum(numbers)) / n', + ' variance = sum((x - mean) ** 2 for x in numbers) / n', + ' return Math.sqrt(variance)']); + code = functionName + '(' + list + ')'; + break; + case 'RANDOM': + Blockly.Java.definitions_['import_random'] = 'import random'; + code = 'random.choice(' + list + ')'; + break; + default: + throw 'Unknown operator: ' + func; + } + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['math_modulo'] = function(block) { + // Remainder computation. + var argument0 = Blockly.Java.valueToCode(block, 'DIVIDEND', + Blockly.Java.ORDER_MULTIPLICATIVE) || '0'; + var argument1 = Blockly.Java.valueToCode(block, 'DIVISOR', + Blockly.Java.ORDER_MULTIPLICATIVE) || '0'; + var code = argument0 + ' % ' + argument1; + return [code, Blockly.Java.ORDER_MULTIPLICATIVE]; +}; + + +Blockly.Java['math_format_as_decimal'] = function(block) { + // Remainder computation. + var argument0 = Blockly.Java.valueToCode(block, 'NUM', + Blockly.Java.ORDER_MULTIPLICATIVE) || '0'; + var argument1 = Blockly.Java.valueToCode(block, 'PLACES', + Blockly.Java.ORDER_MULTIPLICATIVE) || '0'; + var leng = Array(++argument1).join('0'); + var code = 'new DecimalFormat("#.'+leng+'").format('+argument0+')'; + return [code, Blockly.Java.ORDER_MULTIPLICATIVE]; +}; + +Blockly.Java['math_constrain'] = function(block) { + // Constrain a number between two limits. + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '0'; + var argument1 = Blockly.Java.valueToCode(block, 'LOW', + Blockly.Java.ORDER_NONE) || '0'; + var argument2 = Blockly.Java.valueToCode(block, 'HIGH', + Blockly.Java.ORDER_NONE) || 'float(\'inf\')'; + var code = 'min(max(' + argument0 + ', ' + argument1 + '), ' + + argument2 + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['math_random_int'] = function(block) { + // Random integer between [X] and [Y]. + Blockly.Java.definitions_['import_random'] = 'import random'; + var argument0 = Blockly.Java.valueToCode(block, 'FROM', + Blockly.Java.ORDER_NONE) || '0'; + var argument1 = Blockly.Java.valueToCode(block, 'TO', + Blockly.Java.ORDER_NONE) || '0'; + var code = 'random.randint(' + argument0 + ', ' + argument1 + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['math_random_float'] = function(block) { + // Random fraction between 0 and 1. + Blockly.Java.definitions_['import_random'] = 'import random'; + return ['random.random()', Blockly.Java.ORDER_FUNCTION_CALL]; +}; diff --git a/generators/java/procedures.js b/generators/java/procedures.js new file mode 100644 index 00000000000..27795bb2f0f --- /dev/null +++ b/generators/java/procedures.js @@ -0,0 +1,109 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for procedure blocks. + * @author fraser@google.com (Neil Fraser) + */ +'use strict'; + +goog.provide('Blockly.Java.procedures'); + +goog.require('Blockly.Java'); + + +Blockly.Java['procedures_defreturn'] = function(block) { + // Define a procedure with a return value. + var funcName = Blockly.Java.variableDB_.getName(block.getFieldValue('NAME'), + Blockly.Procedures.NAME_TYPE); + var branch = Blockly.Java.statementToCode(block, 'STACK'); + if (Blockly.Java.STATEMENT_PREFIX) { + branch = Blockly.Java.prefixLines( + Blockly.Java.STATEMENT_PREFIX.replace(/%1/g, + '\'' + block.id + '\''), Blockly.Java.INDENT) + branch; + } + if (Blockly.Java.INFINITE_LOOP_TRAP) { + branch = Blockly.Java.INFINITE_LOOP_TRAP.replace(/%1/g, + '"' + block.id + '"') + branch; + } + var returnValue = Blockly.Java.valueToCode(block, 'RETURN', + Blockly.Java.ORDER_NONE) || ''; + if (returnValue) { + returnValue = ' return ' + returnValue + ';\n'; + } else if (!branch) { + branch = Blockly.Java.PASS; + } + var args = []; + for (var x = 0; x < block.arguments_.length; x++) { + args[x] = Blockly.Java.variableDB_.getName(block.arguments_[x]['name'], + Blockly.Variables.NAME_TYPE); + } + var code = 'public ' + funcName + '(' + args.join(', ') + '){\n' + + branch + returnValue + "}"; + code = Blockly.Java.scrub_(block, code); + Blockly.Java.definitions_[funcName] = code; + return null; +}; + +// Defining a procedure without a return value uses the same generator as +// a procedure with a return value. +Blockly.Java['procedures_defnoreturn'] = + Blockly.Java['procedures_defreturn']; + +Blockly.Java['procedures_callreturn'] = function(block) { + // Call a procedure with a return value. + var funcName = Blockly.Java.variableDB_.getName(block.getFieldValue('NAME'), + Blockly.Procedures.NAME_TYPE); + var args = []; + for (var x = 0; x < block.arguments_.length; x++) { + args[x] = Blockly.Java.valueToCode(block, 'ARG' + x, + Blockly.Java.ORDER_NONE) || 'null'; + } + var code = funcName + '(' + args.join(', ') + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['procedures_callnoreturn'] = function(block) { + // Call a procedure with no return value. + var funcName = Blockly.Java.variableDB_.getName(block.getFieldValue('NAME'), + Blockly.Procedures.NAME_TYPE); + var args = []; + for (var x = 0; x < block.arguments_.length; x++) { + args[x] = Blockly.Java.valueToCode(block, 'ARG' + x, + Blockly.Java.ORDER_NONE) || 'null'; + } + var code = funcName + '(' + args.join(', ') + ');\n'; + return code; +}; + +Blockly.Java['procedures_ifreturn'] = function(block) { + // Conditionally return value from a procedure. + var condition = Blockly.Java.valueToCode(block, 'CONDITION', + Blockly.Java.ORDER_NONE) || 'False'; + var code = 'if (' + condition + '){\n'; + if (block.hasReturnValue_) { + var value = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || 'None'; + code += ' return ' + value + ';\n}'; + } else { + code += ' return;\n}'; + } + return code; +}; diff --git a/generators/java/text.js b/generators/java/text.js new file mode 100644 index 00000000000..d289bcb5475 --- /dev/null +++ b/generators/java/text.js @@ -0,0 +1,304 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for text blocks. + * @author q.neutron@gmail.com (Quynh Neutron) + */ +'use strict'; + +goog.provide('Blockly.Java.texts'); + +goog.require('Blockly.Java'); + + +Blockly.Java['text'] = function(block) { + // Text value. + var code = Blockly.Java.quote_(block.getFieldValue('TEXT')); + return [code, Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['text_join'] = function(block) { + // Create a string made up of any number of elements of any type. + //Should we allow joining by '-' or ',' or any other characters? + var code; + if (block.itemCount_ == 0) { + return ['\'\'', Blockly.Java.ORDER_ATOMIC]; + } else if (block.itemCount_ == 1) { + var argument0 = Blockly.Java.valueToCode(block, 'ADD0', + Blockly.Java.ORDER_NONE) || '\'\''; + code = 'str(' + argument0 + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else if (block.itemCount_ == 2) { + var argument0 = Blockly.Java.valueToCode(block, 'ADD0', + Blockly.Java.ORDER_NONE) || '\'\''; + var argument1 = Blockly.Java.valueToCode(block, 'ADD1', + Blockly.Java.ORDER_NONE) || '\'\''; + var code = 'str(' + argument0 + ') + str(' + argument1 + ')'; + return [code, Blockly.Java.ORDER_UNARY_SIGN]; + } else { + var code = []; + for (var n = 0; n < block.itemCount_; n++) { + code[n] = Blockly.Java.valueToCode(block, 'ADD' + n, + Blockly.Java.ORDER_NONE) || '\'\''; + } + var tempVar = Blockly.Java.variableDB_.getDistinctName('temp_value', + Blockly.Variables.NAME_TYPE); + code = '\'\'.join([str(' + tempVar + ') for ' + tempVar + ' in [' + + code.join(', ') + ']])'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } +}; + +Blockly.Java['text_append'] = function(block) { + // Append to a variable in place. + var varName = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), + Blockly.Variables.NAME_TYPE); + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_NONE) || '\'\''; + return varName + ' = str(' + varName + ') + str(' + argument0 + ')\n'; +}; + +Blockly.Java['text_length'] = function(block) { + // String length. + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '\'\''; + return ['len(' + argument0 + ')', Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['text_isEmpty'] = function(block) { + // Is the string null? + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '\'\''; + var code = 'not len(' + argument0 + ')'; + return [code, Blockly.Java.ORDER_LOGICAL_NOT]; +}; + +Blockly.Java['text_indexOf'] = function(block) { + // Search the text for a substring. + // Should we allow for non-case sensitive??? + var operator = block.getFieldValue('END') == 'FIRST' ? 'find' : 'rfind'; + var argument0 = Blockly.Java.valueToCode(block, 'FIND', + Blockly.Java.ORDER_NONE) || '\'\''; + var argument1 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_MEMBER) || '\'\''; + var code = argument1 + '.' + operator + '(' + argument0 + ') + 1'; + return [code, Blockly.Java.ORDER_MEMBER]; +}; + +Blockly.Java['text_charAt'] = function(block) { + // Get letter at index. + // Note: Until January 2013 this block did not have the WHERE input. + var where = block.getFieldValue('WHERE') || 'FROM_START'; + var at = Blockly.Java.valueToCode(block, 'AT', + Blockly.Java.ORDER_UNARY_SIGN) || '1'; + var text = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_MEMBER) || '\'\''; + switch (where) { + case 'FIRST': + var code = text + '[0]'; + return [code, Blockly.Java.ORDER_MEMBER]; + case 'LAST': + var code = text + '[-1]'; + return [code, Blockly.Java.ORDER_MEMBER]; + case 'FROM_START': + // Blockly uses one-based indicies. + if (Blockly.isNumber(at)) { + // If the index is a naked number, decrement it right now. + at = parseInt(at, 10) - 1; + } else { + // If the index is dynamic, decrement it in code. + at = 'int(' + at + ' - 1)'; + } + var code = text + '[' + at + ']'; + return [code, Blockly.Java.ORDER_MEMBER]; + case 'FROM_END': + var code = text + '[-' + at + ']'; + return [code, Blockly.Java.ORDER_MEMBER]; + case 'RANDOM': + Blockly.Java.definitions_['import_random'] = 'import random'; + var functionName = Blockly.Java.provideFunction_( + 'text_random_letter', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(text):', + ' x = int(random.random() * len(text))', + ' return text[x];']); + code = functionName + '(' + text + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } + throw 'Unhandled option (text_charAt).'; +}; + +Blockly.Java['text_getSubstring'] = function(block) { + // Get substring. + var text = Blockly.Java.valueToCode(block, 'STRING', + Blockly.Java.ORDER_MEMBER) || '\'\''; + var where1 = block.getFieldValue('WHERE1'); + var where2 = block.getFieldValue('WHERE2'); + var at1 = Blockly.Java.valueToCode(block, 'AT1', + Blockly.Java.ORDER_ADDITIVE) || '1'; + var at2 = Blockly.Java.valueToCode(block, 'AT2', + Blockly.Java.ORDER_ADDITIVE) || '1'; + if (where1 == 'FIRST' || (where1 == 'FROM_START' && at1 == '1')) { + at1 = ''; + } else if (where1 == 'FROM_START') { + // Blockly uses one-based indicies. + if (Blockly.isNumber(at1)) { + // If the index is a naked number, decrement it right now. + at1 = parseInt(at1, 10) - 1; + } else { + // If the index is dynamic, decrement it in code. + at1 = 'int(' + at1 + ' - 1)'; + } + } else if (where1 == 'FROM_END') { + if (Blockly.isNumber(at1)) { + at1 = -parseInt(at1, 10); + } else { + at1 = '-int(' + at1 + ')'; + } + } + if (where2 == 'LAST' || (where2 == 'FROM_END' && at2 == '1')) { + at2 = ''; + } else if (where1 == 'FROM_START') { + if (Blockly.isNumber(at2)) { + at2 = parseInt(at2, 10); + } else { + at2 = 'int(' + at2 + ')'; + } + } else if (where1 == 'FROM_END') { + if (Blockly.isNumber(at2)) { + // If the index is a naked number, increment it right now. + at2 = 1 - parseInt(at2, 10); + if (at2 == 0) { + at2 = ''; + } + } else { + // If the index is dynamic, increment it in code. + // Add special case for -0. + Blockly.Java.definitions_['import_sys'] = 'import sys'; + at2 = 'int(1 - ' + at2 + ') or sys.maxsize'; + } + } + var code = text + '[' + at1 + ' : ' + at2 + ']'; + return [code, Blockly.Java.ORDER_MEMBER]; +}; + +Blockly.Java['text_changeCase'] = function(block) { + // Change capitalization. + var OPERATORS = { + 'UPPERCASE': '.upper()', + 'LOWERCASE': '.lower()', + 'TITLECASE': '.title()' + }; + var operator = OPERATORS[block.getFieldValue('CASE')]; + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_MEMBER) || '\'\''; + var code = argument0 + operator; + return [code, Blockly.Java.ORDER_MEMBER]; +}; + +Blockly.Java['text_trim'] = function(block) { + // Trim spaces. + var OPERATORS = { + 'LEFT': '.lstrip()', + 'RIGHT': '.rstrip()', + 'BOTH': '.strip()' + }; + var operator = OPERATORS[block.getFieldValue('MODE')]; + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_MEMBER) || '\'\''; + var code = argument0 + operator; + return [code, Blockly.Java.ORDER_MEMBER]; +}; + +Blockly.Java['text_print'] = function(block) { + // Print statement. + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_NONE) || '\'\''; + return 'System.out.println(' + argument0 + '.toString());\n'; +}; + +Blockly.Java['text_prompt'] = function(block) { + // Prompt function (internal message). + var functionName = Blockly.Java.provideFunction_( + 'text_prompt', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(msg):', + ' try:', + ' return raw_input(msg)', + ' except NameError:', + ' return input(msg)']); + var msg = Blockly.Java.quote_(block.getFieldValue('TEXT')); + var code = functionName + '(' + msg + ')'; + var toNumber = block.getFieldValue('TYPE') == 'NUMBER'; + if (toNumber) { + code = 'float(' + code + ')'; + } + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; + +Blockly.Java['text_prompt_ext'] = function(block) { + // Prompt function (external message). + var functionName = Blockly.Java.provideFunction_( + 'text_prompt', + ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(msg):', + ' try:', + ' return raw_input(msg)', + ' except NameError:', + ' return input(msg)']); + var msg = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_NONE) || '\'\''; + var code = functionName + '(' + msg + ')'; + var toNumber = block.getFieldValue('TYPE') == 'NUMBER'; + if (toNumber) { + code = 'float(' + code + ')'; + } + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; +}; + + +Blockly.Java['text_comment'] = function(block) { + // Display comment + + var comment = block.getFieldValue('COMMENT') || ''; + var code = '/*\n' + comment + '\n*/\n'; + + return code; +}; + + +Blockly.Java['text_code_insert'] = function(block) { + // Display code + var type = block.getFieldValue('TYPE') || ''; + var code = ''; + if (type == 'Java') + { + var comment = block.getFieldValue('CODE') || ''; + code = '//Arbitrary Java code insert block'; + if (comment != '') + { + code += '\n'; + code += comment +'\n'; + } + else + { + code += ' is empty\n'; + } + } + return code; +}; diff --git a/generators/java/variables.js b/generators/java/variables.js new file mode 100644 index 00000000000..edef9f71ed4 --- /dev/null +++ b/generators/java/variables.js @@ -0,0 +1,119 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for variable blocks. + * @author q.neutron@gmail.com (Quynh Neutron) + */ +'use strict'; + +goog.provide('Blockly.Java.variables'); + +goog.require('Blockly.Java'); + + +Blockly.Java['variables_get'] = function(block) { + // Variable getter. + var code = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), + Blockly.Variables.NAME_TYPE); + return [code, Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['variables_set'] = function(block) { + // Variable setter. + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '0'; + var varName = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), + Blockly.Variables.NAME_TYPE); + return varName + ' = ' + argument0 + ';\n'; +}; + +Blockly.Java['hash_variables_get'] = function(block) { + // Variable getter. + var getter = 'getString'; + var parent = block.getParent(); + // Look at our parents to see if we know the type that we are assigning to + if (parent) { + var func = parent.getVars; + if (func) { + var blockVariables = func.call(parent); + for (var y = 0; y < blockVariables.length; y++) { + var varName = blockVariables[y]; + // Variable name may be null if the block is only half-built. + if (varName) { + var vartype = Blockly.Java.GetVariableType(varName); + + if (vartype === 'JsonArray') { + getter = 'getJsonArray'; + } else if (vartype === 'JsonObject') { + getter = 'getJsonObject'; + } + } + } + } + } + var code = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), + Blockly.Variables.NAME_TYPE) + '.' + getter + '('+ + Blockly.Java.quote_(block.getFieldValue('HASHKEY')) + ')' ; + return [code, Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['hash_parmvariables_get'] = function(block) { + // Variable getter. + var getter = 'getString'; + var parent = block.getParent(); + // Look at our parents to see if we know the type that we are assigning to + if (parent) { + var func = parent.getVars; + if (func) { + var blockVariables = func.call(parent); + for (var y = 0; y < blockVariables.length; y++) { + var varName = blockVariables[y]; + // Variable name may be null if the block is only half-built. + if (varName) { + var vartype = Blockly.Java.GetVariableType(varName); + + if (vartype === 'JsonArray') { + getter = 'getJsonArray'; + } else if (vartype === 'JsonObject') { + getter = 'getJsonObject'; + } + } + } + } else { + } + } + var argument0 = Blockly.Java.valueToCode(block, 'VAR', + Blockly.Java.ORDER_NONE) || '0'; + var code = argument0 + '.' + getter + '('+ + Blockly.Java.quote_(block.getFieldValue('HASHKEY')) + ')' ; + return [code, Blockly.Java.ORDER_ATOMIC]; +}; + + +Blockly.Java['hash_variables_set'] = function(block) { + // Variable setter. + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '0'; + var varName = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), + Blockly.Variables.NAME_TYPE); + return varName + '{' + block.getFieldValue('HASHKEY') + '}' + + ' = ' + argument0 + ';\n'; +}; diff --git a/java_compressed.js b/java_compressed.js new file mode 100644 index 00000000000..abde74bae3b --- /dev/null +++ b/java_compressed.js @@ -0,0 +1,98 @@ +// Do not edit this file; automatically generated by build.py. +"use strict"; + + +// Copyright 2012 Google Inc. Apache License 2.0 +Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern"); +Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; +Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.EXTRAINDENT="";Blockly.Java.VariableTypes_={};Blockly.Java.AppName_="MyApp";Blockly.Java.needImports_="javax.json.Json javax.json.JsonArray javax.json.JsonObject javax.json.JsonReader javax.json.stream.JsonParsingException java.io.IOException java.io.StringReader".split(" "); +Blockly.Java.SetAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a;console.log(this.AppName_+" --- <"+a+">")};Blockly.Java.GetAppName=function(){return this.AppName_};Blockly.Java.GetVariableType=function(a){(a=Blockly.Java.VariableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.addImport=function(a){a="import "+a+";";Blockly.Java.imports_[a]=a}; +Blockly.Java.getImports=function(a){if(a)for(var b=0;b",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Java.ORDER_RELATIONAL,d=Blockly.Java.valueToCode(a,"A",c)||"0";a=Blockly.Java.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]}; +Blockly.Java.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?" && ":" || ",c="and"==b?Blockly.Java.ORDER_LOGICAL_AND:Blockly.Java.ORDER_LOGICAL_OR,d=Blockly.Java.valueToCode(a,"A",c);a=Blockly.Java.valueToCode(a,"B",c);if(d||a){var e=" && "==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+b+a,c]};Blockly.Java.logic_negate=function(a){return["!("+(Blockly.Java.valueToCode(a,"BOOL",Blockly.Java.ORDER_LOGICAL_NOT)||"true")+")",Blockly.Java.ORDER_LOGICAL_NOT]}; +Blockly.Java.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_null=function(a){return["null",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_ternary=function(a){var b=Blockly.Java.valueToCode(a,"IF",Blockly.Java.ORDER_CONDITIONAL)||"false",c=Blockly.Java.valueToCode(a,"THEN",Blockly.Java.ORDER_CONDITIONAL)||"null";a=Blockly.Java.valueToCode(a,"ELSE",Blockly.Java.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Java.ORDER_CONDITIONAL]}; +// Copyright 2012 Google Inc. Apache License 2.0 +Blockly.Java.loops={};Blockly.Java.controls_repeat=function(a){var b=parseInt(a.getFieldValue("TIMES"),10),c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; +Blockly.Java.controls_repeat_ext=function(a){var b=Blockly.Java.valueToCode(a,"TIMES",Blockly.Java.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")",c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; +Blockly.Java.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Java.valueToCode(a,"BOOL",b?Blockly.Java.ORDER_LOGICAL_NOT:Blockly.Java.ORDER_NONE)||"false",d=Blockly.Java.statementToCode(a,"DO"),d=Blockly.Java.addLoopTrap(d,a.id)||Blockly.Java.PASS;b&&(c="!"+c);return"while ("+c+") {\n"+d+"} // end while\n"}; +Blockly.Java.controls_for=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);Blockly.Java.GetVariableType(a.getFieldValue("VAR"));var c=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0",d=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0",e=Blockly.Java.valueToCode(a,"BY",Blockly.Java.ORDER_NONE)||"1",g=Blockly.Java.statementToCode(a,"DO"),g=Blockly.Java.addLoopTrap(g,a.id)||Blockly.Java.PASS;a="";if(Blockly.isNumber(c)&& +Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),h="<=",f="++";c>d&&(h=">=",e=-e);0>e?f=" -= "+Math.abs(e):1!=e&&(f=" += "+e);a+="for ("+b+" = "+c+"; "+b+h+d+"; "+b+f+")"}else a+="for ("+b+" = "+c+"; "+b+"<="+d+"; "+b+" += "+e+")";return a+(" {\n"+g+"} // end for\n")}; +Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;return"for ("+c+" "+b+" :"+d+") {\n"+e+"} // end for\n"}; +Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";}; +// Copyright 2012 Google Inc. Apache License 2.0 +Blockly.Java.math={};Blockly.Java.addReservedWords("math,random");Blockly.Java.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; +Blockly.Java.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Java.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Java.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Java.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Java.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Java.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Java.valueToCode(a,"A",b)||"0";a=Blockly.Java.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; +Blockly.Java.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Java.ORDER_UNARY_SIGN];Blockly.Java.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0":Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_NONE)||"0";switch(b){case "ABS":c="Math.fabs("+a+")";break;case "ROOT":c="Math.sqrt("+a+")";break; +case "LN":c="Math.log("+a+")";break;case "LOG10":c="Math.log10("+a+")";break;case "EXP":c="Math.exp("+a+")";break;case "POW10":c="Math.pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="Math.ceil("+a+")";break;case "ROUNDDOWN":c="Math.floor("+a+")";break;case "SIN":c="Math.sin("+a+" / 180.0 * Math.pi)";break;case "COS":c="Math.cos("+a+" / 180.0 * Math.pi)";break;case "TAN":c="Math.tan("+a+" / 180.0 * Math.pi)"}if(c)return[c,Blockly.Java.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c= +"Math.asin("+a+") / Math.pi * 180";break;case "ACOS":c="Math.acos("+a+") / Math.pi * 180";break;case "ATAN":c="Math.atan("+a+") / Math.pi * 180";break;default:throw"Unknown math operator: "+b;}return[c,Blockly.Java.ORDER_MULTIPLICATIVE]}; +Blockly.Java.math_constant=function(a){var b={PI:["Math.pi",Blockly.Java.ORDER_MEMBER],E:["Math.e",Blockly.Java.ORDER_MEMBER],GOLDEN_RATIO:["(1 + Math.sqrt(5)) / 2",Blockly.Java.ORDER_MULTIPLICATIVE],SQRT2:["Math.sqrt(2)",Blockly.Java.ORDER_MEMBER],SQRT1_2:["Math.sqrt(1.0 / 2)",Blockly.Java.ORDER_MEMBER],INFINITY:["float('inf')",Blockly.Java.ORDER_ATOMIC]};a=a.getFieldValue("CONSTANT");"INFINITY"!=a&&(Blockly.Java.definitions_.import_math="import math");return b[a]}; +Blockly.Java.math_number_property=function(a){var b=Blockly.Java.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Java.ORDER_MULTIPLICATIVE)||"0",c=a.getFieldValue("PROPERTY"),d;if("PRIME"==c)return Blockly.Java.definitions_.import_math="import math",d=Blockly.Java.provideFunction_("math_isPrime",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(n):"," # https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," # If n is not a number but a string, try parsing it."," if type(n) not in (int, float, long):", +" try:"," n = float(n)"," except:"," return False"," if n == 2 or n == 3:"," return True"," # False if n is negative, is 1, or not whole, or if n is divisible by 2 or 3."," if n <= 1 or n % 1 != 0 or n % 2 == 0 or n % 3 == 0:"," return False"," # Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for x in range(6, int(Math.sqrt(n)) + 2, 6):"," if n % (x - 1) == 0 or n % (x + 1) == 0:"," return False"," return True"])+"("+b+")",[d,Blockly.Java.ORDER_FUNCTION_CALL]; +switch(c){case "EVEN":d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d=b+" % 1 == 0";break;case "POSITIVE":d=b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE);if(!a||"0"==a)return["False",Blockly.Java.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Java.ORDER_RELATIONAL]}; +Blockly.Java.math_change=function(a){var b=Blockly.Java.valueToCode(a,"DELTA",Blockly.Java.ORDER_ADDITIVE)||"0";a=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = ("+a+" if type("+a+") in (int, float, long) else 0) + "+b+"\n"};Blockly.Java.math_round=Blockly.Java.math_single;Blockly.Java.math_trig=Blockly.Java.math_single; +Blockly.Java.math_on_list=function(a){var b=a.getFieldValue("OP");a=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";switch(b){case "SUM":b="sum("+a+")";break;case "MIN":b="min("+a+")";break;case "MAX":b="max("+a+")";break;case "AVERAGE":b=Blockly.Java.provideFunction_("math_mean",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(myList):"," localList = [e for e in myList if type(e) in (int, float, long)]"," if not localList: return"," return float(sum(localList)) / len(localList)"]); +b=b+"("+a+")";break;case "MEDIAN":b=Blockly.Java.provideFunction_("math_median",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(myList):"," localList = sorted([e for e in myList if type(e) in (int, float, long)])"," if not localList: return"," if len(localList) % 2 == 0:"," return (localList[len(localList) / 2 - 1] + localList[len(localList) / 2]) / 2.0"," else:"," return localList[(len(localList) - 1) / 2]"]);b=b+"("+a+")";break;case "MODE":b=Blockly.Java.provideFunction_("math_modes", +["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(some_list):"," modes = []"," # Using a lists of [item, count] to keep count rather than dict",' # to avoid "unhashable" errors when the counted item is itself a list or dict.'," counts = []"," maxCount = 1"," for item in some_list:"," found = False"," for count in counts:"," if count[0] == item:"," count[1] += 1"," maxCount = max(maxCount, count[1])"," found = True"," if not found:"," counts.append([item, 1])", +" for counted_item, item_count in counts:"," if item_count == maxCount:"," modes.append(counted_item)"," return modes"]);b=b+"("+a+")";break;case "STD_DEV":Blockly.Java.definitions_.import_math="import math";b=Blockly.Java.provideFunction_("math_standard_deviation",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(numbers):"," n = len(numbers)"," if n == 0: return"," mean = float(sum(numbers)) / n"," variance = sum((x - mean) ** 2 for x in numbers) / n"," return Math.sqrt(variance)"]); +b=b+"("+a+")";break;case "RANDOM":Blockly.Java.definitions_.import_random="import random";b="random.choice("+a+")";break;default:throw"Unknown operator: "+b;}return[b,Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_modulo=function(a){var b=Blockly.Java.valueToCode(a,"DIVIDEND",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Java.ORDER_MULTIPLICATIVE]}; +Blockly.Java.math_format_as_decimal=function(a){var b=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"PLACES",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return['new DecimalFormat("#.'+Array(++a).join("0")+'").format('+b+")",Blockly.Java.ORDER_MULTIPLICATIVE]}; +Blockly.Java.math_constrain=function(a){var b=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"0",c=Blockly.Java.valueToCode(a,"LOW",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"HIGH",Blockly.Java.ORDER_NONE)||"float('inf')";return["min(max("+b+", "+c+"), "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]}; +Blockly.Java.math_random_int=function(a){Blockly.Java.definitions_.import_random="import random";var b=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0";return["random.randint("+b+", "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_random_float=function(a){Blockly.Java.definitions_.import_random="import random";return["random.random()",Blockly.Java.ORDER_FUNCTION_CALL]}; +// Copyright 2012 Google Inc. Apache License 2.0 +Blockly.Java.procedures={}; +Blockly.Java.procedures_defreturn=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=Blockly.Java.statementToCode(a,"STACK");Blockly.Java.STATEMENT_PREFIX&&(c=Blockly.Java.prefixLines(Blockly.Java.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.Java.INDENT)+c);Blockly.Java.INFINITE_LOOP_TRAP&&(c=Blockly.Java.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+c);var d=Blockly.Java.valueToCode(a,"RETURN",Blockly.Java.ORDER_NONE)||"";d?d=" return "+ +d+";\n":c||(c=Blockly.Java.PASS);for(var e=[],g=0;g Date: Tue, 30 Jun 2015 11:11:38 -0400 Subject: [PATCH 03/84] Initial Java implementation Implementation of Java generators and Typeblock capability --- blockly_compressed.js | 215 +++++++++++++++------------- blockly_uncompressed.js | 106 ++++++++------ blocks_compressed.js | 2 +- build.py | 1 + core/connection.js | 6 +- core/field_image.js | 9 +- core/field_label.js | 1 + core/generator.js | 75 ++++++++-- core/input.js | 27 +++- core/names.js | 12 +- core/procedures.js | 8 +- core/toolbox.js | 9 -- core/variables.js | 72 ++++++++++ core/workspace_svg.js | 5 +- dart_compressed.js | 8 +- demos/code/code.js | 10 +- demos/index.html | 2 +- demos/maxBlocks/index.html | 3 +- generators/dart/procedures.js | 2 +- generators/dart/variables.js | 19 +++ generators/javascript/procedures.js | 2 +- generators/javascript/variables.js | 19 +++ generators/python.js | 13 ++ generators/python/math.js | 10 ++ generators/python/procedures.js | 2 +- generators/python/variables.js | 19 +++ javascript_compressed.js | 8 +- python_compressed.js | 13 +- tests/generators/index.html | 32 ++--- tests/generators/unittest.js | 28 ++-- 30 files changed, 492 insertions(+), 246 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 486ea44504d..424cfe7841b 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -3,33 +3,34 @@ var COMPILED=!0,goog=goog||{};goog.global=this;goog.isDef=function(a){return void 0!==a};goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]?c[d]:c[d]={}}; goog.define=function(a,b){var c=b;COMPILED||(goog.global.CLOSURE_UNCOMPILED_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES,a)?c=goog.global.CLOSURE_UNCOMPILED_DEFINES[a]:goog.global.CLOSURE_DEFINES&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,a)&&(c=goog.global.CLOSURE_DEFINES[a]));goog.exportPath_(a,c)};goog.DEBUG=!0;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG; -goog.provide=function(a){if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)};goog.constructNamespace_=function(a,b){if(!COMPILED){delete goog.implicitNamespaces_[a];for(var c=a;(c=c.substring(0,c.lastIndexOf(".")))&&!goog.getObjectByName(c);)goog.implicitNamespaces_[c]=!0}goog.exportPath_(a,b)};goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/; +goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;goog.provide=function(a){if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)};goog.constructNamespace_=function(a,b){if(!COMPILED){delete goog.implicitNamespaces_[a];for(var c=a;(c=c.substring(0,c.lastIndexOf(".")))&&!goog.getObjectByName(c);)goog.implicitNamespaces_[c]=!0}goog.exportPath_(a,b)};goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/; goog.module=function(a){if(!goog.isString(a)||!a||-1==a.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInModuleLoader_())throw Error("Module "+a+" has been loaded incorrectly.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=a;if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a]}};goog.module.get=function(a){return goog.module.getInternal_(a)}; goog.module.getInternal_=function(a){if(!COMPILED)return goog.isProvided_(a)?a in goog.loadedModules_?goog.loadedModules_[a]:goog.getObjectByName(a):null};goog.moduleLoaderState_=null;goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_};goog.module.declareTestMethods=function(){if(!goog.isInModuleLoader_())throw Error("goog.module.declareTestMethods must be called from within a goog.module");goog.moduleLoaderState_.declareTestMethods=!0}; goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0}; goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.forwardDeclare=function(a){};COMPILED||(goog.isProvided_=function(a){return a in goog.loadedModules_||!goog.implicitNamespaces_[a]&&goog.isDefAndNotNull(goog.getObjectByName(a))},goog.implicitNamespaces_={"goog.module":!0}); goog.getObjectByName=function(a,b){for(var c=a.split("."),d=b||goog.global,e;e=c.shift();)if(goog.isDefAndNotNull(d[e]))d=d[e];else return null;return d};goog.globalize=function(a,b){var c=b||goog.global,d;for(d in a)c[d]=a[d]};goog.addDependency=function(a,b,c,d){if(goog.DEPENDENCIES_ENABLED){var e;a=a.replace(/\\/g,"/");for(var f=goog.dependencies_,g=0;e=b[g];g++)f.nameToPath[e]=a,f.pathIsModule[a]=!!d;for(d=0;b=c[d];d++)a in f.requires||(f.requires[a]={}),f.requires[a][b]=!0}}; goog.ENABLE_DEBUG_LOADER=!0;goog.logToConsole_=function(a){goog.global.console&&goog.global.console.error(a)}; -goog.require=function(a){if(!COMPILED){goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(a);if(goog.isProvided_(a))return goog.isInModuleLoader_()?goog.module.getInternal_(a):null;if(goog.ENABLE_DEBUG_LOADER){var b=goog.getPathFromDeps_(a);if(b)return goog.included_[b]=!0,goog.writeScripts_(),null}a="goog.require could not find: "+a;goog.logToConsole_(a);throw Error(a);}};goog.basePath="";goog.nullFunction=function(){};goog.identityFunction=function(a,b){return a}; +goog.require=function(a){if(!COMPILED){goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(a);if(goog.isProvided_(a))return goog.isInModuleLoader_()?goog.module.getInternal_(a):null;if(goog.ENABLE_DEBUG_LOADER){var b=goog.getPathFromDeps_(a);if(b)return goog.included_[b]=!0,goog.writeScripts_(),null}a="goog.require could not find: "+a;goog.logToConsole_(a);throw Error(a);}};goog.basePath="";goog.nullFunction=function(){}; goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.LOAD_MODULE_USING_EVAL=!0;goog.SEAL_MODULE_EXPORTS=goog.DEBUG;goog.loadedModules_={};goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER; -goog.DEPENDENCIES_ENABLED&&(goog.included_={},goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return"undefined"!=typeof a&&"write"in a},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("script"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?"), +goog.DEPENDENCIES_ENABLED&&(goog.included_={},goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return"undefined"!=typeof a&&"write"in a},goog.findBasePath_=function(){if(goog.global.CLOSURE_BASE_PATH)goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("SCRIPT"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?"), d=-1==d?c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}},goog.importScript_=function(a,b){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(a,b)&&(goog.dependencies_.written[a]=!0)},goog.IS_OLD_IE_=!goog.global.atob&&goog.global.document&&goog.global.document.all,goog.importModule_=function(a){goog.importScript_("",'goog.retrieveAndExecModule_("'+a+'");')&&(goog.dependencies_.written[a]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(a,b){return goog.LOAD_MODULE_USING_EVAL&& goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(b+"\n//# sourceURL="+a+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+b+"\n;return exports});\n//# sourceURL="+a+"\n"},goog.loadQueuedModules_=function(){var a=goog.queuedModules_.length;if(0\x3c/script>")):c.write(' - - - - - - - - - - - - @@ -46,6 +34,16 @@ + + + + + + + + + + @@ -138,13 +136,13 @@ setOutput(code); } -function toPhp() { - var code = Blockly.PHP.workspaceToCode(workspace); +function toDart() { + var code = Blockly.Dart.workspaceToCode(workspace); setOutput(code); } -function toDart() { - var code = Blockly.Dart.workspaceToCode(workspace); +function toJava() { + var code = Blockly.Java.workspaceToCode(workspace); setOutput(code); } @@ -423,8 +421,8 @@

Blockly Generator Tests

- +

diff --git a/tests/generators/unittest.js b/tests/generators/unittest.js index 560e6b91fee..1bd917c945f 100644 --- a/tests/generators/unittest.js +++ b/tests/generators/unittest.js @@ -36,7 +36,18 @@ Blockly.Blocks['unittest_main'] = { }, getVars: function() { return ['unittestResults']; - } + }, + /** + * Return all types of variables referenced by this block. + * @return {!Array.} List of variable names with their types. + * @this Blockly.Block + */ + getVarsTypes: function() { + var vartypes = {}; + vartypes['unittestResults'] = ['Array']; + return vartypes; + }, + }; Blockly.Blocks['unittest_assertequals'] = { @@ -53,9 +64,8 @@ Blockly.Blocks['unittest_assertequals'] = { .appendField('expected'); this.setTooltip('Tests that "actual == expected".'); }, - getVars: function() { - return ['unittestResults']; - } + getVars: Blockly.Blocks['unittest_main'].getVars, + getVarsTypes: Blockly.Blocks['unittest_main'].getVarsTypes }; Blockly.Blocks['unittest_assertvalue'] = { @@ -72,9 +82,8 @@ Blockly.Blocks['unittest_assertvalue'] = { [['true', 'TRUE'], ['false', 'FALSE'], ['null', 'NULL']]), 'EXPECTED'); this.setTooltip('Tests that the value is true, false, or null.'); }, - getVars: function() { - return ['unittestResults']; - } + getVars: Blockly.Blocks['unittest_main'].getVars, + getVarsTypes: Blockly.Blocks['unittest_main'].getVarsTypes }; Blockly.Blocks['unittest_fail'] = { @@ -88,7 +97,6 @@ Blockly.Blocks['unittest_fail'] = { .appendField('fail'); this.setTooltip('Records an error.'); }, - getVars: function() { - return ['unittestResults']; - } + getVars: Blockly.Blocks['unittest_main'].getVars, + getVarsTypes: Blockly.Blocks['unittest_main'].getVarsTypes }; From 3519c97402051bde31c0c146adb8cd0c56e0b1d1 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 6 Jul 2015 14:24:22 -0400 Subject: [PATCH 04/84] Update to utilize more JSON functionality Changed AddSub fields to be more in line with the JSON initializer strategy --- blockly_compressed.js | 37 ++++++------ blocks/logic.js | 126 +++++++++++++++++++++------------------ blocks/procedures.js | 79 ++++++++++++++---------- blocks_compressed.js | 41 ++++++------- core/block.js | 124 ++++++++++++++++++++------------------ core/field.js | 23 +++++++ core/field_clickimage.js | 10 ++-- core/input.js | 25 -------- 8 files changed, 248 insertions(+), 217 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index a689b1cac82..7b545dedc97 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1059,15 +1059,15 @@ Blockly.ConnectionDB.prototype=[];Blockly.ConnectionDB.constructor=Blockly.Conne Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw"Connection not in database.";a.inDB_=!1;for(var b=0,c=this.length-2,d=c;bf&&b.itemCount_[c]--;0==b.itemCount_[c]&&b.removeInput(b.getAddSubName(c,0),!0);(f=b.getInput(b.getAddSubName(c,d)))&&f.connection&&f.connection.targetConnection&&f.connection.targetConnection.sourceBlock_.unplug(!0,!0);for(d+=1;dd&&this.itemCount_[a]--;0==this.itemCount_[a]&&this.removeInput(this.getAddSubName(a,0),!0);(d=this.getInput(this.getAddSubName(a,c)))&&d.connection&&d.connection.targetConnection&&d.connection.targetConnection.sourceBlock_.unplug(!0,!0);for(c+=1;c 0) { - rootBlock.elseifCount_--; - } - // Disconnect anything plugged into the IF and DO part of this elseif - var ifInput = rootBlock.getInput('IF'+pos); - if (ifInput && ifInput.connection && ifInput.connection.targetConnection) { - ifInput.connection.targetConnection.sourceBlock_.unplug(true,true); - } - var doInput = rootBlock.getInput('DO'+pos); - if (doInput && doInput.connection && doInput.connection.targetConnection) { - doInput.connection.targetConnection.sourceBlock_.unplug(true,true); - } - // Now we need to go through and move up all the lower ones to the previous - // one. - for(var slot = pos+1; slot < limit; slot++) { - var nextIfInput = rootBlock.getInput('IF'+slot); - var nextDoInput = rootBlock.getInput('DO'+slot); - if (nextIfInput != null) { - if (nextIfInput.connection && nextIfInput.connection.targetConnection) { - var toMove = nextIfInput.connection.targetConnection; - toMove.sourceBlock_.unplug(false,false); - ifInput.connection.connect(toMove); - } + var privateData = field.getPrivate(); + var pos = privateData.pos; + // Removing one of the ELSIF clauses. + var limit = this.elseifCount_+1; + if(this.elseifCount_ > 0) { + this.elseifCount_--; + } + // Disconnect anything plugged into the IF and DO part of this elseif + var ifInput = this.getInput('IF'+pos); + if (ifInput && ifInput.connection && ifInput.connection.targetConnection) { + ifInput.connection.targetConnection.sourceBlock_.unplug(true,true); + } + var doInput = this.getInput('DO'+pos); + if (doInput && doInput.connection && doInput.connection.targetConnection) { + doInput.connection.targetConnection.sourceBlock_.unplug(true,true); + } + // Now we need to go through and move up all the lower ones to the previous + // one. + for(var slot = pos+1; slot < limit; slot++) { + var nextIfInput = this.getInput('IF'+slot); + var nextDoInput = this.getInput('DO'+slot); + if (nextIfInput != null) { + if (nextIfInput.connection && nextIfInput.connection.targetConnection) { + var toMove = nextIfInput.connection.targetConnection; + toMove.sourceBlock_.unplug(false,false); + ifInput.connection.connect(toMove); } - if (nextDoInput != null) { - if (nextDoInput.connection && nextDoInput.connection.targetConnection) { - var toMove = nextDoInput.connection.targetConnection; - toMove.sourceBlock_.unplug(false,false); - doInput.connection.connect(toMove); - } + } + if (nextDoInput != null) { + if (nextDoInput.connection && nextDoInput.connection.targetConnection) { + var toMove = nextDoInput.connection.targetConnection; + toMove.sourceBlock_.unplug(false,false); + doInput.connection.connect(toMove); } - ifInput = nextIfInput; - doInput = nextDoInput; } + ifInput = nextIfInput; + doInput = nextDoInput; } - rootBlock.updateAddSubShape(); + this.updateAddSubShape(); + }, + /** + * remove the else section from an if + * @param {!Blockly.FieldClickImage} field Field clicked on for the action + */ + doRemoveElseField: function(field) { + // Removing the else, this is easy. + this.elseCount_ = 0; + this.updateAddSubShape(); }, /** * Reconfigure this block based on the component values. @@ -194,13 +197,16 @@ Blockly.Blocks['controls_if'] = { for(pos = 1; pos < this.elseifCount_+1;pos++,inputIndex+=2) { var inputItem = this.getInput('IF'+pos); if (inputItem == null) { + var subField = new Blockly.FieldClickImage(this.subPng, 17, 17, + Blockly.Msg.CONTROLS_IF_ELSEIF_REMOVE_TOOLTIP); + subField.setPrivate({name: 'IF', pos: pos}); + subField.setChangeHandler(this.doRemoveElseifField); + // We have to add an elseif clause var ifInput = this.appendValueInput('IF' + pos) .setCheck('Boolean') .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSEIF) - .appendField(this.getClickField( - this.doRemoveField, 'IF', pos, 'sub', - Blockly.Msg.CONTROLS_IF_ELSEIF_REMOVE_TOOLTIP)); + .appendField(subField); var doInput = this.appendStatementInput('DO' + pos) .appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN); // Now see if we need to move them in front of the else @@ -217,11 +223,13 @@ Blockly.Blocks['controls_if'] = { if (this.elseCount_) { var inputItem = this.getInput('ELSE'); if (inputItem == null) { + var subField = new Blockly.FieldClickImage(this.subPng, 17, 17, + Blockly.Msg.CONTROLS_IF_ELSE_REMOVE_TOOLTIP); + subField.setChangeHandler(this.doRemoveElseField); + this.appendStatementInput('ELSE') .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSE) - .appendField(this.getClickField( - this.doRemoveField, 'ELSE', 0, 'sub', - Blockly.Msg.CONTROLS_IF_ELSE_REMOVE_TOOLTIP)); + .appendField(subField); } } } diff --git a/blocks/procedures.js b/blocks/procedures.js index bf39c87f9f8..dd2e8faaeeb 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -40,6 +40,10 @@ Blockly.Blocks['procedures_defnoreturn'] = { * @this Blockly.Block */ init: function() { + var addField = new Blockly.FieldClickImage(this.addPng, 17, 17); + addField.setPrivate({name: name, pos: 0}); + addField.setChangeHandler(this.doAddField); + this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL); this.setColour(Blockly.Blocks.procedures.HUE); var name = Blockly.Procedures.findLegalName( @@ -50,7 +54,7 @@ Blockly.Blocks['procedures_defnoreturn'] = { this.appendDummyInput() .appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE) .appendField(nameField, 'NAME') - .appendField(this.getClickField(this.doAddField, name, 0, 'add')); + .appendField(addField); this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP); this.setInputsInline(false); this.arguments_ = []; @@ -62,17 +66,15 @@ Blockly.Blocks['procedures_defnoreturn'] = { /** * Add a parameter to the function * @param {!Blockly.FieldClickImage} field Field clicked on for the action - * @param {!Blockly.Block} rootRoot block to work on. - * @this {!Blockly.FieldClickImage} */ - doAddField: function(field, rootBlock) { - var paramNum = rootBlock.arguments_.length; + doAddField: function(field) { + var paramNum = this.arguments_.length; var paramName = 'param'+paramNum; var nameInUse = true; while (nameInUse) { nameInUse = false; - for (var i = 0; i < rootBlock.arguments_.length; i++) { - if (rootBlock.arguments_[i]['name'].toLowerCase() === paramName) { + for (var i = 0; i < this.arguments_.length; i++) { + if (this.arguments_[i]['name'].toLowerCase() === paramName) { nameInUse = true; paramNum++; paramName = 'param'+paramNum; @@ -80,19 +82,19 @@ Blockly.Blocks['procedures_defnoreturn'] = { } } } - rootBlock.arguments_.push({name: paramName, - id: rootBlock.argid++}); - rootBlock.updateParams_(); + this.arguments_.push({name: paramName, + id: this.argid++}); + this.updateParams_(); }, /** * remove a specific parameter from a function * @param {!Blockly.FieldClickImage} field Field clicked on for the action - * @param {!Blockly.Block} rootRoot block to work on. - * @this {!Blockly.FieldClickImage} */ - doRemoveField: function(field, rootBlock) { - rootBlock.arguments_.splice(field.pos_,1); - rootBlock.updateParams_(); + doRemoveField: function(field) { + var privateData = field.getPrivate(); + var pos = privateData.pos; + this.arguments_.splice(pos,1); + this.updateParams_(); }, /** * Update the display of parameters for this procedure definition block. @@ -124,33 +126,29 @@ Blockly.Blocks['procedures_defnoreturn'] = { for (var i = 0; i < this.arguments_.length; i++) { var nameFieldText = 'PARAM'+i+'_NAME'; var typeFieldText = 'PARAM'+i+'_TYPE'; + var subFieldText = 'PARAM'+i+'_SUB'; if (!this.getInput('PARAM'+i)) { - var nameField = new Blockly.FieldTextInput(this.arguments_[i]['name'], - this.updateParam); - nameField.setSpellcheck(false); - nameField.setSerializable(false); - nameField.argPos_ = i; -// var typeField = new Blockly.FieldScopeVariable('types'); -// typeField.setSerializable(false); - var subField = this.getClickField(this.doRemoveField, - 'param', i, 'sub'); this.jsonInit({ "message0": Blockly.Msg.PROCEDURES_PARAM_NOTYPE, // "message0": Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE, "args0": [ { - "type": "field", - "field": nameField, + "type": "field_input", + "text": this.arguments_[i]['name'], "name" : nameFieldText }, // { -// "type": "field", -// "field": typeField, +// "type": "field_scopevariable", +// "scope": 'types', // "name": typeFieldText // }, { - "type": "field", - "field": subField + "type": "field_clickimage", + "src": this.subPng, + "width": 17, + "height": 17, + "alt": Blockly.Msg.CLICK_REMOVE_TOOLTIP, + "name" : subFieldText }, { "type": "input_dummy", @@ -160,6 +158,21 @@ Blockly.Blocks['procedures_defnoreturn'] = { ], "colour": Blockly.Blocks.procedures.HUE }); + + var nameField = this.getField(nameFieldText); + nameField.setSpellcheck(false); + nameField.setSerializable(false); + nameField.argPos_ = i; + nameField.setChangeHandler(this.updateParam); + + var subField = this.getField(subFieldText); + subField.setPrivate({name: 'param', pos: i}); + subField.setSerializable(false); + subField.setChangeHandler(this.doRemoveField); + +// var typeField = this.getField(typeFieldText); +// typeField.setSerializable(false); + this.moveNumberedInputBefore(this.inputList.length-1, i+1); // Name the input since interpolateMsg doesn't name them this.inputList[i+1].name = 'PARAM'+i; @@ -373,10 +386,14 @@ Blockly.Blocks['procedures_defreturn'] = { var nameField = new Blockly.FieldTextInput(name, Blockly.Procedures.rename); nameField.setSpellcheck(false); + var addField = new Blockly.FieldClickImage(this.addPng, 17, 17); + addField.setPrivate({name: name, pos: 0}); + addField.setChangeHandler(this.doAddField); + this.appendDummyInput() .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_TITLE) .appendField(nameField, 'NAME') - .appendField(this.getClickField(this.doAddField, name, 0, 'add')); + .appendField(addField); this.appendValueInput('RETURN') .setAlign(Blockly.ALIGN_RIGHT) .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN); diff --git a/blocks_compressed.js b/blocks_compressed.js index 59364845795..d0e490c094d 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -38,13 +38,13 @@ Blockly.Blocks.lists_split={init:function(){var a=this,b=new Blockly.FieldDropdo fields:{MODE:"SPLIT"}},{translatedName:Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}}]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.logic={};Blockly.Blocks.logic.HUE=210; -Blockly.Blocks.controls_if={init:function(){this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.appendValueInput("IF0").setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_IF).appendField(this.getClickField(this.doAddField,"IF",0,"add",Blockly.Msg.CONTROLS_IF_ADD_TOOLTIP));this.appendStatementInput("DO0").appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN);this.setPreviousStatement(!0);this.setNextStatement(!0);var a=this;this.setTooltip(function(){if(a.elseifCount_|| -a.elseCount_){if(!a.elseifCount_&&a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_2;if(a.elseifCount_&&!a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_3;if(a.elseifCount_&&a.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_4}else return Blockly.Msg.CONTROLS_IF_TOOLTIP_1;return""});this.elseCount_=this.elseifCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=document.createElement("mutation");this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_); -this.elseCount_&&a.setAttribute("else",1);return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elseif"),10);this.elseCount_=parseInt(a.getAttribute("else"),10);this.updateAddSubShape()},doAddField:function(a,b){b.elseCount_?b.elseifCount_++:b.elseCount_=1;b.updateAddSubShape()},doRemoveField:function(a,b){var c=a.pos_;if("ELSE"===a.name_)b.elseCount_=0;else{var d=b.elseifCount_+1;0","LT"],["\u2265","LTE"],["<","GT"],["\u2264","GTE"]]:[["=","EQ"],["\u2260","NEQ"],["<","LT"],["\u2264","LTE"],[">","GT"],["\u2265","GTE"]];this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.setOutput(!0,"Boolean");this.appendValueInput("A");this.appendValueInput("B").appendField(new Blockly.FieldDropdown(a),"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a= b.getFieldValue("OP");return{EQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[a]});this.prevBlocks_=[null,null]},onchange:function(){if(this.workspace){var a=this.getInputTargetBlock("A"),b=this.getInputTargetBlock("B");if(a&&b&&!a.outputConnection.checkType_(b.outputConnection))for(var c=0;c minitems) { - rootBlock.itemCount_[name]--; + if (this.itemCount_[name] > minitems) { + this.itemCount_[name]--; } - if (rootBlock.itemCount_[name] == 0) { + if (this.itemCount_[name] == 0) { // If we drop down to 0 then we remove the block and let redraw // give us back one with the right name on it - rootBlock.removeInput(rootBlock.getAddSubName(name,0),true); + this.removeInput(this.getAddSubName(name,0),true); } - var input = rootBlock.getInput(rootBlock.getAddSubName(name,pos)); + var input = this.getInput(this.getAddSubName(name,pos)); if (input && input.connection && input.connection.targetConnection) { input.connection.targetConnection.sourceBlock_.unplug(true,true); } // Now we need to go through and move up all the lower ones to the previous // one. for (var slot = pos+1; slot < limit; slot++) { - var nextInput = rootBlock.getInput(rootBlock.getAddSubName(name,slot)); + var nextInput = this.getInput(this.getAddSubName(name,slot)); if (nextInput != null) { if (nextInput.connection && nextInput.connection.targetConnection) { var toMove = nextInput.connection.targetConnection; @@ -1353,30 +1357,21 @@ Blockly.Block.prototype.doRemoveField = function(field, rootBlock) { input = nextInput; } } - rootBlock.updateAddSubShape(); + this.updateAddSubShape(); } - -Blockly.Block.prototype.getClickField = function(handler, name, pos, - type, tooltip) { - var src = ''; - var alt = ''; - if (type === 'add') { - src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Mzg5MzA1MkQwMjc5MTFFNUEyMEJEOEM2QTBCNDI2RjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Mzg5MzA1MkUwMjc5MTFFNUEyMEJEOEM2QTBCNDI2RjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozODkzMDUyQjAyNzkxMUU1QTIwQkQ4QzZBMEI0MjZGNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozODkzMDUyQzAyNzkxMUU1QTIwQkQ4QzZBMEI0MjZGNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pptr84cAAACHUExURfPz/xoa/+/v//X1/xcX//v7//b2//Hx//z8/1NT//Dw/9jY/0RE/7u7/+np//T0/zs7/62t/wgI/yMj/w0N/x0d/y8v/19f/ykp//Ly/woK/93d/7S0/+zs/56e/xQU/+fn/9ra/yYm/6am//f3/xAQ/yAg/5qa//r6//7+/////wAA/////19oit8AAAAtdFJOU///////////////////////////////////////////////////////////AKXvC/0AAACcSURBVHjabNDZEoIwDAXQW8omyL65465N+P/vk1J06Iz3pcl56CTBoEOABGiqofso6SpRdUlERsJjyyZt6mmh9MHf1GcaJdjomoj0c90OoAMvhAuFYGXJ2kHWTK0Jc5MhLC0pQ0hhSX//8w8VltwUBjwX4vrjhGpf/2beXZTey4vdGdz4bXZX/ikXLPKXr+ZrjPdwpCcdmg70EWAAstQnpKfUzLwAAAAASUVORK5CYII='; - alt = Blockly.Msg.CLICK_ADD_TOOLTIP; - } else if (type === 'sub') { - src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkU5MkMxMTAwMjc5MTFFNTgxRDJFMTA3OTA2NTkxNDEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkU5MkMxMTEwMjc5MTFFNTgxRDJFMTA3OTA2NTkxNDEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRTkyQzEwRTAyNzkxMUU1ODFEMkUxMDc5MDY1OTE0MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRTkyQzEwRjAyNzkxMUU1ODFEMkUxMDc5MDY1OTE0MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlxGqBwAAACHUExURfPz/xoa/+/v//X1/xcX//v7//b2//Hx//z8/1NT//Dw/9jY/0RE/7u7/+np//T0/zs7/62t/wgI/yMj/w0N/x0d/y8v/19f/ykp//Ly/woK/93d/7S0/+zs/56e/xQU/+fn/9ra/yYm/6am//f3/xAQ/yAg/5qa//r6//7+/////wAA/////19oit8AAAAtdFJOU///////////////////////////////////////////////////////////AKXvC/0AAACXSURBVHjabJDXDoMwDEVvCKtQ9ureKzb//31NoLRE6nmyjyzLvugNBEiAhhqmj5KuElWXRDSacN/ySJt6xlB654n6RNoEK/5xWfegHc8pFIKFZZYOsoaZJpibDGFpmTKEFJY53v7socIyV4Uej5lwfX2h2tZfsTkr85cXu9NE/Bp/V/4hFyzyp68+aeg8HOlJh4aA3gIMAL2WJ7aPWKm3AAAAAElFTkSuQmCC'; - alt = Blockly.Msg.CLICK_REMOVE_TOOLTIP; - } - if (tooltip) { - alt = tooltip; +/** + * Sets the information for an Add Sub field click item + * @param {string} fieldname Name of the click field to set info on + * @param {string} name Name of the field to pass to the callback function + * @param {number} pos Position of the field in the input + */ +Blockly.Block.prototype.setAddSubInfo = function(fieldName,handler,name,pos) { + var field = this.getField(fieldName); + if (field) { + field.setChangeHandler(handler); + field.setPrivate({name: name, pos: pos}); } - var newField = new Blockly.FieldClickImage(src, 17, 17, alt, handler); - newField.pos_ = pos; - newField.name_ = name; - newField.type_ = type; - - return newField; } /** @@ -1410,7 +1405,9 @@ Blockly.Block.prototype.appendAddSubEmptyInput = function(name,title) { */ Blockly.Block.prototype.appendAddSubInput = function(name,pos,title) { var newName = this.getAddSubName(name,pos); - var inputItem; + var inputItem = null; + var field = null; + if (this.itemCount_[name]) { inputItem = this.appendValueInput(newName) .setCheck(this.checks_[name]) @@ -1426,11 +1423,16 @@ Blockly.Block.prototype.appendAddSubInput = function(name,pos,title) { inputItem = this.appendAddSubEmptyInput(newName, title); } if (pos === 0) { - inputItem.appendField(this.getClickField(this.doAddField, name, 0, 'add')); + field = new Blockly.FieldClickImage(this.addPng, 17, 17, + Blockly.Msg.CLICK_ADD_TOOLTIP); + field.setChangeHandler(this.doAddField); } else { - inputItem.appendField(this.getClickField(this.doRemoveField, - name, pos, 'sub')); + field = new Blockly.FieldClickImage(this.subPng, 17, 17, + Blockly.Msg.CLICK_REMOVE_TOOLTIP); + field.setChangeHandler(this.doRemoveField); } + field.setPrivate({name: name, pos: pos}); + inputItem.appendField(field); return [inputItem]; } @@ -1492,15 +1494,21 @@ Blockly.Block.prototype.updateAddSubShape = function() { } inputItem = this.getInput(name0); + var subFieldName0 = name0+'_sub'; + var hasSubField0 = this.getField(subFieldName0); // Now see what the main one has for fields if (this.itemCount_[name] === 1) { // Shouldn't have a sub field if this is the only entry - inputItem.removeClickFields(['sub']); + if (hasSubField0) { + inputItem.removeField(subFieldName0); + } } else { - var hasSubField = inputItem.hasClickField('sub'); - if (!hasSubField) { - inputItem.appendField(this.getClickField(this.doRemoveField, - name, 0, 'sub')); + if (!hasSubField0) { + var field = new Blockly.FieldClickImage(this.subPng, 17, 17, + Blockly.Msg.CLICK_REMOVE_TOOLTIP); + field.setPrivate({name: name, pos: 0}); + field.setChangeHandler(this.doRemoveField); + inputItem.appendField(field, subFieldName0); } } } else { diff --git a/core/field.js b/core/field.js index 45fb9e5d187..6378836f483 100644 --- a/core/field.js +++ b/core/field.js @@ -63,6 +63,13 @@ Blockly.Field.prototype.visible_ = true; */ Blockly.Field.prototype.changeHandler_ = null; +/** + * Holder for private data used by the field for any reason. The format of this + * data is opaque to the field + * @private + */ +Blockly.Field.prototype.privateData_ = null; + /** * Clone this Field. This must be implemented by all classes derived from * Field. Since this class should not be instantiated, calling this method @@ -321,6 +328,22 @@ Blockly.Field.prototype.setValue = function(text) { this.setText(text); }; +/** + * Gets private data associated with this field + * @return {Object} Current private data. + */ +Blockly.Field.prototype.getPrivate = function() { + return this.privateData_; +}; + +/** + * Stores private data associated with this field. + * @param {Object} privateData Data to be stored for later retrieval. + */ +Blockly.Field.prototype.setPrivate = function(privateData) { + this.privateData_ = privateData; +}; + /** * Handle a mouse up event on an editable field. * @param {!Event} e Mouse up event. diff --git a/core/field_clickimage.js b/core/field_clickimage.js index 14c67d03fdb..7b0f3de6259 100644 --- a/core/field_clickimage.js +++ b/core/field_clickimage.js @@ -43,7 +43,7 @@ Blockly.FieldClickImage = function(src, width, height, opt_alt, handler) { Blockly.FieldClickImage.superClass_.constructor.call(this, src, width, height, ''); - this.handler_ = handler; + this.setChangeHandler(handler); }; goog.inherits(Blockly.FieldClickImage, Blockly.FieldImage); @@ -103,8 +103,8 @@ Blockly.FieldClickImage.prototype.init = function(block) { * with the current values of the arguments used during construction. */ Blockly.FieldClickImage.prototype.clone = function() { - return new Blockly.FieldClickImage(this.handler_, - this.rootBlock_, this.name_, this.pos_); + return new Blockly.FieldClickImage(this.getSrc(), this.width_, this.height_, + this.text_, this.changeHandler_); }; /** @@ -116,10 +116,10 @@ Blockly.FieldClickImage.prototype.clone = function() { * @private */ Blockly.FieldClickImage.prototype.showEditor_ = function() { - if (this.handler_) { + if (this.changeHandler_) { var saveDragMode = Blockly.dragMode_; Blockly.dragMode_ = 0; - this.handler_(this, this.sourceBlock_); + this.changeHandler_.call(this.sourceBlock_,this); Blockly.dragMode_ = saveDragMode; } }; diff --git a/core/input.js b/core/input.js index 17917c083ab..fd94625568f 100644 --- a/core/input.js +++ b/core/input.js @@ -221,29 +221,4 @@ Blockly.Input.prototype.dispose = function() { } this.sourceBlock_ = null; }; -/** - * Remove a field from this input. - * @param {string} name The type of the input field. - */ -Blockly.Input.prototype.removeClickFields = function(names) { - for (var i = 0, field; field = this.fieldRow[i]; i++) { - if (names.indexOf(field.type_) != -1) { - field.dispose(); - this.fieldRow.splice(i, 1); - } - } -}; -/** - * Determine if an input has a particular type of field. - * @param {string} name The type of the input field. - * @return {boolean} Whether or not the field type is on the input. - */ -Blockly.Input.prototype.hasClickField = function(name) { - for (var i = 0, field; field = this.fieldRow[i]; i++) { - if (field.type_ === name) { - return true; - } - } - return false; -}; From 74264432b110aa84f3ba1afd7bef2cf2c1eb8802 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Tue, 7 Jul 2015 12:04:03 -0400 Subject: [PATCH 05/84] Fading of ClickImages, Updated Typeblocking Added styles to automatically fade out icons when the block is not active or selected. Added typeblock information for logic, lists, math and loops Implemented optimization for type blocking where a value is simply a number --- blockly_compressed.js | 26 +++--- blocks/lists.js | 3 +- blocks/logic.js | 27 ++++-- blocks/loops.js | 29 +++++-- blocks/math.js | 111 ++++++++++++++++++++---- blocks_compressed.js | 65 +++++++------- core/css.js | 4 + core/field_clickimage.js | 3 + core/typeblock.js | 10 ++- msg/js/ar.js | 68 ++++++++++++++- msg/js/az.js | 68 ++++++++++++++- msg/js/bcc.js | 68 ++++++++++++++- msg/js/be-tarask.js | 68 ++++++++++++++- msg/js/bg.js | 68 ++++++++++++++- msg/js/bn.js | 68 ++++++++++++++- msg/js/br.js | 68 ++++++++++++++- msg/js/ca.js | 68 ++++++++++++++- msg/js/cs.js | 68 ++++++++++++++- msg/js/da.js | 68 ++++++++++++++- msg/js/de.js | 68 ++++++++++++++- msg/js/el.js | 68 ++++++++++++++- msg/js/en.js | 68 ++++++++++++++- msg/js/es.js | 68 ++++++++++++++- msg/js/fa.js | 68 ++++++++++++++- msg/js/fi.js | 68 ++++++++++++++- msg/js/fr.js | 68 ++++++++++++++- msg/js/he.js | 68 ++++++++++++++- msg/js/hi.js | 68 ++++++++++++++- msg/js/hrx.js | 68 ++++++++++++++- msg/js/hu.js | 68 ++++++++++++++- msg/js/ia.js | 68 ++++++++++++++- msg/js/id.js | 68 ++++++++++++++- msg/js/is.js | 68 ++++++++++++++- msg/js/it.js | 68 ++++++++++++++- msg/js/ja.js | 68 ++++++++++++++- msg/js/ko.js | 68 ++++++++++++++- msg/js/lb.js | 68 ++++++++++++++- msg/js/lrc.js | 68 ++++++++++++++- msg/js/lt.js | 68 ++++++++++++++- msg/js/mk.js | 68 ++++++++++++++- msg/js/ms.js | 68 ++++++++++++++- msg/js/nb.js | 68 ++++++++++++++- msg/js/nl.js | 68 ++++++++++++++- msg/js/oc.js | 68 ++++++++++++++- msg/js/pl.js | 68 ++++++++++++++- msg/js/pms.js | 68 ++++++++++++++- msg/js/pt-br.js | 68 ++++++++++++++- msg/js/pt.js | 68 ++++++++++++++- msg/js/ro.js | 68 ++++++++++++++- msg/js/ru.js | 68 ++++++++++++++- msg/js/sc.js | 68 ++++++++++++++- msg/js/sk.js | 68 ++++++++++++++- msg/js/sq.js | 68 ++++++++++++++- msg/js/sr.js | 68 ++++++++++++++- msg/js/sv.js | 68 ++++++++++++++- msg/js/ta.js | 68 ++++++++++++++- msg/js/th.js | 68 ++++++++++++++- msg/js/tl.js | 68 ++++++++++++++- msg/js/tlh.js | 68 ++++++++++++++- msg/js/tr.js | 68 ++++++++++++++- msg/js/uk.js | 68 ++++++++++++++- msg/js/vi.js | 68 ++++++++++++++- msg/js/zh-hans.js | 68 ++++++++++++++- msg/js/zh-hant.js | 68 ++++++++++++++- msg/json/en.json | 70 +++++++++++++++- msg/json/qqq.json | 86 ++++++++++++++++--- msg/messages.js | 177 ++++++++++++++++++++++++++++++++++----- 67 files changed, 4071 insertions(+), 280 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 7b545dedc97..d5452fd0130 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1185,8 +1185,8 @@ Blockly.FieldImage.prototype.setSrc=function(a){null!==a&&(this.src_=a,this.imag // Copyright 2012 Google Inc. Apache License 2.0 Blockly.FieldClickImage=function(a,b,c,d,e){Blockly.FieldClickImage.superClass_.constructor.call(this,a,b,c,"");this.setChangeHandler(e)};goog.inherits(Blockly.FieldClickImage,Blockly.FieldImage);Blockly.FieldClickImage.prototype.EDITABLE=!0;Blockly.FieldLabel.prototype.SERIALIZABLE=!1;Blockly.FieldClickImage.prototype.CURSOR="default"; Blockly.FieldClickImage.prototype.updateEditable=function(){this.sourceBlock_.isInFlyout||!this.EDITABLE?Blockly.addClass_(this.fieldGroup_,"blocklyIconGroupReadonly"):Blockly.removeClass_(this.fieldGroup_,"blocklyIconGroupReadonly")}; -Blockly.FieldClickImage.prototype.init=function(a){this.sourceBlock_||(Blockly.FieldClickImage.superClass_.init.call(this,a),Blockly.addClass_(this.fieldGroup_,"blocklyIconGroup"),this.updateEditable(),this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_())};Blockly.FieldClickImage.prototype.clone=function(){return new Blockly.FieldClickImage(this.getSrc(),this.width_,this.height_,this.text_,this.changeHandler_)}; -Blockly.FieldClickImage.prototype.showEditor_=function(){if(this.changeHandler_){var a=Blockly.dragMode_;Blockly.dragMode_=0;this.changeHandler_.call(this.sourceBlock_,this);Blockly.dragMode_=a}}; +Blockly.FieldClickImage.prototype.init=function(a){this.sourceBlock_||(Blockly.FieldClickImage.superClass_.init.call(this,a),Blockly.addClass_(this.fieldGroup_,"blocklyIconGroup"),Blockly.addClass_(this.fieldGroup_,"blocklyIconFading"),this.updateEditable(),this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_())}; +Blockly.FieldClickImage.prototype.clone=function(){return new Blockly.FieldClickImage(this.getSrc(),this.width_,this.height_,this.text_,this.changeHandler_)};Blockly.FieldClickImage.prototype.showEditor_=function(){if(this.changeHandler_){var a=Blockly.dragMode_;Blockly.dragMode_=0;this.changeHandler_.call(this.sourceBlock_,this);Blockly.dragMode_=a}}; // Copyright 2011 Google Inc. Apache License 2.0 Blockly.Block=function(){goog.asserts.assert(0==arguments.length,"Please use Blockly.Block.obtain.")};Blockly.Block.obtain=function(a,b){if(Blockly.Realtime.isEnabled())return Blockly.Realtime.obtainBlock(a,b);var c=a.rendered?new Blockly.BlockSvg:new Blockly.Block;c.initialize(a,b);return c};Blockly.Block.prototype.initialize=function(a,b){this.id=Blockly.Blocks.genUid();a.addTopBlock(this);this.fill(a,b)}; Blockly.Block.prototype.fill=function(a,b){this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.inputsInline=void 0;this.disabled=this.rendered=!1;this.tooltip="";this.contextMenu=!0;this.parentBlock_=null;this.childBlocks_=[];this.editable_=this.movable_=this.deletable_=!0;this.collapsed_=!1;this.comment=null;this.xy_=new goog.math.Coordinate(0,0);this.workspace=a;this.isInFlyout=a.isFlyout;this.RTL=a.RTL;if(b){this.type=b;var c=Blockly.Blocks[b];goog.asserts.assertObject(c, @@ -1484,7 +1484,7 @@ Blockly.TypeBlock.reloadOptionsAfterChanges_=function(){Blockly.TypeBlock.TBOpti Blockly.TypeBlock.loadProcedures_=function(){Blockly.TypeBlock.TBOptions_=goog.object.filter(Blockly.TypeBlock.TBOptions_,function(a){return!a.isProcedure});var a=Blockly.Procedures.allProcedures(Blockly.mainWorkspace);goog.array.forEach(a[0],function(a){Blockly.TypeBlock.TBOptions_[Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL+" "+a[0]]={canonicName:"procedures_callnoreturn",fields:{PROCNAME:a[0]},isProcedure:!0}});goog.array.forEach(a[1],function(a){translatedName=Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL+ " "+a[0];Blockly.TypeBlock.TBOptions_[translatedName]={canonicName:"procedures_callreturn",fields:{PROCNAME:a[0]},isProcedure:!0}})}; Blockly.TypeBlock.loadGlobalVariables_=function(){Blockly.TypeBlock.TBOptions_=goog.object.filter(Blockly.TypeBlock.TBOptions_,function(a){return!a.isGlobalvar});var a=Blockly.Variables.allVariables(Blockly.mainWorkspace);goog.array.forEach(a,function(a){Blockly.TypeBlock.TBOptions_["get "+a]={canonicName:"variables_get",fields:{VAR:a},isGlobalvar:!0};Blockly.TypeBlock.TBOptions_["set "+a]={canonicName:"variables_set",fields:{VAR:a},isGlobalvar:!0}})}; -Blockly.TypeBlock.mutatorToXMLString=function(a){var b="";if("object"===typeof a&&!goog.object.isEmpty(a)){var c="'+b[d]+"");return c}; +Blockly.TypeBlock.mutatorToXMLString=function(a){var b="";if("object"===typeof a&&!goog.object.isEmpty(a)){var c="'+e+"");c+="<"+a+' name="'+d+'">'+e+""}return c}; Blockly.TypeBlock.autoCompleteSelected=function(){var a=Blockly.TypeBlock.inputText_.value,b=goog.object.get(Blockly.TypeBlock.TBOptions_,a);if(!b){var b=RegExp("^-?[0-9]\\d*(.\\d+)?$","g").exec(a),c=RegExp("^[\"|']+","g").exec(a);if(b&&0'+Blockly.TypeBlock.mutatorToXMLString(b.mutatorAttributes)+Blockly.TypeBlock.sectionToXMLString("field", b.fields)+Blockly.TypeBlock.sectionToXMLString("value",b.values)+"";a=Blockly.Xml.textToDom(a).firstChild;a=Blockly.Xml.domToBlock(Blockly.mainWorkspace,a);a.render();(b=Blockly.selected)?(b.getRelativeToSurfaceXY(),Blockly.TypeBlock.connectIfPossible(b,a),a.parentBlock_||a.moveBy(Blockly.selected.getRelativeToSurfaceXY().x+110,Blockly.selected.getRelativeToSurfaceXY().y+50)):(b=Blockly.getMainWorkspace().options.svg,b=goog.style.getPageOffset(b),c=Blockly.getMainWorkspace().toolbox_.width, c=Blockly.mainWorkspace.getMetrics().viewLeft+Blockly.latestClick.x-b.x-c,b=Blockly.mainWorkspace.getMetrics().viewTop+Blockly.latestClick.y-b.y,a.moveBy(c,b));a.select();Blockly.TypeBlock.hide()}; @@ -1501,16 +1501,16 @@ Blockly.Css.CONTENT=[".blocklySvg {"," background-color: #fff;"," outline: non " cursor: se-resize;"," fill: #aaa;","}",".blocklyResizeSW {"," cursor: sw-resize;"," fill: #aaa;","}",".blocklyResizeLine {"," stroke: #888;"," stroke-width: 1;","}",".blocklyHighlightedConnectionPath {"," fill: none;"," stroke: #fc3;"," stroke-width: 4px;","}",".blocklyPathLight {"," fill: none;"," stroke-linecap: round;"," stroke-width: 1;","}",".blocklySelected>.blocklyPath {"," stroke: #fc3;"," stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {"," display: none;","}", ".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {"," fill-opacity: .8;"," stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {"," display: none;","}",".blocklyDisabled>.blocklyPath {"," fill-opacity: .5;"," stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {"," display: none;","}",".blocklyText {"," cursor: default;"," fill: #fff;"," font-family: sans-serif;"," font-size: 11pt;","}",".blocklyNonEditableText>text {", " pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {"," fill: #fff;"," fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {"," fill: #000;","}",".blocklyEditableText:hover>rect {"," stroke: #fff;"," stroke-width: 2;","}",".blocklyBubbleText {"," fill: #000;","}",".blocklySvg text {"," user-select: none;"," -moz-user-select: none;"," -webkit-user-select: none;"," cursor: inherit;","}",".blocklyHidden {"," display: none;", -"}",".blocklyFieldDropdown:not(.blocklyHidden) {"," display: block;","}",".blocklyIconGroup {"," cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {"," opacity: .6;","}",".blocklyMinimalBody {"," margin: 0;"," padding: 0;","}",".blocklyCommentTextarea {"," background-color: #ffc;"," border: 0;"," margin: 0;"," padding: 2px;"," resize: none;","}",".blocklyHtmlInput {"," border: none;"," font-family: sans-serif;"," font-size: 11pt;"," outline: none;"," width: 100%", -"}",".blocklyMainBackground {"," stroke-width: 1;"," stroke: #c6c6c6;","}",".blocklyMutatorBackground {"," fill: #fff;"," stroke: #ddd;"," stroke-width: 1;","}",".blocklyFlyoutBackground {"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyColourBackground {"," fill: #666;","}",".blocklyScrollbarBackground {"," fill: #fff;"," stroke: #e4e4e4;"," stroke-width: 1;","}",".blocklyScrollbarKnob {"," fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyScrollbarKnob:hover {", -" fill: #bbb;","}",".blocklyInvalidInput {"," background: #faa;","}",".blocklyAngleCircle {"," stroke: #444;"," stroke-width: 1;"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyAngleMarks {"," stroke: #444;"," stroke-width: 1;","}",".blocklyAngleGauge {"," fill: #f88;"," fill-opacity: .8; ","}",".blocklyAngleLine {"," stroke: #f00;"," stroke-width: 2;"," stroke-linecap: round;","}",".blocklyContextMenu {"," border-radius: 4px;","}",".blocklyDropdownMenu {"," padding: 0 !important;", -"}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(<<>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {"," background-color: #ddd;"," overflow-x: visible;"," overflow-y: auto;"," position: absolute;","}",".blocklyTreeRoot {"," padding: 4px 0;","}",".blocklyTreeRoot:focus {"," outline: none;","}",".blocklyTreeRow {"," line-height: 22px;"," height: 22px;"," padding-right: 1em;", -" white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {'," padding-right: 0;"," padding-left: 1em !important;","}",".blocklyTreeRow:hover {"," background-color: #e4e4e4;","}",".blocklyTreeSeparator {"," border-bottom: solid #e5e5e5 1px;"," height: 0px;"," margin: 5px 0;","}",".blocklyTreeIcon {"," background-image: url(<<>>/sprites.png);"," height: 16px;"," vertical-align: middle;"," width: 16px;","}",".blocklyTreeIconClosedLtr {"," background-position: -32px -1px;", -"}",".blocklyTreeIconClosedRtl {"," background-position: 0px -1px;","}",".blocklyTreeIconOpen {"," background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {"," background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {"," background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {"," background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {"," background-position: -48px -1px;", -"}",".blocklyTreeLabel {"," cursor: default;"," font-family: sans-serif;"," font-size: 16px;"," padding: 0 3px;"," vertical-align: middle;","}",".blocklyTreeSelected {"," background-color: #57e !important;","}",".blocklyTreeSelected .blocklyTreeLabel {"," color: #fff;","}",".blocklyWidgetDiv .goog-palette {"," outline: none;"," cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {"," border: 1px solid #666;"," border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {", -" height: 13px;"," width: 15px;"," margin: 0;"," border: 0;"," text-align: center;"," vertical-align: middle;"," border-right: 1px solid #666;"," font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {"," position: relative;"," height: 13px;"," width: 15px;"," border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {"," border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {"," border: 1px solid #000;", -" color: #fff;","}",".blocklyWidgetDiv .goog-menu {"," background: #fff;"," border-color: #ccc #666 #666 #ccc;"," border-style: solid;"," border-width: 1px;"," cursor: default;"," font: normal 13px Arial, sans-serif;"," margin: 0;"," outline: none;"," padding: 4px 0;"," position: absolute;"," z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {"," color: #000;"," font: normal 13px Arial, sans-serif;"," list-style: none;"," margin: 0;"," padding: 4px 7em 4px 28px;"," white-space: nowrap;", -"}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {"," padding-left: 7em;"," padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {"," padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {"," padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {"," color: #000;"," font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,", +"}",".blocklyFieldDropdown:not(.blocklyHidden) {"," display: block;","}",".blocklyIconGroup {"," cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {"," opacity: .6;","}",".blocklyDraggable:not(:hover) .blocklyIconFading {"," opacity: 0;","}",".blocklyMinimalBody {"," margin: 0;"," padding: 0;","}",".blocklyCommentTextarea {"," background-color: #ffc;"," border: 0;"," margin: 0;"," padding: 2px;"," resize: none;","}",".blocklyHtmlInput {"," border: none;", +" font-family: sans-serif;"," font-size: 11pt;"," outline: none;"," width: 100%","}",".blocklyMainBackground {"," stroke-width: 1;"," stroke: #c6c6c6;","}",".blocklyMutatorBackground {"," fill: #fff;"," stroke: #ddd;"," stroke-width: 1;","}",".blocklyFlyoutBackground {"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyColourBackground {"," fill: #666;","}",".blocklyScrollbarBackground {"," fill: #fff;"," stroke: #e4e4e4;"," stroke-width: 1;","}",".blocklyScrollbarKnob {"," fill: #ccc;", +"}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyScrollbarKnob:hover {"," fill: #bbb;","}",".blocklyInvalidInput {"," background: #faa;","}",".blocklyAngleCircle {"," stroke: #444;"," stroke-width: 1;"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyAngleMarks {"," stroke: #444;"," stroke-width: 1;","}",".blocklyAngleGauge {"," fill: #f88;"," fill-opacity: .8; ","}",".blocklyAngleLine {"," stroke: #f00;"," stroke-width: 2;"," stroke-linecap: round;","}",".blocklyContextMenu {", +" border-radius: 4px;","}",".blocklyDropdownMenu {"," padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(<<>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {"," background-color: #ddd;"," overflow-x: visible;"," overflow-y: auto;"," position: absolute;","}",".blocklyTreeRoot {"," padding: 4px 0;","}",".blocklyTreeRoot:focus {"," outline: none;", +"}",".blocklyTreeRow {"," line-height: 22px;"," height: 22px;"," padding-right: 1em;"," white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {'," padding-right: 0;"," padding-left: 1em !important;","}",".blocklyTreeRow:hover {"," background-color: #e4e4e4;","}",".blocklyTreeSeparator {"," border-bottom: solid #e5e5e5 1px;"," height: 0px;"," margin: 5px 0;","}",".blocklyTreeIcon {"," background-image: url(<<>>/sprites.png);"," height: 16px;"," vertical-align: middle;", +" width: 16px;","}",".blocklyTreeIconClosedLtr {"," background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {"," background-position: 0px -1px;","}",".blocklyTreeIconOpen {"," background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {"," background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {"," background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {"," background-position: -16px -17px;","}",".blocklyTreeIconNone,", +".blocklyTreeSelected>.blocklyTreeIconNone {"," background-position: -48px -1px;","}",".blocklyTreeLabel {"," cursor: default;"," font-family: sans-serif;"," font-size: 16px;"," padding: 0 3px;"," vertical-align: middle;","}",".blocklyTreeSelected {"," background-color: #57e !important;","}",".blocklyTreeSelected .blocklyTreeLabel {"," color: #fff;","}",".blocklyWidgetDiv .goog-palette {"," outline: none;"," cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {"," border: 1px solid #666;", +" border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {"," height: 13px;"," width: 15px;"," margin: 0;"," border: 0;"," text-align: center;"," vertical-align: middle;"," border-right: 1px solid #666;"," font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {"," position: relative;"," height: 13px;"," width: 15px;"," border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {"," border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {", +" border: 1px solid #000;"," color: #fff;","}",".blocklyWidgetDiv .goog-menu {"," background: #fff;"," border-color: #ccc #666 #666 #ccc;"," border-style: solid;"," border-width: 1px;"," cursor: default;"," font: normal 13px Arial, sans-serif;"," margin: 0;"," outline: none;"," padding: 4px 0;"," position: absolute;"," z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {"," color: #000;"," font: normal 13px Arial, sans-serif;"," list-style: none;"," margin: 0;"," padding: 4px 7em 4px 28px;", +" white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {"," padding-left: 7em;"," padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {"," padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {"," padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {"," color: #000;"," font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,", ".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {"," color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {"," opacity: 0.3;"," -moz-opacity: 0.3;"," filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {"," background-color: #d6e9f8;"," border-color: #d6e9f8;"," border-style: dotted;"," border-width: 1px 0;"," padding-bottom: 3px;"," padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,", ".blocklyWidgetDiv .goog-menuitem-icon {"," background-repeat: no-repeat;"," height: 16px;"," left: 6px;"," position: absolute;"," right: auto;"," vertical-align: middle;"," width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {"," left: auto;"," right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;", "}",".blocklyWidgetDiv .goog-menuitem-accel {"," color: #999;"," direction: ltr;"," left: auto;"," padding: 0 6px;"," position: absolute;"," right: 0;"," text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {"," left: 0;"," right: auto;"," text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {"," text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {"," color: #999;"," font-size: 12px;"," padding-left: 4px;", diff --git a/blocks/lists.js b/blocks/lists.js index 317405879b3..3973fbde960 100644 --- a/blocks/lists.js +++ b/blocks/lists.js @@ -103,8 +103,7 @@ Blockly.Blocks['lists_repeat'] = { }); }, typeblock: [{translatedName: Blockly.Msg.LISTS_REPEAT_TYPEBLOCK, - values: {NUM : ''+ - '5' }}] + "values": {'NUM': 5 }}] }; Blockly.Blocks['lists_length'] = { diff --git a/blocks/logic.js b/blocks/logic.js index 2e9f98faeaa..b6294d40e10 100644 --- a/blocks/logic.js +++ b/blocks/logic.js @@ -243,7 +243,14 @@ Blockly.Blocks['controls_if'] = { this.workspace.fireChangeEvent(); } }, - typeblock: [{translatedName: Blockly.getMsgString('controls_if_typeblock')}] + typeblock: [ + { translatedName: Blockly.Msg.CONTROLS_IF_TYPEBLOCK }, + { translatedName: Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK, + mutatorAttributes: { 'elseif': 1 } }, + { translatedName: Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK, + mutatorAttributes: { 'elseif': 1, 'else': 1 } }, + { translatedName: Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK, + mutatorAttributes: { 'else': 1 } } ] }; Blockly.Blocks['logic_compare'] = { @@ -317,7 +324,7 @@ Blockly.Blocks['logic_compare'] = { this.prevBlocks_[0] = blockA; this.prevBlocks_[1] = blockB; }, - typeblock: [{translatedName: Blockly.getMsgString('logic_compare_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK}] }; Blockly.Blocks['logic_operation'] = { @@ -349,7 +356,10 @@ Blockly.Blocks['logic_operation'] = { return TOOLTIPS[op]; }); }, - typeblock: [{translatedName: Blockly.getMsgString('logic_operation_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK, + fields: { 'OP': 'OR' }}, + { translatedName: Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK, + fields: { 'OP': 'AND' }}] }; Blockly.Blocks['logic_negate'] = { @@ -373,7 +383,7 @@ Blockly.Blocks['logic_negate'] = { "helpUrl": Blockly.Msg.LOGIC_NEGATE_HELPURL }); }, - typeblock: [{translatedName: Blockly.getMsgString('logic_negate_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK}] }; Blockly.Blocks['logic_boolean'] = { @@ -392,7 +402,10 @@ Blockly.Blocks['logic_boolean'] = { .appendField(new Blockly.FieldDropdown(BOOLEANS), 'BOOL'); this.setTooltip(Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('logic_boolean_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK, + fields: { 'BOOL': 'TRUE' }}, + { translatedName: Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK, + fields: { 'BOOL': 'FALSE' }}] }; Blockly.Blocks['logic_null'] = { @@ -408,7 +421,7 @@ Blockly.Blocks['logic_null'] = { .appendField(Blockly.Msg.LOGIC_NULL); this.setTooltip(Blockly.Msg.LOGIC_NULL_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('logic_null_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.LOGIC_NULL_TYPEBLOCK}] }; Blockly.Blocks['logic_ternary'] = { @@ -460,5 +473,5 @@ Blockly.Blocks['logic_ternary'] = { } this.prevParentConnection_ = parentConnection; }, - typeblock: [{translatedName: Blockly.getMsgString('logic_ternary_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK}] }; diff --git a/blocks/loops.js b/blocks/loops.js index 200e4dc709d..a88c8fea381 100644 --- a/blocks/loops.js +++ b/blocks/loops.js @@ -59,8 +59,11 @@ Blockly.Blocks['controls_repeat'] = { .appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO); this.getField('TIMES').setChangeHandler( Blockly.FieldTextInput.nonnegativeIntegerValidator); - }, - typeblock: [{translatedName: Blockly.getMsgString('controls_repeat_typeblock')}] + }//, +// No typeblock because this appears to be deprecated in +// favor of controls_repeat_ext +// typeblock: [{translatedName: Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK, +// fields: {'TIMES' : 10 }}] }; Blockly.Blocks['controls_repeat_ext'] = { @@ -87,7 +90,8 @@ Blockly.Blocks['controls_repeat_ext'] = { this.appendStatementInput('DO') .appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO); }, - typeblock: [{translatedName: Blockly.getMsgString('controls_repeat_ext_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK, + values: {'TIMES' : 10 }}] }; Blockly.Blocks['controls_whileUntil'] = { @@ -119,7 +123,10 @@ Blockly.Blocks['controls_whileUntil'] = { return TOOLTIPS[op]; }); }, - typeblock: [{translatedName: Blockly.getMsgString('controls_while_until_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK, + fields: {'MODE' : 'WHILE' }}, + {translatedName: Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK, + fields: {'MODE' : 'UNTIL' }}] }; Blockly.Blocks['controls_for'] = { @@ -199,7 +206,7 @@ Blockly.Blocks['controls_for'] = { if (!this.isCollapsed()) { var option = {enabled: true}; var name = this.getFieldValue('VAR'); - option.text = Blockly.Msg.VARIABLES_SET_CREATE_GET.replace('%1', name); + option.text = Blockly.Msg. VARIABLES_SET_CREATE_GET.replace('%1', name); var xmlField = goog.dom.createDom('field', null, name); xmlField.setAttribute('name', 'VAR'); var xmlBlock = goog.dom.createDom('block', null, xmlField); @@ -208,7 +215,8 @@ Blockly.Blocks['controls_for'] = { options.push(option); } }, - typeblock: [{translatedName: Blockly.getMsgString('controls_for_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.CONTROLS_FOR_TYPEBLOCK, + values: {'FROM': 1, 'TO': 10, 'BY': 1}}] }; Blockly.Blocks['controls_forEach'] = { @@ -266,7 +274,7 @@ Blockly.Blocks['controls_forEach'] = { } }, customContextMenu: Blockly.Blocks['controls_for'].customContextMenu, - typeblock: [{translatedName: Blockly.getMsgString('controls_for_each_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}] }; Blockly.Blocks['controls_flow_statements'] = { @@ -324,5 +332,10 @@ Blockly.Blocks['controls_flow_statements'] = { this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING); } }, - typeblock: [{translatedName: Blockly.getMsgString('controls_flow_statements_typeblock')}] + typeblock: [{translatedName: + Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK, + fields: {'FLOW' : 'BREAK' }}, + {translatedName: + Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK, + fields: {'FLOW' : 'CONTINUE' }}] }; diff --git a/blocks/math.js b/blocks/math.js index 42468a61dc8..15296af0c3a 100644 --- a/blocks/math.js +++ b/blocks/math.js @@ -47,8 +47,7 @@ Blockly.Blocks['math_number'] = { Blockly.FieldTextInput.numberValidator), 'NUM'); this.setOutput(true, 'Number'); this.setTooltip(Blockly.Msg.MATH_NUMBER_TOOLTIP); - }, - typeblock: [{translatedName: Blockly.getMsgString('math_number_typeblock')}] + } }; Blockly.Blocks['math_arithmetic'] = { @@ -86,7 +85,16 @@ Blockly.Blocks['math_arithmetic'] = { return TOOLTIPS[mode]; }); }, - typeblock: [{translatedName: Blockly.getMsgString('math_arithmetic_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK, + fields: { 'OP': 'ADD' }}, + { translatedName: Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK, + fields: { 'OP': 'MINUS' }}, + { translatedName: Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK, + fields: { 'OP': 'MULTIPLY' }}, + { translatedName: Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK, + fields: { 'OP': 'DIVIDE' }}, + { translatedName: Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK, + fields: { 'OP': 'POWER' }}] }; Blockly.Blocks['math_single'] = { @@ -125,7 +133,20 @@ Blockly.Blocks['math_single'] = { return TOOLTIPS[mode]; }); }, - typeblock: [{translatedName: Blockly.getMsgString('math_single_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK, + fields: { 'OP': 'ROOT' }}, + { translatedName: Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK, + fields: { 'OP': 'ABS' }}, + { translatedName: Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK, + fields: { 'OP': 'NEG' }}, + { translatedName: 'ln', + fields: { 'OP': 'LN' }}, + { translatedName: 'log10', + fields: { 'OP': 'LOG10' }}, + { translatedName: 'e^', + fields: { 'OP': 'EXP' }}, + { translatedName: '10^', + fields: { 'OP': 'POW10' }}] }; Blockly.Blocks['math_trig'] = { @@ -162,7 +183,18 @@ Blockly.Blocks['math_trig'] = { return TOOLTIPS[mode]; }); }, - typeblock: [{translatedName: Blockly.getMsgString('math_trig_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK, + fields: { 'OP': 'SIN' }}, + { translatedName: Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK, + fields: { 'OP': 'COS' }}, + { translatedName: Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK, + fields: { 'OP': 'TAN' }}, + { translatedName: Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK, + fields: { 'OP': 'ASIN' }}, + { translatedName: Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK, + fields: { 'OP': 'ACOS' }}, + { translatedName: Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK, + fields: { 'OP': 'ATAN' }}] }; Blockly.Blocks['math_constant'] = { @@ -185,7 +217,18 @@ Blockly.Blocks['math_constant'] = { .appendField(new Blockly.FieldDropdown(CONSTANTS), 'CONSTANT'); this.setTooltip(Blockly.Msg.MATH_CONSTANT_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('math_constant_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK, + fields: { 'CONSTANT': 'PI' }}, + { translatedName: Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK, + fields: { 'CONSTANT': 'E' }}, + { translatedName: Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK, + fields: { 'CONSTANT': 'GOLDEN_RATIO' }}, + { translatedName: Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK, + fields: { 'CONSTANT': 'SQRT2' }}, + { translatedName: Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK, + fields: { 'CONSTANT': 'SQRT1_2' }}, + { translatedName: Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK, + fields: { 'CONSTANT': 'INFINITY' }}] }; Blockly.Blocks['math_number_property'] = { @@ -254,7 +297,20 @@ Blockly.Blocks['math_number_property'] = { this.removeInput('DIVISOR'); } }, - typeblock: [{translatedName: Blockly.getMsgString('math_number_property_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK, + fields: { 'PROPERTY': 'EVEN' }}, + { translatedName: Blockly.Msg.MATH_IS_ODD_TYPEBLOCK, + fields: { 'PROPERTY': 'ODD' }}, + { translatedName: Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK, + fields: { 'PROPERTY': 'PRIME' }}, + { translatedName: Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK, + fields: { 'PROPERTY': 'WHOLE' }}, + { translatedName: Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK, + fields: { 'PROPERTY': 'POSITIVE' }}, + { translatedName: Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK, + fields: { 'PROPERTY': 'NEGATIVE' }}, + { translatedName: Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK, + fields: { 'PROPERTY': 'DIVISIBLE_BY' }}] }; Blockly.Blocks['math_change'] = { @@ -309,7 +365,8 @@ Blockly.Blocks['math_change'] = { this.setFieldValue(newName, 'VAR'); } }, - typeblock: [{translatedName: Blockly.getMsgString('math_change_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.MATH_CHANGE_TYPEBLOCK, + values: {"DELTA": 1}}] }; Blockly.Blocks['math_round'] = { @@ -330,7 +387,12 @@ Blockly.Blocks['math_round'] = { .appendField(new Blockly.FieldDropdown(OPERATORS), 'OP'); this.setTooltip(Blockly.Msg.MATH_ROUND_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('math_round_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK, + fields: { 'OP': 'ROUND' }}, + { translatedName: Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK, + fields: { 'OP': 'ROUNDUP' }}, + { translatedName: Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK, + fields: { 'OP': 'ROUNDDOWN' }}] }; Blockly.Blocks['math_format_as_decimal'] = { @@ -349,14 +411,14 @@ Blockly.Blocks['math_format_as_decimal'] = { "check": "Number" } ], - "inputsInline": false, + "inputsInline": true, "output": "Number", "colour": Blockly.Blocks.math.HUE, "tooltip": Blockly.getToolTipString('math_format_as_decimal_tooltip'), "helpUrl": Blockly.getUrlString('math_format_as_decimal_url') }); }, - typeblock: [{translatedName: Blockly.getMsgString('MATH_FORMAT_AS_DECIMAL_TYPEBLOCK')}] + typeblock: [{translatedName: Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK}] }; Blockly.Blocks['math_on_list'] = { @@ -405,7 +467,22 @@ Blockly.Blocks['math_on_list'] = { return TOOLTIPS[mode]; }); }, - typeblock: [{translatedName: Blockly.getMsgString('math_onlist_typeblock')}] + typeblock: [{ translatedName: Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK, + fields: { 'OP': 'SUM' }}, + { translatedName: Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK, + fields: { 'OP': 'MIN' }}, + { translatedName: Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK, + fields: { 'OP': 'MAX' }}, + { translatedName: Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK, + fields: { 'OP': 'AVERAGE' }}, + { translatedName: Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK, + fields: { 'OP': 'MEDIAN' }}, + { translatedName: Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK, + fields: { 'OP': 'MODE' }}, + { translatedName: Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK, + fields: { 'OP': 'STD_DEV' }}, + { translatedName: Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK, + fields: { 'OP': 'RANDOM' }}] }; Blockly.Blocks['math_modulo'] = { @@ -435,7 +512,7 @@ Blockly.Blocks['math_modulo'] = { "helpUrl": Blockly.Msg.MATH_MODULO_HELPURL }); }, - typeblock: [{translatedName: Blockly.getMsgString('math_modulo_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.MATH_MODULO_TYPEBLOCK}] }; Blockly.Blocks['math_constrain'] = { @@ -470,7 +547,8 @@ Blockly.Blocks['math_constrain'] = { "helpUrl": Blockly.Msg.MATH_CONSTRAIN_HELPURL }); }, - typeblock: [{translatedName: Blockly.getMsgString('math_constrain_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK, + values: {"LOW": 1, "HIGH" : 100}}] }; Blockly.Blocks['math_random_int'] = { @@ -500,7 +578,8 @@ Blockly.Blocks['math_random_int'] = { "helpUrl": Blockly.Msg.MATH_RANDOM_INT_HELPURL }); }, - typeblock: [{translatedName: Blockly.getMsgString('math_random_int_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK, + values: {"FROM": 1, "TO" : 100}}] }; Blockly.Blocks['math_random_float'] = { @@ -516,5 +595,5 @@ Blockly.Blocks['math_random_float'] = { .appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM); this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('math_random_float_typeblock')}] + typeblock: [{translatedName: Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK}] }; diff --git a/blocks_compressed.js b/blocks_compressed.js index d0e490c094d..662769ccb3f 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -12,7 +12,7 @@ this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_BLEND_TOOLTIP)},t // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.lists={};Blockly.Blocks.lists.HUE=260;Blockly.Blocks.lists_create_empty={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.setOutput(!0,"Array");this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);this.setTooltip(Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK}]}; Blockly.Blocks.lists_create_with={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendAddSubGroup(Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH,"items",null,Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);this.itemCount_.items=1;this.updateShape_();this.setOutput(!0,"Array");this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP)},getAddSubName:function(a,b){return"ADD"+b},typeblock:[{translatedName:Blockly.Msg.LISTS_CREATE_WITH_TYPEBLOCK,mutatorAttributes:{items:2}}]}; -Blockly.Blocks.lists_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_REPEAT_TITLE,args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.LISTS_REPEAT_HELPURL})},typeblock:[{translatedName:Blockly.Msg.LISTS_REPEAT_TYPEBLOCK,values:{NUM:'5'}}]}; +Blockly.Blocks.lists_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_REPEAT_TITLE,args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.LISTS_REPEAT_HELPURL})},typeblock:[{translatedName:Blockly.Msg.LISTS_REPEAT_TYPEBLOCK,values:{NUM:5}}]}; Blockly.Blocks.lists_length={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_LENGTH_TOOLTIP,helpUrl:Blockly.Msg.LISTS_LENGTH_HELPURL})},typeblock:[{translatedName:Blockly.Msg.LISTS_LENGTH_TYPEBLOCK}]}; Blockly.Blocks.lists_isEmpty={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_ISEMPTY_TOOLTIP,helpUrl:Blockly.Msg.LISTS_ISEMPTY_HELPURL})},typeblock:[{translatedName:Blockly.Msg.LISTS_ISEMPTY_TYPEBLOCK}]}; Blockly.Blocks.lists_indexOf={init:function(){var a=[[Blockly.Msg.LISTS_INDEX_OF_FIRST,"FIRST"],[Blockly.Msg.LISTS_INDEX_OF_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.LISTS_INDEX_OF_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.setOutput(!0,"Number");this.appendValueInput("VALUE").setCheck("Array").appendField(Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST);this.appendValueInput("FIND").appendField(new Blockly.FieldDropdown(a),"END");this.setInputsInline(!0);this.setTooltip(Blockly.Msg.LISTS_INDEX_OF_TOOLTIP)}, @@ -44,52 +44,61 @@ this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_);this.elseCount_&&a this.getInput("IF"+b);c&&c.connection&&c.connection.targetConnection&&c.connection.targetConnection.sourceBlock_.unplug(!0,!0);var d=this.getInput("DO"+b);d&&d.connection&&d.connection.targetConnection&&d.connection.targetConnection.sourceBlock_.unplug(!0,!0);for(b+=1;b","LT"],["\u2265","LTE"],["<","GT"],["\u2264","GTE"]]:[["=","EQ"],["\u2260","NEQ"],["<","LT"],["\u2264","LTE"],[">","GT"],["\u2265","GTE"]];this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.setOutput(!0,"Boolean");this.appendValueInput("A");this.appendValueInput("B").appendField(new Blockly.FieldDropdown(a),"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a= b.getFieldValue("OP");return{EQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[a]});this.prevBlocks_=[null,null]},onchange:function(){if(this.workspace){var a=this.getInputTargetBlock("A"),b=this.getInputTargetBlock("B");if(a&&b&&!a.outputConnection.checkType_(b.outputConnection))for(var c=0;cd;d++){var e=1==d?a:b;e&&!e.outputConnection.checkType_(c)&&(c===this.prevParentConnection_?(this.setParent(null),c.sourceBlock_.bumpNeighbours_()):(e.setParent(null),e.bumpNeighbours_()))}this.prevParentConnection_=c}},typeblock:[{translatedName:Blockly.getMsgString("logic_ternary_typeblock")}]}; +this.getInputTargetBlock("THEN"),b=this.getInputTargetBlock("ELSE"),c=this.outputConnection.targetConnection;if((a||b)&&c)for(var d=0;2>d;d++){var e=1==d?a:b;e&&!e.outputConnection.checkType_(c)&&(c===this.prevParentConnection_?(this.setParent(null),c.sourceBlock_.bumpNeighbours_()):(e.setParent(null),e.bumpNeighbours_()))}this.prevParentConnection_=c}},typeblock:[{translatedName:Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK}]}; // Copyright 2012 Google Inc. Apache License 2.0 -Blockly.Blocks.loops={};Blockly.Blocks.loops.HUE=120; -Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_input",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setChangeHandler(Blockly.FieldTextInput.nonnegativeIntegerValidator)},typeblock:[{translatedName:Blockly.getMsgString("controls_repeat_typeblock")}]}; -Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO)},typeblock:[{translatedName:Blockly.getMsgString("controls_repeat_ext_typeblock")}]}; +Blockly.Blocks.loops={};Blockly.Blocks.loops.HUE=120;Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_input",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setChangeHandler(Blockly.FieldTextInput.nonnegativeIntegerValidator)}}; +Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO)},typeblock:[{translatedName:Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK,values:{TIMES:10}}]}; Blockly.Blocks.controls_whileUntil={init:function(){var a=[[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]];this.setHelpUrl(Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendValueInput("BOOL").setCheck("Boolean").appendField(new Blockly.FieldDropdown(a),"MODE");this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO);this.setPreviousStatement(!0);this.setNextStatement(!0); -var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})},typeblock:[{translatedName:Blockly.getMsgString("controls_while_until_typeblock")}]}; +var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})},typeblock:[{translatedName:Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK,fields:{MODE:"WHILE"}},{translatedName:Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK,fields:{MODE:"UNTIL"}}]}; Blockly.Blocks.controls_for={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOR_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOR_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOR_INPUT_DO); var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:function(a){if(!this.isCollapsed()){var b={enabled:!0},c=this.getFieldValue("VAR");b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR"); -c=goog.dom.createDom("block",null,c);c.setAttribute("type","variables_get");b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)}},typeblock:[{translatedName:Blockly.getMsgString("controls_for_typeblock")}]}; +c=goog.dom.createDom("block",null,c);c.setAttribute("type","variables_get");b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)}},typeblock:[{translatedName:Blockly.Msg.CONTROLS_FOR_TYPEBLOCK,values:{FROM:1,TO:10,BY:1}}]}; Blockly.Blocks.controls_forEach={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOREACH_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOREACH_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO);var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1", -a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:[{translatedName:Blockly.getMsgString("controls_for_each_typeblock")}]}; +a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:[{translatedName:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}]}; Blockly.Blocks.controls_flow_statements={init:function(){var a=[[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"FLOW");this.setPreviousStatement(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("FLOW");return{BREAK:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK, -CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){if(this.workspace){var a=!1,b=this;do{if("controls_repeat"==b.type||"controls_repeat_ext"==b.type||"controls_forEach"==b.type||"controls_for"==b.type||"controls_whileUntil"==b.type){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)}},typeblock:[{translatedName:Blockly.getMsgString("controls_flow_statements_typeblock")}]}; +CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){if(this.workspace){var a=!1,b=this;do{if("controls_repeat"==b.type||"controls_repeat_ext"==b.type||"controls_forEach"==b.type||"controls_for"==b.type||"controls_whileUntil"==b.type){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)}},typeblock:[{translatedName:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK,fields:{FLOW:"BREAK"}}, +{translatedName:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK,fields:{FLOW:"CONTINUE"}}]}; // Copyright 2012 Google Inc. Apache License 2.0 -Blockly.Blocks.math={};Blockly.Blocks.math.HUE=230;Blockly.Blocks.math_number={init:function(){this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.appendDummyInput().appendField(new Blockly.FieldTextInput("0",Blockly.FieldTextInput.numberValidator),"NUM");this.setOutput(!0,"Number");this.setTooltip(Blockly.Msg.MATH_NUMBER_TOOLTIP)},typeblock:[{translatedName:Blockly.getMsgString("math_number_typeblock")}]}; +Blockly.Blocks.math={};Blockly.Blocks.math.HUE=230;Blockly.Blocks.math_number={init:function(){this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.appendDummyInput().appendField(new Blockly.FieldTextInput("0",Blockly.FieldTextInput.numberValidator),"NUM");this.setOutput(!0,"Number");this.setTooltip(Blockly.Msg.MATH_NUMBER_TOOLTIP)}}; Blockly.Blocks.math_arithmetic={init:function(){var a=[[Blockly.Msg.MATH_ADDITION_SYMBOL,"ADD"],[Blockly.Msg.MATH_SUBTRACTION_SYMBOL,"MINUS"],[Blockly.Msg.MATH_MULTIPLICATION_SYMBOL,"MULTIPLY"],[Blockly.Msg.MATH_DIVISION_SYMBOL,"DIVIDE"],[Blockly.Msg.MATH_POWER_SYMBOL,"POWER"]];this.setHelpUrl(Blockly.Msg.MATH_ARITHMETIC_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("A").setCheck("Number");this.appendValueInput("B").setCheck("Number").appendField(new Blockly.FieldDropdown(a), -"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("OP");return{ADD:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[a]})},typeblock:[{translatedName:Blockly.getMsgString("math_arithmetic_typeblock")}]}; +"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("OP");return{ADD:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[a]})},typeblock:[{translatedName:Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK,fields:{OP:"ADD"}},{translatedName:Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK, +fields:{OP:"MINUS"}},{translatedName:Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK,fields:{OP:"MULTIPLY"}},{translatedName:Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK,fields:{OP:"DIVIDE"}},{translatedName:Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK,fields:{OP:"POWER"}}]}; Blockly.Blocks.math_single={init:function(){var a=[[Blockly.Msg.MATH_SINGLE_OP_ROOT,"ROOT"],[Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE,"ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]];this.setHelpUrl(Blockly.Msg.MATH_SINGLE_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(a),"OP");var b=this;this.setTooltip(function(){var a=b.getFieldValue("OP");return{ROOT:Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT, -ABS:Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS,NEG:Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG,LN:Blockly.Msg.MATH_SINGLE_TOOLTIP_LN,LOG10:Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10,EXP:Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP,POW10:Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10}[a]})},typeblock:[{translatedName:Blockly.getMsgString("math_single_typeblock")}]}; +ABS:Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS,NEG:Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG,LN:Blockly.Msg.MATH_SINGLE_TOOLTIP_LN,LOG10:Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10,EXP:Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP,POW10:Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10}[a]})},typeblock:[{translatedName:Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK,fields:{OP:"ROOT"}},{translatedName:Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK,fields:{OP:"ABS"}},{translatedName:Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK,fields:{OP:"NEG"}},{translatedName:"ln", +fields:{OP:"LN"}},{translatedName:"log10",fields:{OP:"LOG10"}},{translatedName:"e^",fields:{OP:"EXP"}},{translatedName:"10^",fields:{OP:"POW10"}}]}; Blockly.Blocks.math_trig={init:function(){var a=[[Blockly.Msg.MATH_TRIG_SIN,"SIN"],[Blockly.Msg.MATH_TRIG_COS,"COS"],[Blockly.Msg.MATH_TRIG_TAN,"TAN"],[Blockly.Msg.MATH_TRIG_ASIN,"ASIN"],[Blockly.Msg.MATH_TRIG_ACOS,"ACOS"],[Blockly.Msg.MATH_TRIG_ATAN,"ATAN"]];this.setHelpUrl(Blockly.Msg.MATH_TRIG_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(a),"OP");var b=this;this.setTooltip(function(){var a= -b.getFieldValue("OP");return{SIN:Blockly.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Blockly.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Blockly.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN}[a]})},typeblock:[{translatedName:Blockly.getMsgString("math_trig_typeblock")}]}; -Blockly.Blocks.math_constant={init:function(){this.setHelpUrl(Blockly.Msg.MATH_CONSTANT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\u03c0","PI"],["e","E"],["\u03c6","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(\u00bd)","SQRT1_2"],["\u221e","INFINITY"]]),"CONSTANT");this.setTooltip(Blockly.Msg.MATH_CONSTANT_TOOLTIP)},typeblock:[{translatedName:Blockly.getMsgString("math_constant_typeblock")}]}; +b.getFieldValue("OP");return{SIN:Blockly.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Blockly.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Blockly.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN}[a]})},typeblock:[{translatedName:Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK,fields:{OP:"SIN"}},{translatedName:Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK,fields:{OP:"COS"}},{translatedName:Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK,fields:{OP:"TAN"}}, +{translatedName:"ln",fields:{OP:"ASIN"}},{translatedName:"log10",fields:{OP:"ACOS"}},{translatedName:"10^",fields:{OP:"ATAN"}}]}; +Blockly.Blocks.math_constant={init:function(){this.setHelpUrl(Blockly.Msg.MATH_CONSTANT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\u03c0","PI"],["e","E"],["\u03c6","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(\u00bd)","SQRT1_2"],["\u221e","INFINITY"]]),"CONSTANT");this.setTooltip(Blockly.Msg.MATH_CONSTANT_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK,fields:{CONSTANT:"PI"}}, +{translatedName:Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK,fields:{CONSTANT:"E"}},{translatedName:Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK,fields:{CONSTANT:"GOLDEN_RATIO"}},{translatedName:Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK,fields:{CONSTANT:"SQRT2"}},{translatedName:Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK,fields:{CONSTANT:"SQRT1_2"}},{translatedName:Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK,fields:{CONSTANT:"INFINITY"}}]}; Blockly.Blocks.math_number_property={init:function(){var a=[[Blockly.Msg.MATH_IS_EVEN,"EVEN"],[Blockly.Msg.MATH_IS_ODD,"ODD"],[Blockly.Msg.MATH_IS_PRIME,"PRIME"],[Blockly.Msg.MATH_IS_WHOLE,"WHOLE"],[Blockly.Msg.MATH_IS_POSITIVE,"POSITIVE"],[Blockly.Msg.MATH_IS_NEGATIVE,"NEGATIVE"],[Blockly.Msg.MATH_IS_DIVISIBLE_BY,"DIVISIBLE_BY"]];this.setColour(Blockly.Blocks.math.HUE);this.appendValueInput("NUMBER_TO_CHECK").setCheck("Number");a=new Blockly.FieldDropdown(a,function(a){this.sourceBlock_.updateShape_("DIVISIBLE_BY"== a)});this.appendDummyInput().appendField(a,"PROPERTY");this.setInputsInline(!0);this.setOutput(!0,"Boolean");this.setTooltip(Blockly.Msg.MATH_IS_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation"),b="DIVISIBLE_BY"==this.getFieldValue("PROPERTY");a.setAttribute("divisor_input",b);return a},domToMutation:function(a){a="true"==a.getAttribute("divisor_input");this.updateShape_(a)},updateShape_:function(a){var b=this.getInput("DIVISOR");a?b||this.appendValueInput("DIVISOR").setCheck("Number"): -b&&this.removeInput("DIVISOR")},typeblock:[{translatedName:Blockly.getMsgString("math_number_property_typeblock")}]}; +b&&this.removeInput("DIVISOR")},typeblock:[{translatedName:Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK,fields:{PROPERTY:"EVEN"}},{translatedName:Blockly.Msg.MATH_IS_ODD_TYPEBLOCK,fields:{PROPERTY:"ODD"}},{translatedName:Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK,fields:{PROPERTY:"PRIME"}},{translatedName:Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK,fields:{PROPERTY:"WHOLE"}},{translatedName:Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK,fields:{PROPERTY:"POSITIVE"}},{translatedName:Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK,fields:{PROPERTY:"NEGATIVE"}}, +{translatedName:Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK,fields:{PROPERTY:"DIVISIBLE_BY"}}]}; Blockly.Blocks.math_change={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_CHANGE_TITLE,args0:[{type:"field_variable",name:"VAR",variable:Blockly.Msg.MATH_CHANGE_TITLE_ITEM},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.math.HUE,helpUrl:Blockly.Msg.MATH_CHANGE_HELPURL});var a=this;this.setTooltip(function(){return Blockly.Msg.MATH_CHANGE_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]}, -renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},typeblock:[{translatedName:Blockly.getMsgString("math_change_typeblock")}]}; -Blockly.Blocks.math_round={init:function(){var a=[[Blockly.Msg.MATH_ROUND_OPERATOR_ROUND,"ROUND"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP,"ROUNDUP"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN,"ROUNDDOWN"]];this.setHelpUrl(Blockly.Msg.MATH_ROUND_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(a),"OP");this.setTooltip(Blockly.Msg.MATH_ROUND_TOOLTIP)},typeblock:[{translatedName:Blockly.getMsgString("math_round_typeblock")}]}; -Blockly.Blocks.math_format_as_decimal={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE,args0:[{type:"input_value",name:"NUM",check:"Number"},{type:"input_value",name:"PLACES",check:"Number"}],inputsInline:!1,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.getToolTipString("math_format_as_decimal_tooltip"),helpUrl:Blockly.getUrlString("math_format_as_decimal_url")})},typeblock:[{translatedName:Blockly.getMsgString("MATH_FORMAT_AS_DECIMAL_TYPEBLOCK")}]}; +renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},typeblock:[{translatedName:Blockly.Msg.MATH_CHANGE_TYPEBLOCK,values:{DELTA:1}}]}; +Blockly.Blocks.math_round={init:function(){var a=[[Blockly.Msg.MATH_ROUND_OPERATOR_ROUND,"ROUND"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP,"ROUNDUP"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN,"ROUNDDOWN"]];this.setHelpUrl(Blockly.Msg.MATH_ROUND_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(a),"OP");this.setTooltip(Blockly.Msg.MATH_ROUND_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK, +fields:{OP:"ROUND"}},{translatedName:Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK,fields:{OP:"ROUNDUP"}},{translatedName:Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK,fields:{OP:"ROUNDDOWN"}}]}; +Blockly.Blocks.math_format_as_decimal={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE,args0:[{type:"input_value",name:"NUM",check:"Number"},{type:"input_value",name:"PLACES",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.getToolTipString("math_format_as_decimal_tooltip"),helpUrl:Blockly.getUrlString("math_format_as_decimal_url")})},typeblock:[{translatedName:Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK}]}; Blockly.Blocks.math_on_list={init:function(){var a=[[Blockly.Msg.MATH_ONLIST_OPERATOR_SUM,"SUM"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MIN,"MIN"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MAX,"MAX"],[Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE,"AVERAGE"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN,"MEDIAN"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MODE,"MODE"],[Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV,"STD_DEV"],[Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM,"RANDOM"]],b=this;this.setHelpUrl(Blockly.Msg.MATH_ONLIST_HELPURL);this.setColour(Blockly.Blocks.math.HUE); this.setOutput(!0,"Number");a=new Blockly.FieldDropdown(a,function(a){"MODE"==a?b.outputConnection.setCheck("Array"):b.outputConnection.setCheck("Number")});this.appendValueInput("LIST").setCheck("Array").appendField(a,"OP");this.setTooltip(function(){var a=b.getFieldValue("OP");return{SUM:Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM,MIN:Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN,MAX:Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX,AVERAGE:Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE,MEDIAN:Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN, -MODE:Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE,STD_DEV:Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV,RANDOM:Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM}[a]})},typeblock:[{translatedName:Blockly.getMsgString("math_onlist_typeblock")}]}; -Blockly.Blocks.math_modulo={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_MODULO_TITLE,args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_MODULO_TOOLTIP,helpUrl:Blockly.Msg.MATH_MODULO_HELPURL})},typeblock:[{translatedName:Blockly.getMsgString("math_modulo_typeblock")}]}; -Blockly.Blocks.math_constrain={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_CONSTRAIN_TITLE,args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_CONSTRAIN_TOOLTIP,helpUrl:Blockly.Msg.MATH_CONSTRAIN_HELPURL})},typeblock:[{translatedName:Blockly.getMsgString("math_constrain_typeblock")}]}; -Blockly.Blocks.math_random_int={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:Blockly.Msg.MATH_RANDOM_INT_HELPURL})},typeblock:[{translatedName:Blockly.getMsgString("math_random_int_typeblock")}]}; -Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM);this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)},typeblock:[{translatedName:Blockly.getMsgString("math_random_float_typeblock")}]}; +MODE:Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE,STD_DEV:Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV,RANDOM:Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM}[a]})},typeblock:[{translatedName:Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK,fields:{OP:"SUM"}},{translatedName:Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK,fields:{OP:"MIN"}},{translatedName:Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK,fields:{OP:"MAX"}},{translatedName:Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK,fields:{OP:"AVERAGE"}},{translatedName:Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK, +fields:{OP:"MEDIAN"}},{translatedName:Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK,fields:{OP:"MODE"}},{translatedName:Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK,fields:{OP:"STD_DEV"}},{translatedName:Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK,fields:{OP:"RANDOM"}}]}; +Blockly.Blocks.math_modulo={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_MODULO_TITLE,args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_MODULO_TOOLTIP,helpUrl:Blockly.Msg.MATH_MODULO_HELPURL})},typeblock:[{translatedName:Blockly.Msg.MATH_MODULO_TYPEBLOCK}]}; +Blockly.Blocks.math_constrain={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_CONSTRAIN_TITLE,args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_CONSTRAIN_TOOLTIP,helpUrl:Blockly.Msg.MATH_CONSTRAIN_HELPURL})},typeblock:[{translatedName:Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK,values:{LOW:1,HIGH:100}}]}; +Blockly.Blocks.math_random_int={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:Blockly.Msg.MATH_RANDOM_INT_HELPURL})},typeblock:[{translatedName:Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK,values:{FROM:1,TO:100}}]}; +Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM);this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK}]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.procedures={};Blockly.Blocks.procedures.HUE=290; Blockly.Blocks.procedures_defnoreturn={init:function(){var a=new Blockly.FieldClickImage(this.addPng,17,17);a.setPrivate({name:b,pos:0});a.setChangeHandler(this.doAddField);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.setColour(Blockly.Blocks.procedures.HUE);var b=Blockly.Procedures.findLegalName(Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,this),b=new Blockly.FieldTextInput(b,Blockly.Procedures.rename);b.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(b, diff --git a/core/css.js b/core/css.js index ad044940735..cb35f7a4a39 100644 --- a/core/css.js +++ b/core/css.js @@ -279,6 +279,10 @@ Blockly.Css.CONTENT = [ ' opacity: .6;', '}', + '.blocklyDraggable:not(:hover) .blocklyIconFading {', + ' opacity: 0;', + '}', + '.blocklyMinimalBody {', ' margin: 0;', ' padding: 0;', diff --git a/core/field_clickimage.js b/core/field_clickimage.js index 7b0f3de6259..ca85e70a3f5 100644 --- a/core/field_clickimage.js +++ b/core/field_clickimage.js @@ -87,6 +87,9 @@ Blockly.FieldClickImage.prototype.init = function(block) { // We want to use the styling of an Icon to indicate clickability Blockly.addClass_(/** @type {!Element} */ (this.fieldGroup_), 'blocklyIconGroup'); + // TODO akinard: Add another class called blocklyIconFading + Blockly.addClass_(/** @type {!Element} */ (this.fieldGroup_), + 'blocklyIconFading'); // // Update the classes for this to appear editable this.updateEditable(); diff --git a/core/typeblock.js b/core/typeblock.js index 272ba487386..075757e6f51 100644 --- a/core/typeblock.js +++ b/core/typeblock.js @@ -363,10 +363,14 @@ Blockly.TypeBlock.sectionToXMLString = function(section,attributes) { if (typeof attributes === 'object') { for (var key in attributes) { if (attributes.hasOwnProperty(key)) { + var val = attributes[key]; + // Handle short cut for number values. + if (section === 'value' && goog.isNumber(val)) { + val = ''+ + '' + val + ''; + } xmlString += '<' + section + - ' name="' + key + '">'+ - attributes[key] + - ''; + ' name="' + key + '">' + val + ''; } } } diff --git a/msg/js/ar.js b/msg/js/ar.js index ecfb57761cf..b2d603a458c 100644 --- a/msg/js/ar.js +++ b/msg/js/ar.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "أحمر"; Blockly.Msg.COLOUR_RGB_TITLE = "لون مع"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "إنشئ لون بالكمية المحددة من الأحمر, الأخضر والأزرق. بحيث يجب تكون كافة القيم بين 0 و 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "اخرج من الحلقة"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "استمر ابتداءا من التكرار التالي من الحلقة"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "تحذير: يمكن استخد Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "لكل عنصر %1 في قائمة %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "لكل عنصر في قائمة ما، عين المتغير '%1' لهذا الغنصر، ومن ثم نفذ بعض الأوامر."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "عد بـ %1 من %2 إلى %3 بمعدل %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "اجعل المتغير %1 يأخذ القيم من رقم البداية الى رقم النهاية، قم بالعد داخل المجال المحدد، وطبق أوامر القطع المحددة."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "إضف شرطا إلى القطعة الشرطية \"إذا\"."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "أضف شرط \"نهاية، إجمع\" إلى القطعة الشرطية \"إذا\"."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "أضف, إزل, أو أعد ترتيب المقاطع لإعادة تكوين القطعة الشرطية \"إذا\"."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "والا"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "إذا كانت قيمة ما تساوي ص Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "إذا كانت قيمة ما تساوي \"صحيح\"، إذن قم بتنفيذ أول قطعة من الأوامر. والا ،قم بتنفيذ القطعة الثانية من الأوامر."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "إذا كانت القيمة الأولى تساوي \"صحيح\", إذن قم بتنفيذ القطعة الأولى من الأوامر. والا, إذا كانت القيمة الثانية تساوي \"صحيح\", قم بتنفيذ القطعة الثانية من الأوامر."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "إذا كانت القيمة الأولى تساوي \"صحيح\", إذن قم بتنفيذ القطعة الأولى من الأوامر. والا , إذا كانت القيمة الثانية تساوي \"صحيح\", قم بتنفيذ القطعة الثانية من الأوامر. إذا لم تكن هناك أي قيمة تساوي صحيح, قم بتنفيذ آخر قطعة من الأوامر."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "نفّذ"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "كرر %1 مرات"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "نفّذ بعض الأوامر عدة مرات."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "اكرّر حتى"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "اكرّر طالما"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "بما ان القيمة خاطئة, نفّذ بعض الأوامر."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "بما ان القيمة صحيحة, نفّذ بعض الأوامر."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "إحذف القطعة"; Blockly.Msg.DELETE_X_BLOCKS = "إحذف قطع %1"; Blockly.Msg.DISABLE_BLOCK = "عطّل القطعة"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "خاطئ"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "يرجع صحيح أو خاطئ."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "صحيح"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "يرجع صحيح إذا كان كلا المدخلات مساوية بعضها البعض."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "يرجع صحيح إذا كان الإدخال الأول أكبر من الإدخال الثاني."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "يرجع صحيح إذا كان الإ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "يرجع صحيح إذا كان الإدخال الأول أصغر من الإدخال الثاني."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "يرجع صحيح إذا كان الإدخال الأول أصغر من أو يساوي الإدخال الثاني."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "يرجع صحيح إذا كانت كلا المدخلات غير مساوية لبعضها البعض."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "ليس من %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "يرجع صحيح إذا كان الإدخال خاطئ . يرجع خاطئ إذا كان الإدخال صحيح."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "ملغى"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "ترجع ملغى."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "و"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "أو"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "ترجع صحيح إذا كان كلا المٌدخلات صحيح."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "ترجع صحيح إذا كان واحد على الأقل من المدخلات صحيح."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "اختبار"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "إذا كانت العبارة خاطئة"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "إذا كانت العبارة صحيحة"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "تحقق الشرط في 'الاختبار'. إذا كان الشرط صحيح، يقوم بإرجاع قيمة 'اذا كانت العبارة صحيحة'؛ خلاف ذلك يرجع قيمة 'اذا كانت العبارة خاطئة'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "يرجع مجموع الرقمين."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "يرجع حاصل قسمة الرقمين."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "يرجع الفرق بين الرقمين."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "يرجع الرقم الأول مر Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "غير %1 بـ %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "إضف رقم إلى متغير '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "ير جع واحد من الثوابت الشائعة : π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "تقيد %1 منخفض %2 مرتفع %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "تقييد العددليكون بين الحدود المحددة (ضمناً)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "قابل للقسمة"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "هو زوجي"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "هو سالب"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "هو فرذي"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "هو موجب"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "هو أولي"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "تحقق إذا كان عدد ما زوجيا، فرذيا, أوليا، صحيحا،موجبا أو سالبا، أو إذا كان قابلا للقسمة على عدد معين. يرجع صحيح أو خاطئ."; Blockly.Msg.MATH_IS_WHOLE = "هو صحيح"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "باقي %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "يرجع الباقي من قسمة الرقمين."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "عدد ما."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "متوسط القائمة"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "الحد الأقصى لقائمة"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "متوسط القائمة"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "منوال القائمة"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "عنصر عشوائي من القائمة"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "الانحراف المعياري للقائمة"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "مجموع القائمة"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "يرجع المعدل (الوسط الحسابي) للقيم الرقمية في القائمة."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "يرجع أكبر عدد في القائمة."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "يرجع وسيط العدد في القائمة."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "كسر عشوائي"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "يرجع جزء عشوائي بين 0.0 (ضمنياً) و 1.0 (خارجيا)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = " عدد صحيح عشوائي من %1 إلى %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "يرجع عدد صحيح عشوائي بين حدين محددين, ضمنيا."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "تقريب"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "تقريب إلى اصغر عدد صحيح"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "تقريب الى اكبر عدد صحيح"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "تقريب الى اكبر عدد صحيح أو الى اصغر عدد صحيح."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "مطلق"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "الجذر التربيعي"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "يرجع القيمة المطلقة لرقم."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "يرجع e الذي هو الاس المرفوع للرقم."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "يرجع اللوغاريتم الطبيعي لرقم."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "يرجع مضروب الرقم 10 في Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "يرجع الجذر التربيعي للرقم."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "جيب تمام"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "جيب"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "ظل"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "يرجع قوس جيب التمام لرقم."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "يرجع قوس الجيب للرقم."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "يرجع قوس الظل للرقم."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "اسم الإدخال:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "المدخلات"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "ازل التعليق"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/az.js b/msg/js/az.js index ef259f7e9f6..8c6c9284673 100644 --- a/msg/js/az.js +++ b/msg/js/az.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "qırmızı"; Blockly.Msg.COLOUR_RGB_TITLE = "rəngin komponentləri:"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Qırmızı, yaşıl və mavinin göstərilən miqdarı ilə bir rəng düzəlt. Bütün qiymətlər 0 ilə 100 arasında olmalıdır."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "dövrdən çıx"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "dövrün növbəti addımından davam et"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Xəbərdarlıq: Bu blok ancaq d Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "hər element üçün %1 siyahıda %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Siyahıdakı hər element üçün \"%1\" dəyişənini elementə mənimsət və bundan sonra bəzi əmrləri yerinə yetir."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "say: %1 %2 ilə başlayıb, %3 qiymətinə kimi %4 qədər dəyiş"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "\"%1\" dəyişəni başlanğıc ədəddən son ədədə qədər göstərilən aralıqla qiymətlər aldıqca göstərilən blokları yerinə yetir."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "\"Əgər\" blokuna bir şərt əlavə et."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "\"Əgər\" blokuna qalan bütün halları əhatə edəb son bir şərt əlavə et."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Bu \"əgər\" blokunu dəyişdirmək üçün bölümlərin yenisini əlavə et, sil və ya yerini dəyiş."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "əks halda"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Əgər qiymət doğrudursa, onda bəzi əmr Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Əgər qiymət doğrudursa, onda birinci əmrlər blokunu yerinə yetir. Əks halda isə ikinci əmrlər blokunu yerinə yetir."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Əgər birinci qiymət doğrudursa, onda birinci əmrlər blokunu yerinə yetir. Əks halda əgər ikinci qiymət doğrudursa, onda ikinci əmrlər blokunu yerinə yetir."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Əgər birinci qiymət doğrudursa, onda birinci əmrlər blokunu yerinə yetir. Əks halda əgər ikinci qiymət doğrudursa, onda ikinci əmrlər blokunu yerinə yetir. Əgər qiymətlərdən heç biri doğru deyilsə, onda axırıncı əmrlər blokunu yerinə yetir."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; // untranslated Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "icra et"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 dəfə təkrar et"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Bəzi əmrləri bir neçə dəfə yerinə yetir."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "təkrar et, ta ki"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "təkrar et, hələ ki"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Hələ ki, qiymət \"yalan\"dır, bəzi əmrləri yerinə yetir."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Hələ ki, qiymət \"doğru\"dur, bəzi əmrləri yerinə yetir."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Bloku sil"; Blockly.Msg.DELETE_X_BLOCKS = "%1 bloku sil"; Blockly.Msg.DISABLE_BLOCK = "Bloku söndür"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "yalan"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "\"doğru\" və ya \"yalan\" cavanını qaytarır."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "doğru"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Girişlər bir birinə bərabərdirsə \"doğru\" cavabını qaytarır."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Birinci giriş ikincidən böyükdürsə \"doğru\" cavabını qaytarır."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Birinci giriş ikincidən böyük və y Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Birinci giriş ikincidən kiçikdirsə \"doğru\" cavabını qaytarır."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Birinci giriş ikincidən kiçik və ya bərarbərdirsə \"doğru\" cavabını qaytarır."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Girişlər bərabər deyillərsə \"doğru\" cavabını qaytarır."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 deyil"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Giriş \"yalan\"-dursa \"doğru\" cavabını qaytarır. Giriş \"doğru\"-dursa \"yalan\" cavabını qaytarır."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "boş"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Boş cavab qaytarır."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "və"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "və ya"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Hər iki giriş \"doğru\"-dursa \"doğru\" cavabını qaytarır."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Girişlərdən heç olmasa biri \"doğru\"-dursa \"doğru\" cavabını qaytarır."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "əgər yalandırsa"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "əgər doğrudursa"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'Yoxla' əmrindəki şərtə nəzər yetirin. Əgər şərt \"doğru\"-dursa \"əgər doğru\", əks halda isə \"əgər yalan\" cavabını qaytarır."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://az.wikipedia.org/wiki/Hesab"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "İki ədədin cəmini qaytarır."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "İki ədədin nisbətini qaytarır."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "İki ədədin fərqini qaytarır."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Birinci ədədin ikinci ədəd dər Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated Blockly.Msg.MATH_CHANGE_TITLE = "dəyiş: %1 buna: %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "'%1' dəyişəninin üzərinə bir ədəd artır."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Ümumi sabitlərdən birini qaytarır π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), və ya ∞ (sonsuzluq)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "%1 üçün ən aşağı %2, ən yuxarı %3 olmağı tələb et"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Bir ədədin verilmiş iki ədəd arasında olmasını tələb edir (sərhədlər də daxil olmaqla)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "bölünür"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "cütdür"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "mənfidir"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "təkdir"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "müsətdir"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "sadədir"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Bir ədədin cüt, tək, sadə, tam, müsbət, mənfi olmasını və ya müəyyən bir ədədə bölünməsini yoxlayır. \"Doğru\" və ya \"yalan\" qiymətini qaytarır."; Blockly.Msg.MATH_IS_WHOLE = "tamdır"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2 bölməsinin qalığı"; Blockly.Msg.MATH_MODULO_TOOLTIP = "İki ədədin nisbətindən alınan qalığı qaytarır."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated Blockly.Msg.MATH_NUMBER_TOOLTIP = "Ədəd."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "siyahının ədədi ortası"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "siyahının maksimumu"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "siyahının medianı"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "Siyahı modları( Ən çox rastlaşıla Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "siyahıdan təsadüfi seçilmiş bir element"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "Siyahının standart deviasiyası"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Siyahının cəmi"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Siyahıdaki ədədlərin ədədi ortasını qaytarır."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Siyahıdaki ən böyük elementi qaytarır."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Siyahının median elementini qaytarır."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "təsadüfi kəsr"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "0.0 (daxil olmaqla) və 1.0 (daxil olmamaqla) ədədlərinin arasından təsadüfi bir kəsr ədəd qaytarır."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "%1 ilə %2 arasından təsadüfi tam ədəd"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Verilmiş iki ədəd arasından (ədədrlər də daxil olmaqla) təsadüfi bir tam ədəd qaytarır."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "yuvarlaqlaşdır"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "aşağı yuvarlaqlaşdır"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "yuxarı yuvarlaqlaşdır"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Ədədi aşağı və ya yuxari yuvarlaqşdır."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "modul"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "kvadrat kök"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Ədədin modulunu qaytarır."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "e sabitinin verilmiş ədədə qüvvətini qaytarır."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Ədədin natural loqarifmini tapır."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "10-un verilmiş ədədə qüvvətini qa Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Ədədin kvadrat kökünü qaytarır."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "arccos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "arcsin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "arctan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tg"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Ədədin arccosinusunu qaytarır."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Ədədin arcsinusunu qaytarır."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Ədədin arctanqensini qaytarır."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Giriş adı:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "girişlər"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Şərhi sil"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/bcc.js b/msg/js/bcc.js index 6bd7362d2a5..31f12452823 100644 --- a/msg/js/bcc.js +++ b/msg/js/bcc.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "قرمز"; Blockly.Msg.COLOUR_RGB_TITLE = "رنگ با"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "ساخت یک رنگ با مقدار مشخص‌شده‌ای از قرمز، سبز و آبی. همهٔ مقادیر باید بین ۰ تا ۱۰۰ باشند."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "شکستن حلقه"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "ادامه با تکرار بعدی حلقه"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "اخطار: این بلوک مم Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "برای هر مورد %1 در فهرست %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "برای هر مورد در این فهرست، تنظیم متغیر «%1» به مورد و انجام تعدادی عبارت."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "با تعداد %1 از %2 به %3 با گام‌های %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "متغیر %1 را در مقادیر شروع‌شده از عدد انتهای به عدد انتهایی را دارد، با فواصل مشخص‌شده می‌شمارد و این بلوک مشخص‌شده را انجام می‌دهد."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "افزودن یک شرط به بلوک اگر."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "اضافه‌کردن نهایی، گرفتن همهٔ شرایط به بلوک اگر."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "اضافه، حذف یا ترتیب‌سازی قسمت‌ها برای تنظیم مجدد این بلوک اگر مسدود است."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "آنگاه"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "اگر یک مقدار صحیح است، س Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "اگر یک مقدار صحیح است، اول بلوک اول عبارات را انجام بده. در غیر این صورت بلوک دوم عبارات انجام بده."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "اگر مقدار اول صحیح بود، از آن بلوک اول عبارات را انجام بده. در غیر این صورت، اگر مقدار دوم صحیح است، بلوک دوم عبارات را انجام بده."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "اگر مقدار اول درست است، بلوک اول عبارات را انجام بده. در غیر این صورت، اگر مقدار دوم درست باشد بلوک دوم عبارات را انجام بده. اگر هیچ از مقادیر درست نبود، آخرین بلوک عبارات را انجام بده."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AD%D9%84%D9%82%D9%87_%D9%81%D9%88%D8%B1"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "انجام"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 بار تکرار"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "انجام چند عبارت چندین بار."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "تکرار تا"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "تکرار در حالی که"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "تا زمانی که یک مقدار ناصحیح است، چند عبارت را انجام بده."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "تا زمانی که یک مقدار صحیح است، چند عبارت را انجام بده."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "حذف بلوک"; Blockly.Msg.DELETE_X_BLOCKS = "حذف بلوک‌های %1"; Blockly.Msg.DISABLE_BLOCK = "غیرفعال‌سازی بلوک"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ناصحیح"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "بازگرداندن یکی از صحیح یا ناصحیح."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "صحیح"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://fa.wikipedia.org/wiki/%D9%86%D8%A7%D8%A8%D8%B1%D8%A7%D8%A8%D8%B1%DB%8C"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "بازگشت صحیح اگر هر دو ورودی با یکدیگر برابر باشد."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "بازگرداندن صحیح اگر ورودی اول بزرگتر از ورودی دوم باشد."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "بازگرداندن صحیح اگر و Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "بازگرداندن صحیح اگر ورودی اول کوچکتر از ورودی دوم باشد."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "بازگرداندن صحیح اگر ورودی اول کوچکتر یا مساوی با ورودی دوم باشد."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "برگرداندن صحیح اگر هر دو ورودی با یکدیگر برابر نباشند."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "نه %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "صجیج باز می‌گرداند اگر ورودی نا صحیح باشند. ناصحیح بازمی‌گرداند اگر ورودی صحیح باشد."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "تهی"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "تهی بازمی‌گرداند."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "و"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "یا"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "بازگرداندن صحیح اگر هر دو ورودی صحیح باشد."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "بازگرداندن صحیح اگر یکی از دو ورودی صحیح باشد."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "آزمایش"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "اگر ناصحیح"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "اگر صحیح"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "بررسی وضعیت در «آزمایش». اگر وضعیت صحیح باشد، مقدار «اگر صحیح» را بر می‌گرداند در غیر اینصورت مقدار «اگر ناصحیح» را."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AD%D8%B3%D8%A7%D8%A8"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "بازگرداندن مقدار جمع دو عدد."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "بازگرداندن باقی‌ماندهٔ دو عدد."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "بازگرداندن تفاوت دو عدد."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "بازگرداندن اولین ع Blockly.Msg.MATH_CHANGE_HELPURL = "https://fa.wikipedia.org/wiki/%D8%A7%D8%B5%D8%B7%D9%84%D8%A7%D8%AD_%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C#.D8.A7.D9.81.D8.B2.D8.A7.DB.8C.D8.B4_.D8.B4.D9.85.D8.A7.D8.B1.D9.86.D8.AF.D9.87"; Blockly.Msg.MATH_CHANGE_TITLE = "تغییر %1 با %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "افزودن یک عدد به متغیر '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AB%D8%A7%D8%A8%D8%AA_%D8%B1%DB%8C%D8%A7%D8%B6%DB%8C"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "یکی از مقادیر مشترک را برمی‌گرداند: π (۳٫۱۴۱…)، e (۲٫۷۱۸...)، φ (۱٫۶۱۸)، sqrt(۲) (۱٫۴۱۴)، sqrt(۱/۲) (۰٫۷۰۷...) و یا ∞ (بی‌نهایت)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "محدودکردن %1 پایین %2 بالا %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "محدودکردن یک عدد بین محدودیت‌های مشخص‌شده (بسته)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "تقسیم شده بر"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "زوج است"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "منفی است"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "فرد است"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "مثبت است"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "عدد اول است"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "بررسی می‌کند که آیا یک عدد زوج، فرد، اول، کامل، مثبت، منفی یا بخش‌پذیر عدد خاصی باشد را بررسی می‌کند. درست یا نادرست باز می‌گرداند."; Blockly.Msg.MATH_IS_WHOLE = "کامل است"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B9%D9%85%D9%84%DB%8C%D8%A7%D8%AA_%D9%BE%DB%8C%D9%85%D8%A7%D9%86%D9%87"; Blockly.Msg.MATH_MODULO_TITLE = "باقی‌ماندهٔ %1 + %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "باقی‌ماندهٔ تقسیم دو عدد را بر می‌گرداند."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B9%D8%AF%D8%AF"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "یک عدد."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "میانگین فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "بزرگ‌ترین فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "میانهٔ فهرست"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "مد فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "مورد تصادفی از فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "انحراف معیار فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "جمع فهرست"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "میانگین (میانگین ریاضی) مقادیر عددی فهرست را بر می‌گرداند."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "بزرگ‌ترین عدد در فهرست را باز می‌گرداند."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "میانهٔ عدد در فهرست را بر می‌گرداند."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AA%D9%88%D9%84%DB%8C%D8%AF_%D8%A7%D8%B9%D8%AF%D8%A7%D8%AF_%D8%AA%D8%B5%D8%A7%D8%AF%D9%81%DB%8C"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "کسر تصادفی"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "بازگرداندن کسری تصادفی بین ۰٫۰ (بسته) تا ۱٫۰ (باز)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AA%D9%88%D9%84%DB%8C%D8%AF_%D8%A7%D8%B9%D8%AF%D8%A7%D8%AF_%D8%AA%D8%B5%D8%A7%D8%AF%D9%81%DB%8C"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "عدد صحیح تصادفی بین %1 تا %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "یک عدد تصادفی بین دو مقدار مشخص‌شده به صورت بسته باز می‌گرداند."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B1%D9%88%DB%8C%D9%87_%28%D8%B9%D9%84%D9%88%D9%85_%D8%B1%D8%A7%DB%8C%D8%A7%D9%86%D9%87%29"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "گردکردن"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "گرد به پایین"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "گرد به بالا"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "گردکردن یک عدد به بالا یا پایین."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B1%DB%8C%D8%B4%D9%87_%D8%AF%D9%88%D9%85"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "مطلق"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "ریشهٔ دوم"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "قدر مطلق یک عدد را بازمی‌گرداند."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "بازگرداندن توان e یک عدد."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "لوگاریتم طبیعی یک عدد را باز می‌گرداند."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "بازگرداندن توان ۱۰ یک Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "ریشهٔ دوم یک عدد را باز می‌گرداند."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AA%D8%A7%D8%A8%D8%B9%E2%80%8C%D9%87%D8%A7%DB%8C_%D9%85%D8%AB%D9%84%D8%AB%D8%A7%D8%AA%DB%8C"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "بازگرداندن آرک‌کسینوس درجه (نه رادیان)."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "بازگرداندن آرک‌سینوس درجه (نه رادیان)."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "بازگرداندن آرک‌تانژانت درجه (نه رادیان)."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "نام ورودی:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "اضافه کردن ورودی به تابع."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "ورودی‌ها"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "افزودن، حذف یا دوباره مرتب‌کردن ورودی این تابع."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "حذف نظر"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/be-tarask.js b/msg/js/be-tarask.js index ac496d3f63e..92a4a0bbd07 100644 --- a/msg/js/be-tarask.js +++ b/msg/js/be-tarask.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "чырвонага"; Blockly.Msg.COLOUR_RGB_TITLE = "колер з"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Стварыць колер з абранымі прапорцыямі чырвонага, зялёнага і сіняга. Усе значэньні павінны быць ад 0 да 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "перарваць цыкль"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "працягнуць з наступнага кроку цыклю"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Увага: гэты блёк м Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "для кожнага элемэнта %1 у сьпісе %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Для кожнага элемэнту сьпісу прысвойвае зьменнай '%1' ягонае значэньне і выконвае пэўныя апэрацыі."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "лічыць з %1 ад %2 да %3 па %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Прысвойвае зьменнай \"%1\" значэньні ад пачатковага да канчатковага значэньня, улічваючы зададзены крок, і выконвае абраныя блёкі."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Дадаць умову да блёку «калі»."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Дадаць заключную ўмову для ўсіх астатніх варыянтаў блёку «калі»."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Дадаць, выдаліць ці пераставіць сэкцыі для пераканфігураваньня гэтага блёку «калі»."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "інакш"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Калі значэньне ісьціна, Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Калі значэньне ісьціна, выканаць першы блёк апэрацыяў, інакш выканаць другі блёк."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Калі першае значэньне ісьціна, выканаць першы блёк апэрацыяў. Інакш, калі другое значэньне ісьціна, выканаць другі блёк апэрацыяў."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Калі першае значэньне ісьціна, выканаць першы блёк апэрацыяў. Інакш, калі другое значэньне ісьціна, выканаць другі блёк апэрацыяў. Калі ніводнае з значэньняў не сапраўднае, выканаць апошні блёк апэрацыяў."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "выканаць"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "паўтарыць %1 раз(ы)"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Выконвае апэрацыі некалькі разоў."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "паўтараць, пакуль не"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "паўтараць, пакуль"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Пакуль значэньне хлусьня, выконваць пэўныя апэрацыі."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Пакуль значэньне ісьціна, выконваць пэўныя апэрацыі."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Выдаліць блёк"; Blockly.Msg.DELETE_X_BLOCKS = "Выдаліць %1 блёкі"; Blockly.Msg.DISABLE_BLOCK = "Адключыць блёк"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Аб’ядноўвае сьпіс тэ Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Падзяліць тэкст у сьпіс тэкстаў, па падзяляльніках."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "з падзяляльнікам"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "хлусьня"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Вяртае «ісьціна» ці «хлусьня»."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "ісьціна"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://be-x-old.wikipedia.org/wiki/%D0%9D%D1%8F%D1%80%D0%BE%D1%9E%D0%BD%D0%B0%D1%81%D1%8C%D1%86%D1%8C"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Вяртае «ісьціна», калі абодва ўводы роўныя."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Вяртае «ісьціна», калі першы ўвод большы за другі."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Вяртае «ісьціна», кал Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Вяртае «ісьціна», калі першы ўвод меншы за другі."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Вяртае «ісьціна», калі першы ўвод меншы ці роўны другому."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Вяртае «ісьціна», калі абодва ўводы ня роўныя."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "не %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Вяртае «ісьціна», калі ўвод непраўдзівы. Вяртае «хлусьня», калі ўвод праўдзівы."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "нічога"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Вяртае нічога."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "і"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "ці"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Вяртае «ісьціна», калі абодва ўводы праўдзівыя."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Вяртае «ісьціна», калі прынамсі адзін з уводаў праўдзівы."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "тэст"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "калі хлусьня"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "калі ісьціна"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Праверыць умову ў 'тэст'. Калі ўмова праўдзівая, будзе вернутае значэньне «калі ісьціна»; інакш будзе вернутае «калі хлусьня»."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://be-x-old.wikipedia.org/wiki/%D0%90%D1%80%D1%8B%D1%82%D0%BC%D1%8D%D1%82%D1%8B%D0%BA%D0%B0"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Вяртае суму двух лікаў."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Вяртае дзель двух лікаў."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Вяртае рознасьць двух лікаў."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Вяртае першы лік у Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "зьмяніць %1 на %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Дадае лічбу да зьменнай '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://be-x-old.wikipedia.org/wiki/%D0%9C%D0%B0%D1%82%D1%8D%D0%BC%D0%B0%D1%82%D1%8B%D1%87%D0%BD%D0%B0%D1%8F_%D0%BA%D0%B0%D0%BD%D1%81%D1%82%D0%B0%D0%BD%D1%82%D0%B0"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Вяртае адну з агульных канстантаў: π (3.141...), e (2.718...), φ (1.618...), sqrt(2) (1.414...), sqrt(½) (0,707...) або ∞ (бясконцасьць)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "абмежаваць %1 зьнізу %2 зьверху %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Абмяжоўвае колькасьць ніжняй і верхняй межамі (уключна)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "дзяліць на"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "парная"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "адмоўная"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "няпарная"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "станоўчая"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "простая"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Правярае, ці зьяўляецца лік парным, няпарным, простым, станоўчым, адмоўным, ці ён дзеліцца на пэўны лік без астатку. Вяртае значэньне ісьціна або няпраўда."; Blockly.Msg.MATH_IS_WHOLE = "цэлая"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "рэшта дзяленьня %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Вяртае рэшту дзяленьня двух лікаў."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://be-x-old.wikipedia.org/wiki/%D0%9B%D1%96%D0%BA"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Лік."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "сярэдняя ў сьпісе"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "мінімальная ў сьпісе"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "мэдыяна сьпісу"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "рэжымы сьпісу"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "выпадковы элемэнт сьпісу"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "стандартнае адхіленьне сьпісу"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Сума сьпісу"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Вяртае сярэднеарытмэтычнае значэньне лікавых значэньняў у сьпісе."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Вяртае найменшы лік у сьпісе."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Вяртае мэдыяну сьпісу."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "выпадковая дроб"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Вяртае выпадковую дроб у дыяпазоне ад 0,0 (уключна) да 1,0."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "выпадковая цэлая з %1 для %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Вяртае выпадковы цэлы лік паміж двума зададзенымі абмежаваньнямі ўключна."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "акругліць"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "акругліць да меншага"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "акругліць да большага"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Акругленьне ліку да большага ці меншага."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://be-x-old.wikipedia.org/wiki/%D0%9A%D0%B2%D0%B0%D0%B4%D1%80%D0%B0%D1%82%D0%BD%D1%8B_%D0%BA%D0%BE%D1%80%D0%B0%D0%BD%D1%8C"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "модуль"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "квадратны корань"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Вяртае модуль ліку."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Вяртае e ў ступені ліку."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Вяртае натуральны лягарытм ліку."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Вяртае 10 у ступені лі Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Вяртае квадратны корань ліку."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://be-x-old.wikipedia.org/wiki/%D0%A2%D1%80%D1%8B%D0%B3%D0%B0%D0%BD%D0%B0%D0%BC%D1%8D%D1%82%D1%80%D1%8B%D1%8F#.D0.A2.D1.80.D1.8B.D0.B3.D0.B0.D0.BD.D0.B0.D0.BC.D1.8D.D1.82.D1.80.D1.8B.D1.87.D0.BD.D1.8B.D1.8F_.D1.84.D1.83.D0.BD.D0.BA.D1.86.D1.8B.D1.96"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Вяртае арккосынус ліку."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Вяртае арксынус ліку."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Вяртае арктангэнс ліку."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "назва парамэтру:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Дадаць уваходныя парамэтры ў функцыю."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "парамэтры"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Дадаць, выдаліць ці запісаць чаргу ўваходных парамэтраў для гэтай функцыі."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Выдаліць камэнтар"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/bg.js b/msg/js/bg.js index ea45a73a534..a5b1b50c128 100644 --- a/msg/js/bg.js +++ b/msg/js/bg.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "червен"; Blockly.Msg.COLOUR_RGB_TITLE = "оцвети с"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Създай цвят с избраните пропорции, червено, зелено и синьо. Всички стойности трябва да бъдат от 0 до 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "прекъсни цикъла"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "премини към следващата стъпка от цикъла"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Предупреждение: Т Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "за всеки елемент %1 в списъка %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "За всеки елемент в списък присвои елемента на променливата '%1' и след това изпълни командите."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "преброй чрез %1 от %2 до %3 през %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Нека променлива \"%1\" премине през стойностите от началното до крайното число през зададената стъпка и изпълни избраните блокове."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Добави условие към \"ако\" блока."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Добави окончателено, прихващащо всичко останали случаи условие към \"ако\" блока."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Добави, премахни или пренареди частите, за да промениш този \"ако\" блок."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "иначе"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Ако стойността е вярна, Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Ако стойността е вярна, изпълни първия блок. Иначе, изпълни втория блок."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Ако първата стойност е вярна, изпълни първия блок. Иначе, ако втората стойност е вярна, изпълни втория блок."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Ако първата стойност е вярна, изпълни първия блок. В противен случай, ако втората стойност е вярна, изпълни втория блок. Ако нито една от стойностите не е вярна, изпълни последния блок."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://bg.wikipedia.org/wiki/Цикъл_(програмиране)#For_.D1.86.D0.B8.D0.BA.D1.8A.D0.BB.D1.8A.D1.82"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "изпълни"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "Повтори %1 пъти"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Изпълнява команди няколко пъти."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "повтаряй докато"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "повтаряй докато е вярно, че"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Докато стойността е лъжа, изпълнявай командите."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Докато стойността е истина, изпълнявай командите."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Изтрий блок"; Blockly.Msg.DELETE_X_BLOCKS = "Изтрий %1 блока"; Blockly.Msg.DISABLE_BLOCK = "Деактивирай блок"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "невярно"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Връща вярно или невярно."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "вярно"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Върни вярно, ако двата параметъра са еднакви."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Върни истина, ако първия параметър е по-голям от втория."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Върни истина, ако пър Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Върни вярно, ако първия параметър е по-малък от втория."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Върни истина, ако първия параметър е по-малък или равен на втория."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Върни вярно, ако двата параметъра са различни."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "не %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Върни вярно, ако параметърът е неверен. Върни невярно, ако параметърът е верен."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "нула"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Връща нула."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "и"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "или"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Върни вярно, ако и двата параметъра са верни."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Върни \"вярно\", ако поне един от входовете е верен."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "тест"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "Ако е невярно"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "Ако е вярно"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Провери исловието в \"тест\". Ако условието е истина, върни \"ако е истина\" стойността, иначе върни \"ако е лъжа\" стойността."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://bg.wikipedia.org/wiki/Аритметика"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Върни сумата на двете числа."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Върни частното на двете числа."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Върни разликата на двете числа."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Върни първото числ Blockly.Msg.MATH_CHANGE_HELPURL = "https://bg.wikipedia.org/wiki/Събиране"; Blockly.Msg.MATH_CHANGE_TITLE = "промени %1 на %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Добави число към променлива '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "http://bg.wikipedia.org/wiki/Константа"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Връща една от често срещаните константи: π (3.141...), e (2.718...), φ (1.618...), sqrt(2) (1.414...), sqrt(½) (0.707...) или ∞ (безкрайност)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "ограничи %1 между %2 и %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Ограничи число да бъде в определените граници (включително)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "се дели на"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "е четно"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "е отрицателно"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "е нечетно"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "е положително"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "е просто"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Проверете дали дадено число е четно, нечетно, просто, цяло, положително, отрицателно или дали се дели на друго число. Връща истина или лъжа."; Blockly.Msg.MATH_IS_WHOLE = "е цяло"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "http://bg.wikipedia.org/wiki/Остатък"; Blockly.Msg.MATH_MODULO_TITLE = "остатъка от делението на %1 на %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Върни остатъка от деление на две числа."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://bg.wikipedia.org/wiki/Число"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Число."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "средната стойност на числата в списъка"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "най-голямата стойност в списъка"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "медианата на списък"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "мода на списъка"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "случаен елемент от списъка"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "стандартно отклонение на списък"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "сумираай списъка"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Върни средната стойност (аритметичното средно) на числата в списъка."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Върни най-голямото число в списъка."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Върни медианата в списъка."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://bg.wikipedia.org/wiki/Генератор_на_случайни_числа"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "случайно дробно число"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Върни случайно дробно число между 0.0 (включително) и 1.0 (без да го включва)"; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://bg.wikipedia.org/wiki/Генератор_на_случайни_числа"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "случайно цяло число между %1 и %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Върни случайно число в определените граници (включително)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "закръгли"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "закръгли надолу"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "закръгли нагоре"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Закръгли число нагоре или надолу."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "абсолютна"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "корен квадратен"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Връща абсолютната стойност на число."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Върни е (неперовото число) на степен зададеното число."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Върни натуралния логаритъм от число."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Върни 10 на степен зад Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Връща корен квадратен от число."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://bg.wikipedia.org/wiki/Тригонометрична_функция"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Върни аркускосинус от число."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Върни аркуссинус от число."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Върни аркустангенс от число."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "име на параметър"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Добавяне на параметър към функцията."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "вход"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Добави, премахни или пренареди входните параметри за тази функция."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Премахни коментар"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/bn.js b/msg/js/bn.js index da2581f19df..d8f53fd87f7 100644 --- a/msg/js/bn.js +++ b/msg/js/bn.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "লাল"; Blockly.Msg.COLOUR_RGB_TITLE = "রং সহ"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "একটি রং তৈরি করুন নির্দিষ্ট পরিমাণে লাল, সবুজ এবং নীল রং মিশ্রিত করে। প্রত্যেকটির মান অবশ্যই ০ থেকে ১০০ এর মধ্যে হতে হবে।"; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "break out of loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continue with next iteration of loop"; // untranslated @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "সর্তকীবার্ Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "প্রত্যেকটি পদের জন্য %1 তালিকার মধ্যে %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "গণনা কর %1 %4 দিয়ে %2 থেকে %3"; Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "যদি নামক ব্লক এ একটি শর্ত যোগ করুন।"; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated Blockly.Msg.CONTROLS_IF_MSG_ELSE = "নতুবা"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; // untranslated Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "করুন"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 বার পুনরাবৃত্তি করো"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repeat until"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repeat while"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements."; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements."; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "ব্লকটি মুছে ফেল"; Blockly.Msg.DELETE_X_BLOCKS = "%1 ব্লক অপসারণ কর"; Blockly.Msg.DISABLE_BLOCK = "ব্লকটি বিকল কর"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "মিথ্যা"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "পাঠাবে হয় সত্য অথবা মিথ্যা।"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "সত্য"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "পাঠাবে সত্য যদি উভয় ইনপুটই সমান হয়।"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "পাঠাবে সত্য যদি প্রথম ইনপুট দ্বিতীয় ইনপুট থেকে বড় হয়।"; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "পাঠাবে সত্য যদ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "পাঠাবে সত্য যদি প্রথম ইনপুট দ্বিতীয় ইনপুট থেকে ছোট হয়।"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "পাঠাবে সত্য যদি প্রথম ইনপুট দ্বিতীয় ইনপুট থেকে ছোট অথবা সমান হয়।"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "পাঠাবে সত্য যদি উভয় ইনপুটই সমান না হয়।"; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 নয়"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "পাঠাবে সত্য যদি ইনপুট মিথ্যা হয়। পাঠাবে মিথ্যা যদি ইনপুট সত্য হয়।"; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "নুল"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "পাঠাবে নাল।"; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "এবং"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "অথবা"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "পাঠাবে সত্য যদি উভয় ইনপুটই সত্য হয়।"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "পাঠাবে সত্য যদি অন্ততপক্ষে যেকোন একটি ইনপুট সত্য হয়।"; Blockly.Msg.LOGIC_TERNARY_CONDITION = "পরীক্ষা"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "যদি মিথ্যা হয়"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "যদি সত্য হয়"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "পাঠাবে দুটি সংখ্যার যোগফল।"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "পাঠাবে দুটি সংখ্যার ভাগফল।"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "পাঠাবে দুটি সংখ্যার বিয়োগফল।"; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated Blockly.Msg.MATH_CHANGE_TITLE = "পরিবর্তন %1 দ্বারা %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; // untranslated Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "দ্বারা বিভাজ্য"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "জোড় সংখ্যা"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "নেতিবাচক"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "বিজোড় সংখ্যা"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "ইতিবাচক"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "মৌলিক সংখ্যা"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "is whole"; // untranslated +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2 এর ভাগশেষ"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://bn.wikipedia.org/wiki/সংখ্যা"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "একটি সংখ্যা।"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "তালিকার গড়"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "তালিকার মধ্যে সর্বোচ্চ"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "তালিকার মধ্যমা"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "তালিকার এলোমেলো পদ"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "তালিকার যোগফল"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "পাঠাবে তালিকার সব সংখ্যার গড়।"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "তালিকার মধ্যে সর্বোচ্চ সংখ্যাটি পাঠাও"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "তালিকার মধ্যমা সংখ্যাটি পাঠাবে।"; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "এলোমেলো ভগ্নাংশ"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "round"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "round down"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "round up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "পরম"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "বর্গমূল"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "পাঠাবে সংখ্যার পরমমান।"; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "পাঠাবে একটি সংখ্যার বর্গমূল।"; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "ইনপুটের নাম:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "ক্রিয়াতে একটি ইনপুট যোগ করুন।"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "মন্তব্য সরাও"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/br.js b/msg/js/br.js index c0bb66e8c53..f3e60cd4e5a 100644 --- a/msg/js/br.js +++ b/msg/js/br.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "ruz"; Blockly.Msg.COLOUR_RGB_TITLE = "liv gant"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Krouiñ ul liv gant ar c'hementad spisaet a ruz, a wer hag a c'hlas. Etre 0 ha 100 e tle bezañ an holl dalvoudoù."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "Mont e-maez an adlañsañ"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "Kenderc'hel gant iteradur nevez ar rodell"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Diwallit : ne c'hall ar bloc'h-m Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "evit pep elfenn %1 er roll %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Evit pep elfenn en ur roll, reiñ talvoud an elfenn d'an argemmenn '%1', ha seveniñ urzhioù zo da c'houde."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "kontañ gant %1 eus %2 da %3 dre %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Ober e doare ma kemero an argemmenn \"%1\" an talvoudennoù adalek niverenn an deroù betek niverenn an dibenn, en ur inkremantiñ an esaouenn, ha seveniñ an urzhioù spisaet."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Ouzhpennañ un amplegad d'ar bloc'h ma."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Ouzhpennañ un amplegad dibenn lak-pep-tra d'ar bloc'h ma."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Ouzhpennañ, lemel pe adurzhiañ ar rannoù evit kefluniañ ar bloc'h ma."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "a-hend-all"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Ma vez gwir un dalvoudenn, seveniñ urzhio Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Ma vez gwir un dalvoudenn, seveniñ ar c'henañ bloc'had urzhioù neuze. Anez seveniñ an eil bloc'had urzhioù."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Ma vez gwir an dalvoudenn gentañ, seveniñ ar c'hentañ bloc'had urzhioù neuze. Anez ma vez gwir an eil talvoudenn, seveniñ an eil bloc'had urzhioù."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Ma vez gwir an dalvoudenn gentañ, seveniñ ar c'hentañ bloc'had. Anez, ma vez gwir an eil talvoudenn, seveniñ an eil bloc'had urzhioù. Ma ne vez gwir talvoudenn ebet, seveniñ ar bloc'had diwezhañ a urzhioù."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "ober"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "adober %1 gwech"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Seveniñ urzhioù zo meur a wech"; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "adober betek"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "adober keit ha ma"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Keit ha ma vez faos un dalvoudenn,seveniñ urzhioù zo neuze."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Keit ha ma vez gwir un dalvoudenn, seveniñ urzhioù zo neuze."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Dilemel ar bloc'h"; Blockly.Msg.DELETE_X_BLOCKS = "Dilemel %1 bloc'h"; Blockly.Msg.DISABLE_BLOCK = "Diweredekaat ar bloc'h"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Bodañ ul listennad testennoù en ul lis Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Troc'hañ un destenn en ul listennad testennoù, o troc'hañ e pep dispartier."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "gant an dispartier"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "gaou"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Distreiñ pe gwir pe faos"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "gwir"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Distreiñ gwir m'eo par an daou voned."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Distreiñ gwir m'eo brasoc'h ar moned kentañ eget an eil."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Distreiñ gwir m'eo brasoc'h ar moned k Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Distreiñ gwir m'eo bihanoc'h ar moned kentañ eget an eil."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Distreiñ gwir m'eo bihanoc'h ar moned kentañ eget an eil pe m'eo par dezhañ."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Distreiñ gwir ma n'eo ket par an daou voned."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "nann %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Distreiñ gwir m'eo faos ar moned. Distreiñ faos m'eo gwir ar moned."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "Null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Distreiñ null."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "ha(g)"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "pe"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Distreiñ gwir m'eo gwir an da daou voned."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Distreiñ gwir m'eo gwir unan eus an daou voned da nebeutañ."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "amprouad"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "m'eo gaou"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "m'eo gwir"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Gwiriañ an amplegad e 'prouad'. M'eo gwir an amplegad, distreiñ an dalvoudenn 'm'eo gwir'; anez distreiñ ar moned 'm'eo faos'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://br.wikipedia.org/wiki/Aritmetik"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Distreiñ sammad daou niver."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Distreiñ rannad daou niver."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Distreiñ diforc'h daou niver"; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Distreiñ an niver kentañ lakaet d Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "kemmañ %1 gant %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Ouzhpennañ un niver d'an argemm '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Distreiñ unan eus digemmennoù red : π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (anvevenn)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "destrizhañ %1 etre %2 ha %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Destrizhañ un niver da vezañ etre ar bevennoù spisaet (enlakaet)"; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "a zo rannadus dre"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "zo par"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "a zo negativel"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "zo ampar"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "a zo pozitivel"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "zo kentañ"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Gwiriañ m'eo par, anpar, kentañ, muiel, leiel un niverenn pe ma c'haller rannañ anezhi dre un niver roet zo. Distreiñ gwir pe faos."; Blockly.Msg.MATH_IS_WHOLE = "zo anterin"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "rest eus %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Distreiñ dilerc'h rannadur an div niver"; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://br.wikipedia.org/wiki/Niver"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un niver."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Keitat al listenn"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Uc'hegenn al listenn"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Kreizad al listenn"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modoù stankañ el listenn"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Elfennn eus al listenn tennet d'ar sord"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "forc'had standart eus al listenn"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Sammad al listenn"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Distreiñ keitad (niveroniel) an talvoudennoù niverel el listenn."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Distreiñ an niver brasañ el listenn."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Distreiñ an niver kreiz el listenn"; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Rann dargouezhek"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Distreiñ ur rann dargouezhek etre 0.0 (enkaelat) hag 1.0 (ezkaelat)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "anterin dargouezhek etre %1 ha %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Distreiñ un anterin dargouezhek etre an div vevenn spisaet, endalc'het."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "Rontaat"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "Rontaat dindan"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "Rontaat a-us"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Rontaat un niver dindan pe a-us"; Blockly.Msg.MATH_SINGLE_HELPURL = "https://br.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "dizave"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "gwrizienn garrez"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Distreiñ talvoud dizave un niver."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Distreiñ galloudad un niver."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Distreiñ logaritm naturel un niver"; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Distreiñ 10 da c'halloudad un niver."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Distreiñ gwrizienn garrez un niver"; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://br.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Distreiñ ark kosinuz un niver"; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Distreiñ ark sinuz un niver"; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Distreiñ ark tangent un niver"; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Anv ar moned"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Ouzhpennañ ur moned d'an arc'hwel."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "Monedoù"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Ouzhpennañ, lemel, pe adkempenn monedoù an arc'hwel-mañ."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Lemel an evezhiadenn kuit"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/ca.js b/msg/js/ca.js index 75ed4ea44ed..3bf8806cb80 100644 --- a/msg/js/ca.js +++ b/msg/js/ca.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "vermell"; Blockly.Msg.COLOUR_RGB_TITLE = "color amb"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Crear un color amb les quantitats especificades de vermell, verd i blau. Tots els valors han de ser entre 0 i 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "sortir del bucle"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continuar amb la següent iteració del bucle"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Advertència: Aquest bloc només Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "per a cada element %1 en la llista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Per a cada element en la llista, desar l'element dins la variable '%1', i llavors executar unes sentències."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "comptar amb %1 des de %2 fins a %3 en increments de %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Fer que la variable \"%1\" prengui els valors des del nombre inicial fins al nombre final, incrementant a cada pas l'interval indicat, i executar els blocs especificats."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Afegeix una condició al bloc 'si'."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Afegeix una condició final, que recull qualsevol altra possibilitat, al bloc 'si'."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Afegeix, esborra o reordena seccions per reconfigurar aquest bloc 'si'."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "si no"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Si un valor és cert, llavors executar unes Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Si un valor és cert, llavors executar el primer bloc de sentències. En cas contrari, executar el segon bloc de sentències."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Si el primer valor és cert, llavors executar el primer bloc de sentències. En cas contrari, si el segon valor és cert, executar el segon bloc de sentències."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Si el primer valor és cert, llavors executar el primer bloc de sentències. En cas contrari, si el segon valor és cert, executar el segon bloc de sentències. Si cap dels valors és cert, executar l'últim bloc de sentències."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://ca.wikipedia.org/wiki/Bucle_For"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "fer"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repetir %1 vegades"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Executar unes sentències diverses vegades."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repetir fins que"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repetir mentre"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Mentre un valor sigui fals, llavors executar unes sentències."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Mentre un valor sigui cert, llavors executar unes sentències."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Esborra bloc"; Blockly.Msg.DELETE_X_BLOCKS = "Esborra %1 blocs"; Blockly.Msg.DISABLE_BLOCK = "Desactiva bloc"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "fals"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Retorna o bé cert o bé fals."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "cert"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://ca.wikipedia.org/wiki/Inequaci%C3%B3"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Retorna cert si totes dues entrades són iguals."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Retorna cert si la primera entrada és més gran que la segona entrada."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Retorna cert si la primera entrada és Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Retorna cert si la primera entrada és més petita que la segona entrada."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Retorna cert si la primera entra és més petita o igual a la segona entrada."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Retorna cert si totes dues entrades són diferents."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "no %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Retorna cert si l'entrada és falsa. Retorna fals si l'entrada és certa."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nul"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Retorna nul."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "i"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "o"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Retorna cer si totes dues entrades són certes."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Retorna cert si almenys una de les entrades és certa."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "condició"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si és fals"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si és cert"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Comprova la condició de 'condició'. Si la condició és certa, retorna el valor 'si és cert'; en cas contrari, retorna el valor 'si és fals'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://ca.wikipedia.org/wiki/Aritm%C3%A8tica"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Retorna la suma dels dos nombres."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Retorna el quocient dels dos nombres."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Retorna la diferència entre els dos nombres."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Retorna el primer nombre elevat a l Blockly.Msg.MATH_CHANGE_HELPURL = "https://ca.wikipedia.org/wiki/Suma"; Blockly.Msg.MATH_CHANGE_TITLE = "canvia %1 per %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Afegeix un nombre a la variable '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://ca.wikipedia.org/wiki/Constant_matem%C3%A0tica"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Retorna una de les constants més habituals: π (3,141…), e (2,718…), φ (1,618…), sqrt(2) (1,414…), sqrt(½) (0,707…), o ∞ (infinit)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "limitar %1 entre %2 i %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Limita un nombre per tal que estigui entre els límits especificats (inclosos)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "és divisible per"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "és parell"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "és negatiu"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "és senar"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "és positiu"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "és primer"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Comprova si un nombre és parell, senar, enter, positium negatiu, o si és divisible per un cert nombre. Retorna cert o fals."; Blockly.Msg.MATH_IS_WHOLE = "és enter"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://ca.wikipedia.org/wiki/Residu_%28aritm%C3%A8tica%29"; Blockly.Msg.MATH_MODULO_TITLE = "residu de %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Retorna el residu de dividir els dos nombres."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://ca.wikipedia.org/wiki/Nombre"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un nombre."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "mitjana de llista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "màxim de llista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana de llista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "moda de llista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "element aleatori de llista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "desviació estàndard de llista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "suma de llista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Retorna la mitjana (mitjana aritmètica) dels valors numèrics de la llista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Retorna el nombre més gran de la llista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Retorna la mediana de la llista."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://ca.wikipedia.org/wiki/Generaci%C3%B3_de_nombres_aleatoris"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "fracció aleatòria"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Retorna una fracció aleatòria entre 0,0 (inclòs) i 1,0 (exclòs)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://ca.wikipedia.org/wiki/Generaci%C3%B3_de_nombres_aleatoris"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "nombre aleatori entre %1 i %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Retorna un nombre aleatori entre els dos límits especificats, inclosos."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://ca.wikipedia.org/wiki/Arrodoniment"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "arrodonir"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "arrodonir cap avall"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "arrodonir cap amunt"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Arrodonir un nombre cap amunt o cap avall."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://ca.wikipedia.org/wiki/Arrel_quadrada"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolut"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "arrel quadrada"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Retorna el valor absolut d'un nombre."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Retorna ''e'' elevat a la potència del nombre indicat."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Retorna el logaritme natural d'un nombre."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Retorna 10 elevat a la potència del no Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Retorna l'arrel quadrada d'un nombre."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://ca.wikipedia.org/wiki/Funci%C3%B3_trigonom%C3%A8trica"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Retorna l'arccosinus d'un nombre."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Retorna l'arcsinus d'un nombre."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Retorna l'arctangent d'un nombre."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nom d'entrada:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Afegir una entrada per la funció."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "entrades"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Afegir, eliminar o canviar l'ordre de les entrades per aquesta funció."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Elimina el comentari"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/cs.js b/msg/js/cs.js index 3d25bdb780a..5af20ae0549 100644 --- a/msg/js/cs.js +++ b/msg/js/cs.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "červená"; Blockly.Msg.COLOUR_RGB_TITLE = "barva s"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Vytvoř barvu se zadaným množstvím červené, zelené a modré. Všechny hodnoty musí být mezi 0 a 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "vymanit se ze smyčky"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "pokračuj dalším opakováním smyčky"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Upozornění: Tento blok může Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pro každou položku %1 v seznamu %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pro každou položku v seznamu nastavte do proměnné '%1' danou položku a proveďte nějaké operace."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "počítat s %1 od %2 do %3 po %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Nechá proměnnou \"%1\" nabývat hodnot od počátečního do koncového čísla po daném přírůstku a provádí s ní příslušné bloky."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Přidat podmínku do \"pokud\" bloku."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Přidej konečnou podmínku zahrnující ostatní případy do bloku pokud."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Přidej, odstraň či uspořádej sekce k přenastavení tohoto bloku pokud."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "jinak"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Je-li hodnota pravda, proveď určité př Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Je-li hodnota pravda, proveď první blok příkazů. V opačném případě proveď druhý blok příkazů."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Je-li první hodnota pravdivá, proveď první blok příkazů. V opačném případě, je-li pravdivá druhá hodnota, proveď druhý blok příkazů."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Je-li první hodnota pravda, proveď první blok příkazů. Je-li druhá hodnota pravda, proveď druhý blok příkazů. Pokud žádná hodnota není pravda, proveď poslední blok příkazů."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://cs.wikipedia.org/wiki/Cyklus_for"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "udělej"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "opakovat %1 krát"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Proveď určité příkazy několikrát."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "opakovat dokud"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "opakovat když"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Dokud je hodnota nepravdivá, prováděj určité příkazy."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Dokud je hodnota pravdivá, prováděj určité příkazy."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Odstranit blok"; Blockly.Msg.DELETE_X_BLOCKS = "Odstranit %1 bloky"; Blockly.Msg.DISABLE_BLOCK = "Zakázat blok"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "nepravda"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Vrací pravda nebo nepravda."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "pravda"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://cs.wikipedia.org/wiki/Nerovnost_(matematika)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Vrátí hodnotu pravda, pokud se oba vstupy rovnají jeden druhému."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Navrátí hodnotu pravda, pokud první vstup je větší než druhý vstup."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Navrátí hodnotu pravda, pokud je prvn Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Navrátí hodnotu pravda, pokud je první vstup menší než druhý vstup."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Navrátí hodnotu pravda, pokud je první vstup menší a nebo rovný druhému vstupu."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Vrátí hodnotu pravda, pokud se oba vstupy nerovnají sobě navzájem."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "není %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Navrátí hodnotu pravda, pokud je vstup nepravda. Navrátí hodnotu nepravda, pokud je vstup pravda."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nula"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Vrátí nulovou hodnotu"; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "a"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "nebo"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Vrátí hodnotu pravda, pokud oba dva vstupy jsou pravdivé."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Vrátí hodnotu pravda, pokud alespoň jeden ze vstupů má hodnotu pravda."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "je-li nepravda"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "je-li to pravda"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Zkontroluje podmínku v \"testu\". Když je podmínka pravda, vrátí hodnotu \"pokud pravda\"; v opačném případě vrátí hodnotu \"pokud nepravda\"."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://cs.wikipedia.org/wiki/Aritmetika"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Vrátí součet dvou čísel."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Vrátí podíl dvou čísel."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Vrátí rozdíl dvou čísel."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Vrátí první číslo umocněné n Blockly.Msg.MATH_CHANGE_HELPURL = "https://pt.wikipedia.org/wiki/Adi%C3%A7%C3%A3o"; Blockly.Msg.MATH_CHANGE_TITLE = "změnit %1 od %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Přičti číslo k proměnné '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Vraťte jednu z následujících konstant: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "omez %1 na rozmezí od %2 do %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Omezí číslo tak, aby bylo ve stanovených mezích (včetně)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "je dělitelné"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "je sudé"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "je záporné"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "je liché"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "je kladné"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "je prvočíslo"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Kontrola, zda je číslo sudé, liché, prvočíslo, celé, kladné, záporné nebo zda je dělitelné daným číslem. Vrací pravdu nebo nepravdu."; Blockly.Msg.MATH_IS_WHOLE = "je celé"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://cs.wikipedia.org/wiki/Modul%C3%A1rn%C3%AD_aritmetika"; Blockly.Msg.MATH_MODULO_TITLE = "zbytek po dělení %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Vrátí zbytek po dělení dvou čísel."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://cs.wikipedia.org/wiki/Číslo"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Číslo."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "průměr v seznamu"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "největší v seznamu"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "medián v seznamu"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "náhodná položka seznamu"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "směrodatná odchylka ze seznamu"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "suma seznamu"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Vrátí průměr (aritmetický průměr) číselných hodnot v seznamu."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Vrátí největší číslo v seznamu."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Vrátí medián seznamu."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://cs.wikipedia.org/wiki/Gener%C3%A1tor_n%C3%A1hodn%C3%BDch_%C4%8D%C3%ADsel"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "náhodné číslo mezi 0 (včetně) do 1"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Vrátí náhodné číslo mezi 0,0 (včetně) až 1,0"; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://cs.wikipedia.org/wiki/Gener%C3%A1tor_n%C3%A1hodn%C3%BDch_%C4%8D%C3%ADsel"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "náhodné celé číslo od %1 do %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Vrací náhodné celé číslo mezi dvěma určenými mezemi, včetně mezních hodnot."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://cs.wikipedia.org/wiki/Zaokrouhlení"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "zaokrouhlit"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "zaokrouhlit dolu"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "zaokrouhlit nahoru"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Zaokrouhlit číslo nahoru nebo dolů."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://cs.wikipedia.org/wiki/Druhá_odmocnina"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolutní"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "druhá odmocnina"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Vrátí absolutní hodnotu čísla."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Vrátí mocninu čísla e."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Vrátí přirozený logaritmus čísla."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Vrátí mocninu čísla 10."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Vrátí druhou odmocninu čísla."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "arcsin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "arctan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://cs.wikipedia.org/wiki/Goniometrická_funkce"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Vrátí arckosinus čísla."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Vrátí arcsinus čísla."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Vrátí arctangens čísla."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "vstupní jméno:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "vstupy"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Odstranit komentář"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/da.js b/msg/js/da.js index cf6cfc69bd2..e63728bdc9b 100644 --- a/msg/js/da.js +++ b/msg/js/da.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rød"; Blockly.Msg.COLOUR_RGB_TITLE = "farve med"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Lav en farve med den angivne mængde af rød, grøn og blå. Alle værdier skal være mellem 0 og 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "bryd ud af løkken"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "fortsæt med den næste gentagelse i løkken"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Advarsel: Denne blok kan kun bru Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "for hvert element %1 i listen %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For hvert element i en liste, sæt variablen '%1' til elementet, og udfør derefter nogle kommandoer."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "tæl med %1 fra %2 til %3 med %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Få variablen \"%1\" til at have værdierne fra startværdien til slutværdien, mens der tælles med det angivne interval, og udfør de angivne blokke."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Tilføj en betingelse til denne \"hvis\" blok."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Tilføj en sidste fang-alt betingelse, til denne \"hvis\" blok."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Tilføj, fjern eller byt om på rækkefølgen af delene for at konfigurere denne \"hvis\" blok."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "ellers"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Hvis en værdi er sand, så udfør nogle ko Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Hvis en værdi er sand, så udfør den første blok af kommandoer. Ellers udfør den anden blok af kommandoer."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Hvis den første værdi er sand, så udfør den første blok af kommandoer. Ellers, hvis den anden værdi er sand, så udfør den anden blok af kommandoer."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Hvis den første værdi er sand, så udfør den første blok af kommandoer. Ellers, hvis den anden værdi er sand, så udfør den anden blok af kommandoer. Hvis ingen af værdierne er sande, så udfør den sidste blok af kommandoer."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://da.wikipedia.org/wiki/For-l%C3%B8kke"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "udfør"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "gentag %1 gange"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Udfør nogle kommandoer flere gange."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "gentag indtil"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "gentag sålænge"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Udfør nogle kommandoer, sålænge en værdi er falsk."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Udfør nogle kommandoer, sålænge en værdi er sand."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Slet blok"; Blockly.Msg.DELETE_X_BLOCKS = "Slet %1 blokke"; Blockly.Msg.DISABLE_BLOCK = "Deaktivér blok"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Saml en liste af tekster til én tekst, Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Bryd tekst op i en liste af tekster med brud ved hvert skilletegn."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "med skilletegn"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falsk"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returnerer enten sand eller falsk."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "sand"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://da.wikipedia.org/wiki/Ulighed_(matematik)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Returnere sand, hvis begge inputs er lig med hinanden."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Returnere sand, hvis det første input er større end det andet input."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Returnere sand, hvis det første input Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Returnere sand, hvis det første input er mindre end det andet input."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Returnere sand, hvis det første input er mindre end eller lig med det andet input."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Returnere sand, hvis begge inputs ikke er lig med hinanden."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "ikke %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returnerer sand, hvis input er falsk. Returnerer falsk, hvis input er sandt."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returnerer null."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "og"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "eller"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Returnere sand, hvis begge inputs er sande."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Returnere sand, hvis mindst et af inputtene er sande."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "hvis falsk"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "hvis sand"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kontrollér betingelsen i 'test'. Hvis betingelsen er sand, returnér \"hvis sand\" værdien; ellers returnér \"hvis falsk\" værdien."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://da.wikipedia.org/wiki/Aritmetik"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Returnere summen af de to tal."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Returnere kvotienten af de to tal."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Returnere forskellen mellem de to tal."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Returnere det første tal opløftet Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "skift %1 med %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Læg et tal til variablen '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://da.wikipedia.org/wiki/Matematisk_konstant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Returnere en af de ofte brugte konstanter: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(2) (1.414…), sqrt(½) (0.707…) eller ∞ (uendeligt)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "begræns %1 til mellem %2 og %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Begræns et tal til at være mellem de angivne grænser (inklusiv)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = ":"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "er deleligt med"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "er lige"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "er negativt"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "er ulige"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "er positivt"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "er et primtal"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Kontrollere, om et tal er lige, ulige, primtal, helt, positivt, negativt, eller om det er deleligt med bestemt tal. Returnere sandt eller falskt."; Blockly.Msg.MATH_IS_WHOLE = "er helt"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://da.wikipedia.org/wiki/Modulo"; Blockly.Msg.MATH_MODULO_TITLE = "resten af %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Returner resten fra at dividere de to tal."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://da.wikipedia.org/wiki/Tal"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Et tal."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "gennemsnit af listen"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "største tal i listen"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "listens median"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "listens typetal"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "tilfældigt element fra listen"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standardafvigelsen for listen"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "summen af listen"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Returner gennemsnittet (middelværdien) af de numeriske værdier i listen."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Returner det største tal i listen."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Returner listens median."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://da.wikipedia.org/wiki/Tilfældighedsgenerator"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "tilfældigt decimaltal (mellem 0 og 1)"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Returner et tilfældigt decimaltal mellem 0,0 (inklusiv) og 1,0 (eksklusiv)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://da.wikipedia.org/wiki/Tilfældighedsgenerator"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "tilfældigt heltal mellem %1 og %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Returner et tilfældigt heltal mellem de to angivne grænser (inklusiv)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://da.wikipedia.org/wiki/Afrunding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "afrund"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "rund ned"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "rund op"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Runde et tal op eller ned."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://da.wikipedia.org/wiki/Kvadratrod"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolut"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "kvadratrod"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Returnere den absolutte værdi af et tal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Returnere e til potensen af et tal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Returnere den naturlige logaritme af et tal."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Returnere 10 til potensen af et tal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Returnere kvadratroden af et tal."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://da.wikipedia.org/wiki/Trigonometrisk_funktion"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Returnere arcus cosinus af et tal."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Returnere arcus sinus af et tal."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Returnere arcus tangens af et tal."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "parameternavn:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Tilføj en parameter til funktionen."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "parametre"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Tilføje, fjerne eller ændre rækkefølgen af parametre til denne funktion."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Fjern kommentar"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/de.js b/msg/js/de.js index f50977df555..7e704d421f3 100644 --- a/msg/js/de.js +++ b/msg/js/de.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rot"; Blockly.Msg.COLOUR_RGB_TITLE = "Farbe mit"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Kreiere eine Farbe mit selbst definierten Rot-, Grün- und Blauwerten. Alle Werte müssen zwischen 0 und 100 liegen."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://de.wikipedia.org/wiki/Kontrollstruktur"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "Die Schleife abbrechen"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "mit der nächsten Iteration der Schleife fortfahren"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warnung: Dieser Block sollte nur Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://de.wikipedia.org/wiki/For-Schleife"; Blockly.Msg.CONTROLS_FOREACH_TITLE = "Für Wert %1 aus der Liste %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Führe eine Anweisung für jeden Wert in der Liste aus und setzte dabei die Variable \"%1\" auf den aktuellen Listenwert."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://de.wikipedia.org/wiki/For-Schleif"; Blockly.Msg.CONTROLS_FOR_TITLE = "Zähle %1 von %2 bis %3 mit %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Zähle die Variable \"%1\" von einem Startwert bis zu einem Zielwert und führe für jeden Wert eine Anweisung aus."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Eine weitere Bedingung hinzufügen."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Eine sonst-Bedingung hinzufügen, führt eine Anweisung aus falls keine Bedingung zutrifft."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Hinzufügen, entfernen oder sortieren von Sektionen"; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "sonst"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Wenn eine Bedingung wahr (true) ist, dann f Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Wenn eine Bedingung wahr (true) ist, dann führe die erste Anweisung aus. Ansonsten führe die zweite Anweisung aus."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Wenn die erste Bedingung wahr (true) ist, dann führe die erste Anweisung aus. Oder wenn die zweite Bedingung wahr (true) ist, dann führe die zweite Anweisung aus."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Wenn die erste Bedingung wahr (true) ist, dann führe die erste Anweisung aus. Oder wenn die zweite Bedingung wahr (true) ist, dann führe die zweite Anweisung aus. Falls keine der beiden Bedingungen wahr (true) ist, dann führe die dritte Anweisung aus."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://de.wikipedia.org/wiki/For-Schleife"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "mache"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "wiederhole %1 mal"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Eine Anweisung mehrfach ausführen."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://de.wikipedia.org/wiki/Schleife_%28Programmierung%29"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "Wiederhole bis"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "Wiederhole solange"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Führe die Anweisung solange aus wie die Bedingung falsch (false) ist."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Führe die Anweisung solange aus wie die Bedingung wahr (true) ist."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Block löschen"; Blockly.Msg.DELETE_X_BLOCKS = "Block %1 löschen"; Blockly.Msg.DISABLE_BLOCK = "Block deaktivieren"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Liste mit Texten in einen Text vereinen, Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Text in eine Liste mit Texten aufteilen, unterbrochen bei jedem Trennzeichen."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "mit Trennzeichen"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falsch"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Ist entweder wahr (true) oder falsch (false)"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "wahr"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://de.wikipedia.org/wiki/Vergleich_%28Zahlen%29"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Ist wahr (true) wenn beide Werte gleich sind."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Ist wahr (true) wenn der erste Wert größer als der zweite Wert ist."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Ist wahr (true) wenn der erste Wert gr Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Ist wahr (true) wenn der erste Wert kleiner als der zweite Wert ist."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Ist wahr (true) wenn der erste Wert kleiner als oder gleich groß wie zweite Wert ist."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Ist wahr (true) wenn beide Werte unterschiedlich sind."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "nicht %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Ist wahr (true) wenn der Eingabewert falsch (false) ist. Ist falsch (false) wenn der Eingabewert wahr (true) ist."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://de.wikipedia.org/wiki/Nullwert"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Ist NULL."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "und"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "oder"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Ist wahr (true) wenn beide Werte wahr (true) sind."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Ist wahr (true) wenn einer der beiden Werte wahr (true) ist."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "teste"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://de.wikipedia.org/wiki/%3F:#Auswahlo Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "wenn falsch"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "wenn wahr"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Überprüft eine Bedingung \"teste\". Wenn die Bedingung wahr ist wird der \"wenn wahr\" Wert zurückgegeben, andernfalls der \"wenn falsch\" Wert"; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://de.wikipedia.org/wiki/Grundrechenart"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Ist die Summe zweier Werte."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Ist der Quotient zweier Werte."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Ist die Differenz zweier Werte."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Ist der erste Wert potenziert mit d Blockly.Msg.MATH_CHANGE_HELPURL = "https://de.wikipedia.org/wiki/Inkrement_und_Dekrement"; Blockly.Msg.MATH_CHANGE_TITLE = "erhöhe %1 um %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Addiert einen Wert zur Variable \"%1\" hinzu."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://de.wikipedia.org/wiki/Mathematische_Konstante"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Mathematische Konstanten wie: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…) oder ∞ (unendlich)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "begrenze %1 von %2 bis %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Begrenzt den Wertebereich auf den \"von\"-Wert bis einschließlich zum \"bis\"-Wert. (inklusiv)"; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "ist teilbar durch"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "ist gerade"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "ist negativ"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "ist ungerade"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "ist positiv"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "ist eine Primzahl"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Überprüft ob eine Zahl gerade, ungerade, eine Primzahl, ganzzahlig, positiv, negativ oder durch eine zweite Zahl teilbar ist. Gibt wahr (true) oder falsch (false) zurück."; Blockly.Msg.MATH_IS_WHOLE = "ist eine ganze Zahl"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://de.wikipedia.org/wiki/Modulo"; Blockly.Msg.MATH_MODULO_TITLE = "Rest von %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Der Rest nach einer Division."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://de.wikipedia.org/wiki/Zahl"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Eine Zahl."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = "http://www.sysplus.ch/einstieg.php?links=menu&seite=4125&grad=Crash&prog=Excel"; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Mittelwert einer Liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Maximalwert einer Liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Median einer Liste"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "Modulo / Restwert einer Liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Zufallswert einer Liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "Standardabweichung einer Liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Summe einer Liste"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Ist der Durchschnittswert aller Werte in einer Liste."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Ist der größte Wert in einer Liste."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Ist der Median aller Werte in einer Liste."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://de.wikipedia.org/wiki/Zufallszahlen"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Zufallszahl (0.0 -1.0)"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Erzeuge eine Zufallszahl zwischen 0.0 (inklusiv) und 1.0 (exklusiv)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://de.wikipedia.org/wiki/Zufallszahlen"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "ganzzahliger Zufallswert zwischen %1 bis %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Erzeuge einen ganzzahligen Zufallswert zwischen zwei Werten (inklusiv)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://de.wikipedia.org/wiki/Runden"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "runden"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "abrunden"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "aufrunden"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Eine Zahl auf- oder abrunden."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://de.wikipedia.org/wiki/Quadratwurzel"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "Absolutwert"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "Quadratwurzel"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Ist der Absolutwert eines Wertes."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Ist Wert der Exponentialfunktion eines Wertes."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Ist der natürliche Logarithmus eines Wertes."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Rechnet 10 hoch Eingabewert."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Ist die Quadratwurzel eines Wertes."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://de.wikipedia.org/wiki/Trigonometrie"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Ist der Arkuskosinus des Eingabewertes."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Ist der Arkussinus des Eingabewertes."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Ist der Arkustangens des Eingabewertes."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Variable:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Eine Eingabe zur Funktion hinzufügen."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "Parameter"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Die Eingaben zu dieser Funktion hinzufügen, entfernen oder neu anordnen."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Kommentar entfernen"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/el.js b/msg/js/el.js index afe74c93940..2ff9551981b 100644 --- a/msg/js/el.js +++ b/msg/js/el.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "κόκκινο"; Blockly.Msg.COLOUR_RGB_TITLE = "χρώμα με"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Δημιουργεί χρώμα με το συγκεκριμένο ποσό του κόκκινου, πράσινου και μπλε που ορίζεις. Όλες οι τιμές πρέπει να είναι μεταξύ 0 και 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "φεύγει από το μπλοκ επαναλήψεως"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "συνέχισε με την επόμενη επανάληψη του μπλοκ επαναλήψεως"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Προειδοποίηση: Αυ Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "για κάθε στοιχείο %1 στη λίστα %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Για κάθε στοιχείο σε μια λίστα, ορίζει τη μεταβλητή «%1» στο στοιχείο και, στη συνέχεια, εκτελεί κάποιες εντολές."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "Blockly"; Blockly.Msg.CONTROLS_FOR_TITLE = "μέτρησε με %1 από το %2 έως το %3 ανά %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Η μεταβλητή «%1» παίρνει τιμές ξεκινώντας από τον αριθμό έναρξης μέχρι τον αριθμό τέλους αυξάνοντας κάθε φορά με το καθορισμένο βήμα και εκτελώντας το καθορισμένο μπλοκ."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Πρόσθετει μια κατάσταση/συνθήκη στο μπλοκ «εάν»."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Προσθέτει μια τελική κατάσταση/συνθήκη, που πιάνει όλες τις άλλες περιπτώσεις, στο μπλοκ «εάν»."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Προσθέτει, αφαιρεί ή αναδιατάσσει τα τμήματα για να αναδιαμορφώσει αυτό το μπλοκ «εάν»."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "αλλιώς"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Αν μια τιμή είναι αληθή Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Αν μια τιμή είναι αληθής, τότε εκτελεί το πρώτο τμήμα εντολών. Διαφορετικά, εκτελεί το δεύτερο τμήμα εντολών."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Αν η πρώτη τιμή είναι αληθής, τότε εκτελεί το πρώτο τμήμα εντολών. Διαφορετικά, αν η δεύτερη τιμή είναι αληθής, εκτελεί το δεύτερο μπλοκ εντολών."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Αν η πρώτη τιμή είναι αληθής, τότε εκτελεί το πρώτο τμήμα εντολών. Διαφορετικά, αν η δεύτερη τιμή είναι αληθής, εκτελεί το δεύτερο τμήμα εντολών. Αν καμία από τις τιμές δεν είναι αληθής, εκτελεί το τελευταίο τμήμα εντολών."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "κάνε"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "επανάλαβε %1 φορές"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Εκτελεί κάποιες εντολές αρκετές φορές."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "επανάλαβε μέχρι"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "επανάλαβε ενώ"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Ενόσω μια τιμή είναι ψευδής, τότε εκτελεί κάποιες εντολές."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Ενόσω μια τιμή είναι αληθής, τότε εκτελεί κάποιες εντολές."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Διέγραψε Το Μπλοκ"; Blockly.Msg.DELETE_X_BLOCKS = "Διέγραψε %1 Μπλοκ"; Blockly.Msg.DISABLE_BLOCK = "Απενεργοποίησε Το Μπλοκ"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Ενώστε μια λίστα κειμ Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Διαίρεση του κειμένου σε μια λίστα κειμένων, με σπάσιμο σε κάθε διαχωριστικό."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "με διαχωριστικό"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ψευδής"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Επιστρέφει είτε αληθής είτε ψευδής."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "αληθής"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Επιστρέφει αληθής αν και οι δύο είσοδοι είναι ίσες μεταξύ τους."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Επιστρέφει αληθής αν η πρώτη είσοδος είναι μεγαλύτερη από τη δεύτερη είσοδο."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Επιστρέφει αληθής αν Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Επιστρέφει αληθής αν η πρώτη είσοδος είναι μικρότερη από τη δεύτερη είσοδο."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Επιστρέφει αληθής αν η πρώτη είσοδος είναι μικρότερη από ή ίση με τη δεύτερη είσοδο."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Επιστρέφει αληθής αν και οι δύο είσοδοι δεν είναι ίσες μεταξύ τους."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "όχι %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Επιστρέφει αληθής αν η είσοδος είναι ψευδής. Επιστρέφει ψευδής αν η είσοδος είναι αληθής."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "κενό"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Επιστρέφει κενό."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "και"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "ή"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Επιστρέφει αληθής αν και οι δύο είσοδοι είναι αληθής."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Επιστρέφει αληθής αν τουλάχιστον μια από τις εισόδους είναι αληθής."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "έλεγχος"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "εάν είναι ψευδής"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "εάν είναι αληθής"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Ελέγχει την κατάσταση/συνθήκη στον «έλεγχο». Αν η κατάσταση/συνθήκη είναι αληθής, επιστρέφει την τιμή «εάν αληθής», διαφορετικά επιστρέφει την τιμή «εάν ψευδής»."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://el.wikipedia.org/wiki/%CE%91%CF%81%CE%B9%CE%B8%CE%BC%CE%B7%CF%84%CE%B9%CE%BA%CE%AE"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Επιστρέφει το άθροισμα των δύο αριθμών."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Επιστρέφει το πηλίκο των δύο αριθμών."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Επιστρέφει τη διαφορά των δύο αριθμών."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Επιστρέφει τον πρώ Blockly.Msg.MATH_CHANGE_HELPURL = "https://el.wikipedia.org/wiki/%CE%A0%CF%81%CF%8C%CF%83%CE%B8%CE%B5%CF%83%CE%B7"; Blockly.Msg.MATH_CHANGE_TITLE = "άλλαξε %1 από %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Προσθέτει έναν αριθμό στη μεταβλητή «%1»."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Επιστρέφει μία από τις κοινές σταθερές: π (3.141...), e (2.718...), φ (1.618...), sqrt(2) (1.414...), sqrt(½) (0.707...), ή ∞ (άπειρο)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "περιόρισε %1 χαμηλή %2 υψηλή %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Περιορίζει έναν αριθμό μεταξύ των προβλεπόμενων ορίων (χωρίς αποκλεισμούς)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "είναι διαιρετός από το"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "είναι άρτιος"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "είναι αρνητικός"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "είναι περιττός"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "είναι θετικός"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "είναι πρώτος"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Ελέγχει αν ένας αριθμός είναι άρτιος, περιττός, πρώτος, ακέραιος, θετικός, αρνητικός, ή αν είναι διαιρετός από έναν ορισμένο αριθμό. Επιστρέφει αληθής ή ψευδής."; Blockly.Msg.MATH_IS_WHOLE = "είναι ακέραιος"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "υπόλοιπο της %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Επιστρέφει το υπόλοιπο της διαίρεσης των δύο αριθμών."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://el.wikipedia.org/wiki/%CE%91%CF%81%CE%B9%CE%B8%CE%BC%CF%8C%CF%82"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Ένας αριθμός."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "μέσος όρος λίστας"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "μεγαλύτερος λίστας"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "διάμεσος λίστας"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "μορφές λίστας"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "τυχαίο στοιχείο λίστας"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "τυπική απόκλιση λίστας"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "άθροισμα λίστας"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Επιστρέφει τον αριθμητικό μέσο όρο από τις αριθμητικές τιμές στη λίστα."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Επιστρέφει τον μεγαλύτερο αριθμό στη λίστα."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Επιστρέφει τον διάμεσο της λίστας."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^ ύψωση σε δύναμη"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://el.wikipedia.org/wiki/%CE%93%CE%B5%CE%BD%CE%BD%CE%AE%CF%84%CF%81%CE%B9%CE%B1_%CE%A4%CF%85%CF%87%CE%B1%CE%AF%CF%89%CE%BD_%CE%91%CF%81%CE%B9%CE%B8%CE%BC%CF%8E%CE%BD"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "τυχαίο κλάσμα"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Επιστρέψει ένα τυχαία κλάσμα μεταξύ 0,0 (κλειστό) και 1,0 (ανοικτό)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "τυχαίος ακέραιος από το %1 έως το %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Επιστρέφει έναν τυχαίο ακέραιο αριθμό μεταξύ δύο συγκεκριμένων ορίων (εντός - συμπεριλαμβανομένων και των ακραίων τιμών)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "στρογγυλοποίησε"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "στρογγυλοποίησε προς τα κάτω"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "στρογγυλοποίησε προς τα πάνω"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Στρογγυλοποιεί έναν αριθμό προς τα πάνω ή προς τα κάτω."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://el.wikipedia.org/wiki/%CE%A4%CE%B5%CF%84%CF%81%CE%B1%CE%B3%CF%89%CE%BD%CE%B9%CE%BA%CE%AE_%CF%81%CE%AF%CE%B6%CE%B1"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "απόλυτη"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "τετραγωνική ρίζα"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Επιστρέφει την απόλυτη τιμή ενός αριθμού."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Επιστρέφει το e υψωμένο στη δύναμη ενός αριθμού."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Επιστρέφει τον νεπέρειο λογάριθμο ενός αριθμού."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Επιστρέφει το 10 υψωμέ Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Επιστρέφει την τετραγωνική ρίζα ενός αριθμού."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "συν"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://el.wikipedia.org/wiki/%CE%A4%CF%81%CE%B9%CE%B3%CF%89%CE%BD%CE%BF%CE%BC%CE%B5%CF%84%CF%81%CE%B9%CE%BA%CE%AE_%CF%83%CF%85%CE%BD%CE%AC%CF%81%CF%84%CE%B7%CF%83%CE%B7"; Blockly.Msg.MATH_TRIG_SIN = "ημ"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "εφ"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Επιστρέφει το τόξο συνημίτονου ενός αριθμού."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Επιστρέφει το τόξο ημίτονου ενός αριθμού."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Επιστρέφει το τόξο εφαπτομένης ενός αριθμού."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "όνομα εισόδου:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Πρόσθεσε μια είσοδος στη συνάρτηση"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "είσοδοι"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Προσθέτει, αφαιρεί ή αναδιατάσσει εισόδους σε αυτήν τη λειτουργία"; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Αφαίρεσε Το Σχόλιο"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/en.js b/msg/js/en.js index 229d5983b23..976fc191069 100644 --- a/msg/js/en.js +++ b/msg/js/en.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "red"; Blockly.Msg.COLOUR_RGB_TITLE = "colour with"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "break out of loop"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continue with next iteration of loop"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; Blockly.Msg.CONTROLS_FOREACH_TITLE = "for each item %1 in list %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; Blockly.Msg.CONTROLS_FOR_TITLE = "count with %1 from %2 to %3 by %4"; Blockly.Msg.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."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "else"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; Blockly.Msg.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."; Blockly.Msg.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."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "do"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repeat %1 times"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repeat until"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repeat while"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; Blockly.Msg.DELETE_BLOCK = "Delete Block"; Blockly.Msg.DELETE_X_BLOCKS = "Delete %1 Blocks"; Blockly.Msg.DISABLE_BLOCK = "Disable Block"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "false"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returns either true or false."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "true"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is great Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; Blockly.Msg.LOGIC_NEGATE_TITLE = "not %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returns null."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; Blockly.Msg.LOGIC_OPERATION_AND = "and"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; Blockly.Msg.LOGIC_OPERATION_OR = "or"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "if false"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "if true"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "change %1 by %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; Blockly.Msg.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)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; Blockly.Msg.MATH_IS_EVEN = "is even"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; Blockly.Msg.MATH_IS_NEGATIVE = "is negative"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; Blockly.Msg.MATH_IS_ODD = "is odd"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; Blockly.Msg.MATH_IS_POSITIVE = "is positive"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; Blockly.Msg.MATH_IS_PRIME = "is prime"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; Blockly.Msg.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."; Blockly.Msg.MATH_IS_WHOLE = "is whole"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "A number."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; Blockly.Msg.MATH_ONLIST_HELPURL = ""; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "average of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "max of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "random item of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "sum of list"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "round"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "round down"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "round up"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolute"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; Blockly.Msg.MATH_SINGLE_OP_ROOT = "square root"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "input name:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; Blockly.Msg.REMOVE_COMMENT = "Remove Comment"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; diff --git a/msg/js/es.js b/msg/js/es.js index 0bfacdb2a2c..a785b576719 100644 --- a/msg/js/es.js +++ b/msg/js/es.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rojo"; Blockly.Msg.COLOUR_RGB_TITLE = "colorear con"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Crea un color con cantidades específicas de rojo, verde y azul. Todos los valores deben encontrarse entre 0 y 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "romper el bucle"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continuar con la siguiente iteración del bucle"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "ADVERTENCIA: Este bloque puede u Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://es.wikipedia.org/wiki/Foreach"; Blockly.Msg.CONTROLS_FOREACH_TITLE = "para cada elemento %1 en la lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para cada elemento en una lista, establecer la variable '%1' al elemento y luego hacer algunas declaraciones."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "contar con %1 desde %2 hasta %3 de a %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Hacer que la variable \"%1\" tome los valores desde el número de inicio hasta el número final, contando con el intervalo especificado, y hacer los bloques especificados."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Agregar una condición a este bloque."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Agregar una condición general final a este bloque."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Agregar, eliminar o reordenar las secciones para reconfigurar este bloque."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "sino"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Si un valor es verdadero, entonces hacer al Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Si un valor es verdadero, entonces hacer el primer bloque de declaraciones. De lo contrario, hacer el segundo bloque de declaraciones."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Si el primer valor es verdadero, entonces hacer el primer bloque de declaraciones. De lo contrario, si el segundo valor es verdadero, hacer el segundo bloque de declaraciones."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Si el primer valor es verdadero, entonces hacer el primer bloque de declaraciones. De lo contrario, si el segundo valor es verdadero, hacer el segundo bloque de declaraciones. Si ninguno de los valores son verdaderos, hacer el último bloque de declaraciones."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://es.wikipedia.org/wiki/Bucle_for"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "hacer"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repetir %1 veces"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Hacer algunas declaraciones varias veces."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repetir hasta"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repetir mientras"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Mientras un valor sea falso, entonces hacer algunas declaraciones."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Mientras un valor sea verdadero, entonces hacer algunas declaraciones."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Eliminar bloque"; Blockly.Msg.DELETE_X_BLOCKS = "Eliminar %1 bloques"; Blockly.Msg.DISABLE_BLOCK = "Desactivar bloque"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Unir una lista de textos en un solo text Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Dividir el texto en una lista de textos, separando en cada delimitador."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "con delimitador"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falso"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Devuelve verdadero o falso."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "verdadero"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://es.wikipedia.org/wiki/Desigualdad_matemática"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Devuelve verdadero si ambas entradas son iguales."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Devuelve verdadero si la primera entrada es mayor que la segunda entrada."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Devuelve verdadero si la primera entrad Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Devuelve verdadero si la primera entrada es menor que la segunda entrada."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Devuelve verdadero si la primera entrada es menor que o igual a la segunda entrada."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Devuelve verdadero si ambas entradas son distintas."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "no %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Devuelve verdadero si la entrada es falsa. Devuelve falso si la entrada es verdadera."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nulo"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Devuelve nulo."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "y"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "o"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Devuelve verdadero si ambas entradas son verdaderas."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Devuelve verdadero si al menos una de las entradas es verdadera."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "prueba"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si es falso"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si es verdadero"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Comprueba la condición en \"prueba\". Si la condición es verdadera, devuelve el valor \"si es verdadero\"; de lo contrario, devuelve el valor \"si es falso\"."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://es.wikipedia.org/wiki/Aritmética"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Devuelve la suma de ambos números."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Devuelve el cociente de ambos números."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Devuelve la diferencia de ambos números."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Devuelve el primer número elevado Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "cambiar %1 por %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Añadir un número a la variable «%1»."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://es.wikipedia.org/wiki/Anexo:Constantes_matemáticas"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Devuelve una de las constantes comunes: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…) o ∞ (infinito)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "limitar %1 entre %2 y %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Limitar un número entre los límites especificados (inclusive)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "es divisible por"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "es par"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "es negativo"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "es impar"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "es positivo"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "es primo"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Comprueba si un número es par, impar, primo, entero, positivo, negativo, o si es divisible por un número determinado. Devuelve verdadero o falso."; Blockly.Msg.MATH_IS_WHOLE = "es entero"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "resto de %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Devuelve el resto al dividir los dos números."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://es.wikipedia.org/wiki/Número"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un número."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "promedio de la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "máximo de la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana de la lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modas de la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "elemento aleatorio de la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "desviación estándar de la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "suma de la lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Devuelve el promedio (media aritmética) de los valores numéricos en la lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Devuelve el número más grande en la lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Devuelve la mediana en la lista."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://es.wikipedia.org/wiki/Generador_de_números_aleatorios"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "fracción aleatoria"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Devuelve una fracción aleatoria entre 0,0 (ambos inclusive) y 1.0 (exclusivo)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://es.wikipedia.org/wiki/Generador_de_números_aleatorios"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "entero aleatorio de %1 a %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Devuelve un entero aleatorio entre los dos límites especificados, inclusive."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://es.wikipedia.org/wiki/Redondeo"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "redondear"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "redondear hacia abajo"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "redondear hacia arriba"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Redondear un número hacia arriba o hacia abajo."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://es.wikipedia.org/wiki/Ra%C3%ADz_cuadrada"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absoluto"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "raíz cuadrada"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Devuelve el valor absoluto de un número."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Devuelve e a la potencia de un número."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Devuelve el logaritmo natural de un número."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Devuelve 10 a la potencia de un número Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Devuelve la raíz cuadrada de un número."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://es.wikipedia.org/wiki/Función_trigonométrica"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Devuelve el arcocoseno de un número."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Devuelve el arcoseno de un número."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Devuelve el arcotangente de un número."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nombre de entrada:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Añadir una entrada a la función."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "entradas"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Añadir, eliminar o reordenar entradas para esta función."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Eliminar comentario"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/fa.js b/msg/js/fa.js index 34b3e6d50fc..6afda2fab10 100644 --- a/msg/js/fa.js +++ b/msg/js/fa.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "قرمز"; Blockly.Msg.COLOUR_RGB_TITLE = "رنگ با"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "ساخت یک رنگ با مقدار مشخص‌شده‌ای از قرمز، سبز و آبی. همهٔ مقادیر باید بین ۰ تا ۱۰۰ باشند."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "شکستن حلقه"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "ادامه با تکرار بعدی حلقه"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "اخطار: این بلوک مم Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "برای هر مورد %1 در فهرست %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "برای هر مورد در این فهرست، تنظیم متغیر «%1» به مورد و انجام تعدادی عبارت."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "با تعداد %1 از %2 به %3 با گام‌های %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "متغیر %1 را در مقادیر شروع‌شده از عدد انتهای به عدد انتهایی را دارد، با فواصل مشخص‌شده می‌شمارد و این بلوک مشخص‌شده را انجام می‌دهد."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "افزودن یک شرط به بلوک اگر."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "اضافه‌کردن نهایی، گرفتن همهٔ شرایط به بلوک اگر."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "افزودن، حذف یا بازمرتب‌سازی قسمت‌ها برای پیکربندی دوبارهٔ این بلوک اگر."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "آنگاه"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "اگر یک مقدار صحیح است، س Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "اگر یک مقدار صحیح است، اول بلوک اول عبارات را انجام بده. در غیر این صورت بلوک دوم عبارات انجام بده."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "اگر مقدار اول صحیح بود، از آن بلوک اول عبارات را انجام بده. در غیر این صورت، اگر مقدار دوم صحیح است، بلوک دوم عبارات را انجام بده."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "اگر مقدار اول درست است، بلوک اول عبارات را انجام بده. در غیر این صورت، اگر مقدار دوم درست باشد بلوک دوم عبارات را انجام بده. اگر هیچ از مقادیر درست نبود، آخرین بلوک عبارات را انجام بده."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AD%D9%84%D9%82%D9%87_%D9%81%D9%88%D8%B1"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "انحام"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 بار تکرار"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "انجام چند عبارت چندین بار."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "تکرار تا زمانی که"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "تکرار در حالی که"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "تا زمانی که یک مقدار ناصحیح است، چند عبارت را انجام بده."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "تا زمانی که یک مقدار صحیح است، چند عبارت را انجام بده."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "حذف بلوک"; Blockly.Msg.DELETE_X_BLOCKS = "حذف بلوک‌های %1"; Blockly.Msg.DISABLE_BLOCK = "غیرفعال‌سازی بلوک"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "همراه جداساز"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ناصحیح"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "بازگرداندن یکی از صحیح یا ناصحیح."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "صحیح"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://fa.wikipedia.org/wiki/%D9%86%D8%A7%D8%A8%D8%B1%D8%A7%D8%A8%D8%B1%DB%8C"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "بازگشت صحیح اگر هر دو ورودی با یکدیگر برابر باشد."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "بازگرداندن صحیح اگر ورودی اول بزرگتر از ورودی دوم باشد."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "بازگرداندن صحیح اگر و Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "بازگرداندن صحیح اگر ورودی اول کوچکتر از ورودی دوم باشد."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "بازگرداندن صحیح اگر ورودی اول کوچکتر یا مساوی با ورودی دوم باشد."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "برگرداندن صحیح اگر هر دو ورودی با یکدیگر برابر نباشند."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "نه %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "صجیج باز می‌گرداند اگر ورودی نا صحیح باشند. ناصحیح بازمی‌گرداند اگر ورودی صحیح باشد."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "تهی"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "تهی بازمی‌گرداند."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "و"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "یا"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "بازگرداندن صحیح اگر هر دو ورودی صحیح باشد."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "بازگرداندن صحیح اگر یکی از دو ورودی صحیح باشد."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "آزمایش"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "اگر ناصحیح"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "اگر صحیح"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "بررسی وضعیت در «آزمایش». اگر وضعیت صحیح باشد، مقدار «اگر صحیح» را بر می‌گرداند در غیر اینصورت مقدار «اگر ناصحیح» را."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AD%D8%B3%D8%A7%D8%A8"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "بازگرداندن مقدار جمع دو عدد."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "بازگرداندن باقی‌ماندهٔ دو عدد."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "بازگرداندن تفاوت دو عدد."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "بازگرداندن اولین ع Blockly.Msg.MATH_CHANGE_HELPURL = "https://fa.wikipedia.org/wiki/%D8%A7%D8%B5%D8%B7%D9%84%D8%A7%D8%AD_%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C#.D8.A7.D9.81.D8.B2.D8.A7.DB.8C.D8.B4_.D8.B4.D9.85.D8.A7.D8.B1.D9.86.D8.AF.D9.87"; Blockly.Msg.MATH_CHANGE_TITLE = "تغییر %1 با %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "افزودن یک عدد به متغیر '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AB%D8%A7%D8%A8%D8%AA_%D8%B1%DB%8C%D8%A7%D8%B6%DB%8C"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "یکی از مقادیر مشترک را برمی‌گرداند: π (۳٫۱۴۱…)، e (۲٫۷۱۸...)، φ (۱٫۶۱۸)، sqrt(۲) (۱٫۴۱۴)، sqrt(۱/۲) (۰٫۷۰۷...) و یا ∞ (بی‌نهایت)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "محدودکردن %1 پایین %2 بالا %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "محدودکردن یک عدد بین محدودیت‌های مشخص‌شده (بسته)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "تقسیم شده بر"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "زوج است"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "منفی است"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "فرد است"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "مثبت است"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "عدد اول است"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "بررسی می‌کند که آیا یک عدد زوج، فرد، اول، کامل، مثبت، منفی یا بخش‌پذیر عدد خاصی باشد را بررسی می‌کند. درست یا نادرست باز می‌گرداند."; Blockly.Msg.MATH_IS_WHOLE = "کامل است"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B9%D9%85%D9%84%DB%8C%D8%A7%D8%AA_%D9%BE%DB%8C%D9%85%D8%A7%D9%86%D9%87"; Blockly.Msg.MATH_MODULO_TITLE = "باقی‌ماندهٔ %1 + %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "باقی‌ماندهٔ تقسیم دو عدد را بر می‌گرداند."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B9%D8%AF%D8%AF"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "یک عدد."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "میانگین فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "بزرگ‌ترین فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "میانهٔ فهرست"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "مد فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "مورد تصادفی از فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "انحراف معیار فهرست"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "جمع فهرست"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "میانگین (میانگین ریاضی) مقادیر عددی فهرست را بر می‌گرداند."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "بزرگ‌ترین عدد در فهرست را باز می‌گرداند."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "میانهٔ عدد در فهرست را بر می‌گرداند."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AA%D9%88%D9%84%DB%8C%D8%AF_%D8%A7%D8%B9%D8%AF%D8%A7%D8%AF_%D8%AA%D8%B5%D8%A7%D8%AF%D9%81%DB%8C"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "کسر تصادفی"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "بازگرداندن کسری تصادفی بین ۰٫۰ (بسته) تا ۱٫۰ (باز)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AA%D9%88%D9%84%DB%8C%D8%AF_%D8%A7%D8%B9%D8%AF%D8%A7%D8%AF_%D8%AA%D8%B5%D8%A7%D8%AF%D9%81%DB%8C"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "عدد صحیح تصادفی بین %1 تا %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "یک عدد تصادفی بین دو مقدار مشخص‌شده به صورت بسته باز می‌گرداند."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B1%D9%88%DB%8C%D9%87_%28%D8%B9%D9%84%D9%88%D9%85_%D8%B1%D8%A7%DB%8C%D8%A7%D9%86%D9%87%29"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "گردکردن"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "گرد به پایین"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "گرد به بالا"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "گردکردن یک عدد به بالا یا پایین."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B1%DB%8C%D8%B4%D9%87_%D8%AF%D9%88%D9%85"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "مطلق"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "ریشهٔ دوم"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "قدر مطلق یک عدد را بازمی‌گرداند."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "بازگرداندن توان e یک عدد."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "لوگاریتم طبیعی یک عدد را باز می‌گرداند."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "بازگرداندن توان ۱۰ یک Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "ریشهٔ دوم یک عدد را باز می‌گرداند."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://fa.wikipedia.org/wiki/%D8%AA%D8%A7%D8%A8%D8%B9%E2%80%8C%D9%87%D8%A7%DB%8C_%D9%85%D8%AB%D9%84%D8%AB%D8%A7%D8%AA%DB%8C"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "بازگرداندن آرک‌کسینوس درجه (نه رادیان)."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "بازگرداندن آرک‌سینوس درجه (نه رادیان)."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "بازگرداندن آرک‌تانژانت درجه (نه رادیان)."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "نام ورودی:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "اضافه کردن ورودی به تابع."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "ورودی‌ها"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "افزودن، حذف یا دوباره مرتب‌کردن ورودی این تابع."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "حذف نظر"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/fi.js b/msg/js/fi.js index 7eeed6c2171..f3ea927f252 100644 --- a/msg/js/fi.js +++ b/msg/js/fi.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "punainen"; Blockly.Msg.COLOUR_RGB_TITLE = "väri, jossa on"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Luo väri, jossa on tietty määrä punaista, vihreää ja sinistä. Kaikkien arvojen tulee olla välillä 0 - 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "poistu silmukasta"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "jatka silmukan seuraavaan toistoon"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Varoitus: Tätä lohkoa voi käy Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "kullekin kohteelle %1 listassa %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Aseta muuttujan %1 arvoksi kukin listan kohde vuorollaan ja suorita joukko lausekkeita."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "laske %1 Väli %2-%3 %4:n välein"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Aseta muuttujaan \"%1\" arvot alkuarvosta loppuarvoon annetun askeleen välein ja suorita joka askeleella annettu koodilohko."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Lisää ehto \"jos\" lohkoon."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Lisää lopullinen \"muuten\" lohko \"jos\" lohkoon."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Lisää, poista tai järjestele osioita tässä \"jos\" lohkossa."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "muuten"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Jos arvo on tosi, suorita lauseke."; Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Jos arvo on tosi, suorita ensimmäinen lohko lausekkeita. Muuten suorita toinen lohko lausekkeita."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Jos ensimmäinen arvo on tosi, suorita ensimmäinen lohko lausekkeita. Muuten, jos toinen arvo on tosi, suorita toinen lohko lausekkeita."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Jos ensimmäinen arvo on tosi, suorita ensimmäinen lohko lausekkeita. Muuten, jos toinen arvo on tosi, suorita toinen lohko lausekkeita. Jos mikään arvoista ei ole tosi, suorita viimeinen lohko lausekkeita."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "tee"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "toista %1 kertaa"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Suorita joukko lausekkeita useampi kertaa."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "toista kunnes"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "toista niin kauan kuin"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Niin kauan kuin arvo on epätosi, suorita joukko lausekkeita."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Niin kauan kuin arvo on tosi, suorita joukko lausekkeita."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Poista lohko"; Blockly.Msg.DELETE_X_BLOCKS = "Poista %1 lohkoa"; Blockly.Msg.DISABLE_BLOCK = "Passivoi lohko"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Jaa teksti osiin erotinmerkin perusteella ja järjestä osat listaksi."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "erottimen kanssa"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "epätosi"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Palauttaa joko tosi tai epätosi."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "tosi"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://fi.wikipedia.org/wiki/Ep%C3%A4yht%C3%A4l%C3%B6"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Palauta tosi, jos syötteet ovat keskenään samat."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Palauttaa tosi, jos ensimmäinen syöte on suurempi, kuin toinen."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Palauttaa tosi, jos ensimmäinen syöte Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Palauttaa tosi, jos ensimmäinen syöte on pienempi, kuin toinen."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Palauttaa tosi, jos ensimmäinen syöte on pienempi tai yhtä suuri, kuin toinen."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Palauttaa tosi, jos syötteet eivät ole keskenään samoja."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "ei %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Palauttaa tosi, jos syöte on epätosi. Palauttaa epätosi, jos syöte on tosi."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "ei mitään"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Palauttaa \"ei mitään\"-arvon."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "ja"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "tai"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Palauttaa tosi, jos kummatkin syötteet ovat tosia."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Palauttaa tosi, jos ainakin yksi syötteistä on tosi."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "ehto"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jos epätosi"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "jos tosi"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Tarkistaa testin ehdon. Jos ehto on tosi, palauttaa \"jos tosi\" arvon, muuten palauttaa \"jos epätosi\" arvon."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "http://fi.wikipedia.org/wiki/Aritmetiikka"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Palauttaa kahden luvun summan."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Palauttaa jakolaskun osamäärän."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Palauttaa kahden luvun erotuksen."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Palauttaa ensimmäisen luvun korote Blockly.Msg.MATH_CHANGE_HELPURL = "https://fi.wikipedia.org/wiki/Yhteenlasku"; Blockly.Msg.MATH_CHANGE_TITLE = "muuta %1 arvolla %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Lisää arvo muuttujaan '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Palauttaa jonkin seuraavista vakioista: π (3.141…), e (2.718…), φ (1.618…), neliöjuuri(2) (1.414…), neliöjuuri(½) (0.707…), or ∞ (ääretön)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "rajoita %1 vähintään %2 enintään %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Rajoittaa arvon annetulle suljetulle välille."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "on jaollinen luvulla"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "on parillinen"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "on negatiivinen"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "on pariton"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "on positiivinen"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "on alkuluku"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Tarkistaa onko numero parillinen, pariton, alkuluku, kokonaisluku, positiivinen, negatiivinen, tai jos se on jaollinen toisella luvulla. Palauttaa tosi tai epätosi."; Blockly.Msg.MATH_IS_WHOLE = "on kokonaisluku"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2 jakojäännös"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Palauttaa jakolaskun jakojäännöksen."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "⋅"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://fi.wikipedia.org/wiki/Luku"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Luku."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "keskiarvo luvuista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "suurin luvuista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "keskiluku luvuista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "tyyppiarvo luvuista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "satunnainen valinta luvuista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "keskihajonta luvuista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "summa luvuista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Palauttaa aritmeettisen keskiarvon annetuista luvuista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Palauttaa suurimman annetuista luvuista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Palauttaa annettujen lukujen keskiluvun."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://fi.wikipedia.org/wiki/Satunnaisluku"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "satunnainen murtoluku"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Palauttaa satunnaisen luvun oikealta puoliavoimesta välistä [0.0, 1.0)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://fi.wikipedia.org/wiki/Satunnaisluku"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "Palauttaa satunnaisen kokonaisluvun väliltä %1-%2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Palauttaa satunnaisen kokonaisluvun kahden annetun arvon suljetulta väliltä."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://fi.wikipedia.org/wiki/Py%C3%B6rist%C3%A4minen"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "pyöristä"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "pyöristä alaspäin"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "pyöristä ylöspäin"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Pyöristää luvun ylös- tai alaspäin."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://fi.wikipedia.org/wiki/Neli%C3%B6juuri"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "itseisarvo"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "neliöjuuri"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Palauttaa luvun itseisarvon."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Palauttaa e potenssiin luku."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Palauttaa luvun luonnollisen logaritmin."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Palauttaa 10 potenssiin luku."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Palauttaa luvun neliöjuuren."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://fi.wikipedia.org/wiki/Trigonometrinen_funktio"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Palauttaa luvun arkuskosinin."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Palauttaa luvun arkussinin."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Palauttaa luvun arkustangentin."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "syötteen nimi:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Lisää sisääntulon funktioon."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "syötteet"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Lisää, poista tai järjestele uudelleen tämän toiminnon tulot."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Poista kommentti"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/fr.js b/msg/js/fr.js index 9c7c870f42e..bb613669241 100644 --- a/msg/js/fr.js +++ b/msg/js/fr.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rouge"; Blockly.Msg.COLOUR_RGB_TITLE = "colorer avec"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Créer une couleur avec la quantité de rouge, vert et bleu. Les valeurs doivent être comprises entre 0 et 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "sortir de la boucle"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continuer avec la prochaine itération de la boucle"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Attention : Ce bloc ne devrait Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pour chaque élément %1 dans la liste %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pour chaque élément dans une liste, donner la valeur de l’élément à la variable '%1', puis exécuter certains ordres."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "compter avec %1 de %2 à %3 par %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Faire en sorte que la variable « %1 » prenne les valeurs depuis le numéro de début jusqu’au numéro de fin, en s’incrémentant de l’intervalle spécifié, et exécuter les ordres spécifiés."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Ajouter une condition au bloc si."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Ajouter une condition finale fourre-tout au bloc si."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Ajouter, supprimer ou réordonner les sections pour reconfigurer ce bloc si."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "sinon"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Si une valeur est vraie, alors exécuter ce Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Si une valeur est vraie, alors exécuter le premier bloc d’ordres. Sinon, exécuter le second bloc d’ordres."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Si la première valeur est vraie, alors exécuter le premier bloc d’ordres. Sinon, si la seconde valeur est vraie, exécuter le second bloc d’ordres."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Si la première valeur est vraie, alors exécuter le premier bloc d’ordres. Sinon, si la seconde valeur est vraie, exécuter le second bloc d’ordres. Si aucune des valeurs n’est vraie, exécuter le dernier bloc d’ordres."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "http://fr.wikipedia.org/wiki/Boucle_for"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "faire"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "répéter %1 fois"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Exécuter certains ordres plusieurs fois."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "répéter jusqu’à"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "répéter tant que"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Tant qu’une valeur est fausse, alors exécuter certains ordres."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Tant qu’une valeur est vraie, alors exécuter certains ordres."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Supprimer le bloc"; Blockly.Msg.DELETE_X_BLOCKS = "Supprimer %1 blocs"; Blockly.Msg.DISABLE_BLOCK = "Désactiver le bloc"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Réunir une liste de textes en un seul, Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Couper un texte en une liste de textes, en coupant à chaque séparateur."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "avec le séparateur"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "faux"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Renvoie soit vrai soit faux."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "vrai"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Renvoyer vrai si les deux entrées sont égales."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Renvoyer vrai si la première entrée est plus grande que la seconde."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Renvoyer vrai si la première entrée e Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Renvoyer vrai si la première entrée est plus petite que la seconde."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Renvoyer vrai si la première entrée est plus petite ou égale à la seconde."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Renvoyer vrai si les deux entrées ne sont pas égales."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "pas %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Renvoie vrai si l’entrée est fausse. Renvoie faux si l’entrée est vraie."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nul"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Renvoie nul."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "et"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "ou"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Renvoyer vrai si les deux entrées sont vraies."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Renvoyer vrai si au moins une des entrées est vraie."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si faux"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si vrai"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Vérifier la condition dans 'test'. Si elle est vraie, renvoie la valeur 'si vrai' ; sinon renvoie la valeur 'si faux'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Renvoie la somme des deux nombres."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Renvoie le quotient des deux nombres."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Renvoie la différence des deux nombres."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Renvoie le premier nombre élevé Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "incrémenter %1 de %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Ajouter un nombre à la variable '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Renvoie une des constantes courantes : π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), ou ∞ (infini)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "contraindre %1 entre %2 et %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Contraindre un nombre à être entre les limites spécifiées (incluses)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "est divisible par"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "est pair"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "est négatif"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "est impair"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "est positif"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "est premier"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Vérifier si un nombre est pair, impair, premier, entier, positif, négatif, ou s’il est divisible par un certain nombre. Renvoie vrai ou faux."; Blockly.Msg.MATH_IS_WHOLE = "est entier"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "reste de %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Renvoyer le reste de la division des deux nombres."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un nombre."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "moyenne de la liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maximum de la liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "médiane de la liste"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "majoritaires de la liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "élément aléatoire de la liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "écart-type de la liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "somme de la liste"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Renvoyer la moyenne (arithmétique) des valeurs numériques dans la liste."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Renvoyer le plus grand nombre dans la liste."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Renvoyer le nombre médian dans la liste."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "fraction aléatoire"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Renvoyer une fraction aléatoire entre 0.0 (inclus) et 1.0 (exclus)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "entier aléatoire entre %1 et %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Renvoyer un entier aléatoire entre les deux limites spécifiées, incluses."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "arrondir"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "arrondir à l’inférieur"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "arrondir au supérieur"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Arrondir un nombre au-dessus ou au-dessous."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolu"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "racine carrée"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Renvoie la valeur absolue d’un nombre."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Renvoie e à la puissance d’un nombre."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Renvoie le logarithme naturel d’un nombre."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Renvoie 10 à la puissance d’un nombr Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Renvoie la racine carrée d’un nombre."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Renvoie l’arccosinus d’un nombre."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Renvoie l’arcsinus d’un nombre."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Renvoie l’arctangente d’un nombre."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nom de l’entrée :"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Ajouter une entrée à la fonction."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "entrées"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Ajouter, supprimer, ou réarranger les entrées de cette fonction."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Supprimer un commentaire"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/he.js b/msg/js/he.js index e36cc8b2dc1..fd0ce293f9c 100644 --- a/msg/js/he.js +++ b/msg/js/he.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "אדום"; Blockly.Msg.COLOUR_RGB_TITLE = "צבע עם"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "צור צבע עם הסכום המצוין של אדום, ירוק וכחול. כל הערכים חייבים להיות בין 0 ל100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "צא מהלולאה"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "המשך עם האיטרציה הבאה של הלולאה"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "אזהרה: בלוק זה עשו Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "לכל פריט %1 ברשימה %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "לכל פריט ברשימה, להגדיר את המשתנה '%1' לפריט הזה, ולאחר מכן לעשות כמה פעולות."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "תספור עם %1 מ- %2 ל- %3 עד- %4"; Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "תוסיף תנאי לבלוק If."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "לסיום, כל התנאים תקפים לגבי בלוק If."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "תוסיף, תמחק, או תסדר מחדש כדי להגדיר מחדש את הבלוק If."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "אחרת"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "אם ערך נכון, לבצע כמה פע Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "אם הערך הוא אמת, לבצע את הבלוק הראשון של הפעולות. אחרת, לבצע את הבלוק השני של הפעולות."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "אם הערך הראשון הוא אמת, לבצע את הבלוק הראשון של הפעולות. אחרת, אם הערך השני הוא אמת, לבצע את הבלוק השני של הפעולות."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "אם הערך הראשון הוא אמת, לבצע את הבלוק הראשון של הפעולות. אחרת, אם הערך השני הוא אמת, לבצע את הבלוק השני של הפעולות. אם אף אחד מהם אינו נכון, לבצע את הבלוק האחרון של הפעולות."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; // untranslated Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "תעשה"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "חזור על הפעולה %1 פעמים"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "לעשות כמה פעולות מספר פעמים."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "חזור עד ש..."; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "חזור כל עוד"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "בזמן שהערך שווה לשגוי, תעשה מספר חישובים."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "כל עוד הערך הוא אמת, לעשות כמה פעולות."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "מחק קטע קוד"; Blockly.Msg.DELETE_X_BLOCKS = "מחק %1 קטעי קוד"; Blockly.Msg.DISABLE_BLOCK = "נטרל קטע קוד"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "שגוי"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "תחזיר אם נכון או אם שגוי."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "נכון"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "תחזיר נכון אם שני הקלטים שווים אחד לשני."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "תחזיר נכון אם הקלט הראשון גדול יותר מהקלט השני."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "תחזיר נכון אם הקלט הר Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "תחזיר אמת (true) אם הקלט הראשון הוא קטן יותר מאשר הקלט השני."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "תחזיר אמת אם הקלט הראשון הוא קטן יותר או שווה לקלט השני."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "תחזיר אמת אם שני הקלטים אינם שווים זה לזה."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "לא %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "תחזיר ריק."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "ו"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "או"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "תחזיר נכון אם שני הקלטים נכונים."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "תחזיר נכון אם מתקיים לפחות אחד מהקלטים נכונים."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "בדיקה"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "אם שגוי"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "אם נכון"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "בדוק את התנאי ב'מבחן'. אם התנאי נכון, תחזיר את הערך 'אם נכון'; אחרת תחזיר את הערך 'אם שגוי'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://he.wikipedia.org/wiki/ארבע_פעולות_החשבון"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "תחזיר את סכום שני המספרים."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated Blockly.Msg.MATH_CHANGE_TITLE = "change %1 by %2"; // untranslated Blockly.Msg.MATH_CHANGE_TOOLTIP = "הוסף מספר למשתנה '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; // untranslated Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "מתחלק ב"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "זוגי"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "שלילי"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "אי-זוגי"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "חיובי"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "ראשוני"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "שלם"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "שארית החילוק %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "החזרת השארית מחלוקת שני המספרים."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated Blockly.Msg.MATH_NUMBER_TOOLTIP = "מספר."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "ממוצע של רשימה"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "מקסימום של רשימה"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; // untranslated @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "פריט אקראי מרשימה"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "סכום של רשימה"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "תחזיר את המספר הגדול ביותר ברשימה."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "תחזיר את המספר החיצוני ביותר ברשימה."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "עיגול"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "עיגול למטה"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "עיגול למעלה"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "ערך מוחלט"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "square root"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "שם הקלט:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "הוסף קלט לפונקציה"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "מקורות קלט"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "הוסף, הסר או סדר מחדש קלטים לפונקציה זו"; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "הסר הערה"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/hi.js b/msg/js/hi.js index b25f0ef90b2..495c23a8003 100644 --- a/msg/js/hi.js +++ b/msg/js/hi.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "लाल"; Blockly.Msg.COLOUR_RGB_TITLE = "इसके साथ रंग करें"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "लाल, हरा और नीले की निर्दिष्ट मात्रा के साथ एक रंग बनायें। सभी मान ० से १०० के बीच होने चाहिए।"; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "लूप से बाहर निकलें"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "लूप का अगला आईटरेशन जारी रखें"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "सावधान: ये ब Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "प्रत्येक आइटम के लिए %1 सूची में %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "सूची के प्रत्येक आयटम के लिए, आयटम में चर का मान '%1' रखें और बाद में कुछ कथन लिखें।"; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "काउंट करें"; Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "यदि ब्लॉक मे एक शर्त जोड़ें।"; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated Blockly.Msg.CONTROLS_IF_MSG_ELSE = "एल्स"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "यदी मान ट्रू है, Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "यदि एक मान सत्य है तो कथनों का प्रथम खण्ड बनायें। अन्यथा कथनों का दूसरा भाग निर्मित करें।"; Blockly.Msg.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."; // untranslated Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "डू"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 बार दोहराएँ"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "कुछ स्टेट्मन्ट कई बार चलाएँ।"; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "दोहराएँ जब तक"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "दोहराएँ जब कि"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "जब तक मान फॉल्स है, तब तक कुछ स्टेट्मेंट्स चलाएँ।"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "जब तक मान ट्रू है, तब तक कुछ स्टेट्मेंट्स चलाएँ।"; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "ब्लॉक हटाएँ"; Blockly.Msg.DELETE_X_BLOCKS = "%1 ब्लॉक हटाएँ"; Blockly.Msg.DISABLE_BLOCK = "ब्लॉक को अक्षम करें"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "फॉल्स"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "ट्रू या फॉल्स रिटर्न करता है।"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "ट्रू"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "ट्रू रिटर्न करें यदि दोनो इनपुट इक दूसरे के बराबर हों।"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "ट्रू रिटर्न करें यदि पहला इनपुट दूसरे इनपुट से बड़ा हो।"; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "ट्रू रिटर्न कर Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "ट्रू रिटर्न करें यदि पहला इनपुट दूसरे इनपुट से छोटा हो।"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "ट्रू रिटर्न करें यदि पहला इनपुट दूसरे इनपुट से छोटा हो या बराबर हो।"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "ट्रू रिटर्न करें यदि दोनो इनपुट इक दूसरे के बराबर नहीं हों।"; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "NOT (पूरक) %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "ट्रू रिटर्न करता है यदि इनपुट फॉल्स है। फॉल्स रिटर्न करता है यदि इनपुट ट्रू है।"; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "NULL (अमान्य)"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "null (अमान्य) रिटर्न करता है।"; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "AND (तथा)"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "OR (अथवा)"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "ट्रू रिटर्न करें यदि दोनो इनपुट ट्रू हों।"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "ट्रू रिटर्न करें यदि दोनो मे से इक इनपुट ट्रू हो।"; Blockly.Msg.LOGIC_TERNARY_CONDITION = "टेस्ट"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "यदि फॉल्स है"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "यदि ट्रू है"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "दो संख्याओं का योग रिटर्न करें।"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "दो संख्याओं का भागफल रिटर्न करें।"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "दो संख्याओं का अंतर रिटर्न करें।"; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "change %1 by %2"; // untranslated Blockly.Msg.MATH_CHANGE_TOOLTIP = "संख्या को चर '%1' से जोड़ें।"; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; // untranslated Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "इसके द्वारा विभाज्य है"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "सम है"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "ऋणात्मक है"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "विषम है"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "धनात्मक है"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "अभाज्य है"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "पूर्णांक है"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2 का शेषफल"; Blockly.Msg.MATH_MODULO_TOOLTIP = "दो संख्याओं के भाग का शेषफल रिटर्न करें।"; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "एक संख्या।"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "सूची का औसत मान"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "सूची मे अधिकतम"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "सूची की माध्यिका"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "सूची का मोड"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "सूची का रैन्डम आइटम"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "सूची का मानक विचलन"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "सूची का योग"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "सूची मे सबसे बड़ी संख्या रिटर्न करें।"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "सूची की माध्यिका संख्या रिटर्न करें।"; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "रैन्डम अंश"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "%1 से % 2 तक रैन्डम पूर्णांक"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "पूर्णांक बनाएँ"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "घटा के पूर्णांक बनाएँ"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "बड़ा के पूर्णांक बनाएँ"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "संख्या को बड़ा या घटा के पूर्णांक बनाएँ।"; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "परम"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "वर्गमूल"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "संख्या का परम मान रिटर्न करें।"; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "संख्या का प्राकृतिक लघुगणक रिटर्न करें।"; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "संख्या का वर्गमूल रिटर्न करें।"; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "संख्या का आर्ककोसाइन रिटर्न करें।"; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "संख्या का आर्कसाइन रिटर्न करें।"; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "संख्या का आर्कटैन्जन्ट रिटर्न करें।"; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "इनपुट का नाम:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "फंगक्शन को इनपुट प्रदान करें।"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "इनपुट"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "टिप्पणी हटायें"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/hrx.js b/msg/js/hrx.js index 7c5f18c00fb..00bf7017f27 100644 --- a/msg/js/hrx.js +++ b/msg/js/hrx.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rot"; Blockly.Msg.COLOUR_RGB_TITLE = "Färreb mit"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Kreiere ene Farreb mit sellrbst definierte rot, grün und blau Wearte. All Wearte müsse zwischich 0 und 100 liehe."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "ausbreche aus der Schleif"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "mit der nächste Iteration fortfoohre aus der Schleifa"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warnung: Die block sollt nuar in Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "Für Weart %1 aus der List %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Füahr en Oonweisung für jede Weart in der List aus und setzt dabei die Variable \"%1\" uff den aktuelle List Weart."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "Zähl %1 von %2 bis %3 mit %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Zähl die Variable \"%1\" von enem Startweart bis zu enem Zielweart und füahrefür jede Weart en Oonweisung aus."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "En weitre Bedingung hinzufüche."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "En orrer Bedingung hinzufüche, füahrt en Oonweisung aus falls ken Bedingung zutrifft."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Hinzufüche, entferne orrer sortiere von Sektione"; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "orrer"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Wenn en Bedingung woahr (true) ist, dann f Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Wenn en Bedingung woahr (true) ist, dann füahr die earscht Oonweisung aus. Ansonscht füahr die zwooite Oonweisung aus."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Wenn der erschte Bedingung woahr (true) ist, dann füahr die erschte Oonweisung aus. Orrer wenn die zwooite Bedingung woahr (true) ist, dann füahr die zwooite Oonweisung aus."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Wenn der erscht Bedingung woahr (true) ist, dann füahr die erschte Oonweisung aus. Orrer wenn die zwooite Bedingung woahr (true) ist, dann füahr die zwooite Oonweisung aus. Falls ken der beide Bedingungen woahr (true) ist, dann füahr die dritte Oonweisung aus."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://hrx.wikipedia.org/wiki/For-Schleif"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "mach"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "wiederhol %1 mol"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "En Oonweisung meahrfach ausführe."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "Repetiere bis"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "Repetier solang"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Füahr die Oonweisung solang aus wie die Bedingung falsch (false) ist."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Füahr die Oonweisung solang aus wie die Bedingung woahr (true) ist."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Block lösche"; Blockly.Msg.DELETE_X_BLOCKS = "Block %1 lösche"; Blockly.Msg.DISABLE_BLOCK = "Block deaktivieren"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falsch"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Ist entweder woahr (true) orrer falsch (false)"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "woahr"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://hrx.wikipedia.org/wiki/Vergleich_%28Zahlen%29"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Ist woahr (true) wenn beide Wearte identisch sind."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Ist woahr (true) wenn der erschte Weart grösser als der zwooite Weart ist."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Ist woahr (true) wenn der erschte Weart Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Ist woahr (true) wenn der earschte Weart klener als der zwooite Weart ist."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Ist woahr (true) wenn der earscht Weart klener als orrer gleich gross wie zwooite Weart ist."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Ist woahr (true) wenn beide Wearte unnerschiedlich sind."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "net %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Ist woahr (true) wenn der Ingäweweart falsch (false) ist. Ist falsch (false) wenn der Ingäweweart woahr (true) ist."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Is NULL."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "und"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "orrer"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Ist woahr (true) wenn beide Wearte woahr (true) sind."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Ist woahr (true) wenn en von der beide Wearte woahr (true) ist."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "wenn falsch"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "wenn woahr"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Üwerprüft en Bedingung \"test\". Wenn die Bedingung woahr ist weerd der \"wenn woahr\" Weart zurückgeb, annerfalls der \"wenn falsch\" Weart"; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://hrx.wikipedia.org/wiki/Grundrechenoort"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Ist die Summe zwooier Wearte."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Ist der Quotient zwooier Wearte."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Ist die Differenz zwooier Wearte."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Ist der earschte Weart potenziert m Blockly.Msg.MATH_CHANGE_HELPURL = "https://hrx.wikipedia.org/wiki/Inkrement_und_Dekrement"; Blockly.Msg.MATH_CHANGE_TITLE = "mach höcher / erhöhe %1 um %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Addiert en Weart zur Variable \"%1\" hinzu."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://hrx.wikipedia.org/wiki/Mathematische_Konstante"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Mathematische Konstante wie: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…) oder ∞ (unendlich)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "begrenze %1 von %2 bis %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Begrenzt den Weartebereich mittels von / bis Wearte. (inklusiv)"; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "ist telbar/kann getelt sin doorrich"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "ist grood"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "ist negativ"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "ist ungrood"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "ist positiv"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "ist en Primenzoohl"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Üwerprüft ob en Zoohl grood, ungrood, en Primenzoohl, ganzzoohlich, positiv, negativ orrer doorrich en zwooite Zoohl telbar ist. Gebt woahr (true) orrer falsch (false) zurück."; Blockly.Msg.MATH_IS_WHOLE = "ganze Zoohl"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://hrx.wikipedia.org/wiki/Modulo"; Blockly.Msg.MATH_MODULO_TITLE = "Rest von %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Der Rest noh en Division."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://hrx.wikipedia.org/wiki/Zoohl"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "En Zoohl."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Mittelweart en List"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Maximalweart en List"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Median von en List"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "Restweart von en List"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Zufallsweart von en List"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "Standart/Padrong Abweichung von en List"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Summe von en List"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Ist der Doorrichschnittsweart von aller Wearte in en List."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Ist der grösste Weart in en List."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Ist der Zentralweart von aller Wearte in en List."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://hex.wikipedia.org/wiki/Zufallszoohle"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Zufallszoohl (0.0 -1.0)"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Generier/erzeich en Zufallszoohl zwischich 0.0 (inklusiv) und 1.0 (exklusiv)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://hrx.wikipedia.org/wiki/Zufallszahlen"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "ganzoohlicher Zufallswearte zwischich %1 bis %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Generier/erzeich en ganzähliche Zufallsweart zwischich zwooi Wearte (inklusiv)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://hrx.wikipedia.org/wiki/Runden"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "runde"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ab runde"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "uff runde"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "En Zoohl uff orrer ab runde."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://hrx.wikipedia.org/wiki/Quadratwoorzel"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "Absolutweart"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "Quadratwoorzel"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Ist der Absolutweart von en Weart."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Ist Weart von der Exponentialfunktion von en Weart."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Ist der natüarliche Logarithmus von en Weart."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Rechnet 10 hoch Ingäbweart."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Ist die Qudratwoorzel von en Weart."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://hrx.wikipedia.org/wiki/Trigonometrie"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Ist der Arcuscosinus von en Ingabweart."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Ist der Arcussinus von en Ingäbweart."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Ist der Arcustangens von en Ingäbweart."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Markiear Funktionsblock"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Generier/erzeich \"Uffruf %1\""; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "Parameter"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Variable:"; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Kommentar entferne"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/hu.js b/msg/js/hu.js index d63c110523a..617dcadf564 100644 --- a/msg/js/hu.js +++ b/msg/js/hu.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "piros"; Blockly.Msg.COLOUR_RGB_TITLE = "Szín"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Szín előállítása a megadott vörös, zöld, és kék értékekkel. Minden értéknek 0 és 100 közé kell esnie."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "befejezi az ismétlést"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "folytatja a következővel"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Figyelem: Ez a blokk, csak egy c Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "Minden %1 elemre a %2 listában"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "A lista elemszámának megfelelő lépésszámú ciklus. A \"%1\" változó minden lépésben megkapja a lista adott elemének értékét. Minden lépésben végrehajtódnak az utasítások."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "Számold ki %1 értékét %2 és %3 között, lépésköz: %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Véges lépésszámú ciklus. A \"%1\" változó értékét számolja ki a kezdőérték és a végérték között. Minden lépésben végrehajtódnak az utasítások."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Újabb feltételes elágazás."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Végső, 'egyébként' feltételt ad a 'ha' blokkhoz."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "A feltételes elágazás (ha) blokk testreszabásához bővítsd, töröld vagy rendezd át a részeit."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "különben"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Ha a kifejezés igaz, akkor végrehajtjuk a Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Ha a kifejezés igaz, akkor végrehajtjuk az első utasítás blokkot. Különben a második utasítás blokk kerül végrehajtásra."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Ha az első kifejezés igaz, akkor végrehajtjuk az első utasítás blokkot. Ha a második kifejezés igaz, akkor végrehajtjuk a második utasítás blokkot."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Ha az első kifejezés igaz, akkor végrehajtjuk az első utasítás blokkot. Ha a második kifejezés igaz, akkor végrehajtjuk a második utasítás blokkot. Amennyiben egyik kifejezés sem igaz, akkor az utolsó utasítás blokk kerül végrehajtásra."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://hu.wikipedia.org/wiki/Ciklus_(programoz%C3%A1s)#Sz.C3.A1ml.C3.A1l.C3.B3s_.28FOR.29_ciklus"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = ""; Blockly.Msg.CONTROLS_REPEAT_TITLE = "Ismételd %1 alkalommal"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Megadott kódrészlet ismételt végrehajtása."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "Ismételd amíg nem"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "ismételd amíg"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Amíg a feltétel hamis, végrehajtja az utasításokat."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Amíg a feltétel igaz, végrehajtja az utasításokat."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Blokk törlése"; Blockly.Msg.DELETE_X_BLOCKS = "%1 blokk törlése"; Blockly.Msg.DISABLE_BLOCK = "Blokk letiltása"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "A lista elemeit összefűzi szöveggé a Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Listát készít a határoló karaktereknél törve a szöveget."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "határoló karakter"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "hamis"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Igaz, vagy Hamis érték"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "igaz"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://hu.wikipedia.org/wiki/Egyenl%C5%91tlens%C3%A9g"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Igaz, ha a kifejezés két oldala egyenlő."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Igaz, ha a bal oldali kifejezés nagyobb, mint a jobb oldali."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Igaz, ha a bal oldali kifejezés nagyob Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Igaz, ha a bal oldali kifejezés kisebb, mint a jobb oldali."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Igaz, ha a bal oldali kifejezés kisebb vagy egyenlő, mint a jobb oldali."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Igaz, ha a kifejezés két oldala nem egyenlő.."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "nem %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Igaz, ha a kifejezés hamis. Hamis, ha a kifejezés igaz."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "null érték."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "és"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "vagy"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Igaz, ha mindkét kifejezés igaz."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Igaz, ha bármelyik kifejezés igaz."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "teszt"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "érték, ha hamis:"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "érték, ha igaz:"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kiértékeli a kifejezést. Ha a kifejezés igaz visszatér az \"érték, ha igaz\" értékkel, különben az \"érték, ha hamis\" értékkel."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://hu.wikipedia.org/wiki/Matematikai_m%C5%B1velet"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Két szám összege."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Két szám hányadosa."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Két szám különbsége."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Az első számnak a második számm Blockly.Msg.MATH_CHANGE_HELPURL = "https://hu.wikipedia.org/wiki/JavaScript#Aritmetikai_oper.C3.A1torok"; Blockly.Msg.MATH_CHANGE_TITLE = "módosítsd %1 értékét, (növekmény)ː %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "A(z) \"%1\" változó értékének növelése."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://hu.wikipedia.org/wiki/Matematikai_konstans"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Ismert matematikai konstans: π (3.141…), e (2.718…), φ (1.618…), gyök(2) (1.414…), gyök(½) (0.707…), vagy ∞ (végtelen)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "korlátozd %1 -t %2 és %3 közé"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Egy változó értékének korlátozása a megadott zárt intervallumra."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "osztható ezzel?:"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "páros szám?"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "negatív szám?"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "páratlan szám?"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "pozitív szám?"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "prímszám?"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Megadja a számról, hogy páros, páratlan, prím, egész, pozitív vagy negatív szám, illetve osztható-e a másodikkal. Igaz, vagy Hamis értéket ad eredményül."; Blockly.Msg.MATH_IS_WHOLE = "egész szám?"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://hu.wikipedia.org/wiki/Eg%C3%A9szr%C3%A9sz#Als.C3.B3_eg.C3.A9szr.C3.A9sz"; Blockly.Msg.MATH_MODULO_TITLE = "maradék %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Az egész osztás maradékát adja eredméynül."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://hu.wikipedia.org/wiki/Sz%C3%A1m"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Egy szám."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "lista elemeinek átlaga"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "lista legnagyobb eleme"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "lista mediánja"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "lista módusza"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "lista véletlen eleme"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "lista elemeinek szórása"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "lista elemeinek összege"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "A lista elemeinek átlagát adja eredményül."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "A lista legnagyobb elemét adja vissza."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "A lista elemeinek mediánját adja eredményül."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://hu.wikipedia.org/wiki/V%C3%A9letlen"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "véletlen tört"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Véletlen tört érték 0.0 és 1.0 között."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://hu.wikipedia.org/wiki/V%C3%A9letlen"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "véletlen egész szám %1 között %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Véletlen egész szám a megadott zárt intervallumon belül."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://hu.wikipedia.org/wiki/Eg%C3%A9szr%C3%A9sz#Kerek.C3.ADt.C3.A9s"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "Kerekítés"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "Lekerekítés"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "Felkerekítés"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Kerekítés a következő, vagy megelőző egész számra."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://hu.wikipedia.org/wiki/Gy%C3%B6kvon%C3%A1s"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "abszolútérték"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "négyzetgyök"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "A szám abszolútértéke."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Az e megadott számú hatványa."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "A szám természetes alapú logaritmusa."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "A 10 megadott számú hatványa."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "A szám négyzetgyöke."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://hu.wikipedia.org/wiki/Sz%C3%B6gf%C3%BCggv%C3%A9nyek"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "A fokban megadott szög arkusz koszinusz értéke."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "A fokban megadott szög arkusz szinusz értéke."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "A fokban megadott szög arkusz tangens értéke."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "változó:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Bemenet hozzáadása a függvényhez."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "paraméterek"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Bemenetek hozzáadása, eltávolítása vagy átrendezése ehhez a függvényhez."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Megjegyzés törlése"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/ia.js b/msg/js/ia.js index 5ecb3d0fdd9..12819661383 100644 --- a/msg/js/ia.js +++ b/msg/js/ia.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rubie"; Blockly.Msg.COLOUR_RGB_TITLE = "colorar con"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Crear un color con le quantitate specificate de rubie, verde e blau. Tote le valores debe esser inter 0 e 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "escappar del bucla"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continuar con le proxime iteration del bucla"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Attention: Iste bloco pote solme Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pro cata elemento %1 in lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pro cata elemento in un lista, mitter lo in le variabile '%1' e exequer certe instructiones."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "contar con %1 de %2 a %3 per %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Mitter in le variabile \"%1\" le valores ab le numero initial usque al numero final, con passos secundo le intervallo specificate, e exequer le blocos specificate."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Adder un condition al bloco \"si\"."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Adder un condition final de reserva al bloco \"si\"."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Adde, remove o reordina sectiones pro reconfigurar iste bloco \"si\"."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "si non"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Si un valor es ver, exequer certe instructi Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Si un valor es ver, exequer le prime bloco de instructiones. Si non, exequer le secunde bloco de instructiones."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Si le prime valor es ver, exequer le prime bloco de instructiones. Si non, si le secunde valor es ver, exequer le secunde bloco de instructiones."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Si le prime valor es ver, exequer le prime bloco de instructiones. Si non, si le secunde valor es ver, exequer le secunde bloco de instructiones. Si necun del valores es ver, exequer le ultime bloco de instructiones."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "face"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repeter %1 vices"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Exequer certe instructiones plure vices."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repeter usque a"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repeter durante que"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Durante que un valor es false, exequer certe instructiones."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Durante que un valor es ver, exequer certe instructiones."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Deler bloco"; Blockly.Msg.DELETE_X_BLOCKS = "Deler %1 blocos"; Blockly.Msg.DISABLE_BLOCK = "Disactivar bloco"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "false"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Retorna o ver o false."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "ver"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Retornar ver si le duo entratas es equal."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Retornar ver si le prime entrata es major que le secunde."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Retornar ver si le prime entrata es maj Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Retornar ver si le prime entrata es minor que le secunde."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Retornar ver si le prime entrata es minor que o equal al secunde."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Retornar ver si le duo entratas non es equal."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "non %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Retornar ver si le entrata es false. Retornar false si le entrata es ver."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nulle"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Retorna nulle."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "e"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "o"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Retornar ver si ambe entratas es ver."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Retornar ver si al minus un del entratas es ver."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si false"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si ver"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Verificar le condition in 'test'. Si le condition es ver, retorna le valor de 'si ver'; si non, retorna le valor de 'si false'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://ia.wikipedia.org/wiki/Arithmetica"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Retornar le summa del duo numeros."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Retornar le quotiente del duo numeros."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Retornar le differentia del duo numeros."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Retornar le prime numero elevate al Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated Blockly.Msg.MATH_CHANGE_TITLE = "cambiar %1 per %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Adder un numero al variabile '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Retornar un del constantes commun: π (3,141…), e (2,718…), φ (1,618…), sqrt(2) (1,414…), sqrt(½) (0,707…) o ∞ (infinite)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "limitar %1 inter %2 e %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Limitar un numero a esser inter le limites specificate (incluse)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "es divisibile per"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "es par"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "es negative"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "es impare"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "es positive"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "es prime"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Verificar si un numero es par, impare, prime, integre, positive, negative, o divisibile per un certe numero. Retorna ver o false."; Blockly.Msg.MATH_IS_WHOLE = "es integre"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "resto de %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Retornar le resto del division del duo numeros."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://ia.wikipedia.org/wiki/Numero"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un numero."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "media del lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maximo del lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana del lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modas del lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "elemento aleatori del lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "deviation standard del lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "summa del lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Retornar le media arithmetic del valores numeric in le lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Retornar le numero le plus grande in le lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Retornar le numero median del lista."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "fraction aleatori"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Retornar un fraction aleatori inter 0.0 (incluse) e 1.0 (excluse)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "numero integre aleatori inter %1 e %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Retornar un numero integre aleatori inter le duo limites specificate, incluse."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://ia.wikipedia.org/wiki/Rotundamento"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "arrotundar"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "arrotundar a infra"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "arrotundar a supra"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Arrotundar un numero a supra o a infra."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://ia.wikipedia.org/wiki/Radice_quadrate"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolute"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "radice quadrate"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Retornar le valor absolute de un numero."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Retornar e elevate al potentia del numero."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Retornar le logarithmo natural de un numero."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Retornar 10 elevate al potentia de un n Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Retornar le radice quadrate de un numero."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Retornar le arcocosino de un numero."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Retornar le arcosino de un numero."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Retornar le arcotangente de un numero."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nomine del entrata:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Adder un entrata al function."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "entratas"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Adder, remover o reordinar le entratas pro iste function."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Remover commento"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/id.js b/msg/js/id.js index 98eacea63fc..7500c770e0a 100644 --- a/msg/js/id.js +++ b/msg/js/id.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "merah"; Blockly.Msg.COLOUR_RGB_TITLE = "Dengan warna"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Buatlah warna dengan jumlah yang ditentukan dari merah, hijau dan biru. Semua nilai harus antarai 0 sampai 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "Keluar dari perulangan"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "Lanjutkan dengan langkah penggulangan berikutnya"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Peringatan: Blok ini hanya dapat Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "untuk setiap item %1 di dalam list %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Untuk tiap-tiap item di dalam list, tetapkan variabel '%1' ke dalam item, selanjutnya kerjakan beberapa statement."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "Cacah dengan %1 dari %2 ke %3 dengan step / penambahan %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Menggunakan variabel \"%1\" dengan mengambil nilai dari batas awal hingga ke batas akhir, dengan interval tertentu, dan mengerjakan block tertentu."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "tambahkan prasyarat ke dalam blok IF."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Terakhir, tambahkan tangkap-semua kondisi kedalam blok jika (if)."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Menambahkan, menghapus, atau menyusun kembali bagian untuk mengkonfigurasi blok IF ini."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "else"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "jika nilainya benar maka kerjakan perintah Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "jika nilainya benar, maka kerjakan blok perintah yang pertama. Jika tidak, kerjakan blok perintah yang kedua."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Jika nilai pertama adalah benar (true), maka lakukan perintah-perintah yang berada didalam blok pertama. Jika nilai kedua adalah benar (true), maka lakukan perintah-perintah yang berada didalam blok kedua."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Jika blok pertama adalah benar (true), maka lakukan perintah-perintah yang berada didalam blok pertama. Atau jika blok kedua adalah benar (true), maka lakukan perintah-perintah yang berada didalam blok kedua."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "kerjakan"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "ulangi %1 kali"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Lakukan beberapa perintah beberapa kali."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "Ulangi sampai"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "Ulangi jika"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Jika sementara nilai tidak benar (false), maka lakukan beberapa perintah."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Jika sementara nilai benar (true), maka lakukan beberapa perintah."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Hapus blok"; Blockly.Msg.DELETE_X_BLOCKS = "Hapus %1 blok"; Blockly.Msg.DISABLE_BLOCK = "Nonaktifkan blok"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "Salah"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Mengembalikan betul (true) atau salah (false)."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "Benar"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Mengembalikan betul jika input kedua-duanya sama dengan satu sama lain."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Mengembalikan nilai benar (true) jika input yang pertama lebih besar dari input yang kedua."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Mengembalikan nilai benar (true) jika i Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Mengembalikan nilai benar (true) jika input yang pertama lebih kecil dari input yang kedua."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Mengembalikan nilai benar (true) jika input yang pertama lebih kecil atau sama dengan input yang kedua ."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Mengembalikan nilai benar (true) jika kedua input tidak sama satu dengan yang lain."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "bukan (not) %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Mengembalikan nilai benar (true) jika input false. Mengembalikan nilai salah (false) jika input true."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "mengembalikan kosong."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "dan"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "atau"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Kembalikan betul jika kedua-dua input adalah betul."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Mengembalikan nilai benar (true) jika setidaknya salah satu masukan nilainya benar (true)."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jika tidak benar (false)"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "jika benar (true)"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Periksa kondisi di \"test\". Jika kondisi benar (true), mengembalikan nilai \"jika benar\" ; Jik sebaliknya akan mengembalikan nilai \"jika salah\"."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://id.wikipedia.org/wiki/Aritmetika"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Kembalikan jumlah dari kedua angka."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Kembalikan hasil bagi dari kedua angka."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Kembalikan selisih dari kedua angka."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Kembalikan angka pertama pangkat an Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "ubah %1 oleh %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Tambahkan angka kedalam variabel '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Kembalikan salah satu konstanta: π (3,141…), e (2,718…), φ (1,618…), akar(2) (1,414…), akar(½) (0.707…), atau ∞ (tak terhingga)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "Batasi %1 rendah %2 tinggi %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Batasi angka antara batas yang ditentukan (inklusif)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "dibagi oleh"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "adalah bilangan genap"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "adalah bilangan negatif"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "adalah bilangan ganjil"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "adalah bilangan positif"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "adalah bilangan pokok"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Periksa apakah angka adalah bilangan genap, bilangan pokok, bilangan bulat, bilangan positif, bilangan negatif, atau apakan bisa dibagi oleh angka tertentu. Mengembalikan benar (true) atau salah (false)."; Blockly.Msg.MATH_IS_WHOLE = "adalah bilangan bulat"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "sisa %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Kembalikan sisa dari pembagian ke dua angka."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Suatu angka."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "rata-rata dari list (daftar)"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maximum dari list (daftar)"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median dari list (daftar)"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "mode-mode dari list (daftar)"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "item acak dari list (daftar)"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "deviasi standar dari list (daftar)"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "jumlah dari list (daftar)"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Kembalikan rata-rata (mean aritmetik) dari nilai numerik dari list (daftar)."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Kembalikan angka terbesar dari list."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Kembalikan median dari list."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Nilai pecahan acak"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Mengembalikan nilai acak pecahan antara 0.0 (inklusif) dan 1.0 (ekslusif)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "acak bulat dari %1 sampai %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Mengembalikan bilangan acak antara dua batas yang ditentukan, inklusif."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "membulatkan"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "membulatkan kebawah"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "mengumpulkan"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Bulatkan suatu bilangan naik atau turun."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "mutlak"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "akar"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Kembalikan nilai absolut angka."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Kembalikan 10 pangkat angka."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Kembalikan logaritma natural dari angka."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Kembalikan 10 pangkat angka."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Kembalikan akar dari angka."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Kembalikan acosine dari angka."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Kembalikan asin dari angka."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Kembalikan atan dari angka."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "masukan Nama:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "input"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Hapus komentar"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/is.js b/msg/js/is.js index 5777f4f3157..d6b72066b23 100644 --- a/msg/js/is.js +++ b/msg/js/is.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rauður"; Blockly.Msg.COLOUR_RGB_TITLE = "litur"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Búa til lit úr tilteknu magni af rauðu, grænu og bláu. Allar tölurnar verða að vera á bilinu 0 til 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "fara út úr lykkju"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "fara beint í næstu umferð lykkjunnar"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Aðvörun: Þennan kubb má aðe Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "fyrir hvert %1 í lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Fyrir hvert atriði í lista er breyta '%1' stillt á atriðið og skipanir gerðar."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; Blockly.Msg.CONTROLS_FOR_TITLE = "telja með %1 frá %2 til %3 um %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Láta breytuna \"%1\" taka inn gildi frá fyrstu tölu til síðustu tölu hlaupandi á bilinu og endurtaka kubbana fyrir hverja tölu."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Bæta skilyrði við EF kubbinn."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Bæta við hluta EF kubbs sem grípur öll tilfelli sem uppfylla ekki hin skilyrðin."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Bæta við, fjarlægja eða umraða til að breyta skipan þessa EF kubbs."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "annars"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Ef gildi er satt skal gera einhverjar skipa Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Ef gildi er satt skal gera skipanir í fyrri kubbnum. Annars skal gera skipanir í seinni kubbnum."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Ef fyrra gildið er satt skal gera skipanir í fyrri kubbnum. Annars, ef seinna gildið er satt, þá skal gera skipanir í seinni kubbnum."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Ef fyrra gildið er satt skal gera skipanir í fyrri kubbnum. Annars, ef seinna gildið er satt, skal gera skipanir í seinni kubbnum. Ef hvorugt gildið er satt, skal gera skipanir í síðasta kubbnum."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "gera"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "endurtaka %1 sinnum"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Gera eitthvað aftur og aftur."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "endurtaka þar til"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "endurtaka á meðan"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Endurtaka eitthvað á meðan gildi er ósatt."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Endurtaka eitthvað á meðan gildi er satt."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Eyða kubbi"; Blockly.Msg.DELETE_X_BLOCKS = "Eyða %1 kubbum"; Blockly.Msg.DISABLE_BLOCK = "Óvirkja kubb"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Sameinar lista af textum í einn texta, Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Skiptir texta í lista af textum, með skil við hvert skiltákn."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "með skiltákni"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ósatt"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Skilar annað hvort sönnu eða ósönnu."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "satt"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Skila sönnu ef inntökin eru jöfn."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Skila sönnu ef fyrra inntakið er stærra en seinna inntakið."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Skila sönnu ef fyrra inntakið er stæ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Skila sönnu ef fyrra inntakið er minna en seinna inntakið."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Skila sönnu ef fyrra inntakið er minna en eða jafnt og seinna inntakið."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Skila sönnu ef inntökin eru ekki jöfn."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; Blockly.Msg.LOGIC_NEGATE_TITLE = "ekki %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Skilar sönnu ef inntakið er ósatt. Skilar ósönnu ef inntakið er satt."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "tómagildi"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Skilar tómagildi."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "og"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; Blockly.Msg.LOGIC_OPERATION_OR = "eða"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Skila sönnu ef bæði inntökin eru sönn."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Skila sönnu ef að minnsta kosti eitt inntak er satt."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "prófun"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ef ósatt"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ef satt"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kanna skilyrðið í 'prófun'. Skilar 'ef satt' gildinu ef skilyrðið er satt, en skilar annars 'ef ósatt' gildinu."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Skila summu talnanna tveggja."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Skila deilingu talnanna."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Skila mismun talnanna."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Skila fyrri tölunni í veldinu sei Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "breyta %1 um %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Bæta tölu við breytu '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Skila algengum fasta: π (3.141…), e (2.718…), φ (1.618…), kvrót(2) (1.414…), kvrót(½) (0.707…) eða ∞ (óendanleika)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "þröngva %1 lægst %2 hæst %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Þröngva tölu til að vera innan hinna tilgreindu marka (að báðum meðtöldum)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "er\u00A0deilanleg með"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "er\u00A0jöfn tala"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "er neikvæð"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "er oddatala"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "er jákvæð"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "er prímtala"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Kanna hvort tala sé jöfn tala, oddatala, jákvæð, neikvæð eða deilanleg með tiltekinni tölu. Skilar sönnu eða ósönnu."; Blockly.Msg.MATH_IS_WHOLE = "er heiltala"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "afgangur af %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Skila afgangi deilingar með tölunum."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Tala."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "meðaltal lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "stærst í lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "miðgildi lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "tíðast í lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "eitthvað úr lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "staðalfrávik lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "summa lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Skila meðaltali talna í listanum."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Skila stærstu tölu í listanum."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Skila miðgildi listans."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "slembibrot"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Skila broti sem er valið af handahófi úr tölum á bilinu frá og með 0.0 til (en ekki með) 1.0."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "slembitala frá %1 til %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Skila heiltölu sem valin er af handahófi og er innan tilgreindra marka, að báðum meðtöldum."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "námunda"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "námunda niður"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "námunda upp"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Námunda tölu upp eða niður."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "algildi"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "kvaðratrót"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Skila algildi tölu."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Skila e í veldi tölu."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Skila náttúrlegum lógaritma tölu."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Skila 10 í veldi tölu."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Skila kvaðratrót tölu."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Skila arkarkósínusi tölu."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Skila arkarsínusi tölu."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Skila arkartangensi tölu."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "heiti inntaks:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Bæta inntaki við fallið."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inntök"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Bæta við, fjarlægja eða umraða inntökum fyrir þetta fall."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Fjarlægja skýringu"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/it.js b/msg/js/it.js index d1fcb9b3226..08a8d388732 100644 --- a/msg/js/it.js +++ b/msg/js/it.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rosso"; Blockly.Msg.COLOUR_RGB_TITLE = "colora con"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Crea un colore con la quantità specificata di rosso, verde e blu. Tutti i valori devono essere compresi tra 0 e 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "esce dal ciclo"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "prosegui con la successiva iterazione del ciclo"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Attenzioneː Questo blocco può Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "per ogni elemento %1 nella lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Per ogni elemento in una lista, imposta la variabile '%1' pari all'elemento e quindi esegue alcune istruzioni."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "conta con %1 da %2 a %3 per %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Fa sì che la variabile '%1' prenda tutti i valori a partire dal numero di partenza fino a quello di arrivo, con passo pari all'intervallo specificato, ed esegue il blocco indicato."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Aggiungi una condizione al blocco se."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Aggiungi una condizione finale pigliatutto al blocco se."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Aggiungi, elimina o riordina le sezioni per riconfigurare questo blocco se."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "altrimenti"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Se un valore è vero allora esegue alcune i Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Se un valore è vero allora esegue il primo blocco di istruzioni. Altrimenti esegue il secondo blocco di istruzioni."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Se il primo valore è vero allora esegue un primo blocco di istruzioni. Altrimenti, se il secondo valore è vero, esegue un secondo blocco di istruzioni."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Se il primo valore è vero allora esegue un primo blocco di istruzioni. Altrimenti, se il secondo valore è vero, esegue un secondo blocco di istruzioni. Se nessuno dei valori è vero esegue l'ultimo blocco di istruzioni."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://it.wikipedia.org/wiki/Ciclo_for"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "fai"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "ripeti %1 volte"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Esegue alcune istruzione diverse volte."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "ripeti fino a che"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "ripeti mentre"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Finché un valore è falso, esegue alcune istruzioni."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Finché un valore è vero, esegue alcune istruzioni."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Cancella blocco"; Blockly.Msg.DELETE_X_BLOCKS = "Cancella %1 blocchi"; Blockly.Msg.DISABLE_BLOCK = "Disattiva blocco"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Unisci una lista di testi in un unico te Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Dividi il testo in un elenco di testi, interrompendo ad ogni delimitatore."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "con delimitatore"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falso"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Restituisce vero o falso."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "vero"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://it.wikipedia.org/wiki/Disuguaglianza"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Restituisce vero se gli input sono uno uguale all'altro."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Restituisce vero se il primo input è maggiore o uguale al secondo."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Restituisce uguale se il primo input è Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Restituisce vero se il primo input è minore del secondo."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Restituisce vero se il primo input è minore o uguale al secondo."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Restituisce vero se gli input non sono uno uguale all'altro."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "non %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Restituisce vero se l'input è falso. Restituisce falso se l'input è vero."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nullo"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Restituisce valore nullo."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "e"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "o"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Restituisce vero se entrambi gli input sono veri."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Restituisce vero se almeno uno degli input è vero."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se falso"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se vero"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Verifica la condizione in 'test'. Se questa è vera restituisce il valore 'se vero' altrimenti restituisce il valore 'se falso'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://it.wikipedia.org/wiki/Aritmetica"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Restituisce la somma dei due numeri."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Restituisce il quoziente dei due numeri."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Restituisce la differenza dei due numeri."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Restituisce il primo numero elevato Blockly.Msg.MATH_CHANGE_HELPURL = "https://it.wikipedia.org/wiki/Addizione"; Blockly.Msg.MATH_CHANGE_TITLE = "cambia %1 di %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Aggiunge un numero alla variabile '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://it.wikipedia.org/wiki/Costante_matematica"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Restituisce una delle costanti comuniː π (3.141…), e (2.718…), φ (1.618…), radq(2) (1.414…), radq(½) (0.707…) o ∞ (infinito)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "costringi %1 da %2 a %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Costringe un numero all'interno dei limiti indicati (compresi)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "è divisibile per"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "è pari"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "è negativo"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "è dispari"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "è positivo"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "è primo"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Verifica se un numero è pari, dispari, primo, intero, positivo, negativo o se è divisibile per un certo numero. Restituisce vero o falso."; Blockly.Msg.MATH_IS_WHOLE = "è intero"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://it.wikipedia.org/wiki/Resto"; Blockly.Msg.MATH_MODULO_TITLE = "resto di %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Restituisce il resto della divisione di due numeri."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://it.wikipedia.org/wiki/Numero"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un numero."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "media della lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "massimo della lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana della lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "mode della lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "elemento casuale della lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "deviazione standard della lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "somma la lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Restituisce la media (media aritmetica) dei valori numerici nella lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Restituisce il più grande numero della lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Restituisce il valore mediano della lista."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://it.wikipedia.org/wiki/Numeri_pseudo-casuali"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "frazione casuale"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Restituisce una frazione compresa fra 0.0 (incluso) e 1.0 (escluso)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://it.wikipedia.org/wiki/Numeri_pseudo-casuali"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "intero casuale da %1 a %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Restituisce un numero intero casuale compreso tra i due limiti indicati (inclusi)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://it.wikipedia.org/wiki/Arrotondamento"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "arrotonda"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "arrotonda verso il basso"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "arrotonda verso l'alto"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Arrotonda un numero verso l'alto o verso il basso."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://it.wikipedia.org/wiki/Radice_quadrata"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "assoluto"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "radice quadrata"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Restituisce il valore assoluto del numero."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Restituisce e elevato alla potenza del numero."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Restituisce il logaritmo naturale del numero."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Restituisce 10 elevato alla potenza del Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Restituisce la radice quadrata del numero."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://it.wikipedia.org/wiki/Funzione_trigonometrica"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Restituisce l'arco-coseno di un numero."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Restituisce l'arco-seno di un numero."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Restituisce l'arco-tangente di un numero."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nome inputː"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Aggiungi un input alla funzione."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "input"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Aggiungi, rimuovi o riordina input alla funzione."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Rimuovi commento"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/ja.js b/msg/js/ja.js index b5907a6fc9b..4726a5838f2 100644 --- a/msg/js/ja.js +++ b/msg/js/ja.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "赤"; Blockly.Msg.COLOUR_RGB_TITLE = "カラーと"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "赤、緑、および青の指定された量で色を作成します。すべての値は 0 ~ 100 の間でなければなりません。"; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "ループから抜け出す"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "ループの次の反復処理を続行します。"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "注意: このブロックは、 Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "各項目の %1 リストで %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "リストの各項目に対して変数 '%1' のアイテムに設定し、いくつかのステートメントをしてください。"; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "で、カウントします。 %1 %2 から%3、 %4 で"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "変数 \"%1\"は、指定した間隔ごとのカウントを開始番号から 終了番号まで、値をとり、指定したブロックを行う必要があります。"; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "場合に条件にブロック追加。"; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Ifブロックに、すべてをキャッチする条件を追加。"; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "追加、削除、またはセクションを順序変更して、ブロックをこれを再構成します。"; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "他"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "値が true の場合はその後ステー Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "値が true 場合は、ステートメントの最初のブロックを行います。それ以外の場合は、ステートメントの 2 番目のブロックを行います。"; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "最初の値が true 場合は、ステートメントの最初のブロックを行います。それ以外の場合は、2 番目の値が true の場合、ステートメントの 2 番目のブロックをします。"; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "最初の値が true 場合は、ステートメントの最初のブロックを行います。2 番目の値が true の場合は、ステートメントの 2 番目のブロックを行います。それ以外の場合は最後のブロックのステートメントを行います。"; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://ja.wikipedia.org/wiki/for文"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "してください"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 回、繰り返します"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "いくつかのステートメントを数回行います。"; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "までを繰り返します"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "つつその間、繰り返す4"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "値は false のあいだ、いくつかのステートメントを行います。"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "値は true のあいだ、いくつかのステートメントを行います。"; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "ブロックを消す"; Blockly.Msg.DELETE_X_BLOCKS = "%1 個のブロックを消す"; Blockly.Msg.DISABLE_BLOCK = "ブロックを無効にします。"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "false"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "True または false を返します。"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "true"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://ja.wikipedia.org/wiki/不等式"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "もし両方がお互いに等しく入力した場合は true を返します。"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "最初の入力が 2 番目の入力よりも大きい場合は true を返します。"; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "もし入力がふたつめの入より Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "最初の入力が 2 番目の入力よりも小さいい場合は true を返します。"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "もし、最初の入力が二つ目入力より少ないか、おなじであったらTRUEをかえしてください"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "両方の入力が互いに等しくない場合に true を返します。"; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://ja.wikipedia.org/wiki/否定"; Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 ではないです。"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "入力が false の場合は、true を返します。入力が true の場合は false を返します。"; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Null を返します。"; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "そして"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "または"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "両方の入力がおんなじ場わいわtrue を返します。"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "最低少なくとも 1 つの入力が true の場合は true を返します。"; Blockly.Msg.LOGIC_TERNARY_CONDITION = "テスト"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://ja.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "false の場合"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "true の場合"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'テスト' の条件をチェックします。条件が true の場合、'true' の値を返します。それ以外の場合 'false' のを返します。"; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://ja.wikipedia.org/wiki/算術"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "2 つの数の合計を返します。"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "2 つの数の商を返します。"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "2 つの数の差を返します。"; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "最初の数を2 番目の値で累 Blockly.Msg.MATH_CHANGE_HELPURL = "https://ja.wikipedia.org/wiki/加法"; Blockly.Msg.MATH_CHANGE_TITLE = "変更 %1 に %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "'%1' をたします。"; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://ja.wikipedia.org/wiki/数学定数"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "いずれかの共通の定数のを返す: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (無限)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "制限%1下リミット%2上限リミット%3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "値を、上限 x と下限 y のあいだに制限んする(上限と下限が、x と y とに同じ場合わ、上限の値は x, 下限の値はy)。"; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "割り切れる"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "わ偶数"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "負の値"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "奇数です。"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "正の値"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "素数です"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "数字が、偶数、奇数、素数、整数、正数、負数、またはそれが特定の数で割り切れる場合かどうかを確認してください。どの制限が一つでも本当でしたら true をかえしてください、そうでない場合わ falseを返してください。"; Blockly.Msg.MATH_IS_WHOLE = "は整数"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "残りの %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "2 つの数値を除算した残りを返します。"; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://ja.wikipedia.org/wiki/数"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "数です。"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "リストの平均"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "リストの最大値"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "リストの中央値"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "一覧モード"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "リストのランダム アイテム"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "リストの標準偏差"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "リストの合計"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "リストの数値の平均 (算術平均) を返します。"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "リストの最大数を返します。"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "リストの中央値の数を返します。"; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "ランダムな分数"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "ランダムな分数を返すー0.0 (包括) の間のと 1.0 (排他的な)。"; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "%1 から %2 への無作為の整数"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "指定した下限の間、無作為なランダムな整数を返します。"; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://ja.wikipedia.org/wiki/端数処理"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "概数"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "端数を切り捨てる"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "数値を切り上げ"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "数値を切り上げるか切り捨てる"; Blockly.Msg.MATH_SINGLE_HELPURL = "https://ja.wikipedia.org/wiki/平方根"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "絶対値"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "平方根"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "絶対値を返す"; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "数値の e 粂を返す"; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "数値の自然対数をかえしてください"; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "10の x 乗"; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "平方根を返す"; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://ja.wikipedia.org/wiki/三角関数"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "arccosine の値を返す"; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "番号のarcsine を返すます"; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "番号のarctangent を返すます"; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "入力名:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "入力"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "コメントを削除します。"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/ko.js b/msg/js/ko.js index 22b054304e9..241d1988b94 100644 --- a/msg/js/ko.js +++ b/msg/js/ko.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "빨강"; Blockly.Msg.COLOUR_RGB_TITLE = "RGB 색"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "빨강,파랑,초록의 값을 이용하여 색을 만드십시오. 모든 값은 0과 100 사이에 있어야 합니다."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "반복 중단"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "다음 반복"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "경고 : 이 블록은 반복 Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "각 항목에 대해 %1 목록으로 %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "리스트 안에 들어있는 각 아이템들을, 순서대로 변수 '%1' 에 한 번씩 저장시키고, 그 때 마다 명령을 실행합니다."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "으로 계산 %1 %2에서 %4을 이용하여 %3로"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "변수 \"%1\"은 지정된 간격으로 시작 수에서 끝 수까지를 세어 지정된 블록을 수행해야 합니다."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "\"만약\" 블럭에 조건 검사를 추가합니다."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "\"만약\" 블럭의 마지막에, 모든 검사 결과가 거짓인 경우 실행할 부분을 추가합니다."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "\"만약\" 블럭의 내용을 추가, 삭제, 재구성 합니다."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "아니라면"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "조건식의 계산 결과가 참이면, Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "조건식의 계산 결과가 참이면, 첫번째 블럭의 명령을 실행하고, 그렇지 않으면 두번째 블럭의 명령을 실행합니다."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "첫번째 조건식의 계산 결과가 참이면, 첫번째 블럭의 명령을 실행하고, 두번째 조건식의 계산 결과가 참이면, 두번째 블럭의 명령을 실행합니다."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "첫번째 조건식의 계산 결과가 참이면, 첫번째 블럭의 명령을 실행하고, 두번째 조건식의 계산 결과가 참이면, 두번째 블럭의 명령을 실행하고, ... , 어떤 조건식의 계산 결과도 참이 아니면, 마지막 블럭의 명령을 실행합니다."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://ko.wikipedia.org/wiki/For_루프"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "하기"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1회 반복"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "여러 번 반복해 명령들을 실행합니다."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "다음까지 반복"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "동안 반복"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "값이 거짓일 때, 몇가지 선언을 합니다."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "값이 참일 때, 몇가지 선언을 합니다."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "블록 삭제"; Blockly.Msg.DELETE_X_BLOCKS = "블록 %1 삭제"; Blockly.Msg.DISABLE_BLOCK = "블록 비활성화"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "구분 기호로 분리 된 하나의 Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "각 속보, 텍스트의 목록들에서 텍스트를 분할합니다."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "분리와"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "거짓"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "참 혹은 거짓 모두 반환합니다."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "참"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "두 값이 같으면, 참(true) 값을 돌려줍니다."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "첫 번째 값이 두 번째 값보다 크면, 참(true) 값을 돌려줍니다."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "첫 번째 값이 두 번째 값보다 Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "첫 번째 값이 두 번째 값보다 작으면, 참(true) 값을 돌려줍니다."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "첫 번째 값이 두 번째 값보다 작거나 같으면, 참(true) 값을 돌려줍니다."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "두 값이 서로 다르면, 참(true) 값을 돌려줍니다."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 의 반대"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "입력값이 거짓이라면 참을 반환합니다. 참이라면 거짓을 반환합니다."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "빈 값"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "빈 값을 반환합니다."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "그리고"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "또는"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "두 값이 모두 참(true) 값이면, 참 값을 돌려줍니다."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "적어도 하나의 값이 참일 경우 참을 반환합니다."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "테스트"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "만약 거짓이라면"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "만약 참이라면"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'검사' 를 진행해, 결과가 참(true)이면 '참이면' 부분의 값을 돌려줍니다. ; 결과가 참이 아니면, '거짓이면' 부분의 값을 돌려줍니다."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "두 수의 합을 반환합니다."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "두 수의 나눈 결과를 반환합니다."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "두 수간의 차이를 반환합니다."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "첫 번째 수를 두 번째 수 Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "바꾸기 %1 만큼 %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "변수 '%1' 에 저장되어있는 값에, 어떤 수를 더해, 변수에 다시 저장합니다."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "일반적인 상수 값들 중 하나를 돌려줍니다. : π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "%1 의 값을, 최소 %2 최대 %3 으로 조정"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "어떤 수를, 특정 범위의 값이 되도록 강제로 조정합니다."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "가 다음 수로 나누어 떨어지면 :"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "가 짝수(even) 이면"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "가 음(-)수 이면"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "가 홀수(odd) 이면"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "가 양(+)수 이면"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "가 소수(prime) 이면"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "어떤 수가 짝 수, 홀 수, 소 수, 정 수, 양 수, 음 수, 나누어 떨어지는 수 인지 검사해 결과값을 돌려줍니다. 참(true) 또는 거짓(false) 값을 돌려줌."; Blockly.Msg.MATH_IS_WHOLE = "가 정수이면"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "%1 를 %2 로 나눈 나머지"; Blockly.Msg.MATH_MODULO_TOOLTIP = "첫 번째 수를 두 번째 수로 나눈, 나머지 값을 돌려줍니다."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "x"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "수"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "평균값"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "최대값"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "중간값"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "가장 여러 개 있는 값"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "목록의 임의 아이템"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "표준 편차"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "합"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "리스트에 들어있는 수(값)들에 대해, 산술 평균(arithmetic mean) 한 값을 돌려줍니다."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "리스트에 들어있는 수(값) 들 중, 가장 큰(max) 수(값)를 돌려줍니다."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "리스트에 들어있는 수(값) 들 중, 중간(median) 수(값)를 돌려줍니다."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "임의 분수"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "0.0 (포함)과 1.0 (배타적) 사이의 임의 분수 값을 돌려줍니다."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "랜덤정수(%1<= n <=%2)"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "두 주어진 제한된 범위 사이의 임의 정수값을 돌려줍니다."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "반올림"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "버림"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "올림"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "어떤 수를 반올림/올림/버림한 결과를, 정수값으로 돌려줍니다."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "절대값"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "제곱근"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "어떤 수의 절대값(absolute)을 계산한 결과를, 정수값으로 돌려줍니다."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "e 의, 거듭제곱(power) 값을 돌려줍니다."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "어떤 수의, 자연로그(natural logarithm) 값을 돌려줍니다.(밑 e, 예시 log e x)"; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "10 의, 거듭제곱(power) 값을 돌 Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "숫자의 제곱근을 반환합니다."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "어떤 수에 대한, acos(arccosine) 값을 돌려줍니다."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "어떤 수에 대한, asin(arcsine) 값을 돌려줍니다."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "어떤 수에 대한, atan(arctangent) 값을 돌려줍니다."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "매개 변수:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "함수에 값을 더합니다."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "매개 변수들"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "이 함수를 추가, 삭제, 혹은 재정렬합니다."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "내용 제거"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/lb.js b/msg/js/lb.js index dd99b8d9b9f..f6260b25171 100644 --- a/msg/js/lb.js +++ b/msg/js/lb.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rout"; Blockly.Msg.COLOUR_RGB_TITLE = "fierwe mat"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "break out of loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continue with next iteration of loop"; // untranslated @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "fir all Element %1 an der Lëscht %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "count with %1 from %2 to %3 by %4"; // untranslated Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; // untranslated Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated Blockly.Msg.CONTROLS_IF_MSG_ELSE = "soss"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; // untranslated Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "maachen"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 mol widderhuelen"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "widderhuele bis"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repeat while"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements."; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements."; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Block läschen"; Blockly.Msg.DELETE_X_BLOCKS = "%1 Bléck läschen"; Blockly.Msg.DISABLE_BLOCK = "Block desaktivéieren"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falsch"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Schéckt entweder richteg oder falsch zréck."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "wouer"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; // untranslated @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is great Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "net %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returns null."; // untranslated +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "an"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "oder"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "wa falsch"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "wa wouer"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Gëtt d'Zomme vun zwou Zuelen."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated Blockly.Msg.MATH_CHANGE_TITLE = "änneren %1 ëm %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; // untranslated Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by"; // untranslated +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "ass gerued"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "ass negativ"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "ass net gerued"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "ass positiv"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "ass eng Primzuel"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "ass eng ganz Zuel"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "Rescht vu(n) %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated Blockly.Msg.MATH_NUMBER_TOOLTIP = "Eng Zuel."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Duerchschnëtt vun der Lëscht"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Maximum aus der Lëscht"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; // untranslated @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "zoufällegt Element vun enger Lëscht"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "sum of list"; // untranslated +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Schéckt de gréisste Wäert aus enger Lëscht zréck."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "zoufälleg ganz Zuel tëscht %1 a(n) %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "opronnen"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ofronnen"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "opronnen"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Eng Zuel op- oder ofronnen."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolut"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "Quadratwuerzel"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "input name:"; // untranslated Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Bemierkunge ewechhuelen"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/lrc.js b/msg/js/lrc.js index e6b93b2c50c..204ad6cd5cf 100644 --- a/msg/js/lrc.js +++ b/msg/js/lrc.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "سور"; Blockly.Msg.COLOUR_RGB_TITLE = "رن وا"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "حلقه نه خراو کو"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continue with next iteration of loop"; // untranslated @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "سی هر قلم %1 د نوم گه %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "اشماردن وا %1 د %2 سی %3 وا %4"; Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; // untranslated Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated Blockly.Msg.CONTROLS_IF_MSG_ELSE = "هنی"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "انجوم بئه"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 تکرار کو چن بار"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "تا تکرار کو"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "تا تکرار کو"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements."; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements."; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "پاکسا کردن برشت"; Blockly.Msg.DELETE_X_BLOCKS = "پاکسا کردن1% د برشتیا"; Blockly.Msg.DISABLE_BLOCK = "ناکشتگر کردن برشت"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "غلط"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "هم غلط و هم راس ورگن"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "راست و دوروست"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; // untranslated @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is great Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "نه %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "خمثی"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returns null."; // untranslated +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "و"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "یا"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated Blockly.Msg.LOGIC_TERNARY_CONDITION = "آزماشت کردن"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ار غلط بی"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ار درس بی"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "وه انازه دو گل شماره ورگن."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "آلشت بكيد %1 وا %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; // untranslated Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "یه وا بهر بیه"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "همیشه هیئش"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "منفیه"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "تهنائه"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "مثبته"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "وه اوله"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "همشه"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; // untranslated Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "یه شماره."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "مینجاگه نوم گه"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "بیشترونه د نومگه"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "مینجا نوم گه"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "بیشری د نومگه"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "random item of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "جم کردن نومگه"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "گرد کردن"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "وه هار گرد کردن"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "وه رو گرد کردن"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "تموم و کمال"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "چارسوک ریشه"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "نوم داده:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "داده یا"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "نظر جا وه جا کو"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/lt.js b/msg/js/lt.js index 49d487a6171..426b887017c 100644 --- a/msg/js/lt.js +++ b/msg/js/lt.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "raudona"; Blockly.Msg.COLOUR_RGB_TITLE = "RGB spalva:"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Spalvą galima sudaryti iš raudonos, žalios ir mėlynos dedamųjų. Kiekvienos intensyvumas nuo 0 iki 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "nutraukti kartojimą"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "šį kartą praleisti likusius veiksmus ir tęsti kartojimą"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Atsargiai: šis blokas gali būt Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "kartok su kiekvienu %1 iš sąrašo %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Kartok veiksmus, kol kintamasis \"%1\" paeiliui gauna kiekvieną sąrašo reikšmę."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "kartok, kai %1 kinta nuo %2 iki %3 po %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Kartoti veiksmus su kiekvienu sąrašo elementu, priskirtu kintamajam \"%1\"."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Pridėti sąlygą"; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Pridėti veiksmų vykdymo variantą/\"šaką\", kai netenkinama nė viena sąlyga."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Galite pridėt/pašalinti/pertvarkyti sąlygų \"šakas\"."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "kitu atveju"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Jeigu sąlyga tenkinama, tai atlik veiksmus Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Jei sąlyga tenkinama, atlikti jai priklausančius veiksmus, o jei ne -- atlikti kitus nurodytus veiksmus."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Jei pirma sąlyga tenkinama, atlikti jai priklausančius veiksmus, O jei ne, tikrinti antrą sąlygą -- ir jei ši tenkinama, atlikti jos veiksmus."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Jei pirma sąlyga tenkinama, atlikti jai priklausančius veiksmus, O jei ne, tikrinti antrą sąlygą -- ir jei ši tenkinama, atlikti jos veiksmus. Kitais atvejais -- atlikti paskutinio bloko veiksmus."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = ":"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "pakartokite %1 kartus"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Leidžia atlikti išvardintus veiksmus kelis kartus."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "kartok, kol pasieksi"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "kartok kol"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Kartoja veiksmus, kol bus pasiekta nurodyta sąlyga."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Kartoja veiksmus, kol sąlyga tenkinama."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Ištrinti bloką"; Blockly.Msg.DELETE_X_BLOCKS = "Ištrinti %1 blokus"; Blockly.Msg.DISABLE_BLOCK = "Išjungti bloką"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "klaidinga"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Reikšmė gali būti \"teisinga\"/\"Taip\" arba \"klaidinga\"/\"Ne\"."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "tiesa"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Tenkinama, jei abu reiškiniai lygūs."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; // untranslated @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is great Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "ne %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nieko"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Reikšmė nebuvo nurodyta..."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "ir"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "ar"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Bus teisinga, kai abi sąlygos bus tenkinamos."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated Blockly.Msg.LOGIC_TERNARY_CONDITION = "sąlyga"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jei ne"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "jei taip"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Jeigu sąlygą tenkinama, grąžina pirmą reikšmę, o jei ne - antrąją."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Grąžina dviejų skaičių suma."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Grąžina dviejų skaičių dalmenį."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Grąžina dviejų skaičių skirtumą."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Grąžina pirmą skaičių pakeltą Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated Blockly.Msg.MATH_CHANGE_TITLE = "padidink %1 (emptypage) %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Prideda skaičių prie kintamojo '%1'. Kai skaičius neigiamas - gaunasi atimtis."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; // untranslated Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "apribok %1 tarp %2 ir %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "yra dalus iš"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "yra lyginis"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "yra neigiamas"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "yra nelyginis"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "yra teigiamas"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "yra pirminis"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Patikrina skaičiaus savybę: (ne)lyginis/pirminis/sveikasis/teigiamas/neigiamas/dalus iš x."; Blockly.Msg.MATH_IS_WHOLE = "yra sveikasis"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "dalybos liekana %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Skaičius."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "vidurkis"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "didžiausia reikšmė sąraše"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana sąrašui"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "statistinė moda sąrašui"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "atsitiktinis elementas iš sąrašo"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standartinis nuokrypis sąraše"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "suma"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "atsitiktinis sk. nuo 0 iki 1"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Atsitiktinė trupmena nuo 0 (imtinai) iki 1 (neimtinai)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "atsitiktinis sveikas sk. nuo %1 iki %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "apvalink"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "apvalink žemyn"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "apvalink aukštyn"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "modulis"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "kv. šaknis"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Skaičiaus modulis - reikšmė be ženklo (panaikina minusą)."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "parametro pavadinimas:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Pridėti funkcijos parametrą (gaunamų duomenų pavadinimą)."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "gaunami duomenys (parametrai)"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Tvarkyti komandos gaunamus duomenis (parametrus)."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Pašalinti komentarą"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/mk.js b/msg/js/mk.js index a60b95647f8..6761ce4304f 100644 --- a/msg/js/mk.js +++ b/msg/js/mk.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "црвена"; Blockly.Msg.COLOUR_RGB_TITLE = "боја со"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Создајте боја со укажаните износи на црвена, зелена и сина. Сите вредности мора да бидат помеѓу 0 и 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "излези од јамката"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "продолжи со следното повторување на јамката"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "за секој елемент %1 на списокот %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Му ја задава променливата „%1“ на секој елемент на списокот, а потоа исполнува наредби."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "број со %1 од %2 до %3 со %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Променливата \"%1\" да ги земе вредностите од почетниот до завршниот број, броејќи според укажаниот интервал и ги исполнува укажаните блокови."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; // untranslated Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Додава, отстранува или прередува делови за прераспоредување на овој блок „ако“."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "инаку"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://mk.wikipedia.org/wiki/For-јамка"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "исполни"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "повтори %1 пати"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Исполнува наредби неколку пати."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "повторувај сè до"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "повторувај додека"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Додека вредноста е невистинита, исполнува наредби."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Додека вредноста е вистинита, исполнува наредби."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Избриши блок"; Blockly.Msg.DELETE_X_BLOCKS = "Избриши %1 блока"; Blockly.Msg.DISABLE_BLOCK = "Исклучи блок"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "невистина"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Дава или вистина или невистина."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "вистина"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://mk.wikipedia.org/wiki/Неравенство"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Дава вистина ако обата вноса се еднакви."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Дава вистина ако првиот внос е поголем од вториот."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Дава вистина ако први Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Дава вистина ако првиот внос е помал од вториот."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Дава вистина ако првиот внос е помал или еднаков на вториот."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Дава вистина ако обата вноса не се еднакви."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "не %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Дава вистина ако вносот е невистинит. Дава невистина ако вносот е вистинит."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "ништо"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Дава ништо."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "и"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "или"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Дава вистина ако обата вноса се вистинити."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Дава вистина ако барем еден од вносовите е вистинит."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "испробај"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ако е невистинито"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ако е вистинито"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter?uselang=mk"; Blockly.Msg.MATH_CHANGE_TITLE = "повиши %1 за %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Ѝ додава број на променливата „%1“."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://mk.wikipedia.org/wiki/Математичка_константа"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Дава една од вообичаените константи: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), или ∞ (бесконечност)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "е делив со"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "е парен"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "е негативен"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "е непарен"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "е позитивен"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "е прост"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Проверува дали бројот е парен, непарен, прост, цел, позитивен, негативен или делив со некој број. Дава вистина или невистина."; Blockly.Msg.MATH_IS_WHOLE = "е цел"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; // untranslated Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated Blockly.Msg.MATH_NUMBER_TOOLTIP = "A number."; // untranslated +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "просек на списокот"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "најголем на списокот"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "медијана на списокот"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "модул на списокот"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "random item of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "збир од списокот"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Дава просек (аритметичка средина) од броевите на списокот."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Го дава најголемиот број на списокот."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Дава медијана од броевите на списокот."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://mk.wikipedia.org/wiki/Заокружување"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "заокружи"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "заокружи на помало"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "заокружи на поголемо"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Го заокружува бројот на поголем или помал."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolute"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "square root"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "input name:"; // untranslated Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Отстрани коментар"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/ms.js b/msg/js/ms.js index 8776e49a4f3..5dd34efa083 100644 --- a/msg/js/ms.js +++ b/msg/js/ms.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "merah"; Blockly.Msg.COLOUR_RGB_TITLE = "warnakan"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Peroleh satu warna dengan menentukan amaun campuran merah, hijau dan biru. Kesemua nilai haruslah antara 0 hingga 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "hentikan gelung"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "teruskan dengan lelaran gelung seterusnya"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Amaran: Blok ini hanya boleh dig Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "untuk setiap perkara %1 dalam senarai %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Untuk setiap perkara dalam senarai, tetapkan pembolehubah '%1' pada perkara, kemudian lakukan beberapa perintah."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "kira dengan %1 dari %2 hingga %3 selang %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Gunakan pembolehubah \"%1\" pada nilai-nilai dari nombor pangkal hingga nombor hujung, mengira mengikut selang yang ditentukan, dan lakukan blok-blok yang tertentu."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Tambah satu syarat kepada blok jika."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Tambah yang terakhir, alihkan semua keadaan ke blok jika."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Tambah, alih keluar, atau susun semula bahagian-bahagian untuk menyusun semula blok jika."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "lain"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Jika nilai yang benar, lakukan beberapa pen Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Jika suatu nilai benar, lakukan penyata blok pertama. Jika tidak, bina penyata blok kedua."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Jika nilai yang pertama adalah benar, lakukan penyata pertama blok. Sebaliknya, jika nilai kedua adalah benar, lakukan penyata blok kedua."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Jika nilai yang pertama adalah benar, lakukan penyata blok pertama. Sebaliknya, jika nilai kedua adalah benar, lakukan penyata blok kedua. Jika tiada nilai adalah benar, lakukan penyata blok terakhir."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "lakukan"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "ulang %1 kali"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Lakukan perintah berulang kali."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "ulangi sehingga"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "ulangi apabila"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Lakukan beberapa perintah apabila nilainya palsu (false)."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Lakukan beberapa perintah apabila nilainya benar (true)."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Hapuskan Blok"; Blockly.Msg.DELETE_X_BLOCKS = "Hapuskan %1 Blok"; Blockly.Msg.DISABLE_BLOCK = "Matikan Blok"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Cantumkan senarai teks menjadi satu teks Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Pecahkan teks kepada senarai teks, berpecah di setiap delimiter."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "dengan delimiter"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "palsu"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Kembalikan samada benar atau palsu."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "benar"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://id.wikipedia.org/wiki/Pertidaksamaan"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Kembali benar jika kedua-dua input benar antara satu sama lain."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Kembali benar jika input pertama adalah lebih besar daripada input kedua."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Kembali benar jika input pertama adalah Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Kembali benar jika input pertama adalah lebih kecil daripada input kedua."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Kembali benar jika input pertama adalah lebih kecil daripada atau sama dengan input kedua."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Taip balik benar jika kedua-dua input tidak sama."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "bukan %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "'Benar' akan dibalas jika inputnya salah. 'Salah' akan dibalas jika inputnya benar."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returns null."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "dan"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "atau"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "Jika palsu"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "Jika benar"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://ms.wikipedia.org/wiki/Aritmetik"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Kembalikan jumlah kedua-dua bilangan."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Taip balik hasil bahagi dua nombor tersebut."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Taip balik hasil tolak dua nombor tersebut."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://id.wikipedia.org/wiki/Perjumlahan"; Blockly.Msg.MATH_CHANGE_TITLE = "perubahan %1 oleh %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Tambah nombor kepada pembolehubah '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://ms.wikipedia.org/wiki/Pemalar_matematik"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "Boleh dibahagikan dengan"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "Adalah genap"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "negatif"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "aneh"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "adalah positif"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "is prime"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; Blockly.Msg.MATH_IS_WHOLE = "is whole"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://id.wikipedia.org/wiki/Operasi_modulus"; Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Taip balik baki yang didapat daripada pembahagian dua nombor tersebut."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://ms.wikipedia.org/wiki/Nombor"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Suatu nombor."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "purata daripada senarai"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Max senarai"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Median senarai"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "jenis senarai"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Item rawak daripada senarai"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "sisihan piawai bagi senarai"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Jumlah senarai"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Kembalikan purata (min aritmetik) nilai-nilai angka di dalam senarai."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Pulangkan jumlah terbesar dalam senarai."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Kembalikan nombor median dalam senarai."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "pecahan rawak"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Kembali sebahagian kecil rawak antara 0.0 (inklusif) dan 1.0 (eksklusif)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "integer rawak dari %1ke %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Kembalikan integer rawak diantara dua had yang ditentukan, inklusif."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "pusingan"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "Pusingan ke bawah"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "pusingan ke atas"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Bulat nombor yang naik atau turun."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://ms.wikipedia.org/wiki/Punca_kuasa_dua"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "mutlak"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "Punca kuasa dua"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Kembalikan nilai mutlak suatu nombor."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Kembalikan e kepada kuasa nombor."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Kembali dalam logaritma nombor asli."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Kembalikan 10 kepada kuasa nombor."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Kembalikan punca kuasa nombor."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://ms.wikipedia.org/wiki/Fungsi_trigonometri"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Kembali arccosine beberapa nombor."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Kembalikan arcsince beberapa nombor."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Kembalikan beberapa nombor arctangent."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Nama input:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Tambah satu input pada fungsi."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "Input-input"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Tambah, alih keluar atau susun semula input pada fungsi ini."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Padamkan Komen"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/nb.js b/msg/js/nb.js index 8034a38f189..5e5e00186c0 100644 --- a/msg/js/nb.js +++ b/msg/js/nb.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rød"; Blockly.Msg.COLOUR_RGB_TITLE = "farge med"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Lag en farge med angitt verdi av rød, grønn og blå. Alle verdier må være mellom 0 og 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "bryt ut av løkken"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "fortsett med neste gjentakelse av løkken"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Advarsel: Denne blokken kan kun Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "for hvert element %1 i listen %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For hvert element i en liste, angi variabelen '%1' til elementet, og deretter lag noen setninger."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "tell med %1 fra %2 til %3 med %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Ha variabel \"%1\" ta verdiene fra start nummer til slutt nummer, telle med spesifisert intervall og lag de spesifiserte blokkene."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Legg til en betingelse til hvis blokken."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Legg til hva som skal skje hvis de andre ikke slår til."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Legg til, fjern eller flytt seksjoner i denne hvis-blokken."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "ellers"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Hvis dette er sant, så gjør følgende."; Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Hvis dette er sant, så utfør den første blokken av instruksjoner. Hvis ikke, utfør den andre blokken."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Hvis det første stemmer, så utfør den første blokken av instruksjoner. Ellers, hvis det andre stemmer, utfør den andre blokken av instruksjoner."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Hvis den første verdien er sann, så utfør den første blokken med setninger. Ellers, hvis den andre verdien er sann, så utfør den andre blokken med setninger. Hvis ingen av verdiene er sanne, så utfør den siste blokken med setninger."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "gjør"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "gjenta %1 ganger"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Gjenta noen instruksjoner flere ganger."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "gjenta til"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "gjenta mens"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Så lenge et utsagn ikke stemmer, gjør noen instruksjoner."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Så lenge et utsagn stemmer, utfør noen instruksjoner."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Slett blokk"; Blockly.Msg.DELETE_X_BLOCKS = "Slett %1 blokk(er)"; Blockly.Msg.DISABLE_BLOCK = "Deaktiver blokk"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "usann"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returnerer enten sann eller usann."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "sann"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Returnerer sann hvis begge inputene er like hverandre."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Returnerer sant hvis det første argumentet er større enn den andre argumentet."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Returnerer sant hvis det første argume Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Returnerer sant hvis det første argumentet er mindre enn det andre argumentet."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Returnerer sant hvis det første argumentet er mindre enn eller likt det andre argumentet."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Returnerer sant hvis begge argumentene er ulike hverandre."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "ikke %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returnerer sant hvis argumentet er usant. Returnerer usant hvis argumentet er sant."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returnerer null."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "og"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "eller"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Returnerer sant hvis begge argumentene er sanne."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Returnerer sant hvis minst ett av argumentene er sant."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "hvis usant"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "hvis sant"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Sjekk betingelsen i 'test'. Hvis betingelsen er sann, da returneres 'hvis sant' verdien. Hvis ikke returneres 'hvis usant' verdien."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://no.wikipedia.org/wiki/Aritmetikk"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Returnerer summen av to tall."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Returner kvotienten av to tall."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Returner differansen mellom to tall."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Returner det første tallet opphøy Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "endre %1 ved %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Addere et tall til variabelen '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Returner en av felleskonstantene π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), eller ∞ (uendelig)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "begrense %1 lav %2 høy %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Begrens et tall til å være mellom de angitte grenseverdiene (inklusiv)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "er delelig med"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "er et partall"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "er negativer negativt"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "er et oddetall"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "er positivt"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "er et primtall"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Sjekk om et tall er et partall, oddetall, primtall, heltall, positivt, negativt, eller om det er delelig med et annet tall. Returnerer sant eller usant."; Blockly.Msg.MATH_IS_WHOLE = "er et heltall"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "resten av %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Returner resten fra delingen av to tall."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "x"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Et tall."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "gjennomsnittet av listen"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maksimum av liste"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "medianen til listen"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "Listens typetall"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "tilfeldig element i listen"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standardavviket til listen"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "summen av listen"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Returner det aritmetiske gjennomsnittet av tallene i listen."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Returner det største tallet i listen."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Returner listens median."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "tilfeldig flyttall"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Returner et tilfeldig flyttall mellom 0.0 (inkludert) og 1.0 (ikke inkludert)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "Et tilfeldig heltall mellom %1 og %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Returner et tilfeldig tall mellom de to spesifiserte grensene, inkludert de to."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "avrunding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "rund ned"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "rund opp"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Avrund et tall ned eller opp."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absoluttverdi"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "kvadratrot"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Returner absoluttverdien av et tall."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Returner e opphøyd i et tall."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Returner den naturlige logaritmen til et tall."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Returner 10 opphøyd i et tall."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Returner kvadratroten av et tall."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Returner arccosinus til et tall."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Returner arcsinus til et tall."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Returner arctangens til et tall."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Navn på parameter:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Legg til en input til funksjonen."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "parametere"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Legg til, fjern eller endre rekkefølgen på input til denne funksjonen."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Fjern kommentar"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/nl.js b/msg/js/nl.js index 8ac6ff9c7f6..d8caa921167 100644 --- a/msg/js/nl.js +++ b/msg/js/nl.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "rood"; Blockly.Msg.COLOUR_RGB_TITLE = "kleuren met"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Maak een kleur met de opgegeven hoeveelheid rood, groen en blauw. Alle waarden moeten tussen 0 en 100 liggen."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "uit lus breken"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "doorgaan met de volgende iteratie van de lus"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Waarschuwing: dit blok mag allee Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "voor ieder item %1 in lijst %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Voor ieder item in een lijst, stel de variabele \"%1\" in op het item en voer daarna opdrachten uit."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; Blockly.Msg.CONTROLS_FOR_TITLE = "rekenen met %1 van %2 tot %3 in stappen van %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Laat de variabele \"%1\" de waarden aannemen van het beginnummer tot het laatste nummer, tellende met het opgegeven interval, en met uitvoering van de opgegeven blokken."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Voeg een voorwaarde toe aan het als-blok."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Voeg een laatste, vang-alles conditie toe aan het als-statement."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Voeg stukken toe, verwijder of verander de volgorde om dit \"als\"-blok te wijzigen."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "anders"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Als een waarde waar is, voer dan opdrachten Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Als een waarde waar is, voert dan het eerste blok met opdrachten uit. Voer andere het tweede blok met opdrachten uit."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Als de eerste waarde waar is, voer dan het eerste blok met opdrachten uit. Voer anders, als de tweede waarde waar is, het tweede blok met opdrachten uit."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Als de eerste waarde \"waar\" is, voer dan het eerste blok uit. Voer anders wanneer de tweede waarde \"waar\" is, het tweede blok uit. Als geen van beide waarden waar zijn, voer dan het laatste blok uit."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://nl.wikipedia.org/wiki/Repetitie_(informatica)#For_en_Foreach"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "voer uit"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 keer herhalen"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Voer een aantal opdrachten meerdere keren uit."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "herhalen totdat"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "herhalen zolang"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Terwijl een waarde onwaar is de volgende opdrachten uitvoeren."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Terwijl een waarde waar is de volgende opdrachten uitvoeren."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Blok verwijderen"; Blockly.Msg.DELETE_X_BLOCKS = "%1 blokken verwijderen"; Blockly.Msg.DISABLE_BLOCK = "Blok uitschakelen"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Lijst van tekstdelen samenvoegen in éé Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Tekst splitsen in een tekst van tekst op basis van een scheidingsteken."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "met scheidingsteken"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "onwaar"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Geeft \"waar\" of \"onwaar\" terug."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "waar"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://nl.wikipedia.org/wiki/Ongelijkheid_(wiskunde)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Geeft \"waar\", als beide waarden gelijk aan elkaar zijn."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Geeft \"waar\" terug als de eerste invoer meer is dan de tweede invoer."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Geeft \"waar\" terug als de eerste invo Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Geeft \"waar\" als de eerste invoer kleiner is dan de tweede invoer."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Geeft \"waar\" terug als de eerste invoer kleiner of gelijk is aan de tweede invoer."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Geeft \"waar\" terug als de waarden niet gelijk zijn aan elkaar."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; Blockly.Msg.LOGIC_NEGATE_TITLE = "niet %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Geeft \"waar\" terug als de invoer \"onwaar\" is. Geeft \"onwaar\" als de invoer \"waar\" is."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "niets"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Geeft niets terug."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "en"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; Blockly.Msg.LOGIC_OPERATION_OR = "of"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Geeft waar als beide waarden waar zijn."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Geeft \"waar\" terug als in ieder geval één van de waarden waar is."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "als onwaar"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "als waar"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Test de voorwaarde in \"test\". Als de voorwaarde \"waar\" is, geef de waarde van \"als waar\" terug; geef anders de waarde van \"als onwaar\" terug."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://nl.wikipedia.org/wiki/Rekenen"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Geeft de som van 2 getallen."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Geeft de gedeelde waarde van twee getallen."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Geeft het verschil van de twee getallen."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Geeft het eerste getal tot de macht Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "%1 wijzigen met %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Voegt een getal toe aan variabele \"%1\"."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://nl.wikipedia.org/wiki/Wiskundige_constante"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Geeft een van de vaak voorkomende constante waardes: π (3.141…), e (2.718…), φ (1.618…), √2 (1.414…), √½ (0.707…), of ∞ (oneindig)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "beperk %1 van minimaal %2 tot maximaal %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Beperk een getal tussen de twee opgegeven limieten (inclusief)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is deelbaar door"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "is even"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "is negatief"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "is oneven"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "is positief"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "is priemgetal"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Test of een getal even, oneven, een priemgetal, geheel, positief of negatief is, of deelbaar is door een bepaald getal. Geeft \"waar\" of \"onwaar\"."; Blockly.Msg.MATH_IS_WHOLE = "is geheel getal"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://nl.wikipedia.org/wiki/Modulair_rekenen"; Blockly.Msg.MATH_MODULO_TITLE = "restgetal van %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Geeft het restgetal van het resultaat van de deling van de twee getallen."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://nl.wikipedia.org/wiki/Getal_%28wiskunde%29"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Een getal."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "gemiddelde van lijst"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "hoogste uit lijst"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediaan van lijst"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modi van lijst"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "willekeurige item van lijst"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standaarddeviatie van lijst"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "som van lijst"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Geeft het gemiddelde terug van de numerieke waardes in een lijst."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Geeft het grootste getal in een lijst."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Geeft de mediaan in de lijst."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://nl.wikipedia.org/wiki/Toevalsgenerator"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "willekeurige fractie"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Geeft een willekeurige fractie tussen 0.0 (inclusief) en 1.0 (exclusief)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://nl.wikipedia.org/wiki/Toevalsgenerator"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "willekeurig geheel getal van %1 tot %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Geeft een willekeurig getal tussen de 2 opgegeven limieten in, inclusief."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://nl.wikipedia.org/wiki/Afronden"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "afronden"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "naar beneden afronden"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "omhoog afronden"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Rondt een getal af omhoog of naar beneden."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://nl.wikipedia.org/wiki/Vierkantswortel"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absoluut"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "wortel"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Geeft de absolute waarde van een getal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Geeft e tot de macht van een getal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Geeft het natuurlijk logaritme van een getal."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Geeft 10 tot de macht van een getal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Geeft de wortel van een getal."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "arctan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://nl.wikipedia.org/wiki/Goniometrische_functie"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Geeft de arccosinus van een getal."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Geeft de arcsinus van een getal."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Geeft de arctangens van een getal."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "invoernaam:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Een invoer aan de functie toevoegen."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "ingangen"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Invoer van deze functie toevoegen, verwijderen of herordenen."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Opmerking verwijderen"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/oc.js b/msg/js/oc.js index eb3e26e2eb1..3e01e7b4b51 100644 --- a/msg/js/oc.js +++ b/msg/js/oc.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "roge"; Blockly.Msg.COLOUR_RGB_TITLE = "colorar amb"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "break out of loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continue with next iteration of loop"; // untranslated @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "per cada element %1 dins la lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "comptar amb %1 de %2 a %3 per %4"; Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; // untranslated Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated Blockly.Msg.CONTROLS_IF_MSG_ELSE = "siquenon"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://oc.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "far"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repetir %1 còps"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repetir fins a"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repetir tant que"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements."; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements."; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Suprimir lo blòt"; Blockly.Msg.DELETE_X_BLOCKS = "Suprimir %1 blòts"; Blockly.Msg.DISABLE_BLOCK = "Desactivar lo blòt"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "fals"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returns either true or false."; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TRUE = "verai"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; // untranslated @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is great Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "pas %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nul"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Renvia nul."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "e"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "o"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated Blockly.Msg.LOGIC_TERNARY_CONDITION = "tèst"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se fals"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se verai"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://oc.wikipedia.org/wiki/Aritmetica"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated Blockly.Msg.MATH_CHANGE_TITLE = "incrementar %1 per %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; // untranslated Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "es devesible per"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "es par"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "es negatiu"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "es impar"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "es positiu"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "es primièr"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "es entièr"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; // untranslated Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://oc.wikipedia.org/wiki/Nombre"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un nombre."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "mejana de la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maximum de la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana de la lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "random item of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "soma de la lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "arredondir"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "arredondir a l’inferior"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "arredondir al superior"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolut"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "raiç carrada"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nom de l’entrada :"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "entradas"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Suprimir un comentari"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/pl.js b/msg/js/pl.js index 4a755c44d81..1021587f3e4 100644 --- a/msg/js/pl.js +++ b/msg/js/pl.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "czerwony"; Blockly.Msg.COLOUR_RGB_TITLE = "kolor z"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Połącz czerwony, zielony i niebieski w odpowiednich proporcjach, tak aby powstał nowy kolor. Zawartość każdego z nich określa liczba z przedziału od 0 do 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "wyjść z pętli"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "przejdź do kolejnej iteracji pętli"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Ostrzeżenie: Ten blok może by Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "dla każdego elementu %1 na liście %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Dla każdego elementu z listy przyporządkuj zmienną '%1', a następnie wykonaj kilka instrukcji."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "liczyć z %1 od %2 do %3 co %4 (wartość kroku)"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Czy zmienna \"%1\" przyjmuje wartości od numeru startowego do numeru końcowego, licząc przez określony interwał, wykonując określone bloki."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Dodaj warunek do bloku „jeśli”."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Dodaj ostatni warunek do bloku „jeśli”, gdy żaden wcześniejszy nie był spełniony."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Dodaj, usuń lub zmień kolejność bloków, żeby zmodyfikować blok „jeśli”."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "w przeciwnym razie"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Jeśli wartość jest prawdziwa, to wykonaj Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Jeśli wartość jest prawdziwa, to wykonaj pierwszy blok instrukcji. W przeciwnym razie, wykonaj drugi blok instrukcji."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Jeśli pierwsza wartość jest prawdziwa, to wykonaj pierwszy blok instrukcji. W przeciwnym razie, jeśli druga wartość jest prawdziwa, to wykonaj drugi blok instrukcji."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Jeśli pierwsza wartość jest prawdziwa, wykonaj pierwszy blok instrukcji. W przeciwnym razie jeśli druga wartość jest prawdziwa, wykonaj drugi blok instrukcji. Jeżeli żadna z wartości nie jest prawdziwa, wykonaj ostatni blok instrukcji."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "wykonaj"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "powtórz %1 razy"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Wykonaj niektóre instrukcje kilka razy."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "powtarzaj aż"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "powtarzaj dopóki"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Gdy wartość jest nieprawdziwa, wykonaj kilka instrukcji."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Gdy wartość jest prawdziwa, wykonaj kilka instrukcji."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Usuń blok"; Blockly.Msg.DELETE_X_BLOCKS = "Usunąć %1 bloki(ów)"; Blockly.Msg.DISABLE_BLOCK = "Wyłącz blok"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "fałsz"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Zwraca 'prawda' lub 'fałsz'."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "prawda"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Zwróć \"prawda\", jeśli obie dane wejściowe są sobie równe."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Zwróć \"prawda\" jeśli pierwszy dany element jest większy od drugiego."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Zwróć \"prawda\", jeśli pierwsza dan Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Zwróć \"prawda\" jeśli pierwsza dana wejściowa jest większa od drugiej."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Zwróć \"prawda\", jeśli pierwsza dana wejściowa jest większa lub równa drugiej danej wejściowej."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Zwróć \"prawda\", jeśli obie dane wejściowe nie są sobie równe."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "nie %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Zwraca \"prawda\", jeśli dane wejściowe są fałszywe. Zwraca \"fałsz\", jeśli dana wejściowa jest prawdziwa."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nic"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Zwraca nic."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "i"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "lub"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Zwróć \"prawda\" jeśli oba dane elementy mają wartość \"prawda\"."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Zwróć \"prawda\" jeśli co najmniej jeden dany element ma wartość \"prawda\"."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jeśli fałsz"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "jeśli prawda"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Sprawdź warunek w „test”. Jeśli warunek jest prawdziwy, to zwróci „jeśli prawda”; jeśli nie jest prawdziwy to zwróci „jeśli fałsz”."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://pl.wikipedia.org/wiki/Arytmetyka"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Zwróć sumę dwóch liczb."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Zwróć iloraz dwóch liczb."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Zwróć różnicę dwóch liczb."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Zwróć liczbę podniesioną do pot Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "zmień %1 o %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Dodaj liczbę do zmiennej '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Zwróć jedną wspólną stałą: π (3.141), e (2.718...), φ (1.618...), sqrt(2) (1.414...), sqrt(½) (0.707...) lub ∞ (nieskończoność)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "ogranicz %1 z dołu %2 z góry %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Ogranicz liczbę, aby była w określonych granicach (włącznie)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "/"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "jest podzielna przez"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "jest parzysta"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "jest ujemna"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "jest nieparzysta"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "jest dodatnia"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "jest liczbą pierwszą"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Sprawdź, czy liczba jest parzysta, nieparzysta, pierwsza, całkowita, dodatnia, ujemna, lub czy jest podzielna przez podaną liczbę. Zwraca wartość \"prawda\" lub \"fałsz\"."; Blockly.Msg.MATH_IS_WHOLE = "jest liczbą całkowitą"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "reszta z dzielenia %1 przez %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Zwróć resztę z dzielenia dwóch liczb przez siebie."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Liczba."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "średnia z listy"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maksymalna wartość z listy"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana z listy"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "dominanty listy"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "losowy element z listy"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "odchylenie standardowe z listy"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "suma z listy"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Zwróć średnią (średnią arytmetyczną) wartości liczbowych z listy."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Zwróć najwyższy numer w liście."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Zwróć medianę liczby na liście."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "losowy ułamek"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Zwróć losowy ułamek między 0.0 (włącznie), a 1.0 (wyłącznie)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "losowa liczba całkowita od %1 do %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Zwróć losową liczbę całkowitą w ramach dwóch wyznaczonych granic, włącznie."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "zaokrąglić"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "zaokrąglić w dół"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "zaokrąglić w górę"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Zaokrąglij w górę lub w dół."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "wartość bezwzględna"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "pierwiastek kwadratowy"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Zwróć wartość bezwzględną danej liczby."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Zwróć e do potęgi danej liczby."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Zwróć logarytm naturalny danej liczby."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Zwróć 10 do potęgi danej liczby."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Zwróć pierwiastek kwadratowy danej liczby."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "arc cos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "arc sin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "arc tan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Zwróć arcus cosinus danej liczby."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Zwróć arcus sinus danej liczby."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Zwróć arcus tangens danej liczby."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nazwa wejścia:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Dodaj dane wejściowe do funkcji."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "wejścia"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Dodaj, usuń lub zmień kolejność danych wejściowych dla tej funkcji."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Usuń Komentarz"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/pms.js b/msg/js/pms.js index c8c952f81ee..71faacfc978 100644 --- a/msg/js/pms.js +++ b/msg/js/pms.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "ross"; Blockly.Msg.COLOUR_RGB_TITLE = "coloré con"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Creé un color con la quantità spessificà ëd ross, verd e bleu. Tuti ij valor a devo esse antra 0 e 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "seurte da la liassa"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continué con l'iterassion sucessiva dla liassa"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Atension: Ës blòch a peul mach Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "për minca n'element %1 ant la lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Për minca element an na lista, dé ël valor ëd l'element a la variàbil '%1', peui eseguì chèiche anstrussion."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "conté con %1 da %2 a %3 për %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Fé an manera che la variàbil \"%1\" a pija ij valor dal nùmer inissial fin-a al nùmer final, an contand për l'antërval ëspessificà, e eseguì ij bloch ëspessificà."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Gionté na condission al blòch si."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Gionté na condission final ch'a cheuj tut al blòch si."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Gionté, gavé o riordiné le session për cinfiguré torna ës blòch si."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "dësnò"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Si un valor a l'é ver, antlora eseguì ch Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Si un valor a l'é ver, antlora eseguì ël prim blòch d'anstrussion. Dësnò, eseguì ël second blòch d'anstrussion."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Si ël prim valor a l'é ver, antlora fé andé ël prim blòch d'anstrussion. Dësnò, si ël second valor a l'é ver, fé andé ël second blòch d'anstrussion."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Si ël prim valor a l'é ver, antlora fé andé ël prim blòch d'anstrussion. Dësnò, si ël second valor a l'é ver, fé andé ël second blòcj d'anstrussion. Si gnun dij valor a l'é ver, fé andé l'ùltim blòch d'anstrussion."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "fé"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "arpete %1 vire"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Eseguì chèiche anstrussion vàire vire."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "arpete fin-a a"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "arpete antramentre che"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Cand un valor a l'é fàuss, eseguì chèiche anstrussion."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Cand un valor a l'é ver, eseguì chèiche anstrussion."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Scancelé ël blòch"; Blockly.Msg.DELETE_X_BLOCKS = "Scancelé %1 blòch"; Blockly.Msg.DISABLE_BLOCK = "Disativé ël blòch"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Gionze na lista ëd test ant un test sol Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Divide un test an na lista ëd test, tajand a minca 'n separator."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "con ël separator"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "fàuss"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "A rëspond ver o fàuss."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "ver"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Rësponde ver si le doe imission a son uguaj."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Rësponde ver si la prima imission a l'é pi granda che la sconda."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Rësponde ver si la prima imission a l' Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Rësponde ver si la prima imission a l'é pi cita dla sconda."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Rësponde ver si la prima imission a l'é pi cita o ugual a la sconda."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Rësponde ver si le doe imission a son nen uguaj."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "nen %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "A rëspond ver se l'imission a l'é fàussa. A rëspond fàuss se l'imission a l'é vera."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "gnente"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "A rëspond gnente."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "e"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "o"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Rësponde ver se tute doe j'imission a son vere."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Rësponde ver se almanch un-a d'imission a l'é vera."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "preuva"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se fàuss"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se ver"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Controlé la condission an 'preuva'. Se la condission a l'é vera, a rëspond con ël valor 'se ver'; dësnò a rëspond con ël valor 'se fàuss'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "A smon la soma ëd doi nùmer."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "A smon ël cossient dij doi nùmer."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "A smon la diferensa dij doi nùmer."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "A smon ël prim nùmer alvà a la p Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "ancrementé %1 për %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Gionté un nùmer a la variàbil '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "A smon un-a dle costante comun-e π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…) o ∞ (infinì)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "limité %1 antra %2 e %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Limité un nùmer a esse antra le limitassion ëspessificà (comprèise)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "a l'é divisìbil për"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "a l'é cobi"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "a l'é negativ"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "a l'é dëscobi"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "a l'é positiv"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "a l'é prim"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "A contròla si un nùmer a l'é cobi, dëscobi, prim, antreghm positiv, negativ, o s'a l'é divisìbil për un nùmer dàit. A rëspond ver o fàuss."; Blockly.Msg.MATH_IS_WHOLE = "a l'é antregh"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "resta ëd %1:%2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "A smon la resta ëd la division dij doi nùmer."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un nùmer."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "media dla lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "màssim ëd la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mesan-a dla lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "mòde dla lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "element a l'ancàpit ëd la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "deviassion ëstàndard ëd la lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "soma dla lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "A smon la media (aritmética) dij valor numérich ant la lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "A smon ël pi gròss nùmer ëd la lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "A smon ël nùmer mesan ëd la lista."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "frassion aleatòria"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "A smon na frassion aleatòria antra 0,0 (comprèis) e 1,0 (esclus)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "antregh aleatòri antra %1 e %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "A smon n'antregh aleatòri antra ij doi lìmit ëspessificà, comprèis."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "ariondé"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ariondé për difet"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "ariondé për ecess"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "A arionda un nùmer për difet o ecess."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "assolù"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "rèis quadra"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "A smon ël valor assolù d'un nùmer."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "A smon e a la potensa d'un nùmer."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "A smon ël logaritm natural d'un nùmer."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "A smon 10 a la potensa d'un nùmer."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "A smon la rèis quadra d'un nùmer."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "A smon l'arch-cosen d'un nùmer."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "A smon l'arch-sen d'un nùmer."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "A smon l'arch-tangenta d'un nùmer."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nòm ëd l'imission:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Gionté n'imission a la fonsion."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "imission"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Gionté, gavé o riordiné j'imission ëd sa fonsion."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Scancelé un coment"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/pt-br.js b/msg/js/pt-br.js index 6488509b9cf..2e52b88da7e 100644 --- a/msg/js/pt-br.js +++ b/msg/js/pt-br.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "vermelho"; Blockly.Msg.COLOUR_RGB_TITLE = "colorir com"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Cria uma cor de acordo com a quantidade especificada de vermelho, verde e azul. Todos os valores devem estar entre 0 e 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "encerra o laço"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continua com a próxima iteração do laço"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Atenção: Este bloco só pode s Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "para cada item %1 na lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para cada item em uma lista, atribui o item à variável \"%1\", e então realiza algumas instruções."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "contar com %1 de %2 até %3 por %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Faz com que a variável \"%1\" assuma os valores do número inicial ao número final, contando de acordo com o intervalo especificado, e executa os blocos especificados."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Acrescente uma condição para o bloco se."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Acrescente uma condição final para o bloco se."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Acrescente, remova ou reordene seções para reconfigurar este bloco."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "senão"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Se um valor é verdadeiro, então realize a Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Se um valor é verdadeiro, então realize o primeiro bloco de instruções. Senão, realize o segundo bloco de instruções."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Se o primeiro valor é verdadeiro, então realize o primeiro bloco de instruções. Senão, se o segundo valor é verdadeiro, realize o segundo bloco de instruções."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Se o primeiro valor é verdadeiro, então realize o primeiro bloco de instruções. Senão, se o segundo valor é verdadeiro, realize o segundo bloco de instruções. Se nenhum dos blocos for verdadeiro, realize o último bloco de instruções."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://pt.wikipedia.org/wiki/Estrutura_de_repeti%C3%A7%C3%A3o#Repeti.C3.A7.C3.A3o_com_vari.C3.A1vel_de_controle"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "faça"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repita %1 vezes"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Faça algumas instruções várias vezes."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repita até"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repita enquanto"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Enquanto um valor é falso, então faça algumas instruções."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Enquanto um valor for verdadeiro, então faça algumas instruções."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Remover Bloco"; Blockly.Msg.DELETE_X_BLOCKS = "Remover %1 Blocos"; Blockly.Msg.DISABLE_BLOCK = "Desabilitar Bloco"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Juntar uma lista de textos em um único Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Dividir o texto em uma lista de textos, separando-o em cada delimitador."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "com delimitador"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falso"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Retorna verdadeiro ou falso."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "verdadeiro"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://pt.wikipedia.org/wiki/Inequa%C3%A7%C3%A3o"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Retorna verdadeiro se ambas as entradas forem iguais."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Retorna verdadeiro se a primeira entrada for maior que a segunda entrada."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Retorna verdadeiro se a primeira entrad Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Retorna verdadeiro se a primeira entrada for menor que a segunda entrada."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Retorna verdadeiro se a primeira entrada for menor ou igual à segunda entrada."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Retorna verdadeiro se ambas as entradas forem diferentes."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "não %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Retorna verdadeiro se a entrada for falsa. Retorna falsa se a entrada for verdadeira."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nulo"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Retorna nulo."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "e"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "ou"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Retorna verdadeiro se ambas as entradas forem verdadeiras."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Retorna verdadeiro se uma das estradas for verdadeira."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "teste"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se falso"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se verdadeiro"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Avalia a condição em \"teste\". Se a condição for verdadeira retorna o valor \"se verdadeiro\", senão retorna o valor \"se falso\"."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://pt.wikipedia.org/wiki/Aritm%C3%A9tica"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Retorna a soma dos dois números."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Retorna o quociente da divisão dos dois números."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Retorna a diferença entre os dois números."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Retorna o primeiro número elevado Blockly.Msg.MATH_CHANGE_HELPURL = "https://pt.wikipedia.org/wiki/Adi%C3%A7%C3%A3o"; Blockly.Msg.MATH_CHANGE_TITLE = "alterar %1 por %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Soma um número à variável \"%1\"."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://pt.wikipedia.org/wiki/Anexo:Lista_de_constantes_matem%C3%A1ticas"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Retorna uma das constantes comuns: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), ou ∞ (infinito)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "restringe %1 inferior %2 superior %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Restringe um número entre os limites especificados (inclusivo)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "é divisível por"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "é par"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "é negativo"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "é ímpar"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "é positivo"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "é primo"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Verifica se um número é par, ímpar, inteiro, positivo, negativo, ou se é divisível por outro número. Retorna verdadeiro ou falso."; Blockly.Msg.MATH_IS_WHOLE = "é inteiro"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://pt.wikipedia.org/wiki/Opera%C3%A7%C3%A3o_m%C3%B3dulo"; Blockly.Msg.MATH_MODULO_TITLE = "resto da divisão de %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Retorna o resto da divisão de dois números."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://pt.wikipedia.org/wiki/N%C3%BAmero"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Um número."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "média da lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maior da lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana da lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "moda da lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "item aleatório da lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "desvio padrão da lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "soma de uma lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Retorna a média aritmética dos números da lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Retorna o maior número da lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Retorna a mediana dos números da lista."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://pt.wikipedia.org/wiki/Gerador_de_n%C3%BAmeros_pseudoaleat%C3%B3rios"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "fração aleatória"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Retorna uma fração aleatória entre 0.0 (inclusivo) e 1.0 (exclusivo)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://pt.wikipedia.org/wiki/Gerador_de_n%C3%BAmeros_pseudoaleat%C3%B3rios"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "inteiro aleatório entre %1 e %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Retorna um número inteiro entre os dois limites informados, inclusivo."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://pt.wikipedia.org/wiki/Arredondamento"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "arredonda"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "arredonda para baixo"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "arredonda para cima"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Arredonda um número para cima ou para baixo."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://pt.wikipedia.org/wiki/Raiz_quadrada"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absoluto"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "raiz quadrada"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Retorna o valor absoluto de um número."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Retorna o número e elevado à potência de um número."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Retorna o logaritmo natural de um número."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Retorna 10 elevado à potência de um n Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Retorna a raiz quadrada de um número."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://pt.wikipedia.org/wiki/Fun%C3%A7%C3%A3o_trigonom%C3%A9trica"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Retorna o arco cosseno de um número."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Retorna o arco seno de um número."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Retorna o arco tangente de um número."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nome da entrada:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Adiciona uma entrada para esta função"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "entradas"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Adiciona, remove, ou reordena as entradas para esta função."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Remover Comentário"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/pt.js b/msg/js/pt.js index 58150fc5ea3..91ae1500fc2 100644 --- a/msg/js/pt.js +++ b/msg/js/pt.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "vermelho"; Blockly.Msg.COLOUR_RGB_TITLE = "pinte com"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Cria uma cor de acordo com a quantidade especificada de vermelho, verde e azul. Todos os valores devem estar entre 0 e 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "sair do ciclo"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continuar com a próxima iteração do ciclo"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Atenção: Este bloco só pode s Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "para cada item %1 na lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para cada item numa lista, define a variável \"%1\" para o item e então faz algumas instruções."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "contar com %1 de %2 até %3 de %3 em %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Faz com que a variável \"%1\" assuma os valores desde o número inicial até ao número final, contando de acordo com o intervalo especificado e executa os blocos especificados."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Acrescente uma condição ao bloco se."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Acrescente uma condição de excepação final para o bloco se."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Acrescente, remova ou reordene secções para reconfigurar este bloco se."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "senão"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Se um valor é verdadeiro, então realize a Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Se um valor é verdadeiro, então realize o primeiro bloco de instruções. Senão, realize o segundo bloco de instruções"; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Se o primeiro valor é verdadeiro, então realize o primeiro bloco de instruções. Senão, se o segundo valor é verdadeiro, realize o segundo bloco de instruções."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Se o primeiro valor é verdadeiro, então realize o primeiro bloco de instruções. Senão, se o segundo valor é verdadeiro, realize o segundo bloco de instruções. Se nenhum dos blocos for verdadeiro, realize o último bloco de instruções."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "http://pt.wikipedia.org/wiki/Estrutura_de_repeti%C3%A7%C3%A3o#Repeti.C3.A7.C3.A3o_com_vari.C3.A1vel_de_controle"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "faça"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repita %1 vez"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Faça algumas instruções várias vezes."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repita até"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repita enquanto"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Enquanto um valor for falso, então faça algumas instruções."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Enquanto um valor for verdadeiro, então faça algumas instruções."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Remover Bloco"; Blockly.Msg.DELETE_X_BLOCKS = "Remover %1 Blocos"; Blockly.Msg.DISABLE_BLOCK = "Desabilitar Bloco"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Juntar uma lista de textos num único te Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Dividir o texto numa lista de textos, separando-o em cada delimitador."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "com delimitador"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falso"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Retorna verdadeiro ou falso."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "verdadeiro"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "http://pt.wikipedia.org/wiki/Inequa%C3%A7%C3%A3o"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Retorna verdadeiro se ambas as entradas forem iguais entre si."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Retorna verdadeiro se a primeira entrada for maior que a segunda entrada."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Retorna verdadeiro se a primeira entrad Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Retorna verdadeiro se a primeira entrada for menor que a segunda entrada."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Retorna verdadeiro se a primeira entrada for menor ou igual à segunda entrada."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Retorna verdadeiro se ambas as entradas forem diferentes entre si."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "não %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Retorna verdadeiro se a entrada for falsa. Retorna falso se a entrada for verdadeira."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nulo"; Blockly.Msg.LOGIC_NULL_HELPURL = "http://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Retorna nulo."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "e"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "ou"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Retorna verdadeiro se ambas as entradas forem verdadeiras."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Retorna verdadeiro se pelo menos uma das estradas for verdadeira."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "teste"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "http://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se falso"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se verdadeiro"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Avalia a condição em \"teste\". Se a condição for verdadeira retorna o valor \"se verdadeiro\", senão retorna o valor \"se falso\"."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "http://pt.wikipedia.org/wiki/Aritm%C3%A9tica"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Retorna a soma de dois números."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Retorna o quociente da divisão de dois números."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Retorna a diferença de dois números."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Retorna o primeiro número elevado Blockly.Msg.MATH_CHANGE_HELPURL = "http://pt.wikipedia.org/wiki/Adi%C3%A7%C3%A3o"; Blockly.Msg.MATH_CHANGE_TITLE = "alterar %1 por %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Soma um número à variável \"%1\"."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "http://pt.wikipedia.org/wiki/Anexo:Lista_de_constantes_matem%C3%A1ticas"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Retorna uma das constantes comuns: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), ou ∞ (infinito)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "restringe %1 inferior %2 superior %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Restringe um número entre os limites especificados (inclusive)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "é divisível por"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "é par"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "é negativo"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "é impar"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "é positivo"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "é primo"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Verifica se um número é par, impar, primo, inteiro, positivo, negativo, ou se é divisível por outro número. Retorna verdadeiro ou falso."; Blockly.Msg.MATH_IS_WHOLE = "é inteiro"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "http://pt.wikipedia.org/wiki/Opera%C3%A7%C3%A3o_m%C3%B3dulo"; Blockly.Msg.MATH_MODULO_TITLE = "resto da divisão de %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Retorna o resto da divisão de dois números."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "http://pt.wikipedia.org/wiki/N%C3%BAmero"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Um número."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "média de uma lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maior de uma lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana de uma lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "moda de uma lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "item aleatório de uma lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "desvio padrão de uma lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "soma da lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Retorna a média aritmética dos valores números da lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Retorna o maior número da lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Retorna a mediana da lista."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "http://pt.wikipedia.org/wiki/N%C3%BAmero_aleat%C3%B3rio"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "fração aleatória"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Insere uma fração aleatória entre 0.0 (inclusive) e 1.0 (exclusive)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "http://pt.wikipedia.org/wiki/N%C3%BAmero_aleat%C3%B3rio"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "inteiro aleatório entre %1 e %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Retorna um número inteiro entre os dois limites especificados, inclusive."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "http://pt.wikipedia.org/wiki/Arredondamento"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "arredonda"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "arredonda para baixo"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "arredonda para cima"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Arredonda um número para cima ou para baixo."; Blockly.Msg.MATH_SINGLE_HELPURL = "http://pt.wikipedia.org/wiki/Raiz_quadrada"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absoluto"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "raíz quadrada"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Retorna o valor absoluto de um número."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Retorna o número e elevado à potência de um número."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Retorna o logarítmo natural de um número."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Retorna 10 elevado à potência de um n Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Retorna a raiz quadrada de um número."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "http://pt.wikipedia.org/wiki/Fun%C3%A7%C3%A3o_trigonom%C3%A9trica"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Retorna o arco cosseno de um número."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Retorna o arco seno de um número."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Retorna o arco tangente de um número."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nome da entrada:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Adicionar uma entrada para a função."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "entradas"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Adicionar, remover ou reordenar as entradas para esta função."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Remover Comentário"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/ro.js b/msg/js/ro.js index d50debf6ea3..254462ee579 100644 --- a/msg/js/ro.js +++ b/msg/js/ro.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "roşu"; Blockly.Msg.COLOUR_RGB_TITLE = "colorează cu"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Creează o culoare cu suma specificată de roşu, verde şi albastru. Toate valorile trebuie să fie între 0 şi 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "ieşi din bucla"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "continuă cu următoarea iterație a buclei"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Avertisment: Acest bloc pote fi Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pentru fiecare element %1 în listă %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pentru fiecare element din listă, setaţi variabila '%1' ca valoarea elementului, şi apoi faceţi unele declaraţii."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "numără cu %1 de la %2 la %3 prin %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Cu variablia \"%1\" ia o valoare din numărul început la numărul final, numara in intervalul specificat, apoi face blocurile specificate."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Adăugaţi o condiţie in blocul if."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Adauga o stare finala, cuprinde toata conditia din blocul if."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Adaugă, elimină sau reordonează secţiuni pentru a reconfigura acest bloc if."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "altfel"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Dacă o valoare este adevărată, atunci fa Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Dacă o valoare este adevărat, atunci face primul bloc de declaraţii. Altfel, face al doilea bloc de declaraţii."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Dacă prima valoare este adevărat, atunci face primul bloc de declaraţii. Altfel, dacă a doua valoare este adevărat, face al doilea bloc de declaraţii."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Dacă prima valoare este adevărat, atunci face primul bloc de declaraţii. Altfel, dacă a doua valoare este adevărat, face al doilea bloc de declaraţii. În cazul în care niciuna din valorilor nu este adevărat, face ultimul bloc de declaraţii."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "fă"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repetă de %1 ori"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Face unele afirmaţii de mai multe ori."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "Repetaţi până când"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repetă în timp ce"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "În timp ce o valoare este adevărat, atunci face unele declaraţii."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "În timp ce o valoare este adevărat, atunci face unele declaraţii."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Șterge Bloc"; Blockly.Msg.DELETE_X_BLOCKS = "Ștergeți %1 Blocuri"; Blockly.Msg.DISABLE_BLOCK = "Dezactivaţi bloc"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Concatenează o listă de texte (alterna Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Împarte textul într-o listă de texte, despărțite prin fiecare separator"; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "cu separatorul"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "fals"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returnează adevărat sau fals."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "adevărat"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Returnează adevărat dacă ambele intrări sunt egale."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Returnează adevărat dacă prima intrare este mai mare decât a doua intrare."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Returnează adevărat dacă prima intra Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Returnează adevărat dacă prima intrare este mai mică decât a doua intrare."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Returnează adevărat dacă prima intrare este mai mică sau egală cu a doua intrare."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Returnează adevărat daca cele două intrări nu sunt egale."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "non %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returnează adevărat dacă intrarea este falsă. Returnează fals dacă intrarea este adevărată."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nul"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "returnează nul."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "şi"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "sau"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Returnează adevărat daca ambele intrări sunt adevărate."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Returnează adevărat dacă cel puţin una din intrări este adevărată."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "dacă este fals"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "dacă este adevărat"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Verifică condiţia din \"test\". Dacă condiţia este adevărată, returnează valoarea \"în cazul în care adevărat\"; în caz contrar întoarce valoarea \"în cazul în care e fals\"."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://ro.wikipedia.org/wiki/Aritmetic%C4%83"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Returnează suma a două numere."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Returnează câtul celor două numere."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Returneaza diferenţa dintre cele două numere."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Returneaza numărul rezultat prin r Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "schimbă %1 de %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Adaugă un număr variabilei '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://ro.wikipedia.org/wiki/Constant%C4%83_matematic%C4%83"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Întoarcă una din constantele comune: π (3.141...), e (2.718...), φ (1,618...), sqrt(2) (1.414...), sqrt(½) (0.707...) sau ∞ (infinitate)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrânge %1 redus %2 ridicat %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrânge un număr să fie între limitele specificate (inclusiv)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "este divizibil cu"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "este par"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "este negativ"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "este impar"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "este pozitiv"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "este prim"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Verifică dacă un număr este un par, impar, prim, întreg, pozitiv, negativ, sau dacă este divizibil cu un anumit număr. Returnează true sau false."; Blockly.Msg.MATH_IS_WHOLE = "este întreg"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "restul la %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Întoarce restul din împărţirea celor două numere."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un număr."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "media listei"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "maximul listei"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "media listei"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "moduri de listă"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "element aleatoriu din lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "deviația standard a listei"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "suma listei"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Întoarce media (aritmetică) a valorilor numerice în listă."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Întoarce cel mai mare număr din listă."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Întoarce numărul median în listă."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "fracții aleatorii"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Returnează o fracţie aleatoare între 0.0 (inclusiv) si 1.0 (exclusiv)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "un număr întreg aleator de la %1 la %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Returnează un număr întreg aleator aflat între cele două limite specificate, inclusiv."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "rotund"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "rotunjit"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "rotunjește în sus"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Rotunjirea unui număr în sus sau în jos."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolută"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "rădăcina pătrată"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Returnează valoarea absolută a unui număr."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Returnează e la puterea unui număr."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Întoarce logaritmul natural al unui număr."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Returnează 10 la puterea unui număr." Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Returnează rădăcina pătrată a unui număr."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "arccos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "arcsin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "arctg"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tg"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Returnează arccosinusul unui număr."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Returnează arcsinusul unui număr."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Returnează arctangenta unui număr."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nume de intrare:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Adaugă un parametru de intrare pentru funcție."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "intrări"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Adăugă, șterge sau reordonează parametrii de intrare ai acestei funcții."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Elimină comentariu"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/ru.js b/msg/js/ru.js index 0d4d0fd288d..2de5b756a42 100644 --- a/msg/js/ru.js +++ b/msg/js/ru.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "красного"; Blockly.Msg.COLOUR_RGB_TITLE = "цвет из"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Создаёт цвет с указанной пропорцией красного, зеленого и синего. Все значения должны быть между 0 и 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "выйти из цикла"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "перейти к следующему шагу цикла"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Предупреждение: э Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "для каждого элемента %1 в списке %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Для каждого элемента в списке, присваивает переменной '%1' значение элемента и выполняет указанные команды."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "цикл по %1 от %2 до %3 с шагом %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Присваивает переменной '%1' значения от начального до конечного с заданным шагом и выполняет указанные команды."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Добавляет условие к блоку \"если\""; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Добавить заключительный подблок для случая, когда все условия ложны."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Добавьте, удалите, переставьте фрагменты для переделки блока \"если\"."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "иначе"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Если условие истинно, в Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Если условие истинно, выполняет первый блок команд. Иначе выполняется второй блок команд."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Если первое условие истинно, то выполняет первый блок команд. Иначе, если второе условие истинно, выполняет второй блок команд."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Если первое условие истинно, то выполняет первый блок команд. В противном случае, если второе условие истинно, выполняет второй блок команд. Если ни одно из условий не истинно, выполняет последний блок команд."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://ru.wikipedia.org/wiki/Цикл_(программирование)"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "выполнить"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "повторить %1 раз"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Выполняет команды несколько раз."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "повторять, пока не"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "повторять, пока"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Пока значение ложно, выполняет команды"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Пока значение истинно, выполняет команды."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Удалить блок"; Blockly.Msg.DELETE_X_BLOCKS = "Удалить %1 блоков"; Blockly.Msg.DISABLE_BLOCK = "Отключить блок"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Соединяет сптсок текс Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Разбивает текст в список текстов, по разделителям."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "с разделителем"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ложь"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Возвращает значение истина или ложь."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "истина"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://ru.wikipedia.org/wiki/%D0%9D%D0%B5%D1%80%D0%B0%D0%B2%D0%B5%D0%BD%D1%81%D1%82%D0%B2%D0%BE"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Возвращает значение истина, если вставки равны."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Возвращает значение истина, если первая вставка больше второй."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Возвращает значение Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Возвращает значение истина, если первая вставка меньше второй."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Возвращает значение истина, если первая вставка меньше или равна второй."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Возвращает значение истина, если вставки не равны."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "не %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Возвращает значение истина, если вставка ложна. Возвращает значение ложь, если вставка истинна."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "ничто"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Возвращает ничто."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "и"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "или"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Возвращает значение истина, если обе вставки истинны."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Возвращает значение истина, если хотя бы одна из вставок истинна."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "выбрать по"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://ru.wikipedia.org/wiki/Тернар Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "если ложь"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "если истина"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Проверяет условие выбора. Если условие истинно, возвращает первое значение, в противном случае возвращает второе значение."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://ru.wikipedia.org/wiki/Арифметика"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Возвращает сумму двух чисел."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Возвращает частное от деления первого числа на второе."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Возвращает разность двух чисел."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Возвращает первое Blockly.Msg.MATH_CHANGE_HELPURL = "https://ru.wikipedia.org/wiki/%D0%98%D0%B4%D0%B8%D0%BE%D0%BC%D0%B0_%28%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5%29#.D0.98.D0.BD.D0.BA.D1.80.D0.B5.D0.BC.D0.B5.D0.BD.D1.82"; Blockly.Msg.MATH_CHANGE_TITLE = "увеличить %1 на %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Добавляет число к переменной '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://ru.wikipedia.org/wiki/Математическая_константа"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Возвращает одну из распространённых констант: π (3.141...), e (2.718...), φ (1.618...), sqrt(2) (1.414...), sqrt(½) (0.707...) или ∞ (бесконечность)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "ограничить %1 снизу %2 сверху %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Ограничивает число нижней и верхней границами (включительно)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "делится на"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "чётное"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "отрицательное"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "нечётное"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "положительное"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "простое"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Проверяет, является ли число чётным, нечётным, простым, целым, положительным, отрицательным или оно кратно определённому числу. Возвращает значение истина или ложь."; Blockly.Msg.MATH_IS_WHOLE = "целое"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://ru.wikipedia.org/wiki/Деление_с_остатком"; Blockly.Msg.MATH_MODULO_TITLE = "остаток от %1 : %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Возвращает остаток от деления двух чисел."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://ru.wikipedia.org/wiki/Число"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Число."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "среднее арифметическое списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "наибольшее в списке"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "медиана списка"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "моды списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "случайный элемент списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "стандартное отклонение списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "сумма списка"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Возвращает среднее арифметическое списка."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Возвращает наибольшее число списка."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Возвращает медиану списка."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://ru.wikipedia.org/wiki/Генератор_псевдослучайных_чисел"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "случайное число от 0 (включительно) до 1"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Возвращает случайное число от 0.0 (включительно) до 1.0."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://ru.wikipedia.org/wiki/Генератор_псевдослучайных_чисел"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "случайное целое число от %1 для %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Возвращает случайное число между двумя заданными пределами (включая и их)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://ru.wikipedia.org/wiki/Округление"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "округлить"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "округлить к меньшему"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "округлить к большему"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Округляет число до большего или меньшего."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://ru.wikipedia.org/wiki/Квадратный_корень"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "модуль"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "квадратный корень"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Возвращает модуль числа"; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Возвращает е в указанной степени."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Возвращает натуральный логарифм числа."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Возвращает 10 в указан Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Возвращает квадратный корень числа."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://ru.wikipedia.org/wiki/Тригонометрические_функции"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Возвращает арккосинус (в градусах)."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Возвращает арксинус (в градусах)."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Возвращает арктангенс (в градусах)"; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "имя параметра:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Добавить входной параметр в функцию."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "параметры"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Добавить, удалить или изменить порядок входных параметров для этой функции."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Удалить комментарий"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/sc.js b/msg/js/sc.js index 0d8d37a5a94..4d2c923063a 100644 --- a/msg/js/sc.js +++ b/msg/js/sc.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "arrùbiu"; Blockly.Msg.COLOUR_RGB_TITLE = "colora cun"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Cuncorda unu colori cun su tanti de arrubiu, birdi, e blue. Totu is valoris depint essi intra 0 e 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "sàrtiat a foras de sa lòriga"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "sighit cun su repicu afatànti"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Amonestu: Custu brocu ddu podis Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "po dònnia item %1 in lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Po dònnia item in sa lista, ponit sa variàbili '%1' pari a s'item, e tandu fait pariga de cumandus."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "po %1 de %2 fintzas %3 a passus de %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Fait pigai a sa variàbili \"%1\" i valoris de su primu numeru a s'urtimu, a su passu impostau e fait su brocu."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Aciungi una cunditzioni a su brocu si."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Aciungi una urtima cunditzioni piga-totu a su brocu si."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Aciungi, fùlia, o assenta is partis po torrai a sètiu custu brocu si."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "sinuncas"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Si su valori est berus, tandu fait pariga d Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Si su valori est berus, tandu fai su primu brocu de is cumandus. Sinuncas, fai su segundu brocu de is cumandus."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Si su primu valori est beridadi, tandu fai su primu brocu de is cumandus. Sinuncas, si su segundu valori est beridadi, fai su segundu brocu de is cumandus."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Si su primu valori est berus, tandu fai su primu brocu de is cumandus. Sinuncas, si su segundu valori est berus, fai su segundu brocu de is cumandus. Si mancu unu valori est berus, tandu fai s'urtimu brocu de is cumandus."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "fai"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "repiti %1 bortas"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Fait pariga de cumandus prus bortas."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "repiti fintzas"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "repiti interis"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Interis su valori est frassu, tandu fai pariga de cumandus."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Interis su valori est berus, tandu fai pariga de cumandus."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Fulia Brocu"; Blockly.Msg.DELETE_X_BLOCKS = "Fulia %1 Brocus"; Blockly.Msg.DISABLE_BLOCK = "Disabìlita Brocu"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Auni una lista de testus in d-unu sceti, Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Dividi su testu in un'elencu de testus, firmendi po dònnia separadori."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "cun separadori"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "frassu"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Torrat berus o frassu."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "berus"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Torrat berus si is inputs funt unu uguali a s'àteru."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Torrat berus si su primu input est prus mannu de s'àteru."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Torrat berus si su primu input est prus Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Torrat berus si su primu input est prus piticu de s'àteru."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Torrat berus si su primu input est prus piticu o uguali a s'àteru."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Torrat berus si is inputs non funt unu uguali a s'àteru."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "non %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Torrat berus si s'input est frassu. Torrat frassu si s'input est berus."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Torrat null."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "and"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "or"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Torrat berus si ambos is inputs funt berus."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Torrat berus si assumancu unu de is inputs est berus."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "cumpròa"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si frassu"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si berus"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "‎Cumproa sa cunditzioni in 'cumproa'. Si sa cunditzioni est berus, torrat su valori 'si berus'; sinuncas torrat su valori 'si frassu'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Torrat sa summa de is duus nùmerus."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Torrat su cuotzienti de is duus nùmerus."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Torrat sa diferèntzia de is duus nùmerus."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Torrat su primu numeru artziau a sa Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "muda %1 de %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Aciungi unu numeru a sa variabili '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Torrat una de is costantis comunas: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), o ∞ (infiniu)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "custringi %1 de %2 a %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Custringi unu numeru aintru de is liminaxus giaus (cumprendius)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "fait a ddu dividi po"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "est paris"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "est negativu"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "est dísparu"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "est positivu"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "est primu"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Cumprova si unu numeru est paris, dìsparis, primu, intreu, positivu, negativu o si fait a ddu dividi po unu numeru giau. Torrat berus o frassu."; Blockly.Msg.MATH_IS_WHOLE = "est intreu"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "arrestu de %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Torrat s'arrestu de sa divisioni de duus numerus."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Unu numeru"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "mèdia de sa lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "massimu de sa lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "medianu de sa lista"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modas de sa lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "unu item a brìtiu de sa lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "deviadura standard de sa lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "suma sa lista"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Torrat sa mèdia (aritimètica) de is valoris de sa lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Torrat su numeru prus mannu de sa lista"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Torrat su numeru medianu de sa lista."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "una fratzioni a brìtiu"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Torrat una fratzioni a brìtiu intra 0.0 (cumpresu) e 1.0 (bogau)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "numeru intreu a brítiu de %1 a %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Torrat unu numeru intreu a brìtiu intra duus nùmerus giaus (cumpresus)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "arretunda"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "arretunda faci a bàsciu."; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "Arretunda faci a susu"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Arretunda unu numeru faci a susu o faci a bàsciu."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "assolutu"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "arraxina cuadra"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Torrat su valori assolútu de unu numeru."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Torrat (e) a sa potèntzia de unu numeru."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Torrat su logaritmu naturali de unu numeru."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Torrat (10) a sa potèntzia de unu nume Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Torrat s'arraxina cuadra de unu numeru."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Torrat su arccosinu de unu numeru."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Torrat su arcsinu de unu numeru."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Torrat su arctangenti de unu numeru."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "nomini input:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Aciungi un input a sa funtzioni."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Aciungi, fùlia, o assenta is inputs a custa funtzioni."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Fùlia unu cumentu"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/sk.js b/msg/js/sk.js index f77a25a06af..f4f1190787a 100644 --- a/msg/js/sk.js +++ b/msg/js/sk.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "červená"; Blockly.Msg.COLOUR_RGB_TITLE = "ofarbiť s"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Vytvoriť farbu pomocou zadaného množstva červenej, zelenej a modrej. Množstvo musí byť medzi 0 a 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "opustiť slučku"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "prejdi na nasledujúce opakovanie slučky"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Upozornenie: Tento blok sa môž Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pre každý prvok %1 v zozname %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pre každý prvok v zozname priraď jeho hodnotu do premenej '%1' a vykonaj príkazy."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "počítať s %1 od %2 do %3 o %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Nechá premennú \"%1\" nadobúdať hodnoty od začiatočného čísla po konečné s daným medzikrokom a vykoná zadané bloky."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Pridať podmienku k \"ak\" bloku."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Pridať poslednú záchytnú podmienku k \"ak\" bloku."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Pridať, odstrániť alebo zmeniť poradie oddielov tohto \"ak\" bloku."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "inak"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Ak je hodnota pravda, vykonaj príkazy."; Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Ak je hodnota pravda, vykonaj príkazy v prvom bloku. Inak vykonaj príkazy v druhom bloku."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Ak je prvá hodnota pravda, vykonaj príkazy v prvom bloku. Inak, ak je druhá hodnota pravda, vykonaj príkazy v druhom bloku."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Ak je prvá hodnota pravda, vykonaj príkazy v prvom bloku. Inak, ak je druhá hodnota pravda, vykonaj príkazy v druhom bloku. Ak ani jedna hodnota nie je pravda, vykonaj príkazy v poslednom bloku."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "rob"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "opakuj %1 krát"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Opakuj určité príkazy viackrát."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "opakuj kým nebude"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "opakuj kým"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Kým je hodnota nepravdivá, vykonávaj príkazy."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Kým je hodnota pravdivá, vykonávaj príkazy."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Odstrániť blok"; Blockly.Msg.DELETE_X_BLOCKS = "Odstrániť %1 blokov"; Blockly.Msg.DISABLE_BLOCK = "Vypnúť blok"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Spojiť zoznam textov do jedného textu Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Rozdelenie textu do zoznamu textov, lámanie na oddeľovačoch."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "s oddeľovačom"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "nepravda"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Vráť buď hodnotu pravda alebo nepravda."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "pravda"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Vráť hodnotu pravda, ak sú vstupy rovnaké."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Vráť hodnotu pravda ak prvý vstup je väčší než druhý."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Vráť hodnotu pravda ak prvý vstup je Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Vráť hodnotu pravda, ak prvý vstup je menší než druhý."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Vráť hodnotu pravda ak prvý vstup je menší alebo rovný druhému."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Vráť hodnotu pravda, ak vstupy nie sú rovnaké."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "nie je %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Vráti hodnotu pravda, ak je vstup nepravda. Vráti hodnotu nepravda ak je vstup pravda."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "nič"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Vráti hodnotu nula."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "a"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "alebo"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Vráť hodnotu pravda, ak sú vstupy pravdivé."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Vráť hodnotu pravda, ak je aspoň jeden vstup pravda."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ak nepravda"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ak pravda"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Skontroluj podmienku testom. Ak je podmienka pravda, vráť hodnotu \"ak pravda\", inak vráť hodnotu \"ak nepravda\"."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Vráť súčet dvoch čísel."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Vráť podiel dvoch čísel."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Vráť rozdiel dvoch čísel."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Vráť prvé číslo umocnené druh Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "zmeniť %1 o %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Pridaj číslo do premennej \"%1\"."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant‎"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Vráť jednu zo zvyčajných konštánt: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), alebo ∞ (nekonečno)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "obmedz %1 od %2 do %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Obmedzí číslo do zadaných hraníc (vrátane)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "je deliteľné"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "je párne"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "je záporné"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "je nepárne"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "je kladné"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "je prvočíslo"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Skontroluj či je číslo párne, nepárne, celé, kladné, záporné alebo deliteľné určitým číslom. Vráť hodnotu pravda alebo nepravda."; Blockly.Msg.MATH_IS_WHOLE = "je celé číslo"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "zvyšok po delení %1 + %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Vráť zvyšok po delení jedného čísla druhým."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Číslo."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "priemer zoznamu"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "najväčšie v zozname"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "medián zoznamu"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "najčastejšie v zozname"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "náhodný prvok zoznamu"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "smerodajná odchýlka zoznamu"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "súčet zoznamu"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Vráť aritmetický priemer čísel v zozname."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Vrátiť najväčšie číslo v zozname."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Vráť medián čísel v zozname."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "náhodné číslo od 0 do 1"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Vráť náhodné číslo z intervalu 0.0 (vrátane) až 1.0."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "náhodné celé číslo od %1 do %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Vráť náhodné celé číslo z určeného intervalu (vrátane)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "zaokrúhli"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "zaokrúhli nadol"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "zaokrúhli nahor"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Zaokrúhli číslo nahor alebo nadol."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolútna hodnota"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "druhá odmocnina"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Vráť absolútnu hodnotu čísla."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Vráť e umocnené číslom."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Vráť prirodzený logaritmus čísla."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Vráť 10 umocnené číslom."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Vráť druhú odmocninu čísla."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Vráť arkus kosínus čísla."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Vráť arkus sínus čísla."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Vráť arkus tangens čísla."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "názov vstupu:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Pridať vstup do funkcie."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "vstupy"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Pridať, odstrániť alebo zmeniť poradie vstupov tejto funkcie."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Odstrániť komentár"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/sq.js b/msg/js/sq.js index d38c221507c..939d5b4804b 100644 --- a/msg/js/sq.js +++ b/msg/js/sq.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "e kuqe"; Blockly.Msg.COLOUR_RGB_TITLE = "ngjyre me"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Krijo një ngjyrë me shumën e specifikuar te te kuqes, te gjelbëres, dhe bluse. Te gjitha vlerat duhet te jene mes 0 dhe 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "dil nga nje faze perseritese"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "vazhdo me elementin tjeter te nje faze perseritese"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Paralajmërim: Ky bllok mund të Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "per cdo produkt %1 ne liste %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Per cdo produkt ne nje \"liste\" \"vendos\" ndryshoren '%1' produktit, dhe pastaj bej disa deklarata."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "numero me %1 nga %2 ne %3 me nga %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Bëje identifikuesin \"%1\" që ta ketë vlerat prej numrit të fillimit deri tek numri i fundit, duke numëruar nga intervali i specifikuar, dhe ti bëj blloqet e specifikuara."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "\"Vendos\" \"kushtein\"tek \"pjesa\" \"if\""; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Shto një përfundues, që i mbërrin të gjitha kushtet në bllokun nëse."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Shto, fshij, ose rirregullo sektoret për ta rikonfiguruar këte bllok nëse."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "përndryshe"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Nëse një vlerë është e saktë, atëher Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Nëse një vlerë është e saktë, atëherë ekzekuto bllokun e parë të fjalive. Përndryshe, ekzekuto bllokun e dytë të fjalive."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Nëse vlera e parë është e saktë, atëherë ekzekuto bllokun e parë të fjalive. Përndryshe, nëse vlera e dytë është e saktë, ekzekuto bllokun e dytë të fjalive."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Nëse vlera e parë është e saktë, atëherë ekzekuto bllokun e parë të fjalive. Përndryshe, nëse vlera e dytë është e saktë, ekzekuto bllokun e dytë të fjalive. Nëse asnjëra nga vlerat nuk është e saktë, ekzekuto bllokun e fundit të fjalive."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "http://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "ekzekuto"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "përsërit %1 herë"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Ekzekuto disa fjali disa herë."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "përsërit derisa"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "përsërit përderisa"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Përderisa një vlerë është e pasaktë, atëherë ekzekuto disa fjali."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Përderisa një vlerë është e saktë, atëherë ekzekuto disa fjali."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Fshij bllokun"; Blockly.Msg.DELETE_X_BLOCKS = "Fshij %1 blloqe"; Blockly.Msg.DISABLE_BLOCK = "Çaktivizo bllokun"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "e pasaktë"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Kthehet ose të saktë ose të pasaktë."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "e saktë"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "http://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Ktheje të saktë nëse të dy hyrjet janë të barabarta me njëra-tjetrën."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Ktheje të saktë nëse hyrja e parë është më e madhe se hyrja e dytë."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Ktheje të saktë nëse hyrja e parë Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Ktheje të saktë nëse hyrja e parë është më e vogël se hyrja e dytë."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Ktheje të saktë nëse hyrja e parë është më e vogël ose e barabartë me hyrjen e dytë."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Ktheje të saktë nëse të dy hyrjet nuk janë të barabarta me njëra-tjetrën."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "jo %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Kthehet e saktë nëse hyrja është e pasaktë. Kthehet e pasaktë nëse hyrja është e saktë."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "pavlerë"; Blockly.Msg.LOGIC_NULL_HELPURL = "http://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Kthehet e pavlerë."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "dhe"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "ose"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Kthehet të saktë nëse të dy hyrjet janë të sakta."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Kthehet e saktë nëse së paku njëra nga hyrjet është e saktë."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "http://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "nëse e pasaktë"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "nëse e saktë"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kontrollo kushtin në 'test'. Nëse kushti është i saktë, kthen vlerën 'nëse e saktë'; përndryshe kthen vlerën 'nëse e pasaktë'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "http://sq.wikipedia.org/wiki/Aritmetika"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Kthen shumën e dy numrave."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Kthen herësin e dy numrave."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Kthen ndryshimin e dy numrave."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Kthen numrin e parë të ngritur n Blockly.Msg.MATH_CHANGE_HELPURL = "http://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "ndrysho %1 nga %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Shto një numër në ndryshoren '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "http://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Kthen një nga konstantet e përbashkëta: : π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infiniti)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "detyro %1 e ulët %2 e lartë %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Vëni një numër që të jetë në mes të kufive të specifikuara(përfshirëse)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "është i pjestueshme me"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "është çift"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "është negativ"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "është tek"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "është pozitiv"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "është prim"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Kontrollo nëse një numër është çift, tek, prim, i plotë, pozitiv, negativ, ose nëse është i pjestueshëm me një numër të caktuar. Kthehet e saktë ose e pasaktë."; Blockly.Msg.MATH_IS_WHOLE = "është i plotë"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "http://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "mbetësi i %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Kthen mbetësin nga pjestimi i dy numrave."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "x"; Blockly.Msg.MATH_NUMBER_HELPURL = "http://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Një numër."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "mesatarja e listës"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "numri më i madh i listës"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "mediana e listës"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modat e listës"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "send i rastësishëm i listës"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "devijimi standard i listës"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "mbledhja e listës"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Kthen mesatarën (kuptimi aritmetik) i vlerave numerike të listës."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Kthe numrin më të madh të listës."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Kthe numrin median të listës."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "http://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "fraksioni i rastësishëm"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Kthe fraksionin e rastësishëm në mes të 0.0 (përfshirëse) dhe 1.0 (jopërfshirëse)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "http://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "numër i plotë i rastësishëm nga %1 deri në %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Kthe një numër të plotë të rastësishëm të dy kufijve të specifikuar, të përfshirë."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "http://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "rrumbullakësimi"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "rrumbullakësimi i ulët"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "rrumbullakësimi i lartë"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Rrumbullakësimi i numrit të lartë ose të ulët."; Blockly.Msg.MATH_SINGLE_HELPURL = "http://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolut"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "rrënja katrore"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Kthen vlerën absolute të një numri."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Kthen e në fuqinë e një numri."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Kthen logaritmën natyrale të një numri."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Kthen 10 në fuqinë e një numri."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Kthen rrënjën katrore të një numri."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acosinus"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asinus"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atangjentë"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "http://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Rikthe cos-1 e nje numeri."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Rikthe sin-1 e nje numeri."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Kthe tg-1 e nje numeri."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Fut emrin:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "Informacioni i futur"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Fshij komentin"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/sr.js b/msg/js/sr.js index 39b2e036b69..bb3d1640212 100644 --- a/msg/js/sr.js +++ b/msg/js/sr.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "црвена"; Blockly.Msg.COLOUR_RGB_TITLE = "боја са"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Креирај боју са одређеном количином црвене,зелене, и плаве. Све вредности морају бити између 0 и 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "Изађите из петље"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "настави са следећом итерацијом петље"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Упозорење: Овај б Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "за сваку ставку %1 на списку %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "За сваку ставку унутар листе, подеси промењиву '%1' по ставци, и онда начини неке изјаве-наредбе."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "преброј са %1 од %2 до %3 од %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Имај промењиву \"%1\" узми вредности од почетног броја до задњег броја, бројећи по одређеном интервалу, и изврши одређене блокове."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Додајте услов блоку „ако“."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Додај коначни, catch-all (ухвати све) услове иф блока."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Додај, уклони, или преуреди делове како бих реконфигурисали овај иф блок."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "иначе"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "ако је вредност тачна, о Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "ако је вредност тачна, онда изврши први блок наредби, У супротном, изврши други блок наредби."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Ако је прва вредност тачна, онда изврши први блок наредби, у супротном, ако је друга вредност тачна , изврши други блок наредби."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Ако је прва вредност тачна, онда изврши први блок наредби, у супротном, ако је друга вредност тачна , изврши други блок наредби. Ако ни једна од вредности није тачна, изврши последнји блок наредби."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://sr.wikipedia.org/wiki/For_петља"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "изврши"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "понови %1 пута"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Одрадити неке наредбе неколико пута."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "понављати до"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "понављати док"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Док вредност није тачна, онда извршити неке наредбе."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Док је вредност тачна, онда извршите неке наредбе."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Обриши блок"; Blockly.Msg.DELETE_X_BLOCKS = "Обриши %1 блокова"; Blockly.Msg.DISABLE_BLOCK = "Онемогући блок"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "нетачно"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "враћа вредност или тачно или нетачно."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "тачно"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://sr.wikipedia.org/wiki/Неједнакост"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Враћа вредност „тачно“ ако су оба улаза једнака."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Враћа вредност „тачно“ ако је први улаз већи од другог."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Враћа вредност „тачн Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Враћа вредност „тачно“ ако је први улаз мањи од другог."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Враћа вредност „тачно“ ако је први улаз мањи или једнак другом."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Враћа вредност „тачно“ ако су оба улаза неједнака."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "није %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Враћа вредност „тачно“ ако је улаз нетачан. Враћа вредност „нетачно“ ако је улаз тачан."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "без вредности"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Враћа „без вредности“."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "и"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "или"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Враћа вредност „тачно“ ако су оба улаза тачна."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Враћа вредност „тачно“ ако је бар један од улаза тачан."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "тест"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ако је нетачно"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ако је тачно"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Провери услов у 'test'. Ако је услов тачан, тада враћа 'if true' вредност; у другом случају враћа 'if false' вредност."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Вратите збир два броја."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Враћа количник два броја."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Враћа разлику два броја."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Враћа први број сте Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "промени %1 за %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Додајте број променљивој „%1“."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://sr.wikipedia.org/wiki/Математичка_константа"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "врати једну од заједничких константи: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), или ∞ (infinity)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "ограничи %1 ниско %2 високо %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Ограничава број на доње и горње границе (укључиво)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "је дељив са"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "је паран"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "је негативан"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "је непаран"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "је позитиван"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "је прост"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Провјерава да ли је број паран, непаран, прост, цио, позитиван, негативан, или да ли је делјив са одређеним бројем. Враћа тачно или нетачно."; Blockly.Msg.MATH_IS_WHOLE = "је цео"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://sr.wikipedia.org/wiki/Конгруенција"; Blockly.Msg.MATH_MODULO_TITLE = "подсетник од %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Враћа подсетник од дељења два броја."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Неки број."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "просек списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "макс. списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "медијана списка"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "модус списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "случајна ставка списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "стандардна девијација списка"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "збир списка"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Враћа просек нумеричких вредности са списка."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Враћа највећи број са списка."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Враћа медијану са списка."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://sr.wikipedia.org/wiki/Генератор_случајних_бројева"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "случајни разломак"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Враћа случајни разломак између 0.0 (укључиво) и 1.0 (искључиво)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://sr.wikipedia.org/wiki/Генератор_случајних_бројева"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "сличајно одабрани цијели број од %1 до %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Враћа случајно одабрани цели број између две одређене границе, уклјучиво."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://sr.wikipedia.org/wiki/Заокруживање"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "заокружи"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "заокружи наниже"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "заокружи навише"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Заокружите број на већу или мању вредност."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://sr.wikipedia.org/wiki/Квадратни_корен"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "апсолутан"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "квадратни корен"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Враћа апсолутну вредност броја."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "вратити е на власти броја."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Враћа природни логаритам броја."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Враћа 10-ти степен бро Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Враћа квадратни корен броја."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "арц цос"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "арц син"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "арц тан"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "цос"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://sr.wikipedia.org/wiki/Тригонометријске_функције"; Blockly.Msg.MATH_TRIG_SIN = "син"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "тан"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Враћа аркус косинус броја."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Враћа аркус броја."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Враћа аркус тангенс броја."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "назив улаза:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "улази"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Уклони коментар"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/sv.js b/msg/js/sv.js index 641d820d655..29d4c27a673 100644 --- a/msg/js/sv.js +++ b/msg/js/sv.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "röd"; Blockly.Msg.COLOUR_RGB_TITLE = "färg med"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Skapa en färg med det angivna mängden röd, grön och blå. Alla värden måste vara mellan 0 och 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "bryt ut ur loop"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "fortsätta med nästa upprepning av loop"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Varning: Detta block kan endast Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "för varje föremål %1 i listan %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "För varje objekt i en lista, ange variabeln '%1' till objektet, och utför sedan några kommandon."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "räkna med %1 från %2 till %3 med %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Låt variabeln \"%1\" ta värden från starttalet till sluttalet, beräknat med det angivna intervallet, och utför de angivna blocken."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Lägg till ett villkor blocket \"om\"."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Lägg till ett sista villkor som täcker alla alternativ som är kvar för \"if\"-blocket."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Lägg till, ta bort eller ändra ordningen för sektioner för att omkonfigurera blocket \"om\"."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "annars"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Om ett värde är sant, utför några komma Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Om värdet är sant, utför det första kommandoblocket. Annars utför det andra kommandoblocket."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Om det första värdet är sant, utför det första kommandoblocket. Annars, om det andra värdet är sant, utför det andra kommandoblocket."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Om det första värdet är sant, utför det första kommandoblocket. Annars, om det andra värdet är sant, utför det andra kommandoblocket. Om ingen av värdena är sanna, utför det sista kommandoblocket."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "utför"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "upprepa %1 gånger"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Utför några kommandon flera gånger."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "upprepa tills"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "upprepa medan"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Medan ett värde är falskt, utför några kommandon."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Medan ett värde är sant, utför några kommandon."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Radera block"; Blockly.Msg.DELETE_X_BLOCKS = "Radera %1 block"; Blockly.Msg.DISABLE_BLOCK = "Inaktivera block"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Sammanfoga en textlista till en text, so Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Dela upp text till en textlista och bryt vid varje avgränsare."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "med avgränsare"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falskt"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returnerar antingen sant eller falskt."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "sant"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://sv.wikipedia.org/wiki/Olikhet"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Ger tillbaka sant om båda värdena är lika med varandra."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Ger tillbaka sant om det första värdet är större än det andra."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Ger tillbaka sant om det första värde Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Ger tillbaka sant om det första värdet är mindre än det andra."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Ger tillbaka sant om det första värdet är mindre än eller lika med det andra."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Ger tillbaka sant om båda värdena inte är lika med varandra."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "inte %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Ger tillbaka sant om inmatningen är falsk. Ger tillbaka falskt och inmatningen är sann."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "null"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://sv.wikipedia.org/wiki/Null"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returnerar null."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "och"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "eller"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Ger tillbaka sant om båda värdena är sanna."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Ger tillbaka sant om minst ett av värdena är sant."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "om falskt"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "om sant"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kontrollera villkoret i \"test\". Om villkoret är sant, ge tillbaka \"om sant\"-värdet; annars ge tillbaka \"om falskt\"-värdet."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://sv.wikipedia.org/wiki/Aritmetik"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Returnerar summan av de två talen."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Returnerar kvoten av de två talen."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Returnerar differensen mellan de två talen."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Ger tillbaka det första talet upph Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "ändra %1 med %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Lägg till ett tal till variabeln '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://sv.wikipedia.org/wiki/Matematisk_konstant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Returnerar en av de vanliga konstanterna: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…) eller ∞ (oändligt)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "begränsa %1 till mellan %2 och %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Begränsa ett tal till att mellan de angivna gränsvärden (inklusive)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "är delbart med"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "är jämnt"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "är negativt"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "är ojämnt"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "är positivt"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "är ett primtal"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Kontrollera om ett tal är jämnt, ojämnt, helt, positivt, negativt eller det är delbart med ett bestämt tal. Returnerar med sant eller falskt."; Blockly.Msg.MATH_IS_WHOLE = "är helt"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "resten av %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Returnerar kvoten från divisionen av de två talen."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://sv.wikipedia.org/wiki/Tal"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Ett tal."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "medelvärdet av listan"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "högsta talet i listan"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "medianen av listan"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "typvärdet i listan"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "slumpmässigt objekt i listan"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standardavvikelsen i listan"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "summan av listan"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Ger tillbaka medelvärdet (aritmetiskt) av de numeriska värdena i listan."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Ger tillbaka det största talet i listan."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Returnerar medianen av talen i listan."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://sv.wikipedia.org/wiki/Slumptalsgenerator"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "slumpat decimaltal"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Ger tillbaka ett slumpat decimaltal mellan 0.0 (inkluderat) och 1.0 (exkluderat)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://sv.wikipedia.org/wiki/Slumptalsgenerator"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "slumpartat heltal från %1 till %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Ger tillbaka ett slumpat heltal mellan två värden (inklusive)."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://sv.wikipedia.org/wiki/Avrundning"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "avrunda"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "avrunda nedåt"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "avrunda uppåt"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Avrunda ett tal uppåt eller nedåt."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://sv.wikipedia.org/wiki/Kvadratrot"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolut"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "kvadratrot"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Returnerar absolutvärdet av ett tal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Ger tillbaka e upphöjt i ett tal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Returnera den naturliga logaritmen av ett tal."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Ger tillbaka 10 upphöjt i ett tal."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Returnerar kvadratroten av ett tal."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "arccos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "arcsin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "arctan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://sv.wikipedia.org/wiki/Trigonometrisk_funktion"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Ger tillbaka arcus cosinus (arccos) för ett tal."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Ger tillbaka arcus sinus (arcsin) för ett tal."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Ger tillbaka arcus tangens (arctan) av ett tal."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "inmatningsnamn:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Lägg till en inmatning till funktionen."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inmatningar"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Lägg till, ta bort och ändra ordningen för inmatningar till denna funktion."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Radera kommentar"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/ta.js b/msg/js/ta.js index 448465e1215..d7b2d67be5c 100644 --- a/msg/js/ta.js +++ b/msg/js/ta.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "சிகப்பு"; Blockly.Msg.COLOUR_RGB_TITLE = "நிறத்துடன்"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "குறிப்பிட்ட அளவு சிவப்பு,பச்சை மற்றும் நீலம் சேர்த்து புது நிறம் உருவாக்கு. மதிப்புகள் 0 முதல் 100 வரை மட்டுமே இருக்க வேண்டும்."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "மடக்கு கட்டளையை நிறுத்து."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "மடக்கு கட்டளையின் அடுத்த இயக்கநிலைக்கு செல்"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "எச்சரிக்கை : Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "உருப்படி ஒவ்வொன்றாக %1 பட்டியலில் உள்ள %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "பட்டியலில் உள்ள உருப்படியில் ஒவ்வொன்றாக, மாறியின் பொருள் '%1' ஆக வைக்க."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "மாறியை வைத்து எண்ண %1 %2 இல் இருந்து %3 வரை %4-இன் படியாக"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "முதல் எண்ணில் இருந்து கடை எண் வரை எடுத்துக்கொள்ள ஒரு மாறியை வைத்துக்கொள், குறித்த இடைவெளியை சேர்த்தவறே தொகுதிகளை செயலாக்கு."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "ஆனால் தொகுப்பிற்கு நிபந்தனை சேர்க்க"; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "ஆனால் தொகுப்பிற்கு விதிவிலக்கு காப்பை சேர்க்க"; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "கட்டளைகளை தொகுப்பு திருத்துதம் செய்"; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "இல்லையெனில்"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "மாறி உண்மை ஆக உள Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "மாறி உண்மை ஆக உள்ள வரை, கட்டளைகளை இயக்கு. அல்லது மற்ற (அடுத்த) கட்டளைகளை இயக்கு."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "மாறி உண்மை ஆக உள்ள வரை, கட்டளைகளை தொகுப்பு இயக்கு. அல்லது மற்ற (அடுத்த) கட்டளைகளை தொகுப்பு இயக்கு."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "மாறி உண்மை ஆக உள்ள வரை, கட்டளைகளை தொகுப்பு இயக்கு. அல்லது மற்ற (அடுத்த) கட்டளைகளை தொகுப்பு இயக்கு. இரண்டும் இல்லை என்றால் கடைசி தொகுப்பு இயக்கு."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "செய்க"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "'%1' முரை திரும்ப செய்"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "கட்டளைகளை பல முரை செய்ய"; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "பலமுரை திரும்ப செய் (முடயேனில்)"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "பலமுரை திரும்ப செய் (வரை)"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "மாறி பொய் ஆக உள்ள வரை, கட்டளைகளை இயக்கு"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "மாறி உண்மை ஆக உள்ள வரை, கட்டளைகளை இயக்கு"; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "உறுப்பை நீக்கு"; Blockly.Msg.DELETE_X_BLOCKS = "%1 உறுப்பை நீக்கு"; Blockly.Msg.DISABLE_BLOCK = "உறுப்பை இயங்காது செய்"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "வரம்புச் சுட்ட Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "உரையை வரம்புச் சுட்டி கொண்டு துண்டாக்கு."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "தடை எழுத்து"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "பொய்"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "மெய், அல்லது பொய் பின்கொடு."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "மெய்"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "இரண்டு மாறியும் ஈடானால், மெய் பின்கொடு."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "முதல் உள்ளீடு இரண்டாவதைவிட அதிகமாக இருந்தால், மெய் பின்கொடு."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "முதல் உள்ளீடு Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "முதல் உள்ளீடு இரண்டாவதைவிட குறைவாக இருந்தால், மெய் பின்கொடு."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "முதல் உள்ளீடு இரண்டாவதைவிட குறைவாக அல்ல சமமாக இருந்தால், மெய் பின்கொடு"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "இரண்டு மாறியும் ஈடாகாவிட்டால், மெய் பின்கொடு."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 இல்லை"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "மெய் ஆனால், பொய் பின்கொடு. பொய் ஆனால், மெய் பின்கொடு."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "பூஜியம்"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "பூஜியம் பின்கொடு"; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "மற்றும்"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "அல்லது"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "இரண்டு மாறியும் மெய் ஆனால், மெய் பின்கொடு."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "ஏதேனும் ஒரு மதிப்பு மெய் ஆனால், மெய் பின்கொடு"; Blockly.Msg.LOGIC_TERNARY_CONDITION = "சோதனை"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "பொய்யெனில்"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "மெய்யெனில்"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'test' உள்ள நிபந்தனையை சரிபார்க்கவும், நிபந்தனை மெய்யானால்,'if true'வை பின்கொடுக்கும் இல்லையெனில் 'if false'வை பின்கொடுக்கும்."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://ta.wikipedia.org/wiki/%E0%AE%8E%E0%AE%A3%E0%AF%8D%E0%AE%95%E0%AE%A3%E0%AE%BF%E0%AE%A4%E0%AE%AE%E0%AF%8D"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "இரு எண்களின் கூட்டை பின்கொடு"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "இரு எண்களின் வகுத்தல் பின்கொடு"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "இரு எண்களின் கழிப்பை பின்கொடு"; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "முதல் உள்ளீட Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "மாற்று %1 மூலம் %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "எண்னை '%1' மதிப்பால் கூட்டு,"; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://ta.wikipedia.org/wiki/%E0%AE%95%E0%AE%A3%E0%AE%BF%E0%AE%A4_%E0%AE%AE%E0%AE%BE%E0%AE%B1%E0%AE%BF%E0%AE%B2%E0%AE%BF"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "ஒரு மாறிலியை பின்கொடு π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (முடிவிலி)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "%1 மாறியை %2 மேலும் %3 கீழும் வற்புறுத்து"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "எண் மாறி வீசுகளம் உள்ளடங்கிய வாறு வற்புறுத்து"; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "ஆல் வகுபடக் கூடியது"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "2-ஆல் பகும்"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "எண் குறைவானதா ?"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "2-ஆல் பகாத"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "எண் நேர்ம முழுதானதா ?"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "எண் பகாத்தனிதானதா?"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "எண் முழுதானதா?"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2ன் மீதி"; Blockly.Msg.MATH_MODULO_TOOLTIP = "இரண்டு எண்கள் மூலம் பிரிவில் இருந்து எஞ்சியதை பின்கொடு."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://ta.wikipedia.org/wiki/%E0%AE%8E%E0%AE%A3%E0%AF%8D"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "ஒரு எண்."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "பட்டியலின் எண் சராசரி"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "பட்டியலின் மிகுதி"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "பட்டியலின் நடுக்கோடு"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "பட்டியலின் பொ Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "ஒரு பட்டியலில் இருந்து சீரற்ற உருப்படி"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "பட்டியலின் நியமவிலகல்"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "பட்டியலின் கூட்டு"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "முழு பட்டியலின் எண் சராசரி பின்கொடு"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "பட்டியலின் அதிகமான எண் பின்கொடு"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "பட்டியலின் நடுக்கோடு பின்கொடு"; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "சீரற்ற எண் பின்னம்"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "சீரற்ற எண் பின்னம், 0.0 இல் இருந்து 1.0 உட்பட, பின்கொடு."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "வீசுகளம் %1 இல் இருந்து %2 உள்ளடங்கிய வாறு சீரற்ற எண்"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "வீசுகளம் இல் இருந்த (உள்ளடங்கிய) வாறு சீரற்ற எண் பின்கொடு."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "முழுமையாக்கு"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "கீழ்வழி முழுமையாக்கு"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "மேல்வழி முழுமையாக்கு"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "மேல்/கீழ் வழி முழு எண் ஆக மாற்று."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://ta.wikipedia.org/wiki/%E0%AE%B5%E0%AE%B0%E0%AF%8D%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AE%AE%E0%AF%82%E0%AE%B2%E0%AE%AE%E0%AF%8D"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "தனித்த"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "வர்க்கமூலம்"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "ஒரு எண்ணின் தனித்த மதிப்பை பின்கொடு"; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "e-இன் எண் அடுக்கு பெருக்கை பின்கொடு."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "ஒரு எண்ணின் (இயற்கை) மடக்கை மதிப்பை பின்கொடு."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "10-இன் எண் அடுக் Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "ஒரு எண்ணின் வர்க்கமூலத்தைத் தரும்."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://ta.wikipedia.org/wiki/%E0%AE%AE%E0%AF%81%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AF%8B%E0%AE%A3%E0%AE%B5%E0%AE%BF%E0%AE%AF%E0%AE%B2%E0%AF%8D_%E0%AE%9A%E0%AE%BE%E0%AE%B0%E0%AF%8D%E0%AE%AA%E0%AF%81%E0%AE%95%E0%AE%B3%E0%AF%8D"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "மதிப்பின் நேர்மாறு கோசைன் பின்கொடு"; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "மதிப்பின் நேர்மாறு சைன் பின்கொடு"; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "மதிப்பின் நேர்மாறு டேஞ்சன்டு பின்கொடு"; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "பெயரை உள்ளிடு Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "செயல்கூறுக்கு ஒரு உள்ளீட்டை சேர்."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "உள்ளீடுகள்"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "செயல்கூறுகளின் உள்ளீட்டை சேர், நீக்கு, or மீண்டும் வரிசை செய்."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "கருத்தை நீக்கு"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/th.js b/msg/js/th.js index 7bbafe460c1..df5fd6ca6e3 100644 --- a/msg/js/th.js +++ b/msg/js/th.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "ค่าสีแดง"; Blockly.Msg.COLOUR_RGB_TITLE = "สีที่ประกอบด้วย"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "สร้างสีด้วยการกำหนดค่าสีแดง เขียว และน้ำเงิน ค่าทั้งหมดต้องอยู่ระหว่าง 0 ถึง 100"; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "ออกจากการวนซ้ำ"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "เริ่มการวนซ้ำรอบต่อไป"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "ระวัง: บล็อก Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "วนซ้ำทุกรายการ %1 ในรายการ %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "ทำซ้ำทุกรายการ กำหนดค่าตัวแปร \"%1\" ตามรายการ และทำตามคำสั่งที่กำหนดไว้"; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "นับ %1 จาก %2 จนถึง %3 เปลี่ยนค่าทีละ %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "ตัวแปร \"%1\" จะมีค่าตั้งแต่จำนวนเริ่มต้น ไปจนถึงจำนวนสิ้นสุด โดยมีการเปลี่ยนแปลงตามจำนวนที่กำหนด"; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "กำหนดเงื่อนไขของบล็อก \"ถ้า\""; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "เพิ่มสิ่งสุดท้าย ที่จะตรวจจับความเป็นไปได้ทั้งหมดของบล็อก \"ถ้า\""; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "เพิ่ม ลบ หรือจัดเรียงบล็อก \"ถ้า\" นี้ใหม่"; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "นอกเหนือจากนี้"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "ว่าเงื่อนไขเป็ Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "ถ้าเงื่อนไขเป็นจริง ก็จะ \"ทำ\" ตามที่กำหนด แต่ถ้าเงื่อนไขเป็นเท็จก็จะทำ \"นอกเหนือจากนี้\""; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "ถ้าเงื่อนไขแรกเป็นจริง ก็จะทำตามคำสั่งในบล็อกแรก แต่ถ้าไม่ก็จะไปตรวจเงื่อนไขที่สอง ถ้าเงื่อนไขที่สองเป็นจริง ก็จะทำตามเงื่อนไขในบล็อกที่สองนี้"; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "ถ้าเงื่อนไขแรกเป็นจริง ก็จะทำคำสั่งในบล็อกแรก จากนั้นจะข้ามคำสั่งในบล็อกที่เหลือ แต่ถ้าเงื่อนไขแรกเป็นเท็จ ก็จะทำการตรวจเงื่อนไขที่สอง ถ้าเงื่อนไขที่สองเป็นจริง ก็จะทำตามคำสั่งในบล็อกที่สอง จากนั้นจะข้ามคำสั่งในบล็อกที่เหลือ แต่ถ้าทั้งเงื่อนไขแรกและเงื่อนไขที่สองเป็นเท็จทั้งหมด ก็จะมาทำบล็อกที่สาม"; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "ทำ:"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "ทำซ้ำ %1 ครั้ง"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "ทำซ้ำบางคำสั่งหลายครั้ง"; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "ทำซ้ำจนกระทั่ง"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "ทำซ้ำตราบเท่าที่"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "ตราบเท่าที่ค่าเป็นเท็จ ก็จะทำบางคำสั่ง"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "ตราบเท่าที่ค่าเป็นจริง ก็จะทำบางคำสั่ง"; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "ลบบล็อก"; Blockly.Msg.DELETE_X_BLOCKS = "ลบ %1 บล็อก"; Blockly.Msg.DISABLE_BLOCK = "ปิดใช้งานบล็อก"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "รวมรายการข้อค Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "แบ่งข้อความเป็นรายการข้อความ แยกแต่ละรายการด้วยตัวคั่น"; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "ด้วยตัวคั่น"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "เท็จ"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "คืนค่าเป็นจริงหรือเท็จ"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "จริง"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://th.wikipedia.org/wiki/อสมการ"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "คืนค่าเป็น \"จริง\" ถ้าค่าที่ใส่ทั้งสองค่านั้นเท่ากัน"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "คืนค่าเป็น \"จริง\" ถ้าค่าแรกมากกว่าค่าที่สอง"; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "คืนค่าเป็น \"จร Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "คืนค่าเป็น \"จริง\" ถ้าค่าแรกน้อยกว่าค่าที่สอง"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "คืนค่าเป็น \"จริง\" ถ้าค่าแรกน้อยกว่าหรือเท่ากับค่าที่สอง"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "คืนค่าเป็น \"จริง\" ถ้าค่าที่ใส่ทั้งสองค่านั้นไม่เท่ากัน"; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "ไม่ %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "คืนค่าเป็น \"จริง\" ถ้าค่าที่ใส่เป็นเท็จ คืนค่าเป็น \"เท็จ\" ถ้าค่าที่ใส่เป็นจริง"; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "ไม่กำหนด"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "คืนค่า \"ไม่กำหนด\""; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "และ"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "หรือ"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "คืนค่าเป็น \"จริง\" ถ้าค่าทั้งสองค่าเป็นจริง"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "คืนค่าเป็น \"จริง\" ถ้ามีอย่างน้อยหนึ่งค่าที่เป็นจริง"; Blockly.Msg.LOGIC_TERNARY_CONDITION = "ทดสอบ"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ถ้า เป็นเท็จ"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ถ้า เป็นจริง"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "ตรวจสอบเงื่อนไขใน \"ทดสอบ\" ถ้าเงื่อนไขเป็นจริง จะคืนค่า \"ถ้า เป็นจริง\" ถ้าเงื่อนไขเป็นเท็จ จะคืนค่า \"ถ้า เป็นเท็จ\""; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://th.wikipedia.org/wiki/เลขคณิต"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "คืนค่าผลรวมของตัวเลขทั้งสองจำนวน"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "คืนค่าผลหารของตัวเลขทั้งสองจำนวน"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "คืนค่าผลต่างของตัวเลขทั้งสองจำนวน"; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "คืนค่าผลการ Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "เปลี่ยนค่า %1 เป็น %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "เพิ่มค่าของตัวแปร \"%1\""; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://th.wikipedia.org/wiki/ค่าคงตัวทางคณิตศาสตร์"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "คืนค่าคงตัวทางคณิตศาสตร์ที่พบบ่อยๆ เช่น π (3.141…), e (2.718…), φ (1.618…), รากที่สอง (1.414…), รากที่ ½ (0.707…), ∞ (อนันต์)"; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "จำกัดค่า %1 ต่ำสุด %2 สูงสุด %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "จำกัดค่าของตัวเลขให้อยู่ในช่วงที่กำหนด"; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "หารลงตัว"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "เป็นจำนวนคู่"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "เป็นเลขติดลบ"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "เป็นจำนวนคี่"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "เป็นเลขบวก"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "เป็นจำนวนเฉพาะ"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "ตรวจว่าตัวเลขเป็นจำนวนคู่ จำนวนคี่ จำนวนเฉพาะ จำนวนเต็ม เลขบวก เลขติดลบ หรือหารด้วยเลขที่กำหนดลงตัวหรือไม่ คืนค่าเป็นจริงหรือเท็จ"; Blockly.Msg.MATH_IS_WHOLE = "เป็นเลขจำนวนเต็ม"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "เศษของ %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "คืนค่าเศษที่ได้จากการหารของตัวเลขทั้งสองจำนวน"; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://th.wikipedia.org/wiki/จำนวน"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "จำนวน"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "ค่าเฉลี่ยของรายการ"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "มากที่สุดในรายการ"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "ค่ามัธยฐานของรายการ"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "ฐานนิยมของราย Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "สุ่มรายการ"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "ส่วนเบี่ยงเบนมาตรฐานของรายการ"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "ผลรวมของรายการ"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "คืนค่าเฉลี่ยของรายการ"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "คืนค่าตัวเลขที่มากที่สุดในรายการ"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "คืนค่ามัธยฐานของรายการ"; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "สุ่มเลขเศษส่วน"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "สุ่มเลขเศษส่วน ตั้งแต่ 0.0 แต่ไม่เกิน 1.0"; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "สุ่มเลขจำนวนเต็มตั้งแต่ %1 จนถึง %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "สุ่มเลขจำนวนเต็มจากช่วงที่กำหนด"; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://th.wikipedia.org/wiki/การปัดเศษ"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "ปัดเศษ"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ปัดเศษลง"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "ปัดเศษขึ้น"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "ปัดเศษของตัวเลขขึ้นหรือลง"; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "ค่าสัมบูรณ์"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "รากที่สอง"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "คืนค่าค่าสัมบูรณ์ของตัวเลข"; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "คืนค่า e ยกกำลังด้วยตัวเลข"; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "คืนค่าลอการิทึมธรรมชาติของตัวเลข"; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "คืนค่า 10 ยกกำล Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "คืนค่ารากที่สองของตัวเลข"; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://th.wikipedia.org/wiki/ฟังก์ชันตรีโกณมิติ"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "คืนค่า arccosine ของตัวเลข"; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "คืนค่า arcsine ของตัวเลข"; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "คืนค่า arctangent ของตัวเลข"; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "ชื่อนำเข้า:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "นำเข้า"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "เอาคำอธิบายออก"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/tl.js b/msg/js/tl.js index f0cca732ccf..41168baddd4 100644 --- a/msg/js/tl.js +++ b/msg/js/tl.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "pula"; Blockly.Msg.COLOUR_RGB_TITLE = "kulayan ng"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "gumawa ng kulay ng may espisipikong dami ng kulay pula, berde, at asul. lahat ng halaga ay dapat sa pagitan ng 0 at 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "putulin ang paulit ulit"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "Magpatuloy sa susunod na pag-ulit ng loop"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Babala: Ang block ito ay maaari Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "sa bawat bagay %1 sa listahan %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para sa bawat item sa isang list, i-set ang variable ng '%1' sa mga item, at pagkatapos ay gumawa ng ilang mga statements."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "bilangin %1 mula %2 hanggang %3 ng %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Magkaroon ng mga variable na \"%1\" na tanggalin ng mga halaga mula sa simulang numero hanggang sa dulong numero, at bilangin sa pamamagitan ng tinukoy na agwat, at gawin ang mga tinukoy na mga blocks."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Mag dagdag ng condition sa if block."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Mag Add ng final, kunin lahat ng condition sa if block."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Mag Add, remove o kaya mag reorder ng sections para maayos ang if block."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "else"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "kung ang value ay true, gagawin ang do sta Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Kung ang value ay true, gagawin ang unang block ng do statements. Kung hindi, gagawin ang pangalawang block ng statement."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Kung ang unang value ay true, gagawin ang first block ng statement. Kung hindi, kung ang second value ay true, gagawin ang second block ng statement."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Kung ang first value ay true, gagawin ang first block ng statement. Kung hindi true ang second value, gagawin ang second block ng statement. Kung wala sa mga values ay true, gagawin ang last block ng statements."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "http://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "gawin"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "ulitin %1 beses"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "gumawa ng ilang pangungusap ng ilang ulit."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "ulitin hanggang"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "ulitin habang"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Habang ang value ay false, gagawin ang ibang statements."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Habang ang value ay true, gagawin ang ibang statements."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "burahin ang bloke"; Blockly.Msg.DELETE_X_BLOCKS = "burahin %1 ng bloke"; Blockly.Msg.DISABLE_BLOCK = "Ipangwalang bisa ang Block"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "mali"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Nag babalik ng true or false."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "tama"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "http://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Nag babalik ng true kung ang pinasok ay parehong magkatumbas."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Nagbabalik ng true kung ang unang pinasok ay mas malaki kaysa pangalawang pinasok."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Nag babalik ng true kung ang unang pina Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Nag babalik ng true kung ang unang pinasok ay maliit kaysa sa pangalawang pinasok."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Nag babalik ng true kung ang unang pinasok ay maliit sa o katumbas sa pangalawang pinasok."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "not %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "blangko"; Blockly.Msg.LOGIC_NULL_HELPURL = "http://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returns null."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "at"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "o"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "http://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "kung mali"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "kung tama"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "http://en.wikipedia.org/wiki/Arithmetic"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "http://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "baguhin %1 by %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "http://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "is even"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "ay negatibo"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "is odd"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "ay positibo"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "is prime"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; Blockly.Msg.MATH_IS_WHOLE = "is whole"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "http://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "http://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "A number."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "average of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "max of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "random item of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "sum of list"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "http://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "http://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "http://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "round"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "round down"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "round up"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; Blockly.Msg.MATH_SINGLE_HELPURL = "http://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolute"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "square root"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "http://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "input name:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Remove Comment"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/tlh.js b/msg/js/tlh.js index 8ba119f00f2..6eeecc2d0b0 100644 --- a/msg/js/tlh.js +++ b/msg/js/tlh.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "'Iw rItlh"; Blockly.Msg.COLOUR_RGB_TITLE = "rItlh wIv"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "gho Haw'"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "gho taHqa'"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "yIqIm! ghoDaq neH ngoghvam lo'la Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "ngIq Doch %1 ngaSbogh tetlh %2 nuDDI'"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "togh %1 mung %2 ghoch %3 Do %4"; Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Add a condition to the if block."; // untranslated Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block."; // untranslated +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block."; // untranslated Blockly.Msg.CONTROLS_IF_MSG_ELSE = "pagh"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "If a value is true, then do some statements Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "If a value is true, then do the first block of statements. Otherwise, do the second block of statements."; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.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."; // untranslated +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; // untranslated Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "ruch"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1-logh qaSmoH"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Do some statements several times."; // untranslated +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "teHpa' qaSmoH"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "teHtaHvIS qaSmoH"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "While a value is false, then do some statements."; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "While a value is true, then do some statements."; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "ngogh Qaw'"; Blockly.Msg.DELETE_X_BLOCKS = "%1 ngoghmey Qaw'"; Blockly.Msg.DISABLE_BLOCK = "ngogh Qotlh"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "teHbe'"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returns either true or false."; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TRUE = "teH"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; // untranslated @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is great Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "yoymoH %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "paghna'"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Returns null."; // untranslated +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "'ej"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "qoj"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated Blockly.Msg.LOGIC_TERNARY_CONDITION = "chov"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "teHbe'chugh"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "teHchugh"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to t Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated Blockly.Msg.MATH_CHANGE_TITLE = "choH %1 chel %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.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)."; // untranslated Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "jon %1 bIng %2 Dung %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "wav'a'"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "lang'a' mI'"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "bIng pagh"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "ror'a' mI'"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "Dung pagh"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "potlh'a' mI'"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.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."; // untranslated Blockly.Msg.MATH_IS_WHOLE = "ngoHlaHbe''a'"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated Blockly.Msg.MATH_MODULO_TITLE = "ratlwI' SIm %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated Blockly.Msg.MATH_NUMBER_TOOLTIP = "A number."; // untranslated +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "beQwI' SIm tetlh"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "tInwI''a' SIm tetlh"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "beQwI'botlh SIm tetlh"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "beQwI' motlh SIm tetlh"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "SaHbe' SIm tetlh"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "motlhbe'wI' SIm tetlh"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "chelwI' SIm tetlh"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "mI'HomSaHbe'"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "ngoH mI'SaHbe' bIng %1 Dung %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "ngoH"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "bIng ngoH"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "Dung ngoH"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "Dung pagh choH"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "cha'DIch wav"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; Blockly.Msg.MATH_TRIG_ACOS = "acos"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "sin"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "pong:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "qelwI'mey"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "QInHom chelHa'"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/tr.js b/msg/js/tr.js index 2c844be9821..35da894241e 100644 --- a/msg/js/tr.js +++ b/msg/js/tr.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "kırmızı"; Blockly.Msg.COLOUR_RGB_TITLE = "renk değerleri"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Kırmızı, yeşil ve mavinin belirtilen miktarıyla bir renk oluşturun. Tüm değerler 0 ile 100 arasında olmalıdır."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "döngüden çık"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "döngünün sonraki adımından devam et"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Uyarı: Bu blok sadece bir döng Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "her öğe için %1 listede %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Bir listedeki her öğe için '%1' değişkenini maddeye atayın ve bundan sonra bazı açıklamalar yapın."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "ile sayılır %1 %2 den %3 ye, her adımda %4 değişim"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "\"%1\" değişkenini başlangıç numarasından bitiş numarasına kadar tanımlı farkla değerler verirken tanımlı blokları yap."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "If bloğuna bir koşul ekleyin."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "If bloğuna kalan durumları \"yakalayan\" bir son ekle."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "If bloğuna ekle, kaldır veya yeniden düzenleme yap."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "değilse"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Eğer değişken true , yani gerçekleşmi Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Eğer değişken true, yani gerçekleşiyor ise ilk blok'taki işlemleri yerine getir, Aksi halde ikinci blok'taki işlemleri yerine getir."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Eğer ilk değişken true, yani koşul gerçekleşmiş ise ilk blok içerisindeki işlem(ler)i gerçekleştir. Eğer ikinci değişken true ise, ikinci bloktaki işlem(ler)i gerçekleştir ."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Eğer ilk değer true, yani olumlu ise, ilk blok'taki işlem(ler)i gerçekleştir. İlk değer true değil ama ikinci değer true ise, ikinci bloktaki işlem(ler)i gerçekleştir. Eğer değerlerin hiçbiri true değil ise son blok'taki işlem(ler)i gerçekleştir."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; // untranslated Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "yap"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 kez tekrarla"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Bazı işlemleri birkaç kez yap."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "kadar tekrarla"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "tekrar ederken"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Bir değer yanlış olduğunda bazı beyanlarda bulun."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Bir değer doğru olduğunda bazı beyanlarda bulun."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Bloğu Sil"; Blockly.Msg.DELETE_X_BLOCKS = "%1 Blokları Sil"; Blockly.Msg.DISABLE_BLOCK = "Bloğu Devre Dışı Bırak"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "false = Olumsuz"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Ya 'True' yada 'False' değerini verir."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "Olumlu"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Girilen iki değer birbirine eşitse \"True\" değerini verir."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Girilen ilk değer ikinci değerden daha büyükse \"True\" değerini verir."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Girilen ilk değer ikinci değerden bü Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Girilen ilk değer ikinci değerden küçükse \"True\" değerini verir."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Girilen ilk değer ikinci değerden küçük veya eşitse \"True\" değerini verir."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Girilen iki değerde birbirine eşit değilse \"True\" değerini verir."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 değil"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Girilen değer yanlışsa \"True\" değerini verir.Girilen değer doğruysa \"False\" değerini verir."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "sıfır"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "sıfır verir."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "ve"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "veya"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Girilen iki değerde doğruysa \"True\" değerini verir."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Girilen iki değerden en az biri doğruysa \"True\" değerini verir."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "yanlış ise"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "doğru ise"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'test'deki şartı test eder. Eğer şart doğru ise 'doğru' değeri döndürür, aksi halde 'yanlış' değeri döndürür."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://tr.wikipedia.org/wiki/Aritmetik"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "İki rakamın toplamını döndür."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "İki sayının bölümünü döndür."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "İki sayını farkını döndür."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "İlk sayinin ikincinin kuvvetine y Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "%1'i %2 kadar değiştir"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "'%1' değişkenine bir sayı ekle."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Yaygın sabitlerden birini döndür:π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (sonsuz)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "%1 i en düşük %2 en yüksek %3 ile sınırla"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Bir sayıyı belirli iki sayı arasında sınırlandır(dahil)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "bölünebilir"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "çift"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "negatif"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "tek"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "pozitif"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "asal"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Bir sayinin çift mi tek mi , tam mı, asal mı , pozitif mi, negatif mi, veya tam bir sayıyla bölünebilirliğini kontrol et.'True' veya 'False' değerini döndür."; Blockly.Msg.MATH_IS_WHOLE = "Bütün olduğunu"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "%1 ÷ %2 nin kalanı"; Blockly.Msg.MATH_MODULO_TOOLTIP = "İki sayının bölümünden kalanı döndür."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "x"; Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Bir sayı."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "listenin ortalaması"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "en büyük sayı"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Listenin medyanı"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "Listenin modları"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Listenin rastgele öğesi"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "Listenin standart sapması"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Listenin toplamı"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Listedeki sayısal değerlerin ortalamasını (aritmetik anlamda) döndür."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Listenin en büyüğünü döndür."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Listenin medyanını döndür."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "üst alma"; Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Rast gele kesirli sayı , yada parça"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "0.0(dahil) ve 1.0 (hariç) sayıları arasında bir sayı döndür ."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated Blockly.Msg.MATH_RANDOM_INT_TITLE = "%1 ile %2 arasında rastgele tam sayı üret"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Herhangi iki sayı arasında , sayılar dahil olmak üzere , rastgele bir tam sayı döndür."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "Yuvarla"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "aşağı yuvarla"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "yukarı yuvarla"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Bir sayı yı yukarı yada aşağı yuvarla ."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "Kesin"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "Kare kök"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Bir sayının tam değerini döndür ."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Bir sayının e ' inci kuvvetini döndür ."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Bir sayının doğal logaritmasını döndür ."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Bir sayının 10. kuvvetini döndür ." Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Bir sayının karekökü nü döndür ."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "tire"; Blockly.Msg.MATH_TRIG_ACOS = "akosünüs"; +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asinüs"; +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atanjant"; +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "kosünüs"; +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated Blockly.Msg.MATH_TRIG_SIN = "Sinüs"; +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tanjant"; +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Bir sayının ters kosunusunu döndür ."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Bir sayının ters sinüsünü döndür ."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Bir sayının ters tanjantını döndür ."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "girdi adı:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "İşleve bir girdi ekleyin."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "girdiler"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Bu işlevin girdilerini ekleyin, çıkarın, ya da yeniden sıralayın."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Yorumu Sil"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/uk.js b/msg/js/uk.js index 1258b00609a..c33b42a93b0 100644 --- a/msg/js/uk.js +++ b/msg/js/uk.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "червоний"; Blockly.Msg.COLOUR_RGB_TITLE = "колір з"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Створити колір зі вказаними рівнями червоного, зеленого та синього. Усі значення мають бути від 0 до 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "перервати цикл"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "продовжити з наступної ітерації циклу"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Попередження: цей Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "для кожного елемента %1 у списку %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Для кожного елемента в списку змінна '%1' отримує значення елемента, а потім виконуються певні дії."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "рахувати з %1 від %2 до %3 через %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Наявна змінна \"%1\" набуває значень від початкового до кінцевого, враховуючи заданий інтервал, і виконуються вказані блоки."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Додайте умову до блока 'якщо'."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Додати остаточну, всеосяжну умову до блоку 'якщо'."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Додайте, вилучіть або змініть порядок секцій, щоб переналаштувати цей блок 'якщо'."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "інакше"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Якщо значення істинне, Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Якщо значення істинне, то виконується перший блок операторів. В іншому випадку виконується другий блок операторів."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Якщо перше значення істинне, то виконується перший блок операторів. В іншому випадку, якщо друге значення істина, то виконується другий блок операторів."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Якщо перше значення істинне, то виконується перший блок операторів. В іншому випадку, якщо друге значення істинне, то виконується другий блок операторів. Якщо жодне із значень не є істинним, то виконується останній блок операторів."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://uk.wikipedia.org/wiki/Цикл_(програмування)#.D0.A6.D0.B8.D0.BA.D0.BB_.D0.B7_.D0.BB.D1.96.D1.87.D0.B8.D0.BB.D1.8C.D0.BD.D0.B8.D0.BA.D0.BE.D0.BC"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "виконати"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "повторити %1 разів"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Виконати певні дії декілька разів."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "повторювати, доки не"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "повторювати поки"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Поки значення хибне, виконувати певні дії."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Поки значення істинне, виконувати певні дії."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Видалити блок"; Blockly.Msg.DELETE_X_BLOCKS = "Видалити %1 блоків"; Blockly.Msg.DISABLE_BLOCK = "Вимкнути блок"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Злити список текстів Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Поділити текст на список текстів, розриваючи на кожному розділювачі."; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "з розділювачем"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "хибність"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Повертає значення істина або хибність."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "істина"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://uk.wikipedia.org/wiki/Нерівність"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Повертає істину, якщо обидва входи рівні один одному."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Повертає істину, якщо перше вхідне значення більше, ніж друге."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Повертає істину, якщо Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Повертає істину, якщо перше вхідне значення менше, ніж друге."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Повертає істину, якщо перше вхідне значення менше або дорівнює другому."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Повертає істину, якщо обидва входи не дорівнюють один одному."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "не %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Повертає істину, якщо вхідне значення хибне. Повертає хибність, якщо вхідне значення істинне."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "ніщо"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; Blockly.Msg.LOGIC_NULL_TOOLTIP = "Повертає ніщо."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "та"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "або"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Повертає істину, якщо обидва входи істинні."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Повертає істину, якщо принаймні один з входів істинний."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "тест"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "якщо хибність"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "якщо істина"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Перевіряє умову в 'тест'. Якщо умова істинна, то повертає значення 'якщо істина'; в іншому випадку повертає значення 'якщо хибність'."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://uk.wikipedia.org/wiki/Арифметика"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Повертає суму двох чисел."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Повертає частку двох чисел."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Повертає різницю двох чисел."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Повертає перше чис Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_TITLE = "змінити %1 на %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Додати число до змінної '%1'."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://uk.wikipedia.org/wiki/Математична_константа"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Повертає одну з поширених констант: π (3.141...), e (2.718...), φ (1,618...), sqrt(2) (1.414...), sqrt(½) (0.707...) або ∞ (нескінченність)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "обмежити %1 від %2 до %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Обмежує число вказаними межами (включно)."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "ділиться на"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "парне"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "від'ємне"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "непарне"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "додатне"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "просте"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Перевіряє, чи число парне, непарне, просте, ціле, додатне, від'ємне або чи воно ділиться на певне число без остачі. Повертає істину або хибність."; Blockly.Msg.MATH_IS_WHOLE = "ціле"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://uk.wikipedia.org/wiki/Ділення_з_остачею"; Blockly.Msg.MATH_MODULO_TITLE = "остача від %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Повертає остачу від ділення двох чисел."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://uk.wikipedia.org/wiki/Число"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Число."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = "http://www.mapleprimes.com/questions/100441-Applying-Function-To-List-Of-Numbers"; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "середнє списку"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "максимум списку"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "медіана списку"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "моди списку"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "випадковий елемент списку"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "стандартне відхилення списку"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "сума списку"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Повертає середнє (арифметичне) числових значень у списку."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Повертає найбільше число у списку."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Повертає медіану списку."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://uk.wikipedia.org/wiki/Генерація_випадкових_чисел"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "випадковий дріб"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Повертає випадковий дріб від 0,0 (включно) та 1.0 (не включно)."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://uk.wikipedia.org/wiki/Генерація_випадкових_чисел"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "випадкове ціле число від %1 до %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Повертає випадкове ціле число між двома заданими межами включно."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://uk.wikipedia.org/wiki/Округлення"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "округлити"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "округлити до меншого"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "округлити до більшого"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Округлення числа до більшого або до меншого."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://uk.wikipedia.org/wiki/Квадратний_корінь"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "модуль"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "квадратний корінь"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Повертає модуль числа."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Повертає e у степені."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Повертає натуральний логарифм числа."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Повертає 10 у степені." Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Повертає квадратний корінь з числа."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://uk.wikipedia.org/wiki/Тригонометричні_функції"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Повертає арккосинус числа."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Повертає арксинус числа."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Повертає арктангенс числа."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "назва входу:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Додати до функції вхідні параметри."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "входи"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Додайте, вилучіть або змініть порядок вхідних параметрів для цієї функції."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Видалити коментар"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/vi.js b/msg/js/vi.js index 9450b9d26b5..aca833599d1 100644 --- a/msg/js/vi.js +++ b/msg/js/vi.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "màu đỏ"; Blockly.Msg.COLOUR_RGB_TITLE = "Tạo màu từ"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Tạo màu từ ba màu: đỏ, xanh lá cây, xanh dương với số lượng cụ thể. Mỗi số phải có giá trị từ 0 đến 100."; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "thoát"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "sang lần lặp tiếp theo"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Chú ý: Mảnh này chỉ có t Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "với mỗi thành phần %1 trong danh sách %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Trong một danh sách, lấy từng thành phần, gán vào biến \"%1\", rồi thực hiện một số lệnh."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "đếm theo %1 từ %2 đến %3 mỗi lần thêm %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Đếm từ số đầu đến số cuối. Khi đến mỗi số, gán số vào biến \"%1\" rồi thực hiện các lệnh."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Thêm một điều kiện vào mảnh nếu."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Cuối cùng, khi không điều kiện nào đúng."; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Thêm, bỏ, hoặc đổi thứ tự các mảnh con để tạo cấu trúc mới cho mảnh nếu."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "nếu không"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Nếu điều kiện đúng, thực hiện Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Nếu điều kiện đúng, thực hiện các lệnh đầu. Nếu sai, thực hiện các lệnh sau."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Nếu điều kiện đúng, thực hiện các lệnh đầu. Nếu không, nếu điều kiện thứ hai đúng, thực hiện các lệnh thứ hai."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Nếu điều kiện đúng, thực hiện các lệnh đầu. Nếu không, nếu điều kiện thứ hai đúng, thực hiện các lệnh thứ hai. Nếu không điều kiện nào đúng, thực hiện các lệnh cuối cùng."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "thực hiện"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "lặp lại %1 lần"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Thực hiện các lệnh vài lần."; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "lặp lại cho đến khi"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "lặp lại trong khi"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Miễn là điều kiện còn sai, thì thực hiện các lệnh. Khi điều kiện đúng thì ngưng."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Miễn là điều kiện còn đúng, thì thực hiện các lệnh."; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "Xóa Mảnh Này"; Blockly.Msg.DELETE_X_BLOCKS = "Xóa %1 Mảnh"; Blockly.Msg.DISABLE_BLOCK = "Ngưng Tác Dụng"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "sai"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Hoàn trả \"đúng\" hoặc \"sai\"."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "đúng"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://vi.wikipedia.org/wiki/B%E1%BA%A5t_%C4%91%E1%BA%B3ng_th%E1%BB%A9c"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Hoàn trả giá trị \"đúng\" (true) nếu giá trị hai đầu vào bằng nhau."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Hoàn trả giá trị \"đúng\" (true) nếu đầu vào thứ nhất lớn hơn đầu vào thứ hai."; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Hoàn trả giá trị \"đúng\" (true Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Hoàn trả giá trị \"đúng\" (true) nếu đầu vào thứ nhất nhỏ hơn đầu vào thứ hai."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Hoàn trả giá trị \"đúng\" (true) nếu đầu vào thứ nhất nhỏ hơn hoặc bằng đầu vào thứ hai."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Hoàn trả giá trị \"đúng\" (true) nếu giá trị hai đầu vào không bằng nhau."; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "không %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Hoàn trả \"đúng\" (true) nếu đầu vào sai. Hoàn trả \"sai\" (false) nếu đầu vào đúng."; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "trống không"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Hoàn trả trống không."; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "và"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "hoặc"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Hoàn trả \"đúng\" (true) nếu cả hai đầu vào đều đúng."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Hoàn trả \"đúng\" (true) nếu ít nhất một trong hai đầu vào đúng."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "kiểm tra"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // un Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "nếu sai"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "nếu đúng"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kiểm tra điều kiện. Nếu điều kiện đúng, hoàn trả giá trị từ mệnh đề \"nếu đúng\" nếu không đúng, hoàn trả giá trị từ mệnh đề \"nếu sai\"."; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://vi.wikipedia.org/wiki/S%E1%BB%91_h%E1%BB%8Dc"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Hoàn trả tổng của hai con số."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Hoàn trả thương của hai con số."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Hoàn trả hiệu của hai con số."; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Hoàn trả số lũy thừa với Blockly.Msg.MATH_CHANGE_HELPURL = "https://vi.wikipedia.org/wiki/Ph%C3%A9p_c%E1%BB%99ng"; Blockly.Msg.MATH_CHANGE_TITLE = "cộng vào %1 giá trị %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Cộng số đầu vào vào biến \"%1\"."; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Hoàn trả các đẳng số thường gặp: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (vô cực)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "giới hạn %1 không dưới %2 không hơn %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Giới hạn số đầu vào để không dưới số thứ nhất và không hơn số thứ hai."; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "chia hết cho"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "chẵn"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "là số âm"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "lẻ"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "là số dương"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "là số nguyên tố"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "Kiểm tra con số xem nó có phải là số chẵn, lẻ, nguyên tố, nguyên, dương, âm, hay xem nó có chia hết cho số đầu vào hay không. Hoàn trả đúng hay sai."; Blockly.Msg.MATH_IS_WHOLE = "là số nguyên"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "số dư của %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Chia số thứ nhất cho số thứ hai rồi hoàn trả số dư từ."; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://vi.wikipedia.org/wiki/S%E1%BB%91"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Một con số."; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "giá trị trung bình của một danh sách"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "số lớn nhât của một danh sách"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "số trung vị của một danh sách"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "các mode của một danh sách"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "một số bất kỳ của một danh sách"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "độ lệch chuẩn của một danh sách"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "tổng của một danh sách"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Hoàn trả giá trị trung bình từ của danh sách số."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Hoàn trả số lớn nhất trong tất cả các số trong danh sách."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Hoàn trả số trung vị của danh sách số."; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "phân số bất kỳ"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Hoàn trả một phân số bất kỳ không nhỏ hơn 0.0 và không lớn hơn 1.0."; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "Một số nguyên bất kỳ từ %1 đến %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Hoàn trả một số nguyên bất kỳ lớn hơn hoặc bằng số đầu và nhỏ hơn hoặc bằng số sau."; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "làm tròn"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "làm tròn xuống"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "làm tròn lên"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "Làm tròn lên hoặc tròn xuống số đầu vào."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://vi.wikipedia.org/wiki/C%C4%83n_b%E1%BA%ADc_hai"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "giá trị tuyệt đối"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "căn bật hai"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Hoàn trả giá trị tuyệt đối của số đầu vào."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Hoàn trả lũy thừa của số e với số mũ đầu vào."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Hoàn trả lôgarit tự nhiên của số đầu vào."; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Hoàn trả lũy thừa của số 10 v Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Hoàn trả căn bật hai của số đầu vào."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://vi.wikipedia.org/wiki/H%C3%A0m_l%C6%B0%E1%BB%A3ng_gi%C3%A1c"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Hoàn trả Arccos của một góc (theo độ)."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Hoàn trả Arcsin của một góc (theo độ)."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Hoàn trả Arctang của một góc (theo độ)."; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "biến:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Thêm một đầu vào cho hàm."; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "các tham số"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Thêm, xóa hoặc sắp xếp lại các đầu vào cho hàm này."; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "Xóa Chú Giải"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/zh-hans.js b/msg/js/zh-hans.js index 5c63fee70f8..a3d066439e9 100644 --- a/msg/js/zh-hans.js +++ b/msg/js/zh-hans.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "红色"; Blockly.Msg.COLOUR_RGB_TITLE = "颜色"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "通过指定红色、绿色和蓝色的量创建一种颜色。所有的值必须介于0和100之间。"; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "中断循环"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "继续下一次循环"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "警告:此块仅可用于在 Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "为每个项目 %1 在列表中 %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "遍历每个列表中的项目,将变量“%1”设定到该项中,然后执行某些语句。"; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "使用 %1 从范围 %2 到 %3 每隔 %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "从起始数到结尾数中取出变量“%1”的值,按指定的时间间隔,执行指定的块。"; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "在if语句块中增加一个条件。"; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "添加一个最终的,包括所有情况的节到if块中。"; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "增加、删除或重新排列各节来重新配置“if”块。"; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "否则"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "如果值为真,执行一些语句。"; Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "如果值为真,则执行语句的第一块;否则,则执行语句的第二块。"; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "如果第一个值为真,则执行语句的第一个块;否则,如果第二个值为真,则执行语句的第二块。"; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "如果第一个值为真,则执行语句的第一块;否则,如果第二个值为真,则执行语句的第二块;如果没有值为真,则执行语句的最后一块。"; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://zh.wikipedia.org/wiki/For循环"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "执行"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "重复 %1 次"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "多次执行一些语句。"; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "重复直到"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "重复当"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "只要值为假,执行一些语句。"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "只要值为真,执行一些语句。"; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "删除块"; Blockly.Msg.DELETE_X_BLOCKS = "删除 %1 块"; Blockly.Msg.DISABLE_BLOCK = "禁用块"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "加入文本列表至一个文本,由 Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "拆分文本到文本列表,按每个分隔符拆分。"; Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "用分隔符"; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "错"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "同时返回真或假。"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "真"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://zh.wikipedia.org/wiki/不等"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "如果两个输入结果相等,则返回真。"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "如果第一个输入结果比第二个大,则返回真。"; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "如果第一个输入结果大于或等 Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "如果第一个输入结果比第二个小,则返回真。"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "如果第一个输入结果小于或等于第二个输入结果,则返回真。"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "如果两个输入结果不相等,则返回真。"; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://zh.wikipedia.org/wiki/逻辑非"; Blockly.Msg.LOGIC_NEGATE_TITLE = "并非%1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "如果输入结果为假,则返回真;如果输入结果为真,则返回假。"; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "空"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "返回空值。"; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "和"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "或"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "如果两个输入结果都为真,则返回真。"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "如果至少有一个输入结果为真,则返回真。"; Blockly.Msg.LOGIC_TERNARY_CONDITION = "测试"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://zh.wikipedia.org/wiki/条件运算 Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "如果为假"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "如果为真"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "检查“test”中的条件。如果条件为真,则返回“if true”的值,否则,则返回“if false”的值。"; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://zh.wikipedia.org/wiki/算术"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "返回两个数字的和。"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "返回两个数字的商。"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "返回两个数字的区别。"; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "返回第一个数的第二个数 Blockly.Msg.MATH_CHANGE_HELPURL = "https://zh.wikipedia.org/wiki/%E5%8A%A0%E6%B3%95"; Blockly.Msg.MATH_CHANGE_TITLE = "更改 %1 由 %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "将一个数添加到变量“%1”。"; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://zh.wikipedia.org/wiki/数学常数"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "返回一个常见常量:π (3.141......),e (2.718...)、φ (1.618...)、 sqrt(2) (1.414......)、sqrt(½) (0.707......)或 ∞(无穷大)。"; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "限制数字 %1 介于 (低) %2 到 (高) %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "限制数字介于两个指定的数字之间"; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "可被整除"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "是偶数"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "为负"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "是奇数"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "是正值"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "是质数"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "如果数字是偶数、奇数、非负整数、正数、负数或如果它可被某数字整除,则返回真或假。"; Blockly.Msg.MATH_IS_WHOLE = "为整数"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://zh.wikipedia.org/wiki/模除"; Blockly.Msg.MATH_MODULO_TITLE = "取余数自 %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "返回这两个数字相除后的余数。"; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://zh.wikipedia.org/wiki/数"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "一个数字。"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "列表中的平均数"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "列表中的最大值"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "列表中位数"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "列表模式"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "列表的随机项"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "列表中的标准差"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "列表中的数的总和"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "返回列表中的数值的平均值。"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "返回列表中最大数。"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "返回列表中的中位数。"; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://zh.wikipedia.org/wiki/随机数生成器"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "随机分数"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "返回介于(包含)0.0到1.0之间的随机数。"; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://zh.wikipedia.org/wiki/随机数生成器"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "从 %1 到 %2 之间的随机整数"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "返回两个指定的范围(含)之间的随机整数。"; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://zh.wikipedia.org/wiki/数值修约"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "向下舍入"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "向下舍入"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "向上舍入"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "数字向上或向下舍入。"; Blockly.Msg.MATH_SINGLE_HELPURL = "https://zh.wikipedia.org/wiki/平方根"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "绝对"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "平方根"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "返回一个数的绝对值。"; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "返回数的e次幂。"; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "返回一个数的自然对数。"; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "返回数的10次幂。"; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "返回数的平方根。"; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://zh.wikipedia.org/wiki/三角函数"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "返回一个数的反余弦值。"; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "返回一个数的反正弦值。"; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "返回指定角度的反正切值。"; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "输入名称:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "添加函数输入。"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "输入"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "添加、删除或重新排此函数的输入。"; -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "删除注释"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/js/zh-hant.js b/msg/js/zh-hant.js index 1a1b4870a4a..855edfb1285 100644 --- a/msg/js/zh-hant.js +++ b/msg/js/zh-hant.js @@ -35,6 +35,8 @@ Blockly.Msg.COLOUR_RGB_RED = "紅"; Blockly.Msg.COLOUR_RGB_TITLE = "顏色"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "透過指定紅、綠、 藍色的值來建立一種顏色。所有的值必須介於 0 和 100 之間。"; Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "停止 迴圈"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "繼續下一個 迴圈"; @@ -44,11 +46,16 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "警告: 此積木僅可用於 Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "取出每個 %1 自列表 %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "遍歷每個列表中的項目,將變量 '%1' 設定到該項目中,然後執行某些語句"; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated Blockly.Msg.CONTROLS_FOR_TITLE = "使用 %1 從範圍 %2 到 %3 每隔 %4"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "從起始數到結尾數中取出變數 \"%1\" 的值,按指定的時間間隔,執行指定的積木。"; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "將條件添加到'如果'積木。"; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "加入一個最終,所有條件下都都執行的區塊到'如果'積木中"; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "添加、 刪除或重新排列各區塊來此重新配置這個'如果'積木。"; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "否則"; @@ -58,17 +65,21 @@ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "當值為真時,執行一些語句"; Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "當值為真時,執行第一個語句,否則則執行第二個語句"; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "如果第一個值為真,則執行第一個語句。否則當第二個值為真時,則執行第二個語句"; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "如果第一個值為真,則執行第一個語句。否則當第二個值為真時,則執行第二個語句。如果前幾個敘述都不為真,則執行最後一個語句"; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://zh.wikipedia.org/wiki/For迴圈"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "執行"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "重複 %1 次"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "多次執行一些語句"; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "重複 直到"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "重複 當"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "當值為否時,執行一些語句"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "當值為真時,執行一些語句"; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated Blockly.Msg.DELETE_BLOCK = "刪除積木"; Blockly.Msg.DELETE_X_BLOCKS = "刪除 %1 塊積木"; Blockly.Msg.DISABLE_BLOCK = "停用積木"; @@ -191,9 +202,11 @@ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, sepa Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_FALSE = "否"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "返回 真 或 否。"; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "真"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://zh.wikipedia.org/wiki/不等"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "如果這兩個輸入區塊內容相等,返回 真。"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "如果第一個輸入大於第二個輸入,返回 真。"; @@ -201,15 +214,20 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "如果第一個輸入大於或等於第 Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "如果第一個輸入小於第二個輸入,返回 真。"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "如果第一個輸入是小於或等於第二個輸入,返回 真。"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "如果這兩個輸入區塊內容不相等,返回 真。"; +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "非 %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "如果輸入的值是 否,則返回 真。如果輸入的值是 真 返回 否。"; +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated Blockly.Msg.LOGIC_NULL = "空"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "返回 空。"; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated Blockly.Msg.LOGIC_OPERATION_AND = "且"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "或"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "如果這兩個輸入值都為 真,則返回 真。"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "如果至少一個輸入的值為 真,返回 真。"; Blockly.Msg.LOGIC_TERNARY_CONDITION = "測試"; @@ -217,8 +235,14 @@ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://zh.wikipedia.org/wiki/條件運算 Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "如果為非"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "如果為真"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "檢查 'test' 中的條件。如果條件為 真,將返回 '如果為 真' 值 ;否則,返回 '如果為 否' 的值。"; +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://zh.wikipedia.org/wiki/算術"; +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "返回兩個數字的總和。"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "返回兩個數字的商。"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "返回兩個數字的差。"; @@ -227,30 +251,51 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "返回第二個數字的指數的 Blockly.Msg.MATH_CHANGE_HELPURL = "https://zh.wikipedia.org/wiki/加法"; Blockly.Msg.MATH_CHANGE_TITLE = "修改 %1 自 %2"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "將數字添加到變量 '%1'。"; +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated Blockly.Msg.MATH_CONSTANT_HELPURL = "https://zh.wikipedia.org/wiki/數學常數"; +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated Blockly.Msg.MATH_CONSTANT_TOOLTIP = "返回一個的常見常量: π (3.141......),e (2.718...)、 φ (1.618...)、 開方(2) (1.414......)、 開方(½) (0.707......) 或 ∞ (無窮大)。"; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "限制數字 %1 介於 (低) %2 到 (高) %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "限制數字介於兩個指定的數字之間"; +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "format as decimal"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "可被整除"; +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated Blockly.Msg.MATH_IS_EVEN = "是偶數"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated Blockly.Msg.MATH_IS_NEGATIVE = "是負值"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated Blockly.Msg.MATH_IS_ODD = "是奇數"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated Blockly.Msg.MATH_IS_POSITIVE = "是正值"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated Blockly.Msg.MATH_IS_PRIME = "是質數"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated Blockly.Msg.MATH_IS_TOOLTIP = "如果數字是偶數,奇數,非負整數,正數、 負數或如果它是可被某數字整除,則返回 真 或 否。"; Blockly.Msg.MATH_IS_WHOLE = "是非負整數"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated Blockly.Msg.MATH_MODULO_HELPURL = "https://zh.wikipedia.org/wiki/模除"; Blockly.Msg.MATH_MODULO_TITLE = "取餘數自 %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "回傳兩個數字相除的餘數"; +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://zh.wikipedia.org/wiki/數"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "一個數字。"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "平均值 自列表"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "最大值 自列表"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "中位數 自列表"; @@ -259,6 +304,9 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "比較眾數 自列表"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "隨機抽取 自列表"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "標準差 自列表"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "總和 自列表"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "返回列表中數值的平均值 (算術平均值)。"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "返回列表中的最大數字。"; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "返回列表中數值的中位數。"; @@ -271,17 +319,25 @@ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://zh.wikipedia.org/wiki/隨機數生成器"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "取隨機分數"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "返回介於 (包含) 0.0 到 1.0 之間的隨機數。"; +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://zh.wikipedia.org/wiki/隨機數生成器"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "取隨機整數介於 (低) %1 到 %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "回傳限制的數字區間內的隨機數字"; +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated Blockly.Msg.MATH_ROUND_HELPURL = "https://zh.wikipedia.org/wiki/數值簡化"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "四捨五入"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "無條件捨去"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "無條件進位"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated Blockly.Msg.MATH_ROUND_TOOLTIP = "將數字向上或向下舍入。"; Blockly.Msg.MATH_SINGLE_HELPURL = "https://zh.wikipedia.org/wiki/平方根"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "絕對值"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated Blockly.Msg.MATH_SINGLE_OP_ROOT = "開根號"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "返回指定數字的絕對值。"; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "返回指定數字指數的 e"; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "返回指定數字的自然對數。"; @@ -291,12 +347,18 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "返回指定數字指數的10的冪次 Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "返回指定數字的平方根。"; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "返回指定角度的反餘弦值(非弧度)。"; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "返回指定角度的反正弦值(非弧度)。"; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "返回指定角度的反正切值。"; @@ -334,8 +396,8 @@ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "變量:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "參數"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "%1 with %2 %3"; // untranslated -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "%1 with %2 as %3%4"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3"; // untranslated Blockly.Msg.REMOVE_COMMENT = "移除註解"; Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated diff --git a/msg/json/en.json b/msg/json/en.json index 8f9dd3c6f4f..c79d0342858 100644 --- a/msg/json/en.json +++ b/msg/json/en.json @@ -1,7 +1,7 @@ { "@metadata": { "author": "Ellen Spertus ", - "lastupdated": "2015-07-02 14:21:58.299750", + "lastupdated": "2015-07-07 11:55:14.124266", "locale": "en", "messagedocumentation" : "qqq" }, @@ -60,23 +60,30 @@ "CONTROLS_REPEAT_TITLE_TIMES": "times", "CONTROLS_REPEAT_INPUT_DO": "do", "CONTROLS_REPEAT_TOOLTIP": "Do some statements several times.", + "CONTROLS_REPEAT_TYPEBLOCK": "Repeat 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_WHILEUNTIL_WHILE_TYPEBLOCK": "Repeat While", + "CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK": "Repeat Unitl", "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_FOR_TYPEBLOCK": "Count With From To By", "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_FOREACH_TYPEBLOCK": "For Each Item In List", "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_FLOW_STATEMENTS_BREAK_TYPEBLOCK": "Break Loop", + "CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK": "Continue 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.", @@ -88,6 +95,10 @@ "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.", + "CONTROLS_IF_TYPEBLOCK": "If", + "CONTROLS_IF_ELSIF_TYPEBLOCK": "If Else If", + "CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK": "If Else If Else", + "CONTROLS_IF_ELSE_TYPEBLOCK": "If Else", "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.", @@ -95,26 +106,34 @@ "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_COMPARE_TYPEBLOCK": "Logic Equal", "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_OPERATION_OR_TYPEBLOCK": "or", + "LOGIC_OPERATION_AND_TYPEBLOCK": "and", "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_NEGATE_TYPEBLOCK": "not", "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_BOOLEAN_TRUE_TYPEBLOCK": "True", + "LOGIC_BOOLEAN_FALSE_TYPEBLOCK": "False", "LOGIC_NULL_HELPURL": "https://en.wikipedia.org/wiki/Nullable_type", "LOGIC_NULL": "null", "LOGIC_NULL_TOOLTIP": "Returns null.", + "LOGIC_NULL_TYPEBLOCK": "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.", + "LOGIC_TERNARY_TYPEBLOCK": "Test", "MATH_NUMBER_HELPURL": "https://en.wikipedia.org/wiki/Number", "MATH_NUMBER_TOOLTIP": "A number.", "MATH_ADDITION_SYMBOL": "+", @@ -134,11 +153,19 @@ "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_ARITHMETIC_ADD_TYPEBLOCK": "+", + "MATH_ARITHMETIC_MINUS_TYPEBLOCK": "-", + "MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK": "*", + "MATH_ARITHMETIC_DIVIDE_TYPEBLOCK": "/", + "MATH_ARITHMETIC_POWER_TYPEBLOCK": "^", "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_OP_ROOT_TYPEBLOCK": "Square Root", + "MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK": "Absolute Value", + "MATH_SINGLE_OP_NEG_TYPEBLOCK": "Negation", "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.", @@ -151,8 +178,20 @@ "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_TRIG_SIN_TYPEBLOCK": "SIN", + "MATH_TRIG_COS_TYPEBLOCK": "COS", + "MATH_TRIG_TAN_TYPEBLOCK": "TAN", + "MATH_TRIG_ASIN_TYPEBLOCK": "ASIN", + "MATH_TRIG_ACOS_TYPEBLOCK": "ACOS", + "MATH_TRIG_ATAN_TYPEBLOCK": "ATAN", "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_CONSTANT_PI_TYPEBLOCK": "Constant PI", + "MATH_CONSTANT_E_TYPEBLOCK": "Constant E", + "MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK": "Constant Golden Ratio (φ)", + "MATH_CONSTANT_SQRT2_TYPEBLOCK": "Constant √ 2", + "MATH_CONSTANT_SQRT1_2_TYPEBLOCK": "Constant √ 1/2", + "MATH_CONSTANT_INFINITY_TYPEBLOCK": "Constant Infinity (∞)", "MATH_IS_EVEN": "is even", "MATH_IS_ODD": "is odd", "MATH_IS_PRIME": "is prime", @@ -161,18 +200,29 @@ "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_IS_EVEN_TYPEBLOCK": "Number Is Even", + "MATH_IS_ODD_TYPEBLOCK": "Number Is Odd", + "MATH_IS_PRIME_TYPEBLOCK": "Number Is Prime", + "MATH_IS_WHOLE_TYPEBLOCK": "Number Is Whole", + "MATH_IS_POSITIVE_TYPEBLOCK": "Number Is Positive", + "MATH_IS_NEGATIVE_TYPEBLOCK": "Number Is Negative", + "MATH_IS_DIVISIBLE_BY_TYPEBLOCK": "Number Is Divisible By", "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_CHANGE_TYPEBLOCK": "Change Variable By Amount", "MATH_FORMAT_AS_DECIMAL_TITLE": "format as decimal number %1 places %2", "MATH_FORMAT_AS_DECIMAL_TOOLTIP": "Format this number", - "MATH_FORMAT_AS_DECIMAL_TYPEBLOCK": "format as decimal", + "MATH_FORMAT_AS_DECIMAL_TYPEBLOCK": "Format as Decimal", "MATH_ONLIST_HELPURL": "https://en.wikipedia.org/wiki/Rounding", "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_ROUND_ROUND_TYPEBLOCK": "Round", + "MATH_ROUND_ROUNDUP_TYPEBLOCK": "Round Up", + "MATH_ROUND_ROUNDDOWN_TYPEBLOCK": "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.", @@ -190,18 +240,30 @@ "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_ONLIST_SUM_TYPEBLOCK": "Sum of List", + "MATH_ONLIST_MIN_TYPEBLOCK": "Min of List", + "MATH_ONLIST_MAX_TYPEBLOCK": "Max of List", + "MATH_ONLIST_AVERAGE_TYPEBLOCK": "Average of List", + "MATH_ONLIST_MEDIAN_TYPEBLOCK": "Median of List", + "MATH_ONLIST_MODE_TYPEBLOCK": "Mode of List", + "MATH_ONLIST_STD_DEV_TYPEBLOCK": "Standard Deviation of List", + "MATH_ONLIST_RANDOM_TYPEBLOCK": "Random Item of 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_MODULO_TYPEBLOCK": "Remainder of", "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_CONSTRAIN_TYPEBLOCK": "Constrain Number Low High", "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_INT_TYPEBLOCK": "Random Integer", "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).", + "MATH_RANDOM_FLOAT_TYPEBLOCK": "Random Fraction", "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", @@ -409,8 +471,8 @@ "PROCEDURES_MUTATORARG_TOOLTIP": "Add an input to the function.", "CLICK_ADD_TOOLTIP": "Add an element", "CLICK_REMOVE_TOOLTIP": "Remove this element", - "PROCEDURES_PARAM_NOTYPE": "%1 with %2 %3", - "PROCEDURES_PARAM_WITH_TYPE": "%1 with %2 as %3%4", + "PROCEDURES_PARAM_NOTYPE": "with %1 %2", + "PROCEDURES_PARAM_WITH_TYPE": "with %1 as %2%3", "PROCEDURES_HIGHLIGHT_DEF": "Highlight function definition", "PROCEDURES_CREATE_DO": "Create '%1'", "PROCEDURES_IFRETURN_TOOLTIP": "If a value is true, then return a second value.", diff --git a/msg/json/qqq.json b/msg/json/qqq.json index 69e690211dc..d2b6b2a87a5 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -54,23 +54,30 @@ "CONTROLS_REPEAT_TITLE_TIMES": "block text - Text following the number of times a [https://github.com/google/blockly/wiki/Loops#repeat repeat loop] should be repeated. (This is redundant but is needed to support older code.)", "CONTROLS_REPEAT_INPUT_DO": "block text - Preceding the blocks in the body of the loop. See [https://github.com/google/blockly/wiki/Loops https://github.com/google/blockly/wiki/Loops].", "CONTROLS_REPEAT_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat https://github.com/google/blockly/wiki/Loops#repeat].", + "CONTROLS_REPEAT_TYPEBLOCK": "typeblock - Typing to add the block", "CONTROLS_WHILEUNTIL_HELPURL": "url - Describes 'while loops' in computer programs; consider using the translation of [https://en.wikipedia.org/wiki/While_loop https://en.wikipedia.org/wiki/While_loop], if present, or [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow].", "CONTROLS_WHILEUNTIL_OPERATOR_WHILE": "dropdown - Specifies that a loop should [https://github.com/google/blockly/wiki/Loops#repeat-while repeat while] the following condition is true.", "CONTROLS_WHILEUNTIL_OPERATOR_UNTIL": "dropdown - Specifies that a loop should [https://github.com/google/blockly/wiki/Loops#repeat-until repeat until] the following condition becomes true.", "CONTROLS_WHILEUNTIL_TOOLTIP_WHILE": "tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat-while Loops#repeat-while https://github.com/google/blockly/wiki/Loops#repeat-while Loops#repeat-while].", "CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL": "tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat-until https://github.com/google/blockly/wiki/Loops#repeat-until].", + "CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK": "typeblock - Typing to add the block", + "CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK": "typeblock - Typing to add the block", "CONTROLS_FOR_HELPURL": "url - Describes 'for loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/For_loop https://en.wikipedia.org/wiki/For_loop], if present.", "CONTROLS_FOR_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Loops#count-with https://github.com/google/blockly/wiki/Loops#count-with].\n\nParameters:\n* %1 - the name of the loop variable.", "CONTROLS_FOR_TITLE": "block text - Repeatedly counts a variable (%1) starting with a (usually lower) number in a range (%2), ending with a (usually higher) number in a range (%3), and counting the iterations by a number of steps (%4). As in [https://github.com/google/blockly/wiki/Loops#count-with https://github.com/google/blockly/wiki/Loops#count-with]. [[File:Blockly-count-with.png]]", + "CONTROLS_FOR_TYPEBLOCK": "typeblock - Typing to add the block", "CONTROLS_FOREACH_HELPURL": "url - Describes 'for-each loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Foreach https://en.wikipedia.org/wiki/Foreach] if present.", "CONTROLS_FOREACH_TITLE": "block text - Title of [https://github.com/google/blockly/wiki/Loops#for-each for each block]. Sequentially assigns every item in array %2 to the valiable %1.", "CONTROLS_FOREACH_TOOLTIP": "block text - Description of [https://github.com/google/blockly/wiki/Loops#for-each for each blocks].\n\nParameters:\n* %1 - the name of the loop variable.", + "CONTROLS_FOREACH_TYPEBLOCK": "typeblock - Typing to add the block", "CONTROLS_FLOW_STATEMENTS_HELPURL": "url - Describes control flow in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow], if it exists.", "CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "dropdown - The current loop should be exited. See [https://github.com/google/blockly/wiki/Loops#break https://github.com/google/blockly/wiki/Loops#break].", "CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "dropdown - The current iteration of the loop should be ended and the next should begin. See [https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration].", "CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK": "tooltip - See [https://github.com/google/blockly/wiki/Loops#break-out-of-loop https://github.com/google/blockly/wiki/Loops#break-out-of-loop].", "CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE": "tooltip - See [https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration].", "CONTROLS_FLOW_STATEMENTS_WARNING": "warning - The user has tried placing a block outside of a loop (for each, while, repeat, etc.), but this type of block may only be used within a loop. See [https://github.com/google/blockly/wiki/Loops#loop-termination-blocks https://github.com/google/blockly/wiki/Loops#loop-termination-blocks].", + "CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK": "typeblock - Typing to add the block", + "CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK": "typeblock - Typing to add the block", "CONTROLS_IF_HELPURL": "url - Describes conditional statements (if-then-else) in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_else https://en.wikipedia.org/wiki/If_else], if present.", "CONTROLS_IF_TOOLTIP_1": "tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-blocks 'if' blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present.", "CONTROLS_IF_TOOLTIP_2": "tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-else-blocks if-else blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present.", @@ -82,6 +89,10 @@ "CONTROLS_IF_IF_TOOLTIP": "tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].", "CONTROLS_IF_ELSEIF_TOOLTIP": "tooltip - Describes the 'else if' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].", "CONTROLS_IF_ELSE_TOOLTIP": "tooltip - Describes the 'else' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].", + "CONTROLS_IF_TYPEBLOCK": "typeblock - Typing to add the block", + "CONTROLS_IF_ELSIF_TYPEBLOCK": "typeblock - Typing to add the block", + "CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK": "typeblock - Typing to add the block", + "CONTROLS_IF_ELSE_TYPEBLOCK": "typeblock - Typing to add the block", "LOGIC_COMPARE_HELPURL": "url - Information about comparisons.", "LOGIC_COMPARE_TOOLTIP_EQ": "tooltip - Describes the equals (=) block.", "LOGIC_COMPARE_TOOLTIP_NEQ": "tooltip - Describes the not equals (≠) block.", @@ -89,26 +100,34 @@ "LOGIC_COMPARE_TOOLTIP_LTE": "tooltip - Describes the less than or equals (≤) block.", "LOGIC_COMPARE_TOOLTIP_GT": "tooltip - Describes the greater than (>) block.", "LOGIC_COMPARE_TOOLTIP_GTE": "tooltip - Describes the greater than or equals (≥) block.", + "LOGIC_COMPARE_TYPEBLOCK": "typeblock - Typing to add the block", "LOGIC_OPERATION_HELPURL": "url - Information about the Boolean conjunction ('and') and disjunction ('or') operators. Consider using the translation of [https://en.wikipedia.org/wiki/Boolean_logic https://en.wikipedia.org/wiki/Boolean_logic], if it exists in your language.", "LOGIC_OPERATION_TOOLTIP_AND": "tooltip - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction].", "LOGIC_OPERATION_AND": "block text - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction].", "LOGIC_OPERATION_TOOLTIP_OR": "block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction].", "LOGIC_OPERATION_OR": "block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction].", + "LOGIC_OPERATION_OR_TYPEBLOCK": "typeblock - Typing to add the block", + "LOGIC_OPERATION_AND_TYPEBLOCK": "typeblock - Typing to add the block", "LOGIC_NEGATE_HELPURL": "url - Information about logical negation. The translation of [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation] is recommended if it exists in the target language.", "LOGIC_NEGATE_TITLE": "block text - This is a unary operator that returns ''false'' when the input is ''true'', and ''true'' when the input is ''false''. \n\nParameters:\n* %1 - the input (which should be either the value 'true' or 'false')", "LOGIC_NEGATE_TOOLTIP": "tooltip - See [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation].", + "LOGIC_NEGATE_TYPEBLOCK": "typeblock - Typing to add the block", "LOGIC_BOOLEAN_HELPURL": "url - Information about the logic values ''true'' and ''false''. Consider using the translation of [https://en.wikipedia.org/wiki/Truth_value https://en.wikipedia.org/wiki/Truth_value] if it exists in your language.", "LOGIC_BOOLEAN_TRUE": "block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''true''.", "LOGIC_BOOLEAN_FALSE": "block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''false''.", "LOGIC_BOOLEAN_TOOLTIP": "tooltip - Indicates that the block returns either of the two possible [https://en.wikipedia.org/wiki/Truth_value logical values].", + "LOGIC_BOOLEAN_TRUE_TYPEBLOCK": "typeblock - Typing to add the block", + "LOGIC_BOOLEAN_FALSE_TYPEBLOCK": "typeblock - Typing to add the block", "LOGIC_NULL_HELPURL": "url - Provide a link to the translation of [https://en.wikipedia.org/wiki/Nullable_type https://en.wikipedia.org/wiki/Nullable_type], if it exists in your language; otherwise, do not worry about translating this advanced concept.", "LOGIC_NULL": "block text - In computer languages, ''null'' is a special value that indicates that no value has been set. You may use your language's word for 'nothing' or 'invalid'.", "LOGIC_NULL_TOOLTIP": "tooltip - This should use the word from the previous message.", + "LOGIC_NULL_TYPEBLOCK": "typeblock - Typing to add the block", "LOGIC_TERNARY_HELPURL": "url - Describes the programming language operator known as the ''ternary'' or ''conditional'' operator. It is recommended that you use the translation of [https://en.wikipedia.org/wiki/%3F: https://en.wikipedia.org/wiki/%3F:] if it exists.", "LOGIC_TERNARY_CONDITION": "block input text - Label for the input whose value determines which of the other two inputs is returned. In some programming languages, this is called a ''''predicate''''.", "LOGIC_TERNARY_IF_TRUE": "block input text - Indicates that the following input should be returned (used as output) if the test input is true. Remember to try to keep block text terse (short).", "LOGIC_TERNARY_IF_FALSE": "block input text - Indicates that the following input should be returned (used as output) if the test input is false.", "LOGIC_TERNARY_TOOLTIP": "tooltip - See [https://en.wikipedia.org/wiki/%3F: https://en.wikipedia.org/wiki/%3F:].", + "LOGIC_TERNARY_TYPEBLOCK": "typeblock - Typing to add the block", "MATH_NUMBER_HELPURL": "url - Information about (real) numbers.", "MATH_NUMBER_TOOLTIP": "tooltip - Any positive or negative number, not necessarily an integer.", "MATH_ADDITION_SYMBOL": "{{optional}}\nmath - The symbol for the binary operation addition.", @@ -128,11 +147,19 @@ "MATH_ARITHMETIC_TOOLTIP_MULTIPLY": "tooltip - See [https://en.wikipedia.org/wiki/Multiplication https://en.wikipedia.org/wiki/Multiplication].", "MATH_ARITHMETIC_TOOLTIP_DIVIDE": "tooltip - See [https://en.wikipedia.org/wiki/Division_(mathematics) https://en.wikipedia.org/wiki/Division_(mathematics)].", "MATH_ARITHMETIC_TOOLTIP_POWER": "tooltip - See [https://en.wikipedia.org/wiki/Exponentiation https://en.wikipedia.org/wiki/Exponentiation].", + "MATH_ARITHMETIC_ADD_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ARITHMETIC_MINUS_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ARITHMETIC_DIVIDE_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ARITHMETIC_POWER_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_SINGLE_HELPURL": "url - Information about the square root operation.", "MATH_SINGLE_OP_ROOT": "dropdown - This computes the positive [https://en.wikipedia.org/wiki/Square_root square root] of its input. For example, the square root of 16 is 4.", "MATH_SINGLE_TOOLTIP_ROOT": "tooltip - Please use the same term as in the previous message.", "MATH_SINGLE_OP_ABSOLUTE": "dropdown - This leaves positive numeric inputs changed and inverts negative inputs. For example, the absolute value of 5 is 5; the absolute value of -5 is also 5. For more information, see [https://en.wikipedia.org/wiki/Absolute_value https://en.wikipedia.org/wiki/Absolute_value].", "MATH_SINGLE_TOOLTIP_ABS": "tooltip - Please use the same term as in the previous message.", + "MATH_SINGLE_OP_ROOT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_SINGLE_OP_NEG_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_SINGLE_TOOLTIP_NEG": "tooltip - Calculates '''0-n''', where '''n''' is the single numeric input.", "MATH_SINGLE_TOOLTIP_LN": "tooltip - Calculates the [https://en.wikipedia.org/wiki/Natural_logarithm|natural logarithm] of its single numeric input.", "MATH_SINGLE_TOOLTIP_LOG10": "tooltip - Calculates the [https://en.wikipedia.org/wiki/Common_logarithm common logarithm] of its single numeric input.", @@ -145,8 +172,20 @@ "MATH_TRIG_TOOLTIP_ASIN": "tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent sine function], using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians.", "MATH_TRIG_TOOLTIP_ACOS": "tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent cosine] function, using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians.", "MATH_TRIG_TOOLTIP_ATAN": "tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent tangent] function, using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians.", + "MATH_TRIG_SIN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_TRIG_COS_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_TRIG_TAN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_TRIG_ASIN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_TRIG_ACOS_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_TRIG_ATAN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_CONSTANT_HELPURL": "url - Information about the mathematical constants Pi (π), e, the golden ratio (φ), √ 2, √ 1/2, and infinity (∞).", "MATH_CONSTANT_TOOLTIP": "tooltip - Provides the specified [https://en.wikipedia.org/wiki/Mathematical_constant mathematical constant].", + "MATH_CONSTANT_PI_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_CONSTANT_E_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_CONSTANT_SQRT2_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_CONSTANT_SQRT1_2_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_CONSTANT_INFINITY_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_IS_EVEN": "dropdown - A number is '''even''' if it is a multiple of 2. For example, 4 is even (yielding true), but 3 is not (false).", "MATH_IS_ODD": "dropdown - A number is '''odd''' if it is not a multiple of 2. For example, 3 is odd (yielding true), but 4 is not (false). The opposite of 'odd' is 'even'.", "MATH_IS_PRIME": "dropdown - A number is [https://en.wikipedia.org/wiki/Prime prime] if it cannot be evenly divided by any positive integers except for 1 and itself. For example, 5 is prime, but 6 is not because 2 × 3 = 6.", @@ -155,18 +194,29 @@ "MATH_IS_NEGATIVE": "dropdown - A number is '''negative''' if it is less than 0. (0 is neither negative nor positive.)", "MATH_IS_DIVISIBLE_BY": "dropdown - A number x is divisible by y if y goes into x evenly. For example, 10 is divisible by 5, but 10 is not divisible by 3.", "MATH_IS_TOOLTIP": "tooltip - This block lets the user specify via a dropdown menu whether to check if the numeric input is even, odd, prime, whole, positive, negative, or divisible by a given value.", + "MATH_IS_EVEN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_IS_ODD_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_IS_PRIME_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_IS_WHOLE_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_IS_POSITIVE_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_IS_NEGATIVE_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_IS_DIVISIBLE_BY_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_CHANGE_HELPURL": "url - Information about incrementing (increasing the value of) a variable. For other languages, just use the translation of the Wikipedia page about addition ([https://en.wikipedia.org/wiki/Addition https://en.wikipedia.org/wiki/Addition]).", "MATH_CHANGE_TITLE": "- As in: ''change'' [the value of variable] ''item'' ''by'' 1 (e.g., if the variable named 'item' had the value 5, change it to 6). %1 is a variable name. %2 is the amount of change.", "MATH_CHANGE_TOOLTIP": "tooltip - This updates the value of the variable by adding to it the following numeric input.\n\nParameters:\n* %1 - the name of the variable whose value should be increased.", + "MATH_CHANGE_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_FORMAT_AS_DECIMAL_TITLE": "format as decimal", - "MATH_FORMAT_AS_DECIMAL_TOOLTIP": "", - "MATH_FORMAT_AS_DECIMAL_TYPEBLOCK": "", + "MATH_FORMAT_AS_DECIMAL_TOOLTIP": "Tooltip - this formats a number as decimal to a given number of places", + "MATH_FORMAT_AS_DECIMAL_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_ONLIST_HELPURL": "url - Information about how numbers are rounded to the nearest integer", "MATH_ROUND_HELPURL": "url - Information about how numbers are rounded to the nearest integer", "MATH_ROUND_TOOLTIP": "tooltip - See [https://en.wikipedia.org/wiki/Rounding https://en.wikipedia.org/wiki/Rounding].", "MATH_ROUND_OPERATOR_ROUND": "dropdown - This rounds its input to the nearest whole number. For example, 3.4 is rounded to 3.", "MATH_ROUND_OPERATOR_ROUNDUP": "dropdown - This rounds its input up to the nearest whole number. For example, if the input was 2.2, the result would be 3.", "MATH_ROUND_OPERATOR_ROUNDDOWN": "dropdown - This rounds its input down to the nearest whole number. For example, if the input was 3.8, the result would be 3.", + "MATH_ROUND_ROUND_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ROUND_ROUNDUP_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ROUND_ROUNDDOWN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_ONLIST_HELPURL": "url - Information about applying a function to a list of numbers. (We were unable to find such information in English. Feel free to skip this and any other URLs that are difficult.)", "MATH_ONLIST_OPERATOR_SUM": "dropdown - This computes the sum of the numeric elements in the list. For example, the sum of the list {1, 4} is 5.", "MATH_ONLIST_TOOLTIP_SUM": "tooltip - Please use the same term for 'sum' as in the previous message.", @@ -184,18 +234,30 @@ "MATH_ONLIST_TOOLTIP_STD_DEV": "tooltip - See [https://en.wikipedia.org/wiki/Standard_deviation https://en.wikipedia.org/wiki/Standard_deviation] for more information.", "MATH_ONLIST_OPERATOR_RANDOM": "dropdown - This choose an element at random from a list. Each element is chosen with equal probability.", "MATH_ONLIST_TOOLTIP_RANDOM": "tooltip - Please use same term for 'random' as in previous entry.", + "MATH_ONLIST_SUM_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ONLIST_MIN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ONLIST_MAX_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ONLIST_AVERAGE_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ONLIST_MEDIAN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ONLIST_MODE_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ONLIST_STD_DEV_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "MATH_ONLIST_RANDOM_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_MODULO_HELPURL": "url - information about the modulo (remainder) operation.", "MATH_MODULO_TITLE": "block text - Title of block providing the remainder when dividing the first numerical input by the second. For example, the remainder of 10 divided by 3 is 1.\n\nParameters:\n* %1 - the dividend (10, in our example)\n* %2 - the divisor (3 in our example).", "MATH_MODULO_TOOLTIP": "tooltip - For example, the remainder of 10 divided by 3 is 1.", + "MATH_MODULO_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_CONSTRAIN_HELPURL": "url - Information about constraining a numeric value to be in a specific range. (The English URL is not ideal. Recall that translating URLs is the lowest priority.)", "MATH_CONSTRAIN_TITLE": "block text - The title of the block that '''constrain'''s (forces) a number to be in a given range. For example, if the number 150 is constrained to be between 5 and 100, the result will be 100. \n\nParameters:\n* %1 - the value to constrain (e.g., 150)\n* %2 - the minimum value (e.g., 5)\n* %3 - the maximum value (e.g., 100).", "MATH_CONSTRAIN_TOOLTIP": "tooltip - This compares a number ''x'' to a low value ''L'' and a high value ''H''. If ''x'' is less then ''L'', the result is ''L''. If ''x'' is greater than ''H'', the result is ''H''. Otherwise, the result is ''x''.", + "MATH_CONSTRAIN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_RANDOM_INT_HELPURL": "url - Information about how computers generate random numbers.", "MATH_RANDOM_INT_TITLE": "block text - The title of the block that generates a random integer (whole number) in the specified range. For example, if the range is from 5 to 7, this returns 5, 6, or 7 with equal likelihood. %1 is a placeholder for the lower number, %2 is the placeholder for the larger number.", "MATH_RANDOM_INT_TOOLTIP": "tooltip - Return a random integer between two values specified as inputs. For example, if one input was 7 and another 9, any of the numbers 7, 8, or 9 could be produced.", + "MATH_RANDOM_INT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "MATH_RANDOM_FLOAT_HELPURL": "url - Information about how computers generate random numbers (specifically, numbers in the range from 0 to just below 1).", "MATH_RANDOM_FLOAT_TITLE_RANDOM": "block text - The title of the block that generates a random number greater than or equal to 0 and less than 1.", "MATH_RANDOM_FLOAT_TOOLTIP": "tooltip - Return a random fraction between 0 and 1. The value may be equal to 0 but must be less than 1.", + "MATH_RANDOM_FLOAT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_TEXT_HELPURL": "url - Information about how computers represent text (sometimes referred to as ''string''s).", "TEXT_TEXT_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text https://github.com/google/blockly/wiki/Text].", "TEXT_JOIN_HELPURL": "url - Information on concatenating/appending pieces of text.", @@ -240,8 +302,8 @@ "TEXT_GET_SUBSTRING_END_LAST": "block text - Indicates that a region ending with the last letter of the preceding piece of text should be extracted. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_TAIL": "block text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text extracting a region of text]. In most languages, this will be the empty string. [[File:Blockly-get-substring.png]]", "TEXT_CONTAINS_HELPURL": "url - Information about how the text contains block works", - "TEXT_CONTAINS_INPUT": "", - "TEXT_CONTAINS_TOOLTIP": "tooltip - Describes a block to adjust the case of letters. For more information on this block,", + "TEXT_CONTAINS_INPUT": "Title for the Contains Text block. %1 corresponds to the Text input block which is of type 'String' %2 corresponds for the Piece input block which is of type 'String' see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains]", + "TEXT_CONTAINS_TOOLTIP": "tooltip - Describes a block to adjust the case of letters. For more information on this block, see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains]", "TEXT_CHANGECASE_HELPURL": "url - Information about the case of letters (upper-case and lower-case).", "TEXT_CHANGECASE_TOOLTIP": "tooltip - Describes a block to adjust the case of letters. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", "TEXT_CHANGECASE_OPERATOR_UPPERCASE": "block text - Indicates that all of the letters in the following piece of text should be capitalized. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", @@ -401,16 +463,16 @@ "PROCEDURES_MUTATORCONTAINER_TOOLTIP": "tooltip", "PROCEDURES_MUTATORARG_TITLE": "block text - This text appears on a block in a window that appears when the user clicks on the plus sign or star on a function definition block]. It appears on the block for adding an individual parameter (referred to by the simpler term 'inputs') to the function. See [[Translating:Blockly#function_definitions]].", "PROCEDURES_MUTATORARG_TOOLTIP": "tooltip", - "CLICK_ADD_TOOLTIP": "", - "CLICK_REMOVE_TOOLTIP": "", - "PROCEDURES_PARAM_NOTYPE": "", - "PROCEDURES_PARAM_WITH_TYPE": "", + "CLICK_ADD_TOOLTIP": "This text is the tooltip for the + icon on a mutator object", + "CLICK_REMOVE_TOOLTIP": "This text is the tooltip for the - icon on a mutator object", + "PROCEDURES_PARAM_NOTYPE": "This is the string for creating a parameter line on a function. %1 corresponds to the name of the parameter as a FieldTextInput %2 corresponds to the - icon for removing the field", + "PROCEDURES_PARAM_WITH_TYPE": "This is the string for creating a parameter line on a function. %1 corresponds to the name of the parameter as a FieldTextInput %2 corresponds to the type of the parameter as a FieldScopeVariable %3 corresponds to the - icon for removing the field", "PROCEDURES_HIGHLIGHT_DEF": "context menu - This appears on the context menu for function calls. Selecting it causes the corresponding function definition to be highlighted (as shown at [[Translating:Blockly#context_menus]].", "PROCEDURES_CREATE_DO": "context menu - This appears on the context menu for function definitions. Selecting it creates a block to call the function.\n\nParameters:\n* %1 - the name of the function.", "PROCEDURES_IFRETURN_TOOLTIP": "tooltip - If the first value is true, this causes the second value to be returned immediately from the enclosing function.", "PROCEDURES_IFRETURN_WARNING": "warning - This appears if the user tries to use this block outside of a function definition.", - "TEXT_TYPE_JAVA": "", - "TEXT_TYPE_PYTHON": "", - "TEXT_TOOLTIP_TYPE_JAVA": "", - "TEXT_TOOLTIP_TYPE_PYTHON": "" + "TEXT_TYPE_JAVA": "Block text", + "TEXT_TYPE_PYTHON": "Block Text", + "TEXT_TOOLTIP_TYPE_JAVA": "tooltip", + "TEXT_TOOLTIP_TYPE_PYTHON": "tooltip" } diff --git a/msg/messages.js b/msg/messages.js index 9c14e739ad1..3fe47339297 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -173,6 +173,8 @@ Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = 'times'; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = 'do'; /// tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat https://github.com/google/blockly/wiki/Loops#repeat]. Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = 'Do some statements several times.'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = 'Repeat Times'; /// url - Describes 'while loops' in computer programs; consider using the translation of [https://en.wikipedia.org/wiki/While_loop https://en.wikipedia.org/wiki/While_loop], if present, or [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow]. Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = 'https://github.com/google/blockly/wiki/Loops#repeat'; Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; @@ -184,6 +186,10 @@ Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = 'repeat until'; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = 'While a value is true, then do some statements.'; /// tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat-until https://github.com/google/blockly/wiki/Loops#repeat-until]. Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = 'While a value is false, then do some statements.'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = 'Repeat While'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = 'Repeat Unitl'; /// url - Describes 'for loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/For_loop https://en.wikipedia.org/wiki/For_loop], if present. Blockly.Msg.CONTROLS_FOR_HELPURL = 'https://github.com/google/blockly/wiki/Loops#count-with'; @@ -198,6 +204,8 @@ Blockly.Msg.CONTROLS_FOR_TOOLTIP = 'Have the variable "%1" take on the values fr /// [[File:Blockly-count-with.png]] Blockly.Msg.CONTROLS_FOR_TITLE = 'count with %1 from %2 to %3 by %4'; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = 'Count With From To By'; /// url - Describes 'for-each loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Foreach https://en.wikipedia.org/wiki/Foreach] if present. Blockly.Msg.CONTROLS_FOREACH_HELPURL = 'https://github.com/google/blockly/wiki/Loops#for-each'; @@ -207,6 +215,8 @@ Blockly.Msg.CONTROLS_FOREACH_TITLE = 'for each item %1 in list %2'; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; /// block text - Description of [https://github.com/google/blockly/wiki/Loops#for-each for each blocks].\n\nParameters:\n* %1 - the name of the loop variable. Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = 'For each item in a list, set the variable "%1" to the item, and then do some statements.'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = 'For Each Item In List'; /// url - Describes control flow in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow], if it exists. Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = 'https://github.com/google/blockly/wiki/Loops#loop-termination-blocks'; @@ -220,6 +230,10 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = 'Break out of the containin Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = 'Skip the rest of this loop, and continue with the next iteration.'; /// warning - The user has tried placing a block outside of a loop (for each, while, repeat, etc.), but this type of block may only be used within a loop. See [https://github.com/google/blockly/wiki/Loops#loop-termination-blocks https://github.com/google/blockly/wiki/Loops#loop-termination-blocks]. Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = 'Warning: This block may only be used within a loop.'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = 'Break Loop'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = 'Continue Loop'; // Logic Blocks. /// url - Describes conditional statements (if-then-else) in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_else https://en.wikipedia.org/wiki/If_else], if present. @@ -249,6 +263,14 @@ Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = 'Add a condition to the if block.'; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; /// tooltip - Describes the 'else' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification]. Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = 'Add a final, catch-all condition to the if block.'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = 'If'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = 'If Else If'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = 'If Else If Else'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = 'If Else'; /// url - Information about comparisons. Blockly.Msg.LOGIC_COMPARE_HELPURL = 'https://en.wikipedia.org/wiki/Inequality_(mathematics)'; @@ -264,6 +286,8 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = 'Return true if the first input is small Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = 'Return true if the first input is greater than the second input.'; /// tooltip - Describes the greater than or equals (≥) block. Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = 'Return true if the first input is greater than or equal to the second input.'; +/// typeblock - Typing to add the block +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = 'Logic Equal'; /// url - Information about the Boolean conjunction ("and") and disjunction ("or") operators. Consider using the translation of [https://en.wikipedia.org/wiki/Boolean_logic https://en.wikipedia.org/wiki/Boolean_logic], if it exists in your language. Blockly.Msg.LOGIC_OPERATION_HELPURL = 'https://github.com/google/blockly/wiki/Logic#logical-operations'; @@ -275,6 +299,11 @@ Blockly.Msg.LOGIC_OPERATION_AND = 'and'; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = 'Return true if at least one of the inputs is true.'; /// block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction]. Blockly.Msg.LOGIC_OPERATION_OR = 'or'; +/// typeblock - Typing to add the block +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = 'or'; +/// typeblock - Typing to add the block +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = 'and'; + /// url - Information about logical negation. The translation of [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation] is recommended if it exists in the target language. Blockly.Msg.LOGIC_NEGATE_HELPURL = 'https://github.com/google/blockly/wiki/Logic#not'; @@ -283,6 +312,8 @@ Blockly.Msg.LOGIC_NEGATE_HELPURL = 'https://github.com/google/blockly/wiki/Logic Blockly.Msg.LOGIC_NEGATE_TITLE = 'not %1'; /// tooltip - See [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation]. Blockly.Msg.LOGIC_NEGATE_TOOLTIP = 'Returns true if the input is false. Returns false if the input is true.'; +/// typeblock - Typing to add the block +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = 'not'; /// url - Information about the logic values ''true'' and ''false''. Consider using the translation of [https://en.wikipedia.org/wiki/Truth_value https://en.wikipedia.org/wiki/Truth_value] if it exists in your language. Blockly.Msg.LOGIC_BOOLEAN_HELPURL = 'https://github.com/google/blockly/wiki/Logic#values'; @@ -292,6 +323,10 @@ Blockly.Msg.LOGIC_BOOLEAN_TRUE = 'true'; Blockly.Msg.LOGIC_BOOLEAN_FALSE = 'false'; /// tooltip - Indicates that the block returns either of the two possible [https://en.wikipedia.org/wiki/Truth_value logical values]. Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = 'Returns either true or false.'; +/// typeblock - Typing to add the block +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = 'True'; +/// typeblock - Typing to add the block +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = 'False'; /// url - Provide a link to the translation of [https://en.wikipedia.org/wiki/Nullable_type https://en.wikipedia.org/wiki/Nullable_type], if it exists in your language; otherwise, do not worry about translating this advanced concept. Blockly.Msg.LOGIC_NULL_HELPURL = 'https://en.wikipedia.org/wiki/Nullable_type'; @@ -299,6 +334,8 @@ Blockly.Msg.LOGIC_NULL_HELPURL = 'https://en.wikipedia.org/wiki/Nullable_type'; Blockly.Msg.LOGIC_NULL = 'null'; /// tooltip - This should use the word from the previous message. Blockly.Msg.LOGIC_NULL_TOOLTIP = 'Returns null.'; +/// typeblock - Typing to add the block +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = 'Null'; /// url - Describes the programming language operator known as the ''ternary'' or ''conditional'' operator. It is recommended that you use the translation of [https://en.wikipedia.org/wiki/%3F: https://en.wikipedia.org/wiki/%3F:] if it exists. Blockly.Msg.LOGIC_TERNARY_HELPURL = 'https://en.wikipedia.org/wiki/%3F:'; @@ -310,6 +347,8 @@ Blockly.Msg.LOGIC_TERNARY_IF_TRUE = 'if true'; Blockly.Msg.LOGIC_TERNARY_IF_FALSE = 'if false'; /// tooltip - See [https://en.wikipedia.org/wiki/%3F: https://en.wikipedia.org/wiki/%3F:]. Blockly.Msg.LOGIC_TERNARY_TOOLTIP = 'Check the condition in "test". If the condition is true, returns the "if true" value; otherwise returns the "if false" value.'; +/// typeblock - Typing to add the block +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = 'Test'; // Math Blocks. /// url - Information about (real) numbers. @@ -363,6 +402,16 @@ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = 'Return the product of the two nu Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = 'Return the quotient of the two numbers.'; /// tooltip - See [https://en.wikipedia.org/wiki/Exponentiation https://en.wikipedia.org/wiki/Exponentiation]. Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = 'Return the first number raised to the power of the second number.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = '+'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = '-'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = '*'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = '/'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = '^'; /// url - Information about the square root operation. Blockly.Msg.MATH_SINGLE_HELPURL = 'https://en.wikipedia.org/wiki/Square_root'; @@ -374,6 +423,13 @@ Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = 'Return the square root of a number.'; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = 'absolute'; /// tooltip - Please use the same term as in the previous message. Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = 'Return the absolute value of a number.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = 'Square Root'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = 'Absolute Value'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = 'Negation'; + /// tooltip - Calculates '''0-n''', where '''n''' is the single numeric input. Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = 'Return the negation of a number.'; @@ -400,11 +456,37 @@ Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = 'Return the arcsine of a number.'; Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = 'Return the arccosine of a number.'; /// tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent tangent] function, using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians. Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = 'Return the arctangent of a number.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = 'SIN'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = 'COS'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = 'TAN'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = 'ASIN'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = 'ACOS'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = 'ATAN'; + /// url - Information about the mathematical constants Pi (π), e, the golden ratio (φ), √ 2, √ 1/2, and infinity (∞). Blockly.Msg.MATH_CONSTANT_HELPURL = 'https://en.wikipedia.org/wiki/Mathematical_constant'; /// tooltip - Provides the specified [https://en.wikipedia.org/wiki/Mathematical_constant mathematical constant]. Blockly.Msg.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).'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = 'Constant PI'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = 'Constant E' +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = 'Constant Golden Ratio (φ)'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = 'Constant √ 2'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = 'Constant √ 1/2'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = 'Constant Infinity (∞)'; + /// dropdown - A number is '''even''' if it is a multiple of 2. For example, 4 is even (yielding true), but 3 is not (false). Blockly.Msg.MATH_IS_EVEN = 'is even'; /// dropdown - A number is '''odd''' if it is not a multiple of 2. For example, 3 is odd (yielding true), but 4 is not (false). The opposite of "odd" is "even". @@ -421,6 +503,21 @@ Blockly.Msg.MATH_IS_NEGATIVE = 'is negative'; Blockly.Msg.MATH_IS_DIVISIBLE_BY = 'is divisible by'; /// tooltip - This block lets the user specify via a dropdown menu whether to check if the numeric input is even, odd, prime, whole, positive, negative, or divisible by a given value. Blockly.Msg.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.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = 'Number Is Even'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = 'Number Is Odd'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = 'Number Is Prime'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = 'Number Is Whole'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = 'Number Is Positive'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = 'Number Is Negative'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = 'Number Is Divisible By'; + /// url - Information about incrementing (increasing the value of) a variable. /// For other languages, just use the translation of the Wikipedia page about @@ -433,13 +530,15 @@ Blockly.Msg.MATH_CHANGE_TITLE = 'change %1 by %2'; Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; /// tooltip - This updates the value of the variable by adding to it the following numeric input.\n\nParameters:\n* %1 - the name of the variable whose value should be increased. Blockly.Msg.MATH_CHANGE_TOOLTIP = 'Add a number to variable "%1".'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = 'Change Variable By Amount'; /// format as decimal Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = 'format as decimal number %1 places %2'; -// Tooltip - this formats a number as decimal to a given number of places +/// Tooltip - this formats a number as decimal to a given number of places Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = 'Format this number'; -// Typeblock - Autocomplete for typeblocking -Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = 'format as decimal'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = 'Format as Decimal'; /// url - Information about how numbers are rounded to the nearest integer Blockly.Msg.MATH_ONLIST_HELPURL = 'https://en.wikipedia.org/wiki/Rounding'; @@ -453,6 +552,12 @@ Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = 'round'; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = 'round up'; /// dropdown - This rounds its input down to the nearest whole number. For example, if the input was 3.8, the result would be 3. Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = 'round down'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = 'Round'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = 'Round Up'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = 'Round Down'; /// url - Information about applying a function to a list of numbers. (We were unable to find such information in English. Feel free to skip this and any other URLs that are difficult.) Blockly.Msg.MATH_ONLIST_HELPURL = ''; @@ -488,6 +593,23 @@ Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = 'Return the standard deviation of the Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = 'random item of list'; /// tooltip - Please use same term for 'random' as in previous entry. Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = 'Return a random element from the list.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = 'Sum of List'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = 'Min of List'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = 'Max of List'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = 'Average of List'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = 'Median of List'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = 'Mode of List'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = 'Standard Deviation of List'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = 'Random Item of List'; + /// url - information about the modulo (remainder) operation. Blockly.Msg.MATH_MODULO_HELPURL = 'https://en.wikipedia.org/wiki/Modulo_operation'; @@ -495,6 +617,8 @@ Blockly.Msg.MATH_MODULO_HELPURL = 'https://en.wikipedia.org/wiki/Modulo_operatio Blockly.Msg.MATH_MODULO_TITLE = 'remainder of %1 ÷ %2'; /// tooltip - For example, the remainder of 10 divided by 3 is 1. Blockly.Msg.MATH_MODULO_TOOLTIP = 'Return the remainder from dividing the two numbers.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_MODULO_TYPEBLOCK = 'Remainder of'; /// url - Information about constraining a numeric value to be in a specific range. (The English URL is not ideal. Recall that translating URLs is the lowest priority.) Blockly.Msg.MATH_CONSTRAIN_HELPURL = 'https://en.wikipedia.org/wiki/Clamping_%28graphics%29'; @@ -504,6 +628,8 @@ Blockly.Msg.MATH_CONSTRAIN_HELPURL = 'https://en.wikipedia.org/wiki/Clamping_%28 Blockly.Msg.MATH_CONSTRAIN_TITLE = 'constrain %1 low %2 high %3'; /// tooltip - This compares a number ''x'' to a low value ''L'' and a high value ''H''. If ''x'' is less then ''L'', the result is ''L''. If ''x'' is greater than ''H'', the result is ''H''. Otherwise, the result is ''x''. Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = 'Constrain a number to be between the specified limits (inclusive).'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = 'Constrain Number Low High'; /// url - Information about how computers generate random numbers. Blockly.Msg.MATH_RANDOM_INT_HELPURL = 'https://en.wikipedia.org/wiki/Random_number_generation'; @@ -511,6 +637,8 @@ Blockly.Msg.MATH_RANDOM_INT_HELPURL = 'https://en.wikipedia.org/wiki/Random_numb Blockly.Msg.MATH_RANDOM_INT_TITLE = 'random integer from %1 to %2'; /// tooltip - Return a random integer between two values specified as inputs. For example, if one input was 7 and another 9, any of the numbers 7, 8, or 9 could be produced. Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = 'Return a random integer between the two specified limits, inclusive.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = 'Random Integer'; /// url - Information about how computers generate random numbers (specifically, numbers in the range from 0 to just below 1). Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = 'https://en.wikipedia.org/wiki/Random_number_generation'; @@ -518,6 +646,8 @@ Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = 'https://en.wikipedia.org/wiki/Random_nu Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = 'random fraction'; /// tooltip - Return a random fraction between 0 and 1. The value may be equal to 0 but must be less than 1. Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = 'Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = 'Random Fraction'; // Text Blocks. /// url - Information about how computers represent text (sometimes referred to as ''string''s). @@ -703,15 +833,15 @@ Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ''; /// url - Information about how the text contains block works Blockly.Msg.TEXT_CONTAINS_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains'; -// Title for the Contains Text block. -// %1 corresponds to the Text input block which is of type "String" -// %2 corresponds for the Piece input block which is of type "String" -// see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains -// http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains] +/// Title for the Contains Text block. +/// %1 corresponds to the Text input block which is of type "String" +/// %2 corresponds for the Piece input block which is of type "String" +/// see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains +/// http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains] Blockly.Msg.TEXT_CONTAINS_INPUT = 'contains text %1 piece %2'; /// tooltip - Describes a block to adjust the case of letters. For more information on this block, -// see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains -// http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains] +/// see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains +/// http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains] Blockly.Msg.TEXT_CONTAINS_TOOLTIP = 'Tests whether the piece is contained in the text.'; /// url - Information about the case of letters (upper-case and lower-case). @@ -1199,19 +1329,19 @@ Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = 'Add, remove, or reorder input Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = 'input name:'; /// tooltip Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = 'Add an input to the function.'; -// This text is the tooltop for the + icon on a mutator object +/// This text is the tooltip for the + icon on a mutator object Blockly.Msg.CLICK_ADD_TOOLTIP = 'Add an element'; -// This text is the tooltop for the - icon on a mutator object +/// This text is the tooltip for the - icon on a mutator object Blockly.Msg.CLICK_REMOVE_TOOLTIP = 'Remove this element'; -// This is the string for creating a parameter line on a function. -// %1 corresponds to the name of the parameter as a FieldTextInput -// %2 corresponds to the - icon for removing the field -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = '%1 with %2 %3'; -// This is the string for creating a parameter line on a function. -// %1 corresponds to the name of the parameter as a FieldTextInput -// %2 corresponds to the type of the parameter as a FieldScopeVariable -// %3 corresponds to the - icon for removing the field -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = '%1 with %2 as %3%4'; +/// This is the string for creating a parameter line on a function. +/// %1 corresponds to the name of the parameter as a FieldTextInput +/// %2 corresponds to the - icon for removing the field +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = 'with %1 %2'; +/// This is the string for creating a parameter line on a function. +/// %1 corresponds to the name of the parameter as a FieldTextInput +/// %2 corresponds to the type of the parameter as a FieldScopeVariable +/// %3 corresponds to the - icon for removing the field +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = 'with %1 as %2%3'; /// context menu - This appears on the context menu for function calls. Selecting /// it causes the corresponding function definition to be highlighted (as shown at @@ -1227,8 +1357,11 @@ Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = 'If a value is true, then return a sec /// warning - This appears if the user tries to use this block outside of a function definition. Blockly.Msg.PROCEDURES_IFRETURN_WARNING = 'Warning: This block may be used only within a function definition.'; - +/// Block text Blockly.Msg.TEXT_TYPE_JAVA = 'insert java code'; +/// Block Text Blockly.Msg.TEXT_TYPE_PYTHON = 'insert python code'; +/// tooltip Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = 'Insert arbitrary Java code'; +/// tooltip Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = 'Insert arbitrary Python code'; From 6f01f102f139de291d6b491a24535f22caf8f1b3 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Wed, 8 Jul 2015 11:18:08 -0400 Subject: [PATCH 06/84] Implement hiding of icons, more typeblock implementation Change translatedName: to be entry: globally Added short cut for typeblock which is just a string to not have to create the entire data structure Implemented typeblock entries for all the text entries --- blockly_compressed.js | 40 ++++++------ blocks/colour.js | 8 +-- blocks/lists.js | 47 +++++++------- blocks/logic.js | 24 +++---- blocks/loops.js | 20 +++--- blocks/math.js | 96 ++++++++++++++-------------- blocks/text.js | 123 ++++++++++++++++++++++++++++++------ blocks/variables.js | 10 +-- blocks_compressed.js | 144 +++++++++++++++++++++--------------------- core/block.js | 2 +- core/css.js | 4 ++ core/flyout.js | 2 +- core/typeblock.js | 18 ++++-- msg/js/ar.js | 26 ++++++++ msg/js/az.js | 26 ++++++++ msg/js/bcc.js | 26 ++++++++ msg/js/be-tarask.js | 26 ++++++++ msg/js/bg.js | 26 ++++++++ msg/js/bn.js | 36 +++++++++-- msg/js/br.js | 26 ++++++++ msg/js/ca.js | 26 ++++++++ msg/js/cs.js | 26 ++++++++ msg/js/da.js | 26 ++++++++ msg/js/de.js | 26 ++++++++ msg/js/el.js | 26 ++++++++ msg/js/en.js | 36 +++++++++-- msg/js/es.js | 26 ++++++++ msg/js/fa.js | 26 ++++++++ msg/js/fi.js | 26 ++++++++ msg/js/fr.js | 26 ++++++++ msg/js/he.js | 36 +++++++++-- msg/js/hi.js | 26 ++++++++ msg/js/hrx.js | 26 ++++++++ msg/js/hu.js | 26 ++++++++ msg/js/ia.js | 26 ++++++++ msg/js/id.js | 26 ++++++++ msg/js/is.js | 26 ++++++++ msg/js/it.js | 26 ++++++++ msg/js/ja.js | 26 ++++++++ msg/js/ko.js | 26 ++++++++ msg/js/lb.js | 36 +++++++++-- msg/js/lrc.js | 36 +++++++++-- msg/js/lt.js | 26 ++++++++ msg/js/mk.js | 36 +++++++++-- msg/js/ms.js | 26 ++++++++ msg/js/nb.js | 26 ++++++++ msg/js/nl.js | 26 ++++++++ msg/js/oc.js | 26 ++++++++ msg/js/pl.js | 26 ++++++++ msg/js/pms.js | 26 ++++++++ msg/js/pt-br.js | 26 ++++++++ msg/js/pt.js | 26 ++++++++ msg/js/ro.js | 26 ++++++++ msg/js/ru.js | 26 ++++++++ msg/js/sc.js | 26 ++++++++ msg/js/sk.js | 26 ++++++++ msg/js/sq.js | 26 ++++++++ msg/js/sr.js | 26 ++++++++ msg/js/sv.js | 26 ++++++++ msg/js/ta.js | 26 ++++++++ msg/js/th.js | 26 ++++++++ msg/js/tl.js | 26 ++++++++ msg/js/tlh.js | 26 ++++++++ msg/js/tr.js | 26 ++++++++ msg/js/uk.js | 26 ++++++++ msg/js/vi.js | 26 ++++++++ msg/js/zh-hans.js | 26 ++++++++ msg/js/zh-hant.js | 26 ++++++++ msg/json/en.json | 35 +++++++++- msg/json/qqq.json | 33 +++++++++- msg/messages.js | 63 ++++++++++++++++++ 71 files changed, 1901 insertions(+), 258 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index d5452fd0130..2bdd40ada23 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1202,7 +1202,7 @@ Blockly.Block.prototype.setParent=function(a){if(this.parentBlock_){for(var b=th a)?a.childBlocks_.push(this):this.workspace.addTopBlock(this)};Blockly.Block.prototype.getDescendants=function(){for(var a=[this],b,c=0;b=this.childBlocks_[c];c++)a.push.apply(a,b.getDescendants());return a};Blockly.Block.prototype.isDeletable=function(){return this.deletable_&&!(this.workspace&&this.workspace.options.readOnly)};Blockly.Block.prototype.setDeletable=function(a){this.deletable_=a};Blockly.Block.prototype.isMovable=function(){return this.movable_&&!(this.workspace&&this.workspace.options.readOnly)}; Blockly.Block.prototype.setMovable=function(a){this.movable_=a};Blockly.Block.prototype.isEditable=function(){return this.editable_&&!(this.workspace&&this.workspace.options.readOnly)};Blockly.Block.prototype.setEditable=function(a){this.editable_=a;a=0;for(var b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.updateEditable();if(this.rendered)for(b=this.getIcons(!0),a=0;a'+e+"");c+="<"+a+' name="'+d+'">'+e+""}return c}; Blockly.TypeBlock.autoCompleteSelected=function(){var a=Blockly.TypeBlock.inputText_.value,b=goog.object.get(Blockly.TypeBlock.TBOptions_,a);if(!b){var b=RegExp("^-?[0-9]\\d*(.\\d+)?$","g").exec(a),c=RegExp("^[\"|']+","g").exec(a);if(b&&0'+Blockly.TypeBlock.mutatorToXMLString(b.mutatorAttributes)+Blockly.TypeBlock.sectionToXMLString("field", @@ -1501,20 +1501,20 @@ Blockly.Css.CONTENT=[".blocklySvg {"," background-color: #fff;"," outline: non " cursor: se-resize;"," fill: #aaa;","}",".blocklyResizeSW {"," cursor: sw-resize;"," fill: #aaa;","}",".blocklyResizeLine {"," stroke: #888;"," stroke-width: 1;","}",".blocklyHighlightedConnectionPath {"," fill: none;"," stroke: #fc3;"," stroke-width: 4px;","}",".blocklyPathLight {"," fill: none;"," stroke-linecap: round;"," stroke-width: 1;","}",".blocklySelected>.blocklyPath {"," stroke: #fc3;"," stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {"," display: none;","}", ".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {"," fill-opacity: .8;"," stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {"," display: none;","}",".blocklyDisabled>.blocklyPath {"," fill-opacity: .5;"," stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {"," display: none;","}",".blocklyText {"," cursor: default;"," fill: #fff;"," font-family: sans-serif;"," font-size: 11pt;","}",".blocklyNonEditableText>text {", " pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {"," fill: #fff;"," fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {"," fill: #000;","}",".blocklyEditableText:hover>rect {"," stroke: #fff;"," stroke-width: 2;","}",".blocklyBubbleText {"," fill: #000;","}",".blocklySvg text {"," user-select: none;"," -moz-user-select: none;"," -webkit-user-select: none;"," cursor: inherit;","}",".blocklyHidden {"," display: none;", -"}",".blocklyFieldDropdown:not(.blocklyHidden) {"," display: block;","}",".blocklyIconGroup {"," cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {"," opacity: .6;","}",".blocklyDraggable:not(:hover) .blocklyIconFading {"," opacity: 0;","}",".blocklyMinimalBody {"," margin: 0;"," padding: 0;","}",".blocklyCommentTextarea {"," background-color: #ffc;"," border: 0;"," margin: 0;"," padding: 2px;"," resize: none;","}",".blocklyHtmlInput {"," border: none;", -" font-family: sans-serif;"," font-size: 11pt;"," outline: none;"," width: 100%","}",".blocklyMainBackground {"," stroke-width: 1;"," stroke: #c6c6c6;","}",".blocklyMutatorBackground {"," fill: #fff;"," stroke: #ddd;"," stroke-width: 1;","}",".blocklyFlyoutBackground {"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyColourBackground {"," fill: #666;","}",".blocklyScrollbarBackground {"," fill: #fff;"," stroke: #e4e4e4;"," stroke-width: 1;","}",".blocklyScrollbarKnob {"," fill: #ccc;", -"}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyScrollbarKnob:hover {"," fill: #bbb;","}",".blocklyInvalidInput {"," background: #faa;","}",".blocklyAngleCircle {"," stroke: #444;"," stroke-width: 1;"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyAngleMarks {"," stroke: #444;"," stroke-width: 1;","}",".blocklyAngleGauge {"," fill: #f88;"," fill-opacity: .8; ","}",".blocklyAngleLine {"," stroke: #f00;"," stroke-width: 2;"," stroke-linecap: round;","}",".blocklyContextMenu {", -" border-radius: 4px;","}",".blocklyDropdownMenu {"," padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(<<>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {"," background-color: #ddd;"," overflow-x: visible;"," overflow-y: auto;"," position: absolute;","}",".blocklyTreeRoot {"," padding: 4px 0;","}",".blocklyTreeRoot:focus {"," outline: none;", -"}",".blocklyTreeRow {"," line-height: 22px;"," height: 22px;"," padding-right: 1em;"," white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {'," padding-right: 0;"," padding-left: 1em !important;","}",".blocklyTreeRow:hover {"," background-color: #e4e4e4;","}",".blocklyTreeSeparator {"," border-bottom: solid #e5e5e5 1px;"," height: 0px;"," margin: 5px 0;","}",".blocklyTreeIcon {"," background-image: url(<<>>/sprites.png);"," height: 16px;"," vertical-align: middle;", -" width: 16px;","}",".blocklyTreeIconClosedLtr {"," background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {"," background-position: 0px -1px;","}",".blocklyTreeIconOpen {"," background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {"," background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {"," background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {"," background-position: -16px -17px;","}",".blocklyTreeIconNone,", -".blocklyTreeSelected>.blocklyTreeIconNone {"," background-position: -48px -1px;","}",".blocklyTreeLabel {"," cursor: default;"," font-family: sans-serif;"," font-size: 16px;"," padding: 0 3px;"," vertical-align: middle;","}",".blocklyTreeSelected {"," background-color: #57e !important;","}",".blocklyTreeSelected .blocklyTreeLabel {"," color: #fff;","}",".blocklyWidgetDiv .goog-palette {"," outline: none;"," cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {"," border: 1px solid #666;", -" border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {"," height: 13px;"," width: 15px;"," margin: 0;"," border: 0;"," text-align: center;"," vertical-align: middle;"," border-right: 1px solid #666;"," font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {"," position: relative;"," height: 13px;"," width: 15px;"," border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {"," border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {", -" border: 1px solid #000;"," color: #fff;","}",".blocklyWidgetDiv .goog-menu {"," background: #fff;"," border-color: #ccc #666 #666 #ccc;"," border-style: solid;"," border-width: 1px;"," cursor: default;"," font: normal 13px Arial, sans-serif;"," margin: 0;"," outline: none;"," padding: 4px 0;"," position: absolute;"," z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {"," color: #000;"," font: normal 13px Arial, sans-serif;"," list-style: none;"," margin: 0;"," padding: 4px 7em 4px 28px;", -" white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {"," padding-left: 7em;"," padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {"," padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {"," padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {"," color: #000;"," font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,", -".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {"," color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {"," opacity: 0.3;"," -moz-opacity: 0.3;"," filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {"," background-color: #d6e9f8;"," border-color: #d6e9f8;"," border-style: dotted;"," border-width: 1px 0;"," padding-bottom: 3px;"," padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,", -".blocklyWidgetDiv .goog-menuitem-icon {"," background-repeat: no-repeat;"," height: 16px;"," left: 6px;"," position: absolute;"," right: auto;"," vertical-align: middle;"," width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {"," left: auto;"," right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;", -"}",".blocklyWidgetDiv .goog-menuitem-accel {"," color: #999;"," direction: ltr;"," left: auto;"," padding: 0 6px;"," position: absolute;"," right: 0;"," text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {"," left: 0;"," right: auto;"," text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {"," text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {"," color: #999;"," font-size: 12px;"," padding-left: 4px;", -"}",".blocklyWidgetDiv .goog-menuseparator {"," border-top: 1px solid #ccc;"," margin: 4px 0;"," padding: 0;","}",""]; +"}",".blocklyFieldDropdown:not(.blocklyHidden) {"," display: block;","}",".blocklyIconGroup {"," cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {"," opacity: .6;","}",".blocklyDraggable:not(:hover) .blocklyIconFading {"," opacity: 0;","}",".blocklyFlyout .blocklyDraggable:not(:hover) .blocklyIconFading {"," opacity: 1;","}",".blocklyMinimalBody {"," margin: 0;"," padding: 0;","}",".blocklyCommentTextarea {"," background-color: #ffc;"," border: 0;"," margin: 0;", +" padding: 2px;"," resize: none;","}",".blocklyHtmlInput {"," border: none;"," font-family: sans-serif;"," font-size: 11pt;"," outline: none;"," width: 100%","}",".blocklyMainBackground {"," stroke-width: 1;"," stroke: #c6c6c6;","}",".blocklyMutatorBackground {"," fill: #fff;"," stroke: #ddd;"," stroke-width: 1;","}",".blocklyFlyoutBackground {"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyColourBackground {"," fill: #666;","}",".blocklyScrollbarBackground {"," fill: #fff;"," stroke: #e4e4e4;", +" stroke-width: 1;","}",".blocklyScrollbarKnob {"," fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyScrollbarKnob:hover {"," fill: #bbb;","}",".blocklyInvalidInput {"," background: #faa;","}",".blocklyAngleCircle {"," stroke: #444;"," stroke-width: 1;"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyAngleMarks {"," stroke: #444;"," stroke-width: 1;","}",".blocklyAngleGauge {"," fill: #f88;"," fill-opacity: .8; ","}",".blocklyAngleLine {"," stroke: #f00;", +" stroke-width: 2;"," stroke-linecap: round;","}",".blocklyContextMenu {"," border-radius: 4px;","}",".blocklyDropdownMenu {"," padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(<<>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {"," background-color: #ddd;"," overflow-x: visible;"," overflow-y: auto;"," position: absolute;","}",".blocklyTreeRoot {", +" padding: 4px 0;","}",".blocklyTreeRoot:focus {"," outline: none;","}",".blocklyTreeRow {"," line-height: 22px;"," height: 22px;"," padding-right: 1em;"," white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {'," padding-right: 0;"," padding-left: 1em !important;","}",".blocklyTreeRow:hover {"," background-color: #e4e4e4;","}",".blocklyTreeSeparator {"," border-bottom: solid #e5e5e5 1px;"," height: 0px;"," margin: 5px 0;","}",".blocklyTreeIcon {"," background-image: url(<<>>/sprites.png);", +" height: 16px;"," vertical-align: middle;"," width: 16px;","}",".blocklyTreeIconClosedLtr {"," background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {"," background-position: 0px -1px;","}",".blocklyTreeIconOpen {"," background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {"," background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {"," background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {", +" background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {"," background-position: -48px -1px;","}",".blocklyTreeLabel {"," cursor: default;"," font-family: sans-serif;"," font-size: 16px;"," padding: 0 3px;"," vertical-align: middle;","}",".blocklyTreeSelected {"," background-color: #57e !important;","}",".blocklyTreeSelected .blocklyTreeLabel {"," color: #fff;","}",".blocklyWidgetDiv .goog-palette {"," outline: none;"," cursor: default;", +"}",".blocklyWidgetDiv .goog-palette-table {"," border: 1px solid #666;"," border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {"," height: 13px;"," width: 15px;"," margin: 0;"," border: 0;"," text-align: center;"," vertical-align: middle;"," border-right: 1px solid #666;"," font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {"," position: relative;"," height: 13px;"," width: 15px;"," border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {", +" border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {"," border: 1px solid #000;"," color: #fff;","}",".blocklyWidgetDiv .goog-menu {"," background: #fff;"," border-color: #ccc #666 #666 #ccc;"," border-style: solid;"," border-width: 1px;"," cursor: default;"," font: normal 13px Arial, sans-serif;"," margin: 0;"," outline: none;"," padding: 4px 0;"," position: absolute;"," z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {"," color: #000;", +" font: normal 13px Arial, sans-serif;"," list-style: none;"," margin: 0;"," padding: 4px 7em 4px 28px;"," white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {"," padding-left: 7em;"," padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {"," padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {"," padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {", +" color: #000;"," font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {"," color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {"," opacity: 0.3;"," -moz-opacity: 0.3;"," filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {"," background-color: #d6e9f8;"," border-color: #d6e9f8;", +" border-style: dotted;"," border-width: 1px 0;"," padding-bottom: 3px;"," padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-icon {"," background-repeat: no-repeat;"," height: 16px;"," left: 6px;"," position: absolute;"," right: auto;"," vertical-align: middle;"," width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {"," left: auto;"," right: 6px;", +"}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;","}",".blocklyWidgetDiv .goog-menuitem-accel {"," color: #999;"," direction: ltr;"," left: auto;"," padding: 0 6px;"," position: absolute;"," right: 0;"," text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {"," left: 0;"," right: auto;"," text-align: left;", +"}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {"," text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {"," color: #999;"," font-size: 12px;"," padding-left: 4px;","}",".blocklyWidgetDiv .goog-menuseparator {"," border-top: 1px solid #ccc;"," margin: 4px 0;"," padding: 0;","}",""]; // Copyright 2013 Google Inc. Apache License 2.0 Blockly.WidgetDiv={};Blockly.WidgetDiv.DIV=null;Blockly.WidgetDiv.owner_=null;Blockly.WidgetDiv.dispose_=null;Blockly.WidgetDiv.createDom=function(){Blockly.WidgetDiv.DIV||(Blockly.WidgetDiv.DIV=goog.dom.createDom("div","blocklyWidgetDiv"),document.body.appendChild(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.show=function(a,b,c){Blockly.WidgetDiv.hide();Blockly.WidgetDiv.owner_=a;Blockly.WidgetDiv.dispose_=c;Blockly.WidgetDiv.DIV.style.direction=b?"rtl":"ltr";Blockly.WidgetDiv.DIV.style.display="block"}; Blockly.WidgetDiv.hide=function(){Blockly.WidgetDiv.owner_&&(Blockly.WidgetDiv.DIV.style.display="none",Blockly.WidgetDiv.dispose_&&Blockly.WidgetDiv.dispose_(),Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.dispose_=null,goog.dom.removeChildren(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.isVisible=function(){return!!Blockly.WidgetDiv.owner_};Blockly.WidgetDiv.hideIfOwner=function(a){Blockly.WidgetDiv.owner_==a&&Blockly.WidgetDiv.hide()}; diff --git a/blocks/colour.js b/blocks/colour.js index 97492efaff7..cf08a119967 100644 --- a/blocks/colour.js +++ b/blocks/colour.js @@ -47,7 +47,7 @@ Blockly.Blocks['colour_picker'] = { this.setOutput(true, 'Colour'); this.setTooltip(Blockly.Msg.COLOUR_PICKER_TOOLTIP); }, - typeblock: [{translatedName: Blockly.Msg.COLOUR_PICKER_TYPEBLOCK}] + typeblock: Blockly.Msg.COLOUR_PICKER_TYPEBLOCK }; Blockly.Blocks['colour_random'] = { @@ -63,7 +63,7 @@ Blockly.Blocks['colour_random'] = { this.setOutput(true, 'Colour'); this.setTooltip(Blockly.Msg.COLOUR_RANDOM_TOOLTIP); }, - typeblock: [{translatedName: Blockly.Msg.COLOUR_RANDOM_TYPEBLOCK}] + typeblock: Blockly.Msg.COLOUR_RANDOM_TYPEBLOCK }; Blockly.Blocks['colour_rgb'] = { @@ -90,7 +90,7 @@ Blockly.Blocks['colour_rgb'] = { this.setOutput(true, 'Colour'); this.setTooltip(Blockly.Msg.COLOUR_RGB_TOOLTIP); }, - typeblock: [{translatedName: Blockly.Msg.COLOUR_RGB_TYPEBLOCK}] + typeblock: Blockly.Msg.COLOUR_RGB_TYPEBLOCK }; Blockly.Blocks['colour_blend'] = { @@ -117,5 +117,5 @@ Blockly.Blocks['colour_blend'] = { this.setOutput(true, 'Colour'); this.setTooltip(Blockly.Msg.COLOUR_BLEND_TOOLTIP); }, - typeblock: [{translatedName: Blockly.Msg.COLOUR_BLEND_TYPEBLOCK}] + typeblock: Blockly.Msg.COLOUR_BLEND_TYPEBLOCK }; diff --git a/blocks/lists.js b/blocks/lists.js index 3973fbde960..c3d4584e85a 100644 --- a/blocks/lists.js +++ b/blocks/lists.js @@ -47,7 +47,7 @@ Blockly.Blocks['lists_create_empty'] = { .appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE); this.setTooltip(Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP); }, - typeblock: [{translatedName: Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK}] + typeblock: Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK }; Blockly.Blocks['lists_create_with'] = { @@ -70,9 +70,9 @@ Blockly.Blocks['lists_create_with'] = { return 'ADD'+pos; }, typeblock: [ - { translatedName: Blockly.Msg.LISTS_CREATE_WITH_TYPEBLOCK, + { entry: Blockly.Msg.LISTS_CREATE_WITH_TYPEBLOCK, mutatorAttributes: { items: 2 } } -// ,{ translatedName: Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK, +// ,{ entry: Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK, // mutatorAttributes: { items: 0 } } ] }; @@ -102,7 +102,7 @@ Blockly.Blocks['lists_repeat'] = { "helpUrl": Blockly.Msg.LISTS_REPEAT_HELPURL }); }, - typeblock: [{translatedName: Blockly.Msg.LISTS_REPEAT_TYPEBLOCK, + typeblock: [{entry: Blockly.Msg.LISTS_REPEAT_TYPEBLOCK, "values": {'NUM': 5 }}] }; @@ -127,7 +127,7 @@ Blockly.Blocks['lists_length'] = { "helpUrl": Blockly.Msg.LISTS_LENGTH_HELPURL }); }, - typeblock: [{translatedName: Blockly.Msg.LISTS_LENGTH_TYPEBLOCK }] + typeblock: Blockly.Msg.LISTS_LENGTH_TYPEBLOCK }; Blockly.Blocks['lists_isEmpty'] = { @@ -151,7 +151,7 @@ Blockly.Blocks['lists_isEmpty'] = { "helpUrl": Blockly.Msg.LISTS_ISEMPTY_HELPURL }); }, - typeblock: [{translatedName: Blockly.Msg.LISTS_ISEMPTY_TYPEBLOCK}] + typeblock: Blockly.Msg.LISTS_ISEMPTY_TYPEBLOCK }; Blockly.Blocks['lists_indexOf'] = { @@ -174,9 +174,9 @@ Blockly.Blocks['lists_indexOf'] = { this.setInputsInline(true); this.setTooltip(Blockly.Msg.LISTS_INDEX_OF_TOOLTIP); }, - typeblock: [{ translatedName: Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK, fields: { END: 'FIRST' } }, - { translatedName: Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK, + { entry: Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK, fields: { END: 'LAST' } } ] }; @@ -318,11 +318,11 @@ Blockly.Blocks['lists_getIndex'] = { var mode = modeOptions[modeSlot]; for (var whereSlot = 0; whereSlot < whereOptions.length; whereSlot++) { var where = whereOptions[whereSlot]; - result.push({ translatedName: Blockly.Msg['LISTS_GET_INDEX_'+ mode + + result.push({ entry: Blockly.Msg['LISTS_GET_INDEX_'+ mode + '_' + where +'_TYPEBLOCK'], - values: { VALUE: ''+ + values: { 'VALUE': ''+ 'list' }, - fields: { MODE: mode, WHERE: where }}); + fields: { 'MODE': mode, 'WHERE': where }}); } } return result; @@ -437,11 +437,11 @@ Blockly.Blocks['lists_setIndex'] = { var mode = modeOptions[modeSlot]; for (var whereSlot = 0; whereSlot < whereOptions.length; whereSlot++) { var where = whereOptions[whereSlot]; - result.push({ translatedName: Blockly.Msg['LISTS_SET_INDEX_'+ mode + + result.push({ entry: Blockly.Msg['LISTS_SET_INDEX_'+ mode + '_' + where +'_TYPEBLOCK'], - values: { LIST: ''+ + values: { 'LIST': ''+ 'list'}, - fields: { MODE: mode, WHERE: where }}); + fields: { 'MODE': mode, 'WHERE': where }}); } } return result; @@ -551,9 +551,8 @@ Blockly.Blocks['lists_getSublist'] = { this.moveInputBefore('TAIL', null); } }, - typeblock: [{ translatedName: - Blockly.Msg.LISTS_GET_SUBLIST_TYPEBLOCK, - values: { LIST: ''+ + typeblock: [{ entry: Blockly.Msg.LISTS_GET_SUBLIST_TYPEBLOCK, + values: { 'LIST': ''+ 'list' }}] }; @@ -597,14 +596,12 @@ Blockly.Blocks['lists_split'] = { throw 'Unknown mode: ' + mode; }); }, - typeblock: [{ translatedName: - Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK, - values: { DELIM: ''+ + typeblock: [{ entry: Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK, + values: { 'DELIM': ''+ ',' }, - fields: { MODE: 'SPLIT' }}, - { translatedName: - Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK, - values: { DELIM: ''+ + fields: { 'MODE': 'SPLIT' }}, + { entry: Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK, + values: { 'DELIM': ''+ ',' }, - fields: { MODE: 'SPLIT' }}] + fields: { 'MODE': 'SPLIT' }}] }; diff --git a/blocks/logic.js b/blocks/logic.js index b6294d40e10..43b9534e579 100644 --- a/blocks/logic.js +++ b/blocks/logic.js @@ -244,12 +244,12 @@ Blockly.Blocks['controls_if'] = { } }, typeblock: [ - { translatedName: Blockly.Msg.CONTROLS_IF_TYPEBLOCK }, - { translatedName: Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK, + { entry: Blockly.Msg.CONTROLS_IF_TYPEBLOCK }, + { entry: Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK, mutatorAttributes: { 'elseif': 1 } }, - { translatedName: Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK, + { entry: Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK, mutatorAttributes: { 'elseif': 1, 'else': 1 } }, - { translatedName: Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK, + { entry: Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK, mutatorAttributes: { 'else': 1 } } ] }; @@ -324,7 +324,7 @@ Blockly.Blocks['logic_compare'] = { this.prevBlocks_[0] = blockA; this.prevBlocks_[1] = blockB; }, - typeblock: [{translatedName: Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK}] + typeblock: Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK }; Blockly.Blocks['logic_operation'] = { @@ -356,9 +356,9 @@ Blockly.Blocks['logic_operation'] = { return TOOLTIPS[op]; }); }, - typeblock: [{ translatedName: Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK, fields: { 'OP': 'OR' }}, - { translatedName: Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK, + { entry: Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK, fields: { 'OP': 'AND' }}] }; @@ -383,7 +383,7 @@ Blockly.Blocks['logic_negate'] = { "helpUrl": Blockly.Msg.LOGIC_NEGATE_HELPURL }); }, - typeblock: [{translatedName: Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK}] + typeblock: Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK }; Blockly.Blocks['logic_boolean'] = { @@ -402,9 +402,9 @@ Blockly.Blocks['logic_boolean'] = { .appendField(new Blockly.FieldDropdown(BOOLEANS), 'BOOL'); this.setTooltip(Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP); }, - typeblock: [{ translatedName: Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK, fields: { 'BOOL': 'TRUE' }}, - { translatedName: Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK, + { entry: Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK, fields: { 'BOOL': 'FALSE' }}] }; @@ -421,7 +421,7 @@ Blockly.Blocks['logic_null'] = { .appendField(Blockly.Msg.LOGIC_NULL); this.setTooltip(Blockly.Msg.LOGIC_NULL_TOOLTIP); }, - typeblock: [{translatedName: Blockly.Msg.LOGIC_NULL_TYPEBLOCK}] + typeblock: Blockly.Msg.LOGIC_NULL_TYPEBLOCK }; Blockly.Blocks['logic_ternary'] = { @@ -473,5 +473,5 @@ Blockly.Blocks['logic_ternary'] = { } this.prevParentConnection_ = parentConnection; }, - typeblock: [{translatedName: Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK}] + typeblock: Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK }; diff --git a/blocks/loops.js b/blocks/loops.js index a88c8fea381..978dffaa68a 100644 --- a/blocks/loops.js +++ b/blocks/loops.js @@ -60,9 +60,9 @@ Blockly.Blocks['controls_repeat'] = { this.getField('TIMES').setChangeHandler( Blockly.FieldTextInput.nonnegativeIntegerValidator); }//, -// No typeblock because this appears to be deprecated in +// No typeblock because this is deprecated in // favor of controls_repeat_ext -// typeblock: [{translatedName: Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK, +// typeblock: [{entry: Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK, // fields: {'TIMES' : 10 }}] }; @@ -90,7 +90,7 @@ Blockly.Blocks['controls_repeat_ext'] = { this.appendStatementInput('DO') .appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO); }, - typeblock: [{translatedName: Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK, + typeblock: [{entry: Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK, values: {'TIMES' : 10 }}] }; @@ -123,9 +123,9 @@ Blockly.Blocks['controls_whileUntil'] = { return TOOLTIPS[op]; }); }, - typeblock: [{translatedName: Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK, + typeblock: [{entry: Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK, fields: {'MODE' : 'WHILE' }}, - {translatedName: Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK, + {entry: Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK, fields: {'MODE' : 'UNTIL' }}] }; @@ -215,7 +215,7 @@ Blockly.Blocks['controls_for'] = { options.push(option); } }, - typeblock: [{translatedName: Blockly.Msg.CONTROLS_FOR_TYPEBLOCK, + typeblock: [{entry: Blockly.Msg.CONTROLS_FOR_TYPEBLOCK, values: {'FROM': 1, 'TO': 10, 'BY': 1}}] }; @@ -274,7 +274,7 @@ Blockly.Blocks['controls_forEach'] = { } }, customContextMenu: Blockly.Blocks['controls_for'].customContextMenu, - typeblock: [{translatedName: Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}] + typeblock: Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK }; Blockly.Blocks['controls_flow_statements'] = { @@ -332,10 +332,8 @@ Blockly.Blocks['controls_flow_statements'] = { this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING); } }, - typeblock: [{translatedName: - Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK, + typeblock: [{entry: Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK, fields: {'FLOW' : 'BREAK' }}, - {translatedName: - Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK, + {entry: Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK, fields: {'FLOW' : 'CONTINUE' }}] }; diff --git a/blocks/math.js b/blocks/math.js index 15296af0c3a..08c8f184a31 100644 --- a/blocks/math.js +++ b/blocks/math.js @@ -85,15 +85,15 @@ Blockly.Blocks['math_arithmetic'] = { return TOOLTIPS[mode]; }); }, - typeblock: [{ translatedName: Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK, fields: { 'OP': 'ADD' }}, - { translatedName: Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK, fields: { 'OP': 'MINUS' }}, - { translatedName: Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK, fields: { 'OP': 'MULTIPLY' }}, - { translatedName: Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK, fields: { 'OP': 'DIVIDE' }}, - { translatedName: Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK, fields: { 'OP': 'POWER' }}] }; @@ -133,19 +133,19 @@ Blockly.Blocks['math_single'] = { return TOOLTIPS[mode]; }); }, - typeblock: [{ translatedName: Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK, fields: { 'OP': 'ROOT' }}, - { translatedName: Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK, + { entry: Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK, fields: { 'OP': 'ABS' }}, - { translatedName: Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK, + { entry: Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK, fields: { 'OP': 'NEG' }}, - { translatedName: 'ln', + { entry: 'ln', fields: { 'OP': 'LN' }}, - { translatedName: 'log10', + { entry: 'log10', fields: { 'OP': 'LOG10' }}, - { translatedName: 'e^', + { entry: 'e^', fields: { 'OP': 'EXP' }}, - { translatedName: '10^', + { entry: '10^', fields: { 'OP': 'POW10' }}] }; @@ -183,17 +183,17 @@ Blockly.Blocks['math_trig'] = { return TOOLTIPS[mode]; }); }, - typeblock: [{ translatedName: Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK, fields: { 'OP': 'SIN' }}, - { translatedName: Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK, + { entry: Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK, fields: { 'OP': 'COS' }}, - { translatedName: Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK, + { entry: Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK, fields: { 'OP': 'TAN' }}, - { translatedName: Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK, + { entry: Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK, fields: { 'OP': 'ASIN' }}, - { translatedName: Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK, + { entry: Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK, fields: { 'OP': 'ACOS' }}, - { translatedName: Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK, + { entry: Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK, fields: { 'OP': 'ATAN' }}] }; @@ -217,17 +217,17 @@ Blockly.Blocks['math_constant'] = { .appendField(new Blockly.FieldDropdown(CONSTANTS), 'CONSTANT'); this.setTooltip(Blockly.Msg.MATH_CONSTANT_TOOLTIP); }, - typeblock: [{ translatedName: Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK, fields: { 'CONSTANT': 'PI' }}, - { translatedName: Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK, + { entry: Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK, fields: { 'CONSTANT': 'E' }}, - { translatedName: Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK, + { entry: Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK, fields: { 'CONSTANT': 'GOLDEN_RATIO' }}, - { translatedName: Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK, + { entry: Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK, fields: { 'CONSTANT': 'SQRT2' }}, - { translatedName: Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK, + { entry: Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK, fields: { 'CONSTANT': 'SQRT1_2' }}, - { translatedName: Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK, + { entry: Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK, fields: { 'CONSTANT': 'INFINITY' }}] }; @@ -297,19 +297,19 @@ Blockly.Blocks['math_number_property'] = { this.removeInput('DIVISOR'); } }, - typeblock: [{ translatedName: Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK, fields: { 'PROPERTY': 'EVEN' }}, - { translatedName: Blockly.Msg.MATH_IS_ODD_TYPEBLOCK, + { entry: Blockly.Msg.MATH_IS_ODD_TYPEBLOCK, fields: { 'PROPERTY': 'ODD' }}, - { translatedName: Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK, + { entry: Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK, fields: { 'PROPERTY': 'PRIME' }}, - { translatedName: Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK, + { entry: Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK, fields: { 'PROPERTY': 'WHOLE' }}, - { translatedName: Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK, + { entry: Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK, fields: { 'PROPERTY': 'POSITIVE' }}, - { translatedName: Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK, + { entry: Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK, fields: { 'PROPERTY': 'NEGATIVE' }}, - { translatedName: Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK, + { entry: Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK, fields: { 'PROPERTY': 'DIVISIBLE_BY' }}] }; @@ -365,7 +365,7 @@ Blockly.Blocks['math_change'] = { this.setFieldValue(newName, 'VAR'); } }, - typeblock: [{translatedName: Blockly.Msg.MATH_CHANGE_TYPEBLOCK, + typeblock: [{entry: Blockly.Msg.MATH_CHANGE_TYPEBLOCK, values: {"DELTA": 1}}] }; @@ -387,11 +387,11 @@ Blockly.Blocks['math_round'] = { .appendField(new Blockly.FieldDropdown(OPERATORS), 'OP'); this.setTooltip(Blockly.Msg.MATH_ROUND_TOOLTIP); }, - typeblock: [{ translatedName: Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK, fields: { 'OP': 'ROUND' }}, - { translatedName: Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK, fields: { 'OP': 'ROUNDUP' }}, - { translatedName: Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK, fields: { 'OP': 'ROUNDDOWN' }}] }; @@ -418,7 +418,7 @@ Blockly.Blocks['math_format_as_decimal'] = { "helpUrl": Blockly.getUrlString('math_format_as_decimal_url') }); }, - typeblock: [{translatedName: Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK}] + typeblock: Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK }; Blockly.Blocks['math_on_list'] = { @@ -467,21 +467,21 @@ Blockly.Blocks['math_on_list'] = { return TOOLTIPS[mode]; }); }, - typeblock: [{ translatedName: Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK, + typeblock: [{ entry: Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK, fields: { 'OP': 'SUM' }}, - { translatedName: Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK, fields: { 'OP': 'MIN' }}, - { translatedName: Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK, fields: { 'OP': 'MAX' }}, - { translatedName: Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK, fields: { 'OP': 'AVERAGE' }}, - { translatedName: Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK, fields: { 'OP': 'MEDIAN' }}, - { translatedName: Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK, fields: { 'OP': 'MODE' }}, - { translatedName: Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK, fields: { 'OP': 'STD_DEV' }}, - { translatedName: Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK, + { entry: Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK, fields: { 'OP': 'RANDOM' }}] }; @@ -512,7 +512,7 @@ Blockly.Blocks['math_modulo'] = { "helpUrl": Blockly.Msg.MATH_MODULO_HELPURL }); }, - typeblock: [{translatedName: Blockly.Msg.MATH_MODULO_TYPEBLOCK}] + typeblock: Blockly.Msg.MATH_MODULO_TYPEBLOCK }; Blockly.Blocks['math_constrain'] = { @@ -547,7 +547,7 @@ Blockly.Blocks['math_constrain'] = { "helpUrl": Blockly.Msg.MATH_CONSTRAIN_HELPURL }); }, - typeblock: [{translatedName: Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK, + typeblock: [{entry: Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK, values: {"LOW": 1, "HIGH" : 100}}] }; @@ -578,7 +578,7 @@ Blockly.Blocks['math_random_int'] = { "helpUrl": Blockly.Msg.MATH_RANDOM_INT_HELPURL }); }, - typeblock: [{translatedName: Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK, + typeblock: [{entry: Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK, values: {"FROM": 1, "TO" : 100}}] }; @@ -595,5 +595,5 @@ Blockly.Blocks['math_random_float'] = { .appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM); this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP); }, - typeblock: [{translatedName: Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK}] + typeblock: Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK }; diff --git a/blocks/text.js b/blocks/text.js index 6f67b141c42..3dc26cba73a 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -63,8 +63,7 @@ Blockly.Blocks['text'] = { var file = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC'; } return new Blockly.FieldImage(file, 12, 12, '"'); - }, - typeblock: [{translatedName: Blockly.getMsgString('text_typeblock')}] + } }; Blockly.Blocks['text_join'] = { @@ -91,7 +90,13 @@ Blockly.Blocks['text_join'] = { return inputItem; }, newQuote_: Blockly.Blocks['text'].newQuote_, - typeblock: [{translatedName: Blockly.getMsgString('text_join_typeblock')}] + typeblock: [ + { entry: Blockly.Msg.TEXT_JOIN_WITH_TYPEBLOCK, + mutatorAttributes: { items: 2 } } +// ,{ entry: Blockly.Msg.TEXT_JOIN_EMPTY_TYPEBLOCK, +// mutatorAttributes: { items: 0 } } + ] + }; Blockly.Blocks['text_append'] = { @@ -136,7 +141,7 @@ Blockly.Blocks['text_append'] = { this.setFieldValue(newName, 'VAR'); } }, - typeblock: [{translatedName: Blockly.getMsgString('text_append_typeblock')}] + typeblock: Blockly.Msg.TEXT_APPEND_TYPEBLOCK }; Blockly.Blocks['text_length'] = { @@ -160,7 +165,7 @@ Blockly.Blocks['text_length'] = { "helpUrl": Blockly.Msg.TEXT_LENGTH_HELPURL }); }, - typeblock: [{translatedName: Blockly.getMsgString('text_length_typeblock')}] + typeblock: Blockly.Msg.TEXT_LENGTH_TYPEBLOCK }; Blockly.Blocks['text_isEmpty'] = { @@ -184,7 +189,7 @@ Blockly.Blocks['text_isEmpty'] = { "helpUrl": Blockly.Msg.TEXT_ISEMPTY_HELPURL }); }, - typeblock: [{translatedName: Blockly.getMsgString('text_isEmpty_typeblock')}] + typeblock: Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK }; Blockly.Blocks['text_contains'] = { @@ -210,7 +215,7 @@ Blockly.Blocks['text_contains'] = { "helpUrl": Blockly.getUrlString('text_contains_url') }); }, - typeblock: [{translatedName: Blockly.getMsgString('text_contains_typeblock')}] + typeblock: Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK }; Blockly.Blocks['text_indexOf'] = { @@ -237,7 +242,14 @@ Blockly.Blocks['text_indexOf'] = { this.setInputsInline(true); this.setTooltip(Blockly.Msg.TEXT_INDEXOF_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('text_indexof_typeblock')}] + typeblock: [{ entry: Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK, + values: { 'VALUE': ''+ + 'list' }, + fields: { 'END': 'FIRST' }}, + { entry: Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK, + values: { 'VALUE': ''+ + 'list' }, + fields: { 'END': 'LAST' }}] }; Blockly.Blocks['text_charAt'] = { @@ -324,7 +336,28 @@ Blockly.Blocks['text_charAt'] = { }); this.getInput('AT').appendField(menu, 'WHERE'); }, - typeblock: [{translatedName: Blockly.getMsgString('text_charat_typeblock')}] + typeblock: [{ entry: Blockly.Msg.TEXT_CHARAT_FROM_START, + values: { 'VALUE': ''+ + 'text', + 'AT': 1 }, + fields: { 'WHERE': 'FROM_START' }}, + { entry: Blockly.Msg.TEXT_CHARAT_FROM_END, + values: { 'VALUE': ''+ + 'text', + 'AT': 1 }, + fields: { 'WHERE': 'FROM_END' }}, + { entry: Blockly.Msg.TEXT_CHARAT_FIRST, + values: { 'VALUE': ''+ + 'text' }, + fields: { 'WHERE': 'FIRST' }}, + { entry: Blockly.Msg.TEXT_CHARAT_LAST, + values: { 'VALUE': ''+ + 'text' }, + fields: { 'WHERE': 'LAST' }}, + { entry: Blockly.Msg.TEXT_CHARAT_RANDOM, + values: { 'VALUE': ''+ + 'text' }, + fields: { 'WHERE': 'RANDOM' }}] }; Blockly.Blocks['text_getSubstring'] = { @@ -430,7 +463,28 @@ Blockly.Blocks['text_getSubstring'] = { this.moveInputBefore('AT1', 'AT2'); } }, - typeblock: [{translatedName: Blockly.getMsgString('text_getsubstring_typeblock')}] + typeblock: function() { + var result = []; + var whereOptions1 = ['FROM_START', 'FROM_END', 'FIRST']; + var whereOptions2 = ['FROM_START', 'FROM_END', 'LAST']; + for (var at1Slot = 0; at1Slot < whereOptions1.length; at1Slot++) { + var at1 = whereOptions1[at1Slot]; + var at1var = (at1 !== 'FIRST'); + for (var at2Slot = 0; at2Slot < whereOptions2.length; at2Slot++) { + var at2 = whereOptions2[at2Slot]; + var at2var = (at2 !== 'LAST'); + result.push({ entry: Blockly.Msg['TEXT_GET_SUBSTRING_START_'+ + at1 +'_TYPEBLOCK'] + + Blockly.Msg['TEXT_GET_SUBSTRING_END_'+ + at2 +'_TYPEBLOCK'], + mutatorAttributes: { 'at1': at1var, 'at2': at2var }, + values: { 'STRING': ''+ + 'text' }, + fields: { 'WHERE1': at1, 'WHERE2': at2 }}); + } + } + return result; + } }; Blockly.Blocks['text_changeCase'] = { @@ -451,7 +505,12 @@ Blockly.Blocks['text_changeCase'] = { this.setOutput(true, 'String'); this.setTooltip(Blockly.Msg.TEXT_CHANGECASE_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('text_changecase_typeblock')}] + typeblock: [{ entry: Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK, + fields: { 'CASE': 'UPPERCASE' }}, + { entry: Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK, + fields: { 'CASE': 'LOWERCASE' }}, + { entry: Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK, + fields: { 'CASE': 'TITLECASE' }}] }; Blockly.Blocks['text_trim'] = { @@ -472,7 +531,12 @@ Blockly.Blocks['text_trim'] = { this.setOutput(true, 'String'); this.setTooltip(Blockly.Msg.TEXT_TRIM_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('text_trim_typeblock')}] + typeblock: [{ entry: Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK, + fields: { 'MODE': 'BOTH' }}, + { entry: Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK, + fields: { 'MODE': 'LEFT' }}, + { entry: Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK, + fields: { 'MODE': 'RIGHT' }}] }; Blockly.Blocks['text_print'] = { @@ -496,7 +560,7 @@ Blockly.Blocks['text_print'] = { "helpUrl": Blockly.Msg.TEXT_PRINT_HELPURL }); }, - typeblock: [{translatedName: Blockly.getMsgString('text_print_typeblock')}] + typeblock: Blockly.Msg.TEXT_PRINT_TYPEBLOCK }; Blockly.Blocks['text_prompt'] = { @@ -533,8 +597,15 @@ Blockly.Blocks['text_prompt'] = { Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER; }); }, - newQuote_: Blockly.Blocks['text'].newQuote_, - typeblock: [{translatedName: Blockly.getMsgString('text_prompt_typeblock')}] + newQuote_: Blockly.Blocks['text'].newQuote_//, +// No typeblock because this is deprecated in +// favor of text_prompt_ext +// typeblock: [{entry: Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK, +// fields: {'TYPE' : 'TEXT' } +// }, +// {entry: Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK, +// fields: {'TYPE' : 'NUMBER' } +// }] }; Blockly.Blocks['text_prompt_ext'] = { @@ -568,7 +639,16 @@ Blockly.Blocks['text_prompt_ext'] = { Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER; }); }, - typeblock: [{translatedName: Blockly.getMsgString('text_prompt_ext_typeblock')}] + typeblock: [{entry: Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK, + fields: {'TYPE' : 'TEXT' }, + values: { 'TEXT': ''+ + '' } + }, + {entry: Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK, + fields: {'TYPE' : 'NUMBER' }, + values: { 'TEXT': ''+ + '' } + }] }; @@ -582,7 +662,7 @@ Blockly.Blocks['text_comment'] = { this.setColour(160); //this.setHelpUrl(Blockly.Msg.TEXT_PROMPT_HELPURL); this.appendDummyInput() - .appendField('Comment:'); + .appendField(Blockly.Msg.TEXT_COMMENT_TEXT); this.appendDummyInput() .appendField(new Blockly.FieldTextArea(''), 'COMMENT') ; @@ -590,7 +670,7 @@ Blockly.Blocks['text_comment'] = { this.setNextStatement(true); // this.setTooltip(Blockly.Msg.TEXT_TEXT_TOOLTIP); }, - typeblock: [{translatedName: Blockly.getMsgString('text_comment_typeblock')}] + typeblock: Blockly.Msg.TEXT_COMMENT_TYPEBLOCK }; Blockly.Blocks['text_code_insert'] = { @@ -623,7 +703,10 @@ Blockly.Blocks['text_code_insert'] = { this.setPreviousStatement(true); this.setNextStatement(true); }, - helpUrl: Blockly.getUrlString('text_code_insert_url'), - typeblock: [{translatedName: Blockly.getMsgString('text_code_insert_typeblock')}] + helpUrl: Blockly.getUrlString('text_code_insert_url'), + typeblock: [{entry: Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK, + fields: {'TYPE' : 'Java' }}, + {entry: Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK, + fields: {'TYPE' : 'Python' }}] }; diff --git a/blocks/variables.js b/blocks/variables.js index dd48e29e0c3..8c19b7019c4 100644 --- a/blocks/variables.js +++ b/blocks/variables.js @@ -102,7 +102,7 @@ Blockly.Blocks['variables_get'] = { option.callback = Blockly.ContextMenu.callbackFactory(this, xmlBlock); options.push(option); }, - typeblock: [{translatedName: Blockly.getMsgString('variables_get_typeblock')}] + typeblock: Blockly.getMsgString('variables_get_typeblock') }; Blockly.Blocks['variables_set'] = { @@ -153,7 +153,7 @@ Blockly.Blocks['variables_set'] = { } return vartypes; }, - typeblock: [{translatedName: Blockly.getMsgString('variables_set_typeblock')}] + typeblock: Blockly.getMsgString('variables_set_typeblock') }; Blockly.Blocks['hash_variables_get'] = { @@ -237,7 +237,7 @@ Blockly.Blocks['hash_variables_get'] = { }, helpUrl: Blockly.getUrlString('variables_hash_get_url'), tooltip: Blockly.getToolTipString('variables_hash_get_tooltip'), - typeblock: [{translatedName: Blockly.getMsgString('variables_hash_get_typeblock')}] + typeblock: Blockly.getMsgString('variables_hash_get_typeblock') }; Blockly.Blocks['hash_parmvariables_get'] = { @@ -264,7 +264,7 @@ Blockly.Blocks['hash_parmvariables_get'] = { // customContextMenu: Blockly.Blocks['hash_variables_get'].customContextMenu helpUrl: Blockly.getUrlString('variables_hash_param_get_url'), tooltip: Blockly.getToolTipString('variables_hash_param_get_tooltip'), - typeblock: [{translatedName: Blockly.getMsgString('variables_hash_param_get_typeblock')}] + typeblock: Blockly.getMsgString('variables_hash_param_get_typeblock') }; @@ -308,6 +308,6 @@ Blockly.Blocks['hash_variables_set'] = { getVarsTypes: Blockly.Blocks['hash_variables_get'].getVarsTypes, renameScopeVar: Blockly.Blocks['hash_variables_get'].renameScopeVar, customContextMenu: Blockly.Blocks['hash_variables_get'].customContextMenu, - typeblock: [{translatedName: Blockly.getMsgString('variables_hash_param_set_typeblock')}] + typeblock: Blockly.getMsgString('variables_hash_param_set_typeblock') }; diff --git a/blocks_compressed.js b/blocks_compressed.js index 662769ccb3f..f6f464d9208 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -3,39 +3,39 @@ // Copyright 2012 Google Inc. Apache License 2.0 -Blockly.Blocks.colour={};Blockly.Blocks.colour.HUE=20;Blockly.Blocks.colour_picker={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_PICKER_HELPURL);this.setColour(Blockly.Blocks.colour.HUE);this.appendDummyInput().appendField(new Blockly.FieldColour("#ff0000"),"COLOUR");this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_PICKER_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.COLOUR_PICKER_TYPEBLOCK}]}; -Blockly.Blocks.colour_random={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_RANDOM_HELPURL);this.setColour(Blockly.Blocks.colour.HUE);this.appendDummyInput().appendField(Blockly.Msg.COLOUR_RANDOM_TITLE);this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_RANDOM_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.COLOUR_RANDOM_TYPEBLOCK}]}; +Blockly.Blocks.colour={};Blockly.Blocks.colour.HUE=20;Blockly.Blocks.colour_picker={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_PICKER_HELPURL);this.setColour(Blockly.Blocks.colour.HUE);this.appendDummyInput().appendField(new Blockly.FieldColour("#ff0000"),"COLOUR");this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_PICKER_TOOLTIP)},typeblock:Blockly.Msg.COLOUR_PICKER_TYPEBLOCK}; +Blockly.Blocks.colour_random={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_RANDOM_HELPURL);this.setColour(Blockly.Blocks.colour.HUE);this.appendDummyInput().appendField(Blockly.Msg.COLOUR_RANDOM_TITLE);this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_RANDOM_TOOLTIP)},typeblock:Blockly.Msg.COLOUR_RANDOM_TYPEBLOCK}; Blockly.Blocks.colour_rgb={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_RGB_HELPURL);this.setColour(Blockly.Blocks.colour.HUE);this.appendValueInput("RED").setCheck("Number").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_RGB_TITLE).appendField(Blockly.Msg.COLOUR_RGB_RED);this.appendValueInput("GREEN").setCheck("Number").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_RGB_GREEN);this.appendValueInput("BLUE").setCheck("Number").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_RGB_BLUE); -this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_RGB_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.COLOUR_RGB_TYPEBLOCK}]}; +this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_RGB_TOOLTIP)},typeblock:Blockly.Msg.COLOUR_RGB_TYPEBLOCK}; Blockly.Blocks.colour_blend={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_BLEND_HELPURL);this.setColour(Blockly.Blocks.colour.HUE);this.appendValueInput("COLOUR1").setCheck("Colour").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_BLEND_TITLE).appendField(Blockly.Msg.COLOUR_BLEND_COLOUR1);this.appendValueInput("COLOUR2").setCheck("Colour").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_BLEND_COLOUR2);this.appendValueInput("RATIO").setCheck("Number").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_BLEND_RATIO); -this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_BLEND_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.COLOUR_BLEND_TYPEBLOCK}]}; +this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_BLEND_TOOLTIP)},typeblock:Blockly.Msg.COLOUR_BLEND_TYPEBLOCK}; // Copyright 2012 Google Inc. Apache License 2.0 -Blockly.Blocks.lists={};Blockly.Blocks.lists.HUE=260;Blockly.Blocks.lists_create_empty={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.setOutput(!0,"Array");this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);this.setTooltip(Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK}]}; -Blockly.Blocks.lists_create_with={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendAddSubGroup(Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH,"items",null,Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);this.itemCount_.items=1;this.updateShape_();this.setOutput(!0,"Array");this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP)},getAddSubName:function(a,b){return"ADD"+b},typeblock:[{translatedName:Blockly.Msg.LISTS_CREATE_WITH_TYPEBLOCK,mutatorAttributes:{items:2}}]}; -Blockly.Blocks.lists_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_REPEAT_TITLE,args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.LISTS_REPEAT_HELPURL})},typeblock:[{translatedName:Blockly.Msg.LISTS_REPEAT_TYPEBLOCK,values:{NUM:5}}]}; -Blockly.Blocks.lists_length={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_LENGTH_TOOLTIP,helpUrl:Blockly.Msg.LISTS_LENGTH_HELPURL})},typeblock:[{translatedName:Blockly.Msg.LISTS_LENGTH_TYPEBLOCK}]}; -Blockly.Blocks.lists_isEmpty={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_ISEMPTY_TOOLTIP,helpUrl:Blockly.Msg.LISTS_ISEMPTY_HELPURL})},typeblock:[{translatedName:Blockly.Msg.LISTS_ISEMPTY_TYPEBLOCK}]}; +Blockly.Blocks.lists={};Blockly.Blocks.lists.HUE=260;Blockly.Blocks.lists_create_empty={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.setOutput(!0,"Array");this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);this.setTooltip(Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP)},typeblock:Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK}; +Blockly.Blocks.lists_create_with={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendAddSubGroup(Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH,"items",null,Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);this.itemCount_.items=1;this.updateShape_();this.setOutput(!0,"Array");this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP)},getAddSubName:function(a,b){return"ADD"+b},typeblock:[{entry:Blockly.Msg.LISTS_CREATE_WITH_TYPEBLOCK,mutatorAttributes:{items:2}}]}; +Blockly.Blocks.lists_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_REPEAT_TITLE,args0:[{type:"input_value",name:"ITEM"},{type:"input_value",name:"NUM",check:"Number"}],output:"Array",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.LISTS_REPEAT_HELPURL})},typeblock:[{entry:Blockly.Msg.LISTS_REPEAT_TYPEBLOCK,values:{NUM:5}}]}; +Blockly.Blocks.lists_length={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_LENGTH_TOOLTIP,helpUrl:Blockly.Msg.LISTS_LENGTH_HELPURL})},typeblock:Blockly.Msg.LISTS_LENGTH_TYPEBLOCK}; +Blockly.Blocks.lists_isEmpty={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Blockly.Blocks.lists.HUE,tooltip:Blockly.Msg.LISTS_ISEMPTY_TOOLTIP,helpUrl:Blockly.Msg.LISTS_ISEMPTY_HELPURL})},typeblock:Blockly.Msg.LISTS_ISEMPTY_TYPEBLOCK}; Blockly.Blocks.lists_indexOf={init:function(){var a=[[Blockly.Msg.LISTS_INDEX_OF_FIRST,"FIRST"],[Blockly.Msg.LISTS_INDEX_OF_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.LISTS_INDEX_OF_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.setOutput(!0,"Number");this.appendValueInput("VALUE").setCheck("Array").appendField(Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST);this.appendValueInput("FIND").appendField(new Blockly.FieldDropdown(a),"END");this.setInputsInline(!0);this.setTooltip(Blockly.Msg.LISTS_INDEX_OF_TOOLTIP)}, -typeblock:[{translatedName:Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK,fields:{END:"FIRST"}},{translatedName:Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK,fields:{END:"LAST"}}]}; +typeblock:[{entry:Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK,fields:{END:"FIRST"}},{entry:Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK,fields:{END:"LAST"}}]}; Blockly.Blocks.lists_getIndex={init:function(){var a=[[Blockly.Msg.LISTS_GET_INDEX_GET,"GET"],[Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE,"GET_REMOVE"],[Blockly.Msg.LISTS_GET_INDEX_REMOVE,"REMOVE"]];this.WHERE_OPTIONS=[[Blockly.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[Blockly.Msg.LISTS_GET_INDEX_LAST,"LAST"],[Blockly.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]];this.setHelpUrl(Blockly.Msg.LISTS_GET_INDEX_HELPURL); this.setColour(Blockly.Blocks.lists.HUE);a=new Blockly.FieldDropdown(a,function(a){this.sourceBlock_.updateStatement_("REMOVE"==a)});this.appendValueInput("VALUE").setCheck("Array").appendField(Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST);this.appendDummyInput().appendField(a,"MODE").appendField("","SPACE");this.appendDummyInput("AT");Blockly.Msg.LISTS_GET_INDEX_TAIL&&this.appendDummyInput("TAIL").appendField(Blockly.Msg.LISTS_GET_INDEX_TAIL);this.setInputsInline(!0);this.setOutput(!0);this.updateAt_(!0); var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE")+"_"+b.getFieldValue("WHERE");return Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_"+a]})},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("statement",!this.outputConnection);var b=this.getInput("AT").type==Blockly.INPUT_VALUE;a.setAttribute("at",b);return a},domToMutation:function(a){var b="true"==a.getAttribute("statement");this.updateStatement_(b);a="false"!=a.getAttribute("at");this.updateAt_(a)},updateStatement_:function(a){a!= !this.outputConnection&&(this.unplug(!0,!0),a?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(a){this.removeInput("AT");this.removeInput("ORDINAL",!0);a?(this.appendValueInput("AT").setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var b=new Blockly.FieldDropdown(this.WHERE_OPTIONS, -function(b){var d="FROM_START"==b||"FROM_END"==b;if(d!=a){var e=this.sourceBlock_;e.updateAt_(d);e.setFieldValue(b,"WHERE");return null}});this.getInput("AT").appendField(b,"WHERE");Blockly.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)},typeblock:function(){for(var a=[],b=["GET","GET_REMOVE","REMOVE"],c=["FROM_START","FROM_END","FIRST","LAST","RANDOM"],d=0;dlist'},fields:{MODE:e,WHERE:g}})}return a}}; Blockly.Blocks.lists_setIndex={init:function(){var a=[[Blockly.Msg.LISTS_SET_INDEX_SET,"SET"],[Blockly.Msg.LISTS_SET_INDEX_INSERT,"INSERT"]];this.WHERE_OPTIONS=[[Blockly.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[Blockly.Msg.LISTS_GET_INDEX_LAST,"LAST"],[Blockly.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]];this.setHelpUrl(Blockly.Msg.LISTS_SET_INDEX_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("LIST").setCheck("Array").appendField(Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST); this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"MODE").appendField("","SPACE");this.appendDummyInput("AT");this.appendValueInput("TO").appendField(Blockly.Msg.LISTS_SET_INDEX_INPUT_TO);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.LISTS_SET_INDEX_TOOLTIP);this.updateAt_(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE")+"_"+b.getFieldValue("WHERE");return Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_"+a]})}, mutationToDom:function(){var a=document.createElement("mutation"),b=this.getInput("AT").type==Blockly.INPUT_VALUE;a.setAttribute("at",b);return a},domToMutation:function(a){a="false"!=a.getAttribute("at");this.updateAt_(a)},updateAt_:function(a){this.removeInput("AT");this.removeInput("ORDINAL",!0);a?(this.appendValueInput("AT").setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var b=new Blockly.FieldDropdown(this.WHERE_OPTIONS, -function(b){var d="FROM_START"==b||"FROM_END"==b;if(d!=a){var e=this.sourceBlock_;e.updateAt_(d);e.setFieldValue(b,"WHERE");return null}});this.moveInputBefore("AT","TO");this.getInput("ORDINAL")&&this.moveInputBefore("ORDINAL","TO");this.getInput("AT").appendField(b,"WHERE")},typeblock:function(){for(var a=[],b=["SET","INSERT"],c=["FROM_START","FROM_END","FIRST","LAST","RANDOM"],d=0;dlist'},fields:{MODE:e,WHERE:g}})}return a}}; +function(b){var d="FROM_START"==b||"FROM_END"==b;if(d!=a){var e=this.sourceBlock_;e.updateAt_(d);e.setFieldValue(b,"WHERE");return null}});this.moveInputBefore("AT","TO");this.getInput("ORDINAL")&&this.moveInputBefore("ORDINAL","TO");this.getInput("AT").appendField(b,"WHERE")},typeblock:function(){for(var a=[],b=["SET","INSERT"],c=["FROM_START","FROM_END","FIRST","LAST","RANDOM"],d=0;dlist'},fields:{MODE:e,WHERE:g}})}return a}}; Blockly.Blocks.lists_getSublist={init:function(){this.WHERE_OPTIONS_1=[[Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]];this.WHERE_OPTIONS_2=[[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.LISTS_GET_SUBLIST_HELPURL);this.setColour(Blockly.Blocks.lists.HUE); this.appendValueInput("LIST").setCheck("Array").appendField(Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST);this.appendDummyInput("AT1");this.appendDummyInput("AT2");Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput("TAIL").appendField(Blockly.Msg.LISTS_GET_SUBLIST_TAIL);this.setInputsInline(!0);this.setOutput(!0,"Array");this.updateAt_(1,!0);this.updateAt_(2,!0);this.setTooltip(Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation"),b=this.getInput("AT1").type== Blockly.INPUT_VALUE;a.setAttribute("at1",b);b=this.getInput("AT2").type==Blockly.INPUT_VALUE;a.setAttribute("at2",b);return a},domToMutation:function(a){var b="true"==a.getAttribute("at1");a="true"==a.getAttribute("at2");this.updateAt_(1,b);this.updateAt_(2,a)},updateAt_:function(a,b){this.removeInput("AT"+a);this.removeInput("ORDINAL"+a,!0);b?(this.appendValueInput("AT"+a).setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+a).appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)): -this.appendDummyInput("AT"+a);var c=new Blockly.FieldDropdown(this["WHERE_OPTIONS_"+a],function(c){var e="FROM_START"==c||"FROM_END"==c;if(e!=b){var f=this.sourceBlock_;f.updateAt_(a,e);f.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"));Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore("TAIL",null)},typeblock:[{translatedName:Blockly.Msg.LISTS_GET_SUBLIST_TYPEBLOCK, +this.appendDummyInput("AT"+a);var c=new Blockly.FieldDropdown(this["WHERE_OPTIONS_"+a],function(c){var e="FROM_START"==c||"FROM_END"==c;if(e!=b){var f=this.sourceBlock_;f.updateAt_(a,e);f.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"));Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore("TAIL",null)},typeblock:[{entry:Blockly.Msg.LISTS_GET_SUBLIST_TYPEBLOCK, values:{LIST:'list'}}]}; Blockly.Blocks.lists_split={init:function(){var a=this,b=new Blockly.FieldDropdown([[Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]],function(b){"SPLIT"==b?(a.outputConnection.setCheck("Array"),a.getInput("INPUT").setCheck("String")):(a.outputConnection.setCheck("String"),a.getInput("INPUT").setCheck("Array"))});this.setHelpUrl(Blockly.Msg.LISTS_SPLIT_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("INPUT").setCheck("String").appendField(b, -"MODE");this.appendValueInput("DELIM").setCheck("String").appendField(Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER);this.setInputsInline(!0);this.setOutput(!0,"Array");this.setTooltip(function(){var b=a.getFieldValue("MODE");if("SPLIT"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if("JOIN"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw"Unknown mode: "+b;})},typeblock:[{translatedName:Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK,values:{DELIM:','}, -fields:{MODE:"SPLIT"}},{translatedName:Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}}]}; +"MODE");this.appendValueInput("DELIM").setCheck("String").appendField(Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER);this.setInputsInline(!0);this.setOutput(!0,"Array");this.setTooltip(function(){var b=a.getFieldValue("MODE");if("SPLIT"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if("JOIN"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw"Unknown mode: "+b;})},typeblock:[{entry:Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK,values:{DELIM:','}, +fields:{MODE:"SPLIT"}},{entry:Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}}]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.logic={};Blockly.Blocks.logic.HUE=210; Blockly.Blocks.controls_if={init:function(){var a=new Blockly.FieldClickImage(this.addPng,17,17,Blockly.Msg.CONTROLS_IF_ADD_TOOLTIP);a.setChangeHandler(this.doAddField);this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.appendValueInput("IF0").setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_IF).appendField(a,"IF_ADD");this.appendStatementInput("DO0").appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN);this.setPreviousStatement(!0);this.setNextStatement(!0); @@ -44,61 +44,60 @@ this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_);this.elseCount_&&a this.getInput("IF"+b);c&&c.connection&&c.connection.targetConnection&&c.connection.targetConnection.sourceBlock_.unplug(!0,!0);var d=this.getInput("DO"+b);d&&d.connection&&d.connection.targetConnection&&d.connection.targetConnection.sourceBlock_.unplug(!0,!0);for(b+=1;b","LT"],["\u2265","LTE"],["<","GT"],["\u2264","GTE"]]:[["=","EQ"],["\u2260","NEQ"],["<","LT"],["\u2264","LTE"],[">","GT"],["\u2265","GTE"]];this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.setOutput(!0,"Boolean");this.appendValueInput("A");this.appendValueInput("B").appendField(new Blockly.FieldDropdown(a),"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a= b.getFieldValue("OP");return{EQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[a]});this.prevBlocks_=[null,null]},onchange:function(){if(this.workspace){var a=this.getInputTargetBlock("A"),b=this.getInputTargetBlock("B");if(a&&b&&!a.outputConnection.checkType_(b.outputConnection))for(var c=0;cd;d++){var e=1==d?a:b;e&&!e.outputConnection.checkType_(c)&&(c===this.prevParentConnection_?(this.setParent(null),c.sourceBlock_.bumpNeighbours_()):(e.setParent(null),e.bumpNeighbours_()))}this.prevParentConnection_=c}},typeblock:[{translatedName:Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK}]}; +this.getInputTargetBlock("THEN"),b=this.getInputTargetBlock("ELSE"),c=this.outputConnection.targetConnection;if((a||b)&&c)for(var d=0;2>d;d++){var e=1==d?a:b;e&&!e.outputConnection.checkType_(c)&&(c===this.prevParentConnection_?(this.setParent(null),c.sourceBlock_.bumpNeighbours_()):(e.setParent(null),e.bumpNeighbours_()))}this.prevParentConnection_=c}},typeblock:Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.loops={};Blockly.Blocks.loops.HUE=120;Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_input",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setChangeHandler(Blockly.FieldTextInput.nonnegativeIntegerValidator)}}; -Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO)},typeblock:[{translatedName:Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK,values:{TIMES:10}}]}; +Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO)},typeblock:[{entry:Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK,values:{TIMES:10}}]}; Blockly.Blocks.controls_whileUntil={init:function(){var a=[[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]];this.setHelpUrl(Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendValueInput("BOOL").setCheck("Boolean").appendField(new Blockly.FieldDropdown(a),"MODE");this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO);this.setPreviousStatement(!0);this.setNextStatement(!0); -var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})},typeblock:[{translatedName:Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK,fields:{MODE:"WHILE"}},{translatedName:Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK,fields:{MODE:"UNTIL"}}]}; +var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})},typeblock:[{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK,fields:{MODE:"WHILE"}},{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK,fields:{MODE:"UNTIL"}}]}; Blockly.Blocks.controls_for={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOR_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOR_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOR_INPUT_DO); var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:function(a){if(!this.isCollapsed()){var b={enabled:!0},c=this.getFieldValue("VAR");b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR"); -c=goog.dom.createDom("block",null,c);c.setAttribute("type","variables_get");b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)}},typeblock:[{translatedName:Blockly.Msg.CONTROLS_FOR_TYPEBLOCK,values:{FROM:1,TO:10,BY:1}}]}; +c=goog.dom.createDom("block",null,c);c.setAttribute("type","variables_get");b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)}},typeblock:[{entry:Blockly.Msg.CONTROLS_FOR_TYPEBLOCK,values:{FROM:1,TO:10,BY:1}}]}; Blockly.Blocks.controls_forEach={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOREACH_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOREACH_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO);var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1", -a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:[{translatedName:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}]}; +a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}; Blockly.Blocks.controls_flow_statements={init:function(){var a=[[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"FLOW");this.setPreviousStatement(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("FLOW");return{BREAK:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK, -CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){if(this.workspace){var a=!1,b=this;do{if("controls_repeat"==b.type||"controls_repeat_ext"==b.type||"controls_forEach"==b.type||"controls_for"==b.type||"controls_whileUntil"==b.type){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)}},typeblock:[{translatedName:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK,fields:{FLOW:"BREAK"}}, -{translatedName:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK,fields:{FLOW:"CONTINUE"}}]}; +CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){if(this.workspace){var a=!1,b=this;do{if("controls_repeat"==b.type||"controls_repeat_ext"==b.type||"controls_forEach"==b.type||"controls_for"==b.type||"controls_whileUntil"==b.type){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)}},typeblock:[{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK,fields:{FLOW:"BREAK"}}, +{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK,fields:{FLOW:"CONTINUE"}}]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.math={};Blockly.Blocks.math.HUE=230;Blockly.Blocks.math_number={init:function(){this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.appendDummyInput().appendField(new Blockly.FieldTextInput("0",Blockly.FieldTextInput.numberValidator),"NUM");this.setOutput(!0,"Number");this.setTooltip(Blockly.Msg.MATH_NUMBER_TOOLTIP)}}; Blockly.Blocks.math_arithmetic={init:function(){var a=[[Blockly.Msg.MATH_ADDITION_SYMBOL,"ADD"],[Blockly.Msg.MATH_SUBTRACTION_SYMBOL,"MINUS"],[Blockly.Msg.MATH_MULTIPLICATION_SYMBOL,"MULTIPLY"],[Blockly.Msg.MATH_DIVISION_SYMBOL,"DIVIDE"],[Blockly.Msg.MATH_POWER_SYMBOL,"POWER"]];this.setHelpUrl(Blockly.Msg.MATH_ARITHMETIC_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("A").setCheck("Number");this.appendValueInput("B").setCheck("Number").appendField(new Blockly.FieldDropdown(a), -"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("OP");return{ADD:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[a]})},typeblock:[{translatedName:Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK,fields:{OP:"ADD"}},{translatedName:Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK, -fields:{OP:"MINUS"}},{translatedName:Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK,fields:{OP:"MULTIPLY"}},{translatedName:Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK,fields:{OP:"DIVIDE"}},{translatedName:Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK,fields:{OP:"POWER"}}]}; +"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("OP");return{ADD:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[a]})},typeblock:[{entry:Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK,fields:{OP:"ADD"}},{entry:Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK,fields:{OP:"MINUS"}}, +{entry:Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK,fields:{OP:"MULTIPLY"}},{entry:Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK,fields:{OP:"DIVIDE"}},{entry:Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK,fields:{OP:"POWER"}}]}; Blockly.Blocks.math_single={init:function(){var a=[[Blockly.Msg.MATH_SINGLE_OP_ROOT,"ROOT"],[Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE,"ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]];this.setHelpUrl(Blockly.Msg.MATH_SINGLE_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(a),"OP");var b=this;this.setTooltip(function(){var a=b.getFieldValue("OP");return{ROOT:Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT, -ABS:Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS,NEG:Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG,LN:Blockly.Msg.MATH_SINGLE_TOOLTIP_LN,LOG10:Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10,EXP:Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP,POW10:Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10}[a]})},typeblock:[{translatedName:Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK,fields:{OP:"ROOT"}},{translatedName:Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK,fields:{OP:"ABS"}},{translatedName:Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK,fields:{OP:"NEG"}},{translatedName:"ln", -fields:{OP:"LN"}},{translatedName:"log10",fields:{OP:"LOG10"}},{translatedName:"e^",fields:{OP:"EXP"}},{translatedName:"10^",fields:{OP:"POW10"}}]}; +ABS:Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS,NEG:Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG,LN:Blockly.Msg.MATH_SINGLE_TOOLTIP_LN,LOG10:Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10,EXP:Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP,POW10:Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10}[a]})},typeblock:[{entry:Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK,fields:{OP:"ROOT"}},{entry:Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK,fields:{OP:"ABS"}},{entry:Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK,fields:{OP:"NEG"}},{entry:"ln",fields:{OP:"LN"}}, +{entry:"log10",fields:{OP:"LOG10"}},{entry:"e^",fields:{OP:"EXP"}},{entry:"10^",fields:{OP:"POW10"}}]}; Blockly.Blocks.math_trig={init:function(){var a=[[Blockly.Msg.MATH_TRIG_SIN,"SIN"],[Blockly.Msg.MATH_TRIG_COS,"COS"],[Blockly.Msg.MATH_TRIG_TAN,"TAN"],[Blockly.Msg.MATH_TRIG_ASIN,"ASIN"],[Blockly.Msg.MATH_TRIG_ACOS,"ACOS"],[Blockly.Msg.MATH_TRIG_ATAN,"ATAN"]];this.setHelpUrl(Blockly.Msg.MATH_TRIG_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(a),"OP");var b=this;this.setTooltip(function(){var a= -b.getFieldValue("OP");return{SIN:Blockly.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Blockly.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Blockly.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN}[a]})},typeblock:[{translatedName:Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK,fields:{OP:"SIN"}},{translatedName:Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK,fields:{OP:"COS"}},{translatedName:Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK,fields:{OP:"TAN"}}, -{translatedName:"ln",fields:{OP:"ASIN"}},{translatedName:"log10",fields:{OP:"ACOS"}},{translatedName:"10^",fields:{OP:"ATAN"}}]}; -Blockly.Blocks.math_constant={init:function(){this.setHelpUrl(Blockly.Msg.MATH_CONSTANT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\u03c0","PI"],["e","E"],["\u03c6","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(\u00bd)","SQRT1_2"],["\u221e","INFINITY"]]),"CONSTANT");this.setTooltip(Blockly.Msg.MATH_CONSTANT_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK,fields:{CONSTANT:"PI"}}, -{translatedName:Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK,fields:{CONSTANT:"E"}},{translatedName:Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK,fields:{CONSTANT:"GOLDEN_RATIO"}},{translatedName:Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK,fields:{CONSTANT:"SQRT2"}},{translatedName:Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK,fields:{CONSTANT:"SQRT1_2"}},{translatedName:Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK,fields:{CONSTANT:"INFINITY"}}]}; +b.getFieldValue("OP");return{SIN:Blockly.Msg.MATH_TRIG_TOOLTIP_SIN,COS:Blockly.Msg.MATH_TRIG_TOOLTIP_COS,TAN:Blockly.Msg.MATH_TRIG_TOOLTIP_TAN,ASIN:Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN,ACOS:Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS,ATAN:Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN}[a]})},typeblock:[{entry:Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK,fields:{OP:"SIN"}},{entry:Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK,fields:{OP:"COS"}},{entry:Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK,fields:{OP:"TAN"}},{entry:Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK, +fields:{OP:"ASIN"}},{entry:Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK,fields:{OP:"ACOS"}},{entry:Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK,fields:{OP:"ATAN"}}]}; +Blockly.Blocks.math_constant={init:function(){this.setHelpUrl(Blockly.Msg.MATH_CONSTANT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(new Blockly.FieldDropdown([["\u03c0","PI"],["e","E"],["\u03c6","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(\u00bd)","SQRT1_2"],["\u221e","INFINITY"]]),"CONSTANT");this.setTooltip(Blockly.Msg.MATH_CONSTANT_TOOLTIP)},typeblock:[{entry:Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK,fields:{CONSTANT:"PI"}},{entry:Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK, +fields:{CONSTANT:"E"}},{entry:Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK,fields:{CONSTANT:"GOLDEN_RATIO"}},{entry:Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK,fields:{CONSTANT:"SQRT2"}},{entry:Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK,fields:{CONSTANT:"SQRT1_2"}},{entry:Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK,fields:{CONSTANT:"INFINITY"}}]}; Blockly.Blocks.math_number_property={init:function(){var a=[[Blockly.Msg.MATH_IS_EVEN,"EVEN"],[Blockly.Msg.MATH_IS_ODD,"ODD"],[Blockly.Msg.MATH_IS_PRIME,"PRIME"],[Blockly.Msg.MATH_IS_WHOLE,"WHOLE"],[Blockly.Msg.MATH_IS_POSITIVE,"POSITIVE"],[Blockly.Msg.MATH_IS_NEGATIVE,"NEGATIVE"],[Blockly.Msg.MATH_IS_DIVISIBLE_BY,"DIVISIBLE_BY"]];this.setColour(Blockly.Blocks.math.HUE);this.appendValueInput("NUMBER_TO_CHECK").setCheck("Number");a=new Blockly.FieldDropdown(a,function(a){this.sourceBlock_.updateShape_("DIVISIBLE_BY"== a)});this.appendDummyInput().appendField(a,"PROPERTY");this.setInputsInline(!0);this.setOutput(!0,"Boolean");this.setTooltip(Blockly.Msg.MATH_IS_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation"),b="DIVISIBLE_BY"==this.getFieldValue("PROPERTY");a.setAttribute("divisor_input",b);return a},domToMutation:function(a){a="true"==a.getAttribute("divisor_input");this.updateShape_(a)},updateShape_:function(a){var b=this.getInput("DIVISOR");a?b||this.appendValueInput("DIVISOR").setCheck("Number"): -b&&this.removeInput("DIVISOR")},typeblock:[{translatedName:Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK,fields:{PROPERTY:"EVEN"}},{translatedName:Blockly.Msg.MATH_IS_ODD_TYPEBLOCK,fields:{PROPERTY:"ODD"}},{translatedName:Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK,fields:{PROPERTY:"PRIME"}},{translatedName:Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK,fields:{PROPERTY:"WHOLE"}},{translatedName:Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK,fields:{PROPERTY:"POSITIVE"}},{translatedName:Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK,fields:{PROPERTY:"NEGATIVE"}}, -{translatedName:Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK,fields:{PROPERTY:"DIVISIBLE_BY"}}]}; +b&&this.removeInput("DIVISOR")},typeblock:[{entry:Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK,fields:{PROPERTY:"EVEN"}},{entry:Blockly.Msg.MATH_IS_ODD_TYPEBLOCK,fields:{PROPERTY:"ODD"}},{entry:Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK,fields:{PROPERTY:"PRIME"}},{entry:Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK,fields:{PROPERTY:"WHOLE"}},{entry:Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK,fields:{PROPERTY:"POSITIVE"}},{entry:Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK,fields:{PROPERTY:"NEGATIVE"}},{entry:Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK, +fields:{PROPERTY:"DIVISIBLE_BY"}}]}; Blockly.Blocks.math_change={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_CHANGE_TITLE,args0:[{type:"field_variable",name:"VAR",variable:Blockly.Msg.MATH_CHANGE_TITLE_ITEM},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.math.HUE,helpUrl:Blockly.Msg.MATH_CHANGE_HELPURL});var a=this;this.setTooltip(function(){return Blockly.Msg.MATH_CHANGE_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]}, -renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},typeblock:[{translatedName:Blockly.Msg.MATH_CHANGE_TYPEBLOCK,values:{DELTA:1}}]}; -Blockly.Blocks.math_round={init:function(){var a=[[Blockly.Msg.MATH_ROUND_OPERATOR_ROUND,"ROUND"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP,"ROUNDUP"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN,"ROUNDDOWN"]];this.setHelpUrl(Blockly.Msg.MATH_ROUND_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(a),"OP");this.setTooltip(Blockly.Msg.MATH_ROUND_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK, -fields:{OP:"ROUND"}},{translatedName:Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK,fields:{OP:"ROUNDUP"}},{translatedName:Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK,fields:{OP:"ROUNDDOWN"}}]}; -Blockly.Blocks.math_format_as_decimal={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE,args0:[{type:"input_value",name:"NUM",check:"Number"},{type:"input_value",name:"PLACES",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.getToolTipString("math_format_as_decimal_tooltip"),helpUrl:Blockly.getUrlString("math_format_as_decimal_url")})},typeblock:[{translatedName:Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK}]}; +renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},typeblock:[{entry:Blockly.Msg.MATH_CHANGE_TYPEBLOCK,values:{DELTA:1}}]}; +Blockly.Blocks.math_round={init:function(){var a=[[Blockly.Msg.MATH_ROUND_OPERATOR_ROUND,"ROUND"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP,"ROUNDUP"],[Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN,"ROUNDDOWN"]];this.setHelpUrl(Blockly.Msg.MATH_ROUND_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("NUM").setCheck("Number").appendField(new Blockly.FieldDropdown(a),"OP");this.setTooltip(Blockly.Msg.MATH_ROUND_TOOLTIP)},typeblock:[{entry:Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK, +fields:{OP:"ROUND"}},{entry:Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK,fields:{OP:"ROUNDUP"}},{entry:Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK,fields:{OP:"ROUNDDOWN"}}]}; +Blockly.Blocks.math_format_as_decimal={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE,args0:[{type:"input_value",name:"NUM",check:"Number"},{type:"input_value",name:"PLACES",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.getToolTipString("math_format_as_decimal_tooltip"),helpUrl:Blockly.getUrlString("math_format_as_decimal_url")})},typeblock:Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK}; Blockly.Blocks.math_on_list={init:function(){var a=[[Blockly.Msg.MATH_ONLIST_OPERATOR_SUM,"SUM"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MIN,"MIN"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MAX,"MAX"],[Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE,"AVERAGE"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN,"MEDIAN"],[Blockly.Msg.MATH_ONLIST_OPERATOR_MODE,"MODE"],[Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV,"STD_DEV"],[Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM,"RANDOM"]],b=this;this.setHelpUrl(Blockly.Msg.MATH_ONLIST_HELPURL);this.setColour(Blockly.Blocks.math.HUE); this.setOutput(!0,"Number");a=new Blockly.FieldDropdown(a,function(a){"MODE"==a?b.outputConnection.setCheck("Array"):b.outputConnection.setCheck("Number")});this.appendValueInput("LIST").setCheck("Array").appendField(a,"OP");this.setTooltip(function(){var a=b.getFieldValue("OP");return{SUM:Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM,MIN:Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN,MAX:Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX,AVERAGE:Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE,MEDIAN:Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN, -MODE:Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE,STD_DEV:Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV,RANDOM:Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM}[a]})},typeblock:[{translatedName:Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK,fields:{OP:"SUM"}},{translatedName:Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK,fields:{OP:"MIN"}},{translatedName:Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK,fields:{OP:"MAX"}},{translatedName:Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK,fields:{OP:"AVERAGE"}},{translatedName:Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK, -fields:{OP:"MEDIAN"}},{translatedName:Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK,fields:{OP:"MODE"}},{translatedName:Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK,fields:{OP:"STD_DEV"}},{translatedName:Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK,fields:{OP:"RANDOM"}}]}; -Blockly.Blocks.math_modulo={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_MODULO_TITLE,args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_MODULO_TOOLTIP,helpUrl:Blockly.Msg.MATH_MODULO_HELPURL})},typeblock:[{translatedName:Blockly.Msg.MATH_MODULO_TYPEBLOCK}]}; -Blockly.Blocks.math_constrain={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_CONSTRAIN_TITLE,args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_CONSTRAIN_TOOLTIP,helpUrl:Blockly.Msg.MATH_CONSTRAIN_HELPURL})},typeblock:[{translatedName:Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK,values:{LOW:1,HIGH:100}}]}; -Blockly.Blocks.math_random_int={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:Blockly.Msg.MATH_RANDOM_INT_HELPURL})},typeblock:[{translatedName:Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK,values:{FROM:1,TO:100}}]}; -Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM);this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)},typeblock:[{translatedName:Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK}]}; +MODE:Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE,STD_DEV:Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV,RANDOM:Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM}[a]})},typeblock:[{entry:Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK,fields:{OP:"SUM"}},{entry:Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK,fields:{OP:"MIN"}},{entry:Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK,fields:{OP:"MAX"}},{entry:Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK,fields:{OP:"AVERAGE"}},{entry:Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK,fields:{OP:"MEDIAN"}},{entry:Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK, +fields:{OP:"MODE"}},{entry:Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK,fields:{OP:"STD_DEV"}},{entry:Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK,fields:{OP:"RANDOM"}}]}; +Blockly.Blocks.math_modulo={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_MODULO_TITLE,args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_MODULO_TOOLTIP,helpUrl:Blockly.Msg.MATH_MODULO_HELPURL})},typeblock:Blockly.Msg.MATH_MODULO_TYPEBLOCK}; +Blockly.Blocks.math_constrain={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_CONSTRAIN_TITLE,args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_CONSTRAIN_TOOLTIP,helpUrl:Blockly.Msg.MATH_CONSTRAIN_HELPURL})},typeblock:[{entry:Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK,values:{LOW:1,HIGH:100}}]}; +Blockly.Blocks.math_random_int={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:Blockly.Msg.MATH_RANDOM_INT_HELPURL})},typeblock:[{entry:Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK,values:{FROM:1,TO:100}}]}; +Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM);this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)},typeblock:Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.procedures={};Blockly.Blocks.procedures.HUE=290; Blockly.Blocks.procedures_defnoreturn={init:function(){var a=new Blockly.FieldClickImage(this.addPng,17,17);a.setPrivate({name:b,pos:0});a.setChangeHandler(this.doAddField);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.setColour(Blockly.Blocks.procedures.HUE);var b=Blockly.Procedures.findLegalName(Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,this),b=new Blockly.FieldTextInput(b,Blockly.Procedures.rename);b.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(b, @@ -130,44 +129,47 @@ b.type&&this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("V // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.texts={};Blockly.Blocks.texts.HUE=160; Blockly.Blocks.text={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_TEXT_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Blockly.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1));this.setOutput(!0,"String");this.setTooltip(Blockly.Msg.TEXT_TEXT_TOOLTIP)},newQuote_:function(a){return new Blockly.FieldImage(a==this.RTL?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC", -12,12,'"')},typeblock:[{translatedName:Blockly.getMsgString("text_typeblock")}]}; -Blockly.Blocks.text_join={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_JOIN_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.setOutput(!0,"String");this.appendAddSubGroup(Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH,"items",null,"-IGNORED-");this.itemCount_.items=2;this.updateShape_()},getAddSubName:function(a,b){return"ADD"+b},appendAddSubEmptyInput:function(a,b){return this.appendDummyInput(a).appendField(this.newQuote_(!0)).appendField(this.newQuote_(!1))},newQuote_:Blockly.Blocks.text.newQuote_, -typeblock:[{translatedName:Blockly.getMsgString("text_join_typeblock")}]}; +12,12,'"')}}; +Blockly.Blocks.text_join={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_JOIN_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.setOutput(!0,"String");this.appendAddSubGroup(Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH,"items",null,"-IGNORED-");this.itemCount_.items=2;this.updateShape_()},getAddSubName:function(a,b){return"ADD"+b},appendAddSubEmptyInput:function(a,b){return this.appendDummyInput(a).appendField(this.newQuote_(!0)).appendField(this.newQuote_(!1))},newQuote_:Blockly.Blocks.text.newQuote_,typeblock:[{entry:Blockly.Msg.TEXT_JOIN_WITH_TYPEBLOCK, +mutatorAttributes:{items:2}}]}; Blockly.Blocks.text_append={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_APPEND_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendValueInput("TEXT").appendField(Blockly.Msg.TEXT_APPEND_TO).appendField(new Blockly.FieldVariable(Blockly.Msg.TEXT_APPEND_VARIABLE),"VAR").appendField(Blockly.Msg.TEXT_APPEND_APPENDTEXT);this.setPreviousStatement(!0);this.setNextStatement(!0);var a=this;this.setTooltip(function(){return Blockly.Msg.TEXT_APPEND_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})}, -getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},typeblock:[{translatedName:Blockly.getMsgString("text_append_typeblock")}]}; -Blockly.Blocks.text_length={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_LENGTH_TOOLTIP,helpUrl:Blockly.Msg.TEXT_LENGTH_HELPURL})},typeblock:[{translatedName:Blockly.getMsgString("text_length_typeblock")}]}; -Blockly.Blocks.text_isEmpty={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_ISEMPTY_TOOLTIP,helpUrl:Blockly.Msg.TEXT_ISEMPTY_HELPURL})},typeblock:[{translatedName:Blockly.getMsgString("text_isEmpty_typeblock")}]}; -Blockly.Blocks.text_contains={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_CONTAINS_INPUT,args0:[{type:"input_value",name:"TEXT",check:"String"},{type:"input_value",name:"PIECE",check:"String"}],output:"Boolean",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.getToolTipString("text_contains_tooltip"),helpUrl:Blockly.getUrlString("text_contains_url")})},typeblock:[{translatedName:Blockly.getMsgString("text_contains_typeblock")}]}; +getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},typeblock:Blockly.Msg.TEXT_APPEND_TYPEBLOCK};Blockly.Blocks.text_length={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_LENGTH_TOOLTIP,helpUrl:Blockly.Msg.TEXT_LENGTH_HELPURL})},typeblock:Blockly.Msg.TEXT_LENGTH_TYPEBLOCK}; +Blockly.Blocks.text_isEmpty={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_ISEMPTY_TOOLTIP,helpUrl:Blockly.Msg.TEXT_ISEMPTY_HELPURL})},typeblock:Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK}; +Blockly.Blocks.text_contains={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_CONTAINS_INPUT,args0:[{type:"input_value",name:"TEXT",check:"String"},{type:"input_value",name:"PIECE",check:"String"}],output:"Boolean",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.getToolTipString("text_contains_tooltip"),helpUrl:Blockly.getUrlString("text_contains_url")})},typeblock:Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK}; Blockly.Blocks.text_indexOf={init:function(){var a=[[Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST,"FIRST"],[Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.TEXT_INDEXOF_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.setOutput(!0,"Number");this.appendValueInput("VALUE").setCheck("String").appendField(Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT);this.appendValueInput("FIND").setCheck("String").appendField(new Blockly.FieldDropdown(a),"END");Blockly.Msg.TEXT_INDEXOF_TAIL&&this.appendDummyInput().appendField(Blockly.Msg.TEXT_INDEXOF_TAIL); -this.setInputsInline(!0);this.setTooltip(Blockly.Msg.TEXT_INDEXOF_TOOLTIP)},typeblock:[{translatedName:Blockly.getMsgString("text_indexof_typeblock")}]}; +this.setInputsInline(!0);this.setTooltip(Blockly.Msg.TEXT_INDEXOF_TOOLTIP)},typeblock:[{entry:Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK,values:{VALUE:'list'},fields:{END:"FIRST"}},{entry:Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK,values:{VALUE:'list'},fields:{END:"LAST"}}]}; Blockly.Blocks.text_charAt={init:function(){this.WHERE_OPTIONS=[[Blockly.Msg.TEXT_CHARAT_FROM_START,"FROM_START"],[Blockly.Msg.TEXT_CHARAT_FROM_END,"FROM_END"],[Blockly.Msg.TEXT_CHARAT_FIRST,"FIRST"],[Blockly.Msg.TEXT_CHARAT_LAST,"LAST"],[Blockly.Msg.TEXT_CHARAT_RANDOM,"RANDOM"]];this.setHelpUrl(Blockly.Msg.TEXT_CHARAT_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.setOutput(!0,"String");this.appendValueInput("VALUE").setCheck("String").appendField(Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT);this.appendDummyInput("AT"); this.setInputsInline(!0);this.updateAt_(!0);this.setTooltip(Blockly.Msg.TEXT_CHARAT_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation"),b=this.getInput("AT").type==Blockly.INPUT_VALUE;a.setAttribute("at",b);return a},domToMutation:function(a){a="false"!=a.getAttribute("at");this.updateAt_(a)},updateAt_:function(a){this.removeInput("AT");this.removeInput("ORDINAL",!0);a?(this.appendValueInput("AT").setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)): -this.appendDummyInput("AT");Blockly.Msg.TEXT_CHARAT_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(Blockly.Msg.TEXT_CHARAT_TAIL));var b=new Blockly.FieldDropdown(this.WHERE_OPTIONS,function(b){var d="FROM_START"==b||"FROM_END"==b;if(d!=a){var e=this.sourceBlock_;e.updateAt_(d);e.setFieldValue(b,"WHERE");return null}});this.getInput("AT").appendField(b,"WHERE")},typeblock:[{translatedName:Blockly.getMsgString("text_charat_typeblock")}]}; +this.appendDummyInput("AT");Blockly.Msg.TEXT_CHARAT_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(Blockly.Msg.TEXT_CHARAT_TAIL));var b=new Blockly.FieldDropdown(this.WHERE_OPTIONS,function(b){var d="FROM_START"==b||"FROM_END"==b;if(d!=a){var e=this.sourceBlock_;e.updateAt_(d);e.setFieldValue(b,"WHERE");return null}});this.getInput("AT").appendField(b,"WHERE")},typeblock:[{entry:Blockly.Msg.TEXT_CHARAT_FROM_START,values:{VALUE:'text', +AT:1},fields:{WHERE:"FROM_START"}},{entry:Blockly.Msg.TEXT_CHARAT_FROM_END,values:{VALUE:'text',AT:1},fields:{WHERE:"FROM_END"}},{entry:Blockly.Msg.TEXT_CHARAT_FIRST,values:{VALUE:'text'},fields:{WHERE:"FIRST"}},{entry:Blockly.Msg.TEXT_CHARAT_LAST,values:{VALUE:'text'},fields:{WHERE:"LAST"}},{entry:Blockly.Msg.TEXT_CHARAT_RANDOM, +values:{VALUE:'text'},fields:{WHERE:"RANDOM"}}]}; Blockly.Blocks.text_getSubstring={init:function(){this.WHERE_OPTIONS_1=[[Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START,"FROM_START"],[Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END,"FROM_END"],[Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST,"FIRST"]];this.WHERE_OPTIONS_2=[[Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START,"FROM_START"],[Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END,"FROM_END"],[Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL);this.setColour(Blockly.Blocks.texts.HUE); this.appendValueInput("STRING").setCheck("String").appendField(Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT);this.appendDummyInput("AT1");this.appendDummyInput("AT2");Blockly.Msg.TEXT_GET_SUBSTRING_TAIL&&this.appendDummyInput("TAIL").appendField(Blockly.Msg.TEXT_GET_SUBSTRING_TAIL);this.setInputsInline(!0);this.setOutput(!0,"String");this.updateAt_(1,!0);this.updateAt_(2,!0);this.setTooltip(Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation"), b=this.getInput("AT1").type==Blockly.INPUT_VALUE;a.setAttribute("at1",b);b=this.getInput("AT2").type==Blockly.INPUT_VALUE;a.setAttribute("at2",b);return a},domToMutation:function(a){var b="true"==a.getAttribute("at1");a="true"==a.getAttribute("at2");this.updateAt_(1,b);this.updateAt_(2,a)},updateAt_:function(a,b){this.removeInput("AT"+a);this.removeInput("ORDINAL"+a,!0);b?(this.appendValueInput("AT"+a).setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+a).appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)): -this.appendDummyInput("AT"+a);2==a&&Blockly.Msg.TEXT_GET_SUBSTRING_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(Blockly.Msg.TEXT_GET_SUBSTRING_TAIL));var c=new Blockly.FieldDropdown(this["WHERE_OPTIONS_"+a],function(c){var e="FROM_START"==c||"FROM_END"==c;if(e!=b){var f=this.sourceBlock_;f.updateAt_(a,e);f.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&this.moveInputBefore("AT1","AT2")},typeblock:[{translatedName:Blockly.getMsgString("text_getsubstring_typeblock")}]}; +this.appendDummyInput("AT"+a);2==a&&Blockly.Msg.TEXT_GET_SUBSTRING_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField(Blockly.Msg.TEXT_GET_SUBSTRING_TAIL));var c=new Blockly.FieldDropdown(this["WHERE_OPTIONS_"+a],function(c){var e="FROM_START"==c||"FROM_END"==c;if(e!=b){var f=this.sourceBlock_;f.updateAt_(a,e);f.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&this.moveInputBefore("AT1","AT2")},typeblock:function(){for(var a= +[],b=["FROM_START","FROM_END","FIRST"],c=["FROM_START","FROM_END","LAST"],d=0;dtext'},fields:{WHERE1:e,WHERE2:h}})}return a}}; Blockly.Blocks.text_changeCase={init:function(){var a=[[Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE,"UPPERCASE"],[Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE,"LOWERCASE"],[Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE,"TITLECASE"]];this.setHelpUrl(Blockly.Msg.TEXT_CHANGECASE_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendValueInput("TEXT").setCheck("String").appendField(new Blockly.FieldDropdown(a),"CASE");this.setOutput(!0,"String");this.setTooltip(Blockly.Msg.TEXT_CHANGECASE_TOOLTIP)}, -typeblock:[{translatedName:Blockly.getMsgString("text_changecase_typeblock")}]}; -Blockly.Blocks.text_trim={init:function(){var a=[[Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH,"BOTH"],[Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT,"LEFT"],[Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT,"RIGHT"]];this.setHelpUrl(Blockly.Msg.TEXT_TRIM_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendValueInput("TEXT").setCheck("String").appendField(new Blockly.FieldDropdown(a),"MODE");this.setOutput(!0,"String");this.setTooltip(Blockly.Msg.TEXT_TRIM_TOOLTIP)},typeblock:[{translatedName:Blockly.getMsgString("text_trim_typeblock")}]}; -Blockly.Blocks.text_print={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_PRINT_TITLE,args0:[{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_PRINT_TOOLTIP,helpUrl:Blockly.Msg.TEXT_PRINT_HELPURL})},typeblock:[{translatedName:Blockly.getMsgString("text_print_typeblock")}]}; +typeblock:[{entry:Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK,fields:{CASE:"UPPERCASE"}},{entry:Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK,fields:{CASE:"LOWERCASE"}},{entry:Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK,fields:{CASE:"TITLECASE"}}]}; +Blockly.Blocks.text_trim={init:function(){var a=[[Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH,"BOTH"],[Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT,"LEFT"],[Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT,"RIGHT"]];this.setHelpUrl(Blockly.Msg.TEXT_TRIM_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendValueInput("TEXT").setCheck("String").appendField(new Blockly.FieldDropdown(a),"MODE");this.setOutput(!0,"String");this.setTooltip(Blockly.Msg.TEXT_TRIM_TOOLTIP)},typeblock:[{entry:Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK, +fields:{MODE:"BOTH"}},{entry:Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK,fields:{MODE:"LEFT"}},{entry:Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK,fields:{MODE:"RIGHT"}}]};Blockly.Blocks.text_print={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_PRINT_TITLE,args0:[{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_PRINT_TOOLTIP,helpUrl:Blockly.Msg.TEXT_PRINT_HELPURL})},typeblock:Blockly.Msg.TEXT_PRINT_TYPEBLOCK}; Blockly.Blocks.text_prompt={init:function(){var a=[[Blockly.Msg.TEXT_PROMPT_TYPE_TEXT,"TEXT"],[Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER,"NUMBER"]],b=this;this.setHelpUrl(Blockly.Msg.TEXT_PROMPT_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);a=new Blockly.FieldDropdown(a,function(a){"NUMBER"==a?b.changeOutput("Number"):b.changeOutput("String")});this.appendDummyInput().appendField(a,"TYPE").appendField(this.newQuote_(!0)).appendField(new Blockly.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1)); -this.setOutput(!0,"String");b=this;this.setTooltip(function(){return"TEXT"==b.getFieldValue("TYPE")?Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT:Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER})},newQuote_:Blockly.Blocks.text.newQuote_,typeblock:[{translatedName:Blockly.getMsgString("text_prompt_typeblock")}]}; +this.setOutput(!0,"String");b=this;this.setTooltip(function(){return"TEXT"==b.getFieldValue("TYPE")?Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT:Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER})},newQuote_:Blockly.Blocks.text.newQuote_}; Blockly.Blocks.text_prompt_ext={init:function(){var a=[[Blockly.Msg.TEXT_PROMPT_TYPE_TEXT,"TEXT"],[Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER,"NUMBER"]],b=this;this.setHelpUrl(Blockly.Msg.TEXT_PROMPT_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);a=new Blockly.FieldDropdown(a,function(a){"NUMBER"==a?b.changeOutput("Number"):b.changeOutput("String")});this.appendValueInput("TEXT").appendField(a,"TYPE");this.setOutput(!0,"String");b=this;this.setTooltip(function(){return"TEXT"==b.getFieldValue("TYPE")? -Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT:Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER})},typeblock:[{translatedName:Blockly.getMsgString("text_prompt_ext_typeblock")}]};Blockly.Blocks.text_comment={init:function(){this.setColour(160);this.appendDummyInput().appendField("Comment:");this.appendDummyInput().appendField(new Blockly.FieldTextArea(""),"COMMENT");this.setPreviousStatement(!0);this.setNextStatement(!0)},typeblock:[{translatedName:Blockly.getMsgString("text_comment_typeblock")}]}; +Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT:Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER})},typeblock:[{entry:Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK,fields:{TYPE:"TEXT"},values:{TEXT:''}},{entry:Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK,fields:{TYPE:"NUMBER"},values:{TEXT:''}}]}; +Blockly.Blocks.text_comment={init:function(){this.setColour(160);this.appendDummyInput().appendField(Blockly.Msg.TEXT_COMMENT_TEXT);this.appendDummyInput().appendField(new Blockly.FieldTextArea(""),"COMMENT");this.setPreviousStatement(!0);this.setNextStatement(!0)},typeblock:Blockly.Msg.TEXT_COMMENT_TYPEBLOCK}; Blockly.Blocks.text_code_insert={init:function(){var a=[[Blockly.Msg.TEXT_TYPE_JAVA,"Java"],[Blockly.Msg.TEXT_TYPE_PYTHON,"Python"]],b=this;this.setColour(Blockly.getBlockHue("blockhue_text"));a=new Blockly.FieldDropdown(a);this.appendDummyInput().appendField(a,"TYPE");this.appendDummyInput().appendFieldTextAreaInput("CODE",250,"");this.setTooltip(function(){var a=b.getFieldValue("TYPE");return{Java:Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA,Python:Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON}[a]});this.setPreviousStatement(!0); -this.setNextStatement(!0)},helpUrl:Blockly.getUrlString("text_code_insert_url"),typeblock:[{translatedName:Blockly.getMsgString("text_code_insert_typeblock")}]}; +this.setNextStatement(!0)},helpUrl:Blockly.getUrlString("text_code_insert_url"),typeblock:[{entry:Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK,fields:{TYPE:"Java"}},{entry:Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK,fields:{TYPE:"Python"}}]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Blocks.variables={};Blockly.Blocks.variables.HUE=330; Blockly.Blocks.variables_get={init:function(){this.setHelpUrl(Blockly.Msg.VARIABLES_GET_HELPURL);this.setColour(Blockly.Blocks.variables.HUE);this.appendDummyInput().appendField(new Blockly.FieldVariable(Blockly.Msg.VARIABLES_DEFAULT_NAME),"VAR");this.setOutput(!0);this.setTooltip(Blockly.Msg.VARIABLES_GET_TOOLTIP);this.contextMenuMsg_=Blockly.Msg.VARIABLES_GET_CREATE_SET},getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};this.outputConnection&&this.outputConnection.targetConnection&& this.outputConnection.targetConnection.check_&&(a[this.getFieldValue("VAR")]=this.outputConnection.targetConnection.check_);return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},contextMenuType_:"variables_set",customContextMenu:function(a){var b={enabled:!0},c=this.getFieldValue("VAR");b.text=this.contextMenuMsg_.replace("%1",c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR");c=goog.dom.createDom("block",null,c);c.setAttribute("type", -this.contextMenuType_);b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)},typeblock:[{translatedName:Blockly.getMsgString("variables_get_typeblock")}]}; +this.contextMenuType_);b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)},typeblock:Blockly.getMsgString("variables_get_typeblock")}; Blockly.Blocks.variables_set={init:function(){this.jsonInit({message0:Blockly.Msg.VARIABLES_SET,args0:[{type:"field_variable",name:"VAR",variable:Blockly.Msg.VARIABLES_DEFAULT_NAME},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.variables.HUE,tooltip:Blockly.Msg.VARIABLES_SET_TOOLTIP,helpUrl:Blockly.Msg.VARIABLES_SET_HELPURL});this.contextMenuMsg_=Blockly.Msg.VARIABLES_SET_CREATE_GET},getVars:Blockly.Blocks.variables_get.getVars,renameVar:Blockly.Blocks.variables_get.renameVar, -contextMenuType_:"variables_get",customContextMenu:Blockly.Blocks.variables_get.customContextMenu,getVarsTypes:function(){var a={},b=this.getInput("VALUE");b&&b.connection&&b.connection.targetConnection&&b.connection.targetConnection.check_&&(a[this.getFieldValue("VAR")]=b.connection.targetConnection.check_);return a},typeblock:[{translatedName:Blockly.getMsgString("variables_set_typeblock")}]}; +contextMenuType_:"variables_get",customContextMenu:Blockly.Blocks.variables_get.customContextMenu,getVarsTypes:function(){var a={},b=this.getInput("VALUE");b&&b.connection&&b.connection.targetConnection&&b.connection.targetConnection.check_&&(a[this.getFieldValue("VAR")]=b.connection.targetConnection.check_);return a},typeblock:Blockly.getMsgString("variables_set_typeblock")}; Blockly.Blocks.hash_variables_get={init:function(){this.setColour(Blockly.getBlockHue("blockhue_variables"));this.appendDummyInput().appendField(Blockly.Msg.VARIABLES_GET_TITLE).appendField(new Blockly.FieldVariable(Blockly.Msg.VARIABLES_GET_ITEM),"VAR").appendField(".").appendField(new Blockly.FieldScopeVariable("HASHKEY"),"HASHKEY").appendField(Blockly.Msg.VARIABLES_GET_TAIL);this.setOutput(!0);this.contextMenuMsg_=Blockly.Msg.VARIABLES_GET_CREATE_SET;this.contextMenuType_="hash_variables_set"}, getVars:Blockly.Blocks.variables_get.getVars,renameVar:Blockly.Blocks.variables_get.renameVar,getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["JSON"];return a},getScopeVars:function(a){var b=[];"HASHKEY"===a&&b.push(this.getFieldValue("HASHKEY"));return b},renameScopeVar:function(a,b,c){"HASHKEY"===c&&Blockly.Names.equals(a,this.getFieldValue("HASHKEY"))&&this.setFieldValue(b,"HASHKEY")},customContextMenu:function(a){var b={enabled:!0},c=this.getFieldValue("VAR"),d=this.getFieldValue("HASHKEY"); -b.text=this.contextMenuMsg_.replace("%1",c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR");c=goog.dom.createDom("field",null,d);c.setAttribute("name","HASHKEY");d=goog.dom.createDom("block",null,c);d.setAttribute("type",this.contextMenuType_);b.callback=Blockly.ContextMenu.callbackFactory(this,d);a.push(b)},helpUrl:Blockly.getUrlString("variables_hash_get_url"),tooltip:Blockly.getToolTipString("variables_hash_get_tooltip"),typeblock:[{translatedName:Blockly.getMsgString("variables_hash_get_typeblock")}]}; +b.text=this.contextMenuMsg_.replace("%1",c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR");c=goog.dom.createDom("field",null,d);c.setAttribute("name","HASHKEY");d=goog.dom.createDom("block",null,c);d.setAttribute("type",this.contextMenuType_);b.callback=Blockly.ContextMenu.callbackFactory(this,d);a.push(b)},helpUrl:Blockly.getUrlString("variables_hash_get_url"),tooltip:Blockly.getToolTipString("variables_hash_get_tooltip"),typeblock:Blockly.getMsgString("variables_hash_get_typeblock")}; Blockly.Blocks.hash_parmvariables_get={init:function(){this.setColour(Blockly.getBlockHue("blockhue_variables"));this.appendValueInput("VAR").appendField(Blockly.Msg.VARIABLES_GET_TITLE);this.appendDummyInput().appendField(".").appendField(new Blockly.FieldScopeVariable("HASHKEY"),"HASHKEY").appendField(Blockly.Msg.VARIABLES_GET_TAIL);this.setOutput(!0);this.setInputsInline(!0);this.contextMenuMsg_=Blockly.Msg.VARIABLES_GET_CREATE_SET;this.contextMenuType_="hash_variables_set"},getScopeVars:Blockly.Blocks.hash_variables_get.getScopeVars, -renameScopeVar:Blockly.Blocks.hash_variables_get.renameScopeVar,helpUrl:Blockly.getUrlString("variables_hash_param_get_url"),tooltip:Blockly.getToolTipString("variables_hash_param_get_tooltip"),typeblock:[{translatedName:Blockly.getMsgString("variables_hash_param_get_typeblock")}]}; +renameScopeVar:Blockly.Blocks.hash_variables_get.renameScopeVar,helpUrl:Blockly.getUrlString("variables_hash_param_get_url"),tooltip:Blockly.getToolTipString("variables_hash_param_get_tooltip"),typeblock:Blockly.getMsgString("variables_hash_param_get_typeblock")}; Blockly.Blocks.hash_variables_set={init:function(){this.jsonInit({message0:Blockly.Msg.SCOPE_VARIABLES_SET,args0:[{type:"field_variable",name:"VAR",variable:Blockly.Msg.VARIABLES_DEFAULT_NAME},{type:"field_scopevariable",name:"HASHKEY",scope:"HASHKEY"},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.variables.HUE,tooltip:Blockly.getToolTipString("variables_hash_param_set_tooltip"),helpUrl:Blockly.getUrlString("variables_hash_param_set_url")});this.contextMenuMsg_= -Blockly.Msg.VARIABLES_SET_CREATE_GET;this.contextMenuType_="hash_variables_get"},getVars:Blockly.Blocks.hash_variables_get.getVars,renameVar:Blockly.Blocks.hash_variables_get.renameVar,getScopeVars:Blockly.Blocks.hash_variables_get.getScopeVars,getVarsTypes:Blockly.Blocks.hash_variables_get.getVarsTypes,renameScopeVar:Blockly.Blocks.hash_variables_get.renameScopeVar,customContextMenu:Blockly.Blocks.hash_variables_get.customContextMenu,typeblock:[{translatedName:Blockly.getMsgString("variables_hash_param_set_typeblock")}]}; \ No newline at end of file +Blockly.Msg.VARIABLES_SET_CREATE_GET;this.contextMenuType_="hash_variables_get"},getVars:Blockly.Blocks.hash_variables_get.getVars,renameVar:Blockly.Blocks.hash_variables_get.renameVar,getScopeVars:Blockly.Blocks.hash_variables_get.getScopeVars,getVarsTypes:Blockly.Blocks.hash_variables_get.getVarsTypes,renameScopeVar:Blockly.Blocks.hash_variables_get.renameScopeVar,customContextMenu:Blockly.Blocks.hash_variables_get.customContextMenu,typeblock:Blockly.getMsgString("variables_hash_param_set_typeblock")}; \ No newline at end of file diff --git a/core/block.js b/core/block.js index f9449271902..64fab841063 100644 --- a/core/block.js +++ b/core/block.js @@ -568,7 +568,7 @@ Blockly.Block.prototype.setHelpUrl = function(url) { */ Blockly.Block.prototype.setTypeblock = function(typeblock) { if (typeof typeblock === 'string') { - this.typeblock = { translatedName: typeblock }; + this.typeblock = { entry: typeblock }; } else { this.typeblock = typeblock; } diff --git a/core/css.js b/core/css.js index cb35f7a4a39..1d2ed29937b 100644 --- a/core/css.js +++ b/core/css.js @@ -283,6 +283,10 @@ Blockly.Css.CONTENT = [ ' opacity: 0;', '}', + '.blocklyFlyout .blocklyDraggable:not(:hover) .blocklyIconFading {', + ' opacity: 1;', + '}', + '.blocklyMinimalBody {', ' margin: 0;', ' padding: 0;', diff --git a/core/flyout.js b/core/flyout.js index 4e0dfcfa891..7e78ccc1cee 100644 --- a/core/flyout.js +++ b/core/flyout.js @@ -118,7 +118,7 @@ Blockly.Flyout.prototype.createDom = function() { */ - this.svgGroup_ = Blockly.createSvgElement('g', {}, null); + this.svgGroup_ = Blockly.createSvgElement('g', {'class': 'blocklyFlyout'}, null); this.svgBackground_ = Blockly.createSvgElement('path', {'class': 'blocklyFlyoutBackground'}, this.svgGroup_); this.svgGroup_.appendChild(this.workspace_.createDom()); diff --git a/core/typeblock.js b/core/typeblock.js index 075757e6f51..aef4e78834c 100644 --- a/core/typeblock.js +++ b/core/typeblock.js @@ -64,8 +64,8 @@ Blockly.TypeBlock.visible = false; * internationalised word or sentence used in typeblocks. Certain blocks do not * only need the canonical block representation, but also values for dropdowns * (name and value) - * - No dropdowns: this.typeblock: [{ translatedName: Blockly.LANG_VAR }] - * - With dropdowns: this.typeblock: [{ translatedName: Blockly.LANG_VAR }, + * - No dropdowns: this.typeblock: [{ entry: Blockly.LANG_VAR }] + * - With dropdowns: this.typeblock: [{ entry: Blockly.LANG_VAR }, * fields: { TITLE: 'value'}] * - Additional types can be used to mark a block as isProcedure or * isGlobalVar. These are only used to manage the loading of options in the @@ -221,6 +221,10 @@ Blockly.TypeBlock.generateOptions = function() { typeblockArray = block.typeblock; if(typeof block.typeblock == "function") { typeblockArray = block.typeblock(); + } else if (typeof block.typeblock === 'string') { + // If they just give us a string, build up the single level array + // from that string. This is the most common case for blocks + typeblockArray = [{entry: block.typeblock}]; } createOption(typeblockArray, name); } @@ -241,7 +245,7 @@ Blockly.TypeBlock.generateOptions = function() { if(dd.mutatorAttributes) { mutatorAttributes = dd.mutatorAttributes; } - listOfOptions[dd.translatedName] = { + listOfOptions[dd.entry] = { canonicName: canonicName, mutatorAttributes: mutatorAttributes, fields: fields, @@ -293,9 +297,9 @@ Blockly.TypeBlock.loadProcedures_ = function() { // Add blocks for the calls with no return goog.array.forEach(procNamesArray[0], function(proc){ - var translatedName = Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL + + var entry = Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL + ' ' + proc[0]; - Blockly.TypeBlock.TBOptions_[translatedName] = { + Blockly.TypeBlock.TBOptions_[entry] = { canonicName: 'procedures_callnoreturn', fields: {PROCNAME: proc[0] }, isProcedure: true // this attribute is used to clean up before reloading @@ -304,9 +308,9 @@ Blockly.TypeBlock.loadProcedures_ = function() { // Add blocks for the calls with a return goog.array.forEach(procNamesArray[1], function(proc){ - translatedName = Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL + + entry = Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL + ' ' + proc[0]; - Blockly.TypeBlock.TBOptions_[translatedName] = { + Blockly.TypeBlock.TBOptions_[entry] = { canonicName: 'procedures_callreturn', fields: {PROCNAME: proc[0] }, isProcedure: true // this attribute is used to clean up before reloading diff --git a/msg/js/ar.js b/msg/js/ar.js index b2d603a458c..cbcd9691c72 100644 --- a/msg/js/ar.js +++ b/msg/js/ar.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "إلصق نص"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "إلى"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "إلصق جزءا من النص إلى متغير '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "الى حروف صغيرة"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "الى حروف العنوان"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "الى حروف كبيرة"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "يرجع نسخة من النص في حالة مختلفة."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "احصل على الحرف الأول"; Blockly.Msg.TEXT_CHARAT_FROM_END = "الحصول على الحرف # من نهاية"; Blockly.Msg.TEXT_CHARAT_FROM_START = "الحصول على الحرف #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "احصل على آخر حرف"; Blockly.Msg.TEXT_CHARAT_RANDOM = "الحصول على حرف عشوائي"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "يرجع حرف ما في الموضع المحدد."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "إضف عنصر إلى النص."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "الانضمام إلى"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "أضف, إحذف, أو أعد ترتيب المقاطع لإعادة تكوين النص من القطع التالية."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "إلى حرف # من نهاية"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "إلى حرف #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "إلى آخر حرف"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "في النص"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "الحصول على سلسلة فرعية من الحرف الأول"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "الحصول على سلسلة حروف فرعية من الحرف # من نهاية"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "الحصول على سلسلة حروف فرعية من الحرف #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "يرجع جزء معين من النص."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "في النص"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "ابحث عن التواجد الأول للنص"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "ابحث عن التواجد الأخير للنص"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "تقوم بإرجاع مؤشر التواج Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 فارغ"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "يرجع \"صحيح\" إذا كان النص المقدم فارغ."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "انشئ نص مع"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "أنشئ جزء من النص بالصاق أي عدد من العناصر ببعضها البعض."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "طول %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "تقوم بإرجاع عدد الاحرف (بما في ذلك الفراغات) في النص المقدم."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "اطبع %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "اطبع النص المحدد أو العدد أو قيمة أخرى."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "انتظر ادخال المستخذم لرقم ما."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "انتظر ادخال المستخدم لنص ما."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "انتظر ادخال المستخدم لرقم ما مع اظهار رسالة"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "حرف أو كلمة أو سطر من النص."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "إزالة الفراغات من كلا الجانبين"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "إزالة الفراغات من الجانب الأيسر من"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "إزالة الفراغات من الجانب الأيمن من"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "يرجع نسخة من النص مع حذف من أحد أو كلا الفراغات من أطرافه."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "البند"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "انشئ 'التعيين %1'"; diff --git a/msg/js/az.js b/msg/js/az.js index 8c6c9284673..cde5d3119de 100644 --- a/msg/js/az.js +++ b/msg/js/az.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "bu mətni əlavə et:"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "bu mətnin sonuna:"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "'%1' dəyişəninin sonuna nəsə əlavə et."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "kiçik hərflərlə"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Baş Hərflərlə"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "BÖYÜK HƏRFLƏRLƏ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Mətndə hərflərin böyük-kiçikliyini dəyiş."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "birinci hərfi götür"; Blockly.Msg.TEXT_CHARAT_FROM_END = "axırdan bu nömrəli hərfi götür"; Blockly.Msg.TEXT_CHARAT_FROM_START = "bu nömrəli hərfi götür"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "axırıncı hərfi götür"; Blockly.Msg.TEXT_CHARAT_RANDOM = "təsadüfi hərf götür"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Göstərilən mövqedəki hərfi qaytarır."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Mətnə bir element əlavə et."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "birləşdir"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Bu mətn blokunu yenidən konfigurasiya etmək üçün bölmələri əlavə edin, silin və ya yerlərini dəyişin."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "axırdan bu nömrəli hərfə qədər"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "bu nömrəli hərfə qədər"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "son hərfə qədər"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "mətndə"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "Mətnin surətini ilk hərfdən"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "Mətnin surətini sondan bu nömrəli # hərfdən"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "Mətnin surətini bu nömrəli hərfdən"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Mətnin təyin olunmuş hissəsini qaytarır."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "mətndə"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "Bu mətn ilə ilk rastlaşmanı tap:"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "Bu mətn ilə son rastlaşmanı tap:"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Birinci mətnin ikinci mətndə ilk/son rast Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 boşdur"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Verilmiş mətn boşdursa, doğru qiymətini qaytarır."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "Verilmişlərlə mətn yarat"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "İxtiyari sayda elementlərinin birləşməsi ilə mətn parçası yarat."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "%1 - ın uzunluğu"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Verilmiş mətndəki hərflərin(sözlər arası boşluqlar sayılmaqla) sayını qaytarır."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "%1 - i çap elə"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Təyin olunmuş mətn, ədəd və ya hər hansı bir başqa elementi çap elə."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "İstifadəçiyə ədəd daxil etməsi üçün sorğu/tələb göndərin."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "İstifadəçiyə mətn daxil etməsi üçün sorğu/tələb göndərin."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "İstifadəçiyə ədəd daxil etməsi üçün sorğunu/tələbi ismarıc kimi göndərin"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Mətndəki hərf, söz və ya sətir."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "Boşluqları hər iki tərəfdən pozun"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "Boşluqlari yalnız sol tərəfdən pozun"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "Boşluqları yalnız sağ tərəfdən pozun"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Mətnin hər iki və ya yalnız bir tərəfdən olan boşluqları pozulmuş surətini qaytarın."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "'%1 - i təyin et' - i yarat"; diff --git a/msg/js/bcc.js b/msg/js/bcc.js index 31f12452823..f15ae301e0c 100644 --- a/msg/js/bcc.js +++ b/msg/js/bcc.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "الحاق متن"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "به"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "الحاق متنی به متغیر «%1»."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "به حروف کوچک"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "به حروف بزرگ عنوان"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "به حروف بزرگ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "بازگرداندن کپی متن در حالتی متفاوت."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "گرفتن اولین حرف"; Blockly.Msg.TEXT_CHARAT_FROM_END = "گرفتن حرف # از آخر"; Blockly.Msg.TEXT_CHARAT_FROM_START = "گرفتن حرف #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "گرفتن آخرین حرف"; Blockly.Msg.TEXT_CHARAT_RANDOM = "گرفتن حرف تصادفی"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "حرفی در موقعیت مشخص‌شده بر می‌گرداند."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "افزودن یک مورد به متن."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "عضویت"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "اضافه، حذف یا ترتیب‌سازی قسمت‌ها برای تنظیم مجدد این بلوک اگر مسدود است."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "به حرف # از انتها"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "به حرف #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "گرفتن آخرین حرف"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "در متن"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "گرفتن زیرمتن از اولین حرف"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "گرفتن زیرمتن از حرف # به انتها"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "گرفتن زیرمتن از حرف #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "قسمت مشخصی‌شده‌ای از متن را بر می‌گرداند."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "در متن"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "اولین رخداد متن را بیاب"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "آخرین رخداد متن را بیاب"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "شاخصی از اولین آخرین رخ Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 خالی است"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "اضافه‌کردن صحیح اگر متن فراهم‌شده خالی است."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ایجاد متن با"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "یک تکه‌ای از متن را با چسپاندن همهٔ تعداد از موارد ایجاد می‌کند."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "طول %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "بازگرداندن عددی از حروف (شامل فاصله‌ها) در متن فراهم‌شده."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "چاپ %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "چاپ متن، عدد یا هر مقدار دیگر مشخص‌شده."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "اعلان برای کاربر با یک عدد."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "اعلان برای کاربر برای یک متن."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "اعلان برای عدد با پیام"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B1%D8%B4%D8%A Blockly.Msg.TEXT_TEXT_TOOLTIP = "یک حرف، کلمه یا خطی از متن."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "تراشیدن فاصله‌ها از هر دو طرف"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "تراشیدن فاصله‌ها از طرف چپ"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "تراشیدن فاصله‌ها از طرف چپ"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "کپی از متن با فاصله‌های حذف‌شده از یک یا هر دو پایان باز می‌گرداند."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "مورد"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "درست‌کردن «تنظیم %1»"; diff --git a/msg/js/be-tarask.js b/msg/js/be-tarask.js index 92a4a0bbd07..267e2fda611 100644 --- a/msg/js/be-tarask.js +++ b/msg/js/be-tarask.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "дадаць тэкст"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "да"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Дадаць які-небудзь тэкст да зьменнай '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "да ніжняга рэгістру"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Вялікія Першыя Літары"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "да ВЕРХНЯГА РЭГІСТРУ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Вярнуць копію тэксту зь іншай велічынёй літар."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "узяць першую літару"; Blockly.Msg.TEXT_CHARAT_FROM_END = "узяць літару № з канца"; Blockly.Msg.TEXT_CHARAT_FROM_START = "узяць літару №"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "узяць апошнюю літару"; Blockly.Msg.TEXT_CHARAT_RANDOM = "узяць выпадковую літару"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Вяртае літару ў пазначанай пазыцыі."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Дадаць элемэнт да тэксту."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "далучыць"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Дадайце, выдаліце ці зьмяніце парадак разьдзелаў для перадачы тэкставага блёку."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "да літары № з канца"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "да літары №"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "да апошняй літары"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "у тэксьце"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "атрымаць падрадок зь першай літары"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "узяць падрадок зь літары № з канца"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "узяць падрадок зь літары №"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Вяртае пазначаную частку тэксту."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "у тэксьце"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "знайсьці першае ўваходжаньне тэксту"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "знайсьці апошняе ўваходжаньне тэксту"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Вяртае індэкс першага/а Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 пусты"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Вяртае значэньне ісьціна, калі тэкст пусты."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "стварыць тэкст з"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Стварае фрагмэнт тэксту аб’яднаньнем любой колькасьці элемэнтаў."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "даўжыня %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Вяртае колькасьць літараў (у тым ліку прабелы) у пададзеным тэксьце."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "друкаваць %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Надрукаваць пазначаны тэкст, лічбу ці іншыя сымбалі."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Запытаць у карыстальніка лічбу."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Запытаць у карыстальніка тэкст."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "запытаць лічбу з падказкай"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Літара, слова ці радок тэксту."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "абрэзаць прабелы з абодвух бакоў"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "абрэзаць прабелы зь левага боку"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "абрэзаць прабелы з правага боку"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Вяртае копію тэксту з прабеламі, выдаленымі ад аднаго ці абодвух бакоў."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Сёньня"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "аб’ект"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Стварыць блёк «усталяваць %1»"; diff --git a/msg/js/bg.js b/msg/js/bg.js index a5b1b50c128..ec3bf10bc48 100644 --- a/msg/js/bg.js +++ b/msg/js/bg.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "добави текста"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "към"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Добави текста към променливата \"%1\"."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "с малки букви"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "с Главна Буква На Всяка Дума"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "с ГЛАВНИ БУКВИ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Връща копие на текста със сменени малки и главни букви."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "вземи първата буква"; Blockly.Msg.TEXT_CHARAT_FROM_END = "вземи поредна буква от края"; Blockly.Msg.TEXT_CHARAT_FROM_START = "вземи поредна буква"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "вземи последната буква"; Blockly.Msg.TEXT_CHARAT_RANDOM = "вземи произволна буква"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Връща буквата в определена позиция."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Добави елемент към текста."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "свържи"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Добави, премахни или пренареди частите, за да промениш този текстов блок."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "со буква № (броено отзад-напред)"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "до буква №"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "со последната буква."; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "В текста"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "вземи текста от първата буква"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "вземи текста от буква № (броено отзад-напред)"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "вземи текста от буква №"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Връща определена част от текста."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "в текста"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "намери първата поява на текста"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "намери последната поява на текста"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Връща индекса на първот Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 е празен"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Връща истина, ако текста е празен."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "създай текст с"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Създай текст като съчетаеш няколко елемента."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "дължината на %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Връща броя на символите (включително и интервалите) в текста."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "отпечатай %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Отпечатай текста, числото или друга стойност."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Питай потребителя за число."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Питай потребителя за текст."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "питай за число със съобщение"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://bg.wikipedia.org/wiki/Низ"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "Буква, дума или ред"; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "премахни интервалите от двете страни"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "премахни интервалите отляво"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "премахни интервалите отдясно"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Върни копие на текста с пемахнати интервали от диния или двата края."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "елемент"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Създай \"промени стойността на %1\""; diff --git a/msg/js/bn.js b/msg/js/bn.js index d8f53fd87f7..946ef3fd299 100644 --- a/msg/js/bn.js +++ b/msg/js/bn.js @@ -408,38 +408,53 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; // untranslated Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "এতে"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "ছোটহাতের অক্ষরে"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "বড়হাতের অক্ষরে"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated -Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHARAT_FIRST = "In Text Get First Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_END = "In Text Get Letter # From End"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_START = "In Text Get Letter #"; // untranslated Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "in text"; // untranslated -Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_LAST = "In Text Get Last Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_RANDOM = "In Text Get Random Letter"; // untranslated Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "লেখাটিতে একটি পদ যোগ করুন।"; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "সংযোগ কর"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in text"; // untranslated +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 খালি"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "পাঠাবে সত্য যদি সরবরাহকৃত লেখাটি খালি হয়।"; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; // untranslated Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; // untranslated Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "প্রিন্ট %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "একটি অক্ষর, শব্দ অথবা বাক্য।"; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "উভয় পাশ থেকে খালি অংশ ছাটাই"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "বামপাশ থেকে খালি অংশ ছাটাই"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "ডানপাশ থেকে খালি অংশ ছাটাই"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "আজ"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "পদ"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated diff --git a/msg/js/br.js b/msg/js/br.js index f3e60cd4e5a..f0f48ebcf46 100644 --- a/msg/js/br.js +++ b/msg/js/br.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ouzhpennañ an destenn"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "da"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Ouzhpennañ testenn d'an argemmenn'%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "e lizherennoù bihan"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Gant Ur Bennlizherenn E Deroù Pep Ger"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "e PENNLIZHERENNOÙ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Distreiñ un eilenn eus an eilenn en un direnneg all"; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "tapout al lizherenn gentañ"; Blockly.Msg.TEXT_CHARAT_FROM_END = "Kaout al lizherenn # adalek an dibenn."; Blockly.Msg.TEXT_CHARAT_FROM_START = "Kaout al lizherenn #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "tapout al lizherenn ziwezhañ"; Blockly.Msg.TEXT_CHARAT_RANDOM = "Kaout ul lizherenn dre zegouezh"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Distreiñ al lizherenn d'al lec'h spisaet."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Ouzhpennañ un elfenn d'an destenn."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "stagañ"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Ouzhpennañ, lemel pe adurzhiañ ar rannoù evit kefluniañ ar bloc'h testenn-mañ."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "Betek al lizherenn # adalek an dibenn."; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "betek al lizherenn #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "d'al lizherenn diwezhañ"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "en destenn"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "Kaout an ischadenn adalek al lizherenn gentañ"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "Kaout an ischadenn adalek al lizherenn # betek an dibenn"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "Kaout an ischadenn adalek al lizherenn #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Distreiñ un tamm spisaet eus an destenn."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "en destenn"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "kavout reveziadenn gentañ an destenn"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "kavout reveziadenn diwezhañ an destenn"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Distreiñ meneger ar c'hentañ/an eil revezi Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 zo goullo"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Adkas gwir m'eo goullo an destenn roet."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "krouiñ un destenn gant"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Krouit un tamm testenn en ur gevelstrollañ un niver bennak a elfennoù"; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "hirder %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Distreiñ an niver a lizherennoù(en ur gontañ an esaouennoù e-barzh) en destenn roet."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "moullañ %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Moullañ an destenn, an niverenn pe un dalvoudenn spisaet all"; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Goulenn un niver gant an implijer."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Goulenn un destenn gant an implijer."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "pedadenn evit un niver gant ur c'hemennad"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Ul lizherenn, ur ger pe ul linennad testenn."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "Lemel an esaouennoù en daou du"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "Lemel an esaouennoù eus an tu kleiz"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "Lemel an esaouennoù eus an tu dehou"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Distreiñ un eilenn eus an destenn gant an esaouennoù lamet eus un tu pe eus an daou du"; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Hiziv"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "elfenn"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Krouiñ 'termenañ %1'"; diff --git a/msg/js/ca.js b/msg/js/ca.js index 3bf8806cb80..cf25d0c5092 100644 --- a/msg/js/ca.js +++ b/msg/js/ca.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "afegir text"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "a"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Afegir un text a la variable '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "a minúscules"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "a Text De Títol"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "a MAJÚSCULES"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Retorna una còpia del text amb diferents majúscules/minúscules."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "recupera la primera lletra"; Blockly.Msg.TEXT_CHARAT_FROM_END = "recupera la lletra núm.# des del final"; Blockly.Msg.TEXT_CHARAT_FROM_START = "recupera la lletra núm.#"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "recupera l'última lletra"; Blockly.Msg.TEXT_CHARAT_RANDOM = "recupera una lletra a l'atzar"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Recupera la lletra de la posició especificada."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Afegeix un element al text."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "unir"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Afegeix, esborrar o reordenar seccions per reconfigurar aquest bloc de text."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "fins a la lletra núm.# des del final"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "fins a la lletra núm.#"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "fins a l'última lletra"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "en el text"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "recupera subcadena des de la primera lletra"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "recupera subcadena des de la lletra núm.# des del final"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "recupera subcadena des de la lletra núm.#"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Recupera una part especificada del text."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "en el text"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "trobar la primera aparició del text"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "trobar l'última aparició del text"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Retorna l'índex de la primera/última apari Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 està buit"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Retorna cert si el text proporcionat està buit."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "crear text amb"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Crea un tros de text per unió de qualsevol nombre d'elements."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "llargària de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Retorna el nombre de lletres (espais inclosos) en el text proporcionat."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "imprimir %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Imprimir el text, el nombre o altre valor especificat."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Demana que l'usuari introdueixi un nombre."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Demana que l'usuari introdueixi un text."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "demanar un nombre amb el missatge"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://ca.wikipedia.org/wiki/Cadena_%28inform% Blockly.Msg.TEXT_TEXT_TOOLTIP = "Una lletra, paraula o línia de text."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "retalla espais de tots dos extrems de"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "retalla espais de l'esquerra de"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "retalla espais de la dreta de"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Retorna una còpia del text on s'han esborrat els espais d'un o dels dos extrems."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Crea 'modifica %1'"; diff --git a/msg/js/cs.js b/msg/js/cs.js index 5af20ae0549..1cedc6c45dd 100644 --- a/msg/js/cs.js +++ b/msg/js/cs.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "přidat text"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "do"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Přidá určitý text k proměnné '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "na malá písmena"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "na Počáteční Velká Písmena"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "na VELKÁ PÍSMENA"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Vrátí kopii textu s jinou velikostí písmen."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "získat první písmeno"; Blockly.Msg.TEXT_CHARAT_FROM_END = "získat # písmeno od konce"; Blockly.Msg.TEXT_CHARAT_FROM_START = "získat písmeno #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "získat poslední písmeno"; Blockly.Msg.TEXT_CHARAT_RANDOM = "získat náhodné písmeno"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Získat písmeno na konkrétní pozici."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Přidat položku do textu."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "spojit"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Přidat, odebrat nebo změnit pořadí oddílů tohoto textového bloku."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "do # písmene od konce"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "do písmene #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "do posledního písmene"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "v textu"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "získat podřetězec od prvního písmene"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "získat podřetězec od písmene # od konce"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "získat podřetězec od písmene #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Získat zadanou část textu."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "v textu"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "najít první výskyt textu"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "najít poslední výskyt textu"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Vrátí index prvního/posledního výskytu Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 je prázdný"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Vrátí pravda pokud je zadaný text prázdný."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "vytvořit text s"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Vytvoří kousek textu spojením libovolného počtu položek."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "délka %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Vrátí počet písmen (včetně mezer) v zadaném textu."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "tisk %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Tisk zadaného textu, čísla nebo jiné hodnoty."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Výzva pro uživatele k zadání čísla."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Výzva pro uživatele k zadání nějakého textu."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "výzva k zadání čísla se zprávou"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://cs.wikipedia.org/wiki/Textov%C3%BD_%C5% Blockly.Msg.TEXT_TEXT_TOOLTIP = "Písmeno, slovo nebo řádek textu."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "odstranit mezery z obou stran"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "odstranit mezery z levé strany"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "odstranit mezery z pravé strany"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Vrátí kopii textu s odstraněnými mezerami z jednoho nebo obou konců."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "položka"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Vytvořit \"nastavit %1\""; diff --git a/msg/js/da.js b/msg/js/da.js index e63728bdc9b..0e4b5e3993b 100644 --- a/msg/js/da.js +++ b/msg/js/da.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "tilføj tekst"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "til"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Tilføj noget tekst til variablen '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "til små bogstaver"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "til Stort Begyndelsesbogstav"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "til STORE BOGSTAVER"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Returner en kopi af teksten hvor bogstaverne enten er udelukkende store eller små, eller hvor første bogstav i hvert ord er stort."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "hent første bogstav"; Blockly.Msg.TEXT_CHARAT_FROM_END = "hent bogstav # fra slutningen"; Blockly.Msg.TEXT_CHARAT_FROM_START = "hent bogstav #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "hent sidste bogstav"; Blockly.Msg.TEXT_CHARAT_RANDOM = "hent tilfældigt bogstav"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returnerer bogstavet på den angivne placering."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Føj et element til teksten."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "sammenføj"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Tilføj, fjern eller byt om på rækkefølgen af delene for at konfigurere denne tekstblok."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "til bogstav # fra slutningen"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "til bogstav #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "til sidste bogstav"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "i teksten"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "hent delstreng fra første bogstav"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "hent delstreng fra bogstav # fra slutningen"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "hent delstreng fra bogstav #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returnerer den angivne del af teksten."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "i teksten"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find første forekomst af teksten"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find sidste forekomst af teksten"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returnerer indeks for første/sidste forekom Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 er tom"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returnerer sand, hvis den angivne tekst er tom."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "lav en tekst med"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Lav et stykke tekst ved at sætte et antal elementer sammen."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "længden af %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returnerer antallet af bogstaver (herunder mellemrum) i den angivne tekst."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "skriv %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Skriv den angivne tekst, tal eller anden værdi."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Spørg brugeren efter et tal"; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Spørg brugeren efter en tekst"; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "spørg efter et tal med meddelelsen"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://da.wikipedia.org/wiki/Tekststreng"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "En bogstav, et ord eller en linje med tekst."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "fjern mellemrum fra begge sider af"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "fjern mellemrum fra venstre side af"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "fjern mellemrum fra højre side af"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Returner en kopi af teksten med mellemrum fjernet fra den ene eller begge sider."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "I dag"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Opret 'sæt %1'"; diff --git a/msg/js/de.js b/msg/js/de.js index 7e704d421f3..7f2de3d55fa 100644 --- a/msg/js/de.js +++ b/msg/js/de.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Text anhängen"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "An"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Text an die Variable \"%1\" anhängen."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "umwandeln in kleinbuchstaben"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "umwandeln in Substantive"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "umwandeln in GROSSBUCHSTABEN"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Wandelt Schreibweise von Texten um, in Großbuchstaben, Kleinbuchstaben oder den ersten Buchstaben jedes Wortes groß und die anderen klein."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "Nehme ersten Buchstaben"; Blockly.Msg.TEXT_CHARAT_FROM_END = "Nehme #ten Buchstaben von hinten"; Blockly.Msg.TEXT_CHARAT_FROM_START = "Nehme #ten Buchstaben"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "Nehme letzten Buchstaben"; Blockly.Msg.TEXT_CHARAT_RANDOM = "Nehme zufälligen Buchstaben"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Extrahiere einen Buchstaben von einer spezifizierten Position."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Ein Element zum Text hinzufügen."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "verbinden"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Hinzufügen, entfernen und sortieren von Elementen."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "bis zum #ten Buchstaben von hinten"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "bis zum #ten Buchstaben"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "bis zum letzten Buchstaben"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm"; Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in Text"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "vom ersten Buchstaben"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "vom #ten Buchstaben von hinten"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "vom #ten Buchstaben"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Gibt die angegebenen Textabschnitt zurück."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm"; Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "im Text"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "Suche erstes Auftreten des Begriffs"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "Suche letztes Auftreten des Begriffs"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Findet das erste / letzte Auftreten eines Su Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 ist leer?"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Ist wahr (true), wenn der Text keine Zeichen enthält ist."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = ""; Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "Erstelle Text aus"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Erstellt einen Text durch das Verbinden von mehreren Textelementen."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "Länge %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Die Anzahl von Zeichen in einem Text. (inkl. Leerzeichen)"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "Ausgabe %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Gib den Inhalt einer Variable aus."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Fragt den Benutzer nach einer Zahl."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Fragt den Benutzer nach einem Text."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Fragt nach Zahl mit Hinweis"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://de.wikipedia.org/wiki/Zeichenkette"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "Ein Buchstabe, Text oder Satz."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "entferne Leerzeichen vom Anfang und vom Ende (links und rechts)"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "entferne Leerzeichen vom Anfang (links)"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "entferne Leerzeichen vom Ende (rechts)"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Entfernt Leerzeichen vom Anfang und / oder Ende eines Textes."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Heute"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "Element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Erzeuge \"Schreibe %1\""; diff --git a/msg/js/el.js b/msg/js/el.js index 2ff9551981b..1828d9130a7 100644 --- a/msg/js/el.js +++ b/msg/js/el.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ανάθεσε κείμενο"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "έως"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Αναθέτει κείμενο στη μεταβλητή «%1»."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "σε πεζά"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "σε Λέξεις Με Πρώτα Κεφαλαία"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "σε ΚΕΦΑΛΑΙΑ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Επιστρέφει ένα αντίγραφο του κειμένου σε διαφορετική μορφή γραμμάτων."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "πάρε το πρώτο γράμμα"; Blockly.Msg.TEXT_CHARAT_FROM_END = "πάρε το γράμμα # από το τέλος"; Blockly.Msg.TEXT_CHARAT_FROM_START = "πάρε το γράμμα #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "πάρε το τελευταίο γράμμα"; Blockly.Msg.TEXT_CHARAT_RANDOM = "πάρε τυχαίο γράμμα"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Επιστρέφει το γράμμα στην καθορισμένη θέση."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Προσθέτει ένα στοιχείο στο κείμενο."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "ένωσε"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Προσθέτει, αφαιρεί ή αναδιατάσσει τους τομείς για να αναδιαμορφώσει αυτό το μπλοκ κειμένου."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "μέχρι το # γράμμα από το τέλος"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "μέχρι το # γράμμα"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "μέχρι το τελευταίο γράμμα"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "στο κείμενο"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "πάρε τη δευτερεύουσα συμβολοσειρά από το πρώτο γράμμα"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "πάρε τη δευτερεύουσα συμβολοσειρά από το # γράμμα από το τέλος"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "πάρε τη δευτερεύουσα συμβολοσειρά από το # γράμμα"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Επιστρέφει ένα συγκεκριμένο τμήμα του κειμένου."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "στο κείμενο"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "βρες την πρώτη εμφάνιση του κειμένου"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "βρες την τελευταία εμφάνιση του κειμένου"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Επιστρέφει τον δείκτη τ Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "το %1 είναι κενό"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Επιστρέφει αληθής αν το παρεχόμενο κείμενο είναι κενό."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "δημιούργησε κείμενο με"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Δημιουργεί ένα κομμάτι κειμένου ενώνοντας έναν απεριόριστο αριθμό αντικειμένων."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "το μήκος του %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Επιστρέφει το πλήθος των γραμμάτων (συμπεριλαμβανομένων και των κενών διαστημάτων) στο παρεχόμενο κείμενο."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "εκτύπωσε %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Εκτυπώνει το καθορισμένο κείμενο, αριθμό ή άλλη τιμή."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Δημιουργεί προτροπή για τον χρήστη για να δώσει ένα αριθμό."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Δημιουργεί προτροπή για το χρήστη για να δώσει κάποιο κείμενο."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "πρότρεψε με μήνυμα για να δοθεί αριθμός"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://el.wikipedia.org/wiki/%CE%A3%CF%85%CE%B Blockly.Msg.TEXT_TEXT_TOOLTIP = "Ένα γράμμα, μια λέξη ή μια γραμμή κειμένου."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "περίκοψε τα κενά και από τις δυο πλευρές του"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "περίκοψε τα κενά από την αριστερή πλευρά του"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "περίκοψε τα κενά από την δεξιά πλευρά του"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Επιστρέφει ένα αντίγραφο του κειμένου με αφαιρεμένα τα κενά από το ένα ή και τα δύο άκρα."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Σήμερα"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "αντικείμενο"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Δημιούργησε «όρισε %1»"; diff --git a/msg/js/en.js b/msg/js/en.js index 976fc191069..0114fd7d330 100644 --- a/msg/js/en.js +++ b/msg/js/en.js @@ -408,38 +408,53 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; Blockly.Msg.TEXT_APPEND_TO = "to"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; -Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; -Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; -Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; +Blockly.Msg.TEXT_CHARAT_FIRST = "In Text Get First Letter"; +Blockly.Msg.TEXT_CHARAT_FROM_END = "In Text Get Letter # From End"; +Blockly.Msg.TEXT_CHARAT_FROM_START = "In Text Get Letter #"; Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "in text"; -Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; -Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; +Blockly.Msg.TEXT_CHARAT_LAST = "In Text Get Last Letter"; +Blockly.Msg.TEXT_CHARAT_RANDOM = "In Text Get Random Letter"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in text"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 is empty"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; Blockly.Msg.TODAY = "Today"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "item"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; diff --git a/msg/js/es.js b/msg/js/es.js index a785b576719..8124ecda36e 100644 --- a/msg/js/es.js +++ b/msg/js/es.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "añadir texto"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "a"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Añadir texto a la variable '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "a minúsculas"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "a Mayúsculas Cada Palabra"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "a MAYÚSCULAS"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Devuelve una copia del texto en un caso diferente."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "obtener la primera letra"; Blockly.Msg.TEXT_CHARAT_FROM_END = "obtener la letra # del final"; Blockly.Msg.TEXT_CHARAT_FROM_START = "obtener la letra #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "obtener la última letra"; Blockly.Msg.TEXT_CHARAT_RANDOM = "obtener letra aleatoria"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Devuelve la letra en la posición especificada."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Agregar un elemento al texto."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "unir"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Agregar, eliminar o reordenar las secciones para reconfigurar este bloque de texto."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "hasta la letra # del final"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "hasta la letra #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "hasta la última letra"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "en el texto"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "obtener subcadena desde la primera letra"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "obtener subcadena desde la letra # del final"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "obtener subcadena desde la letra #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Devuelve una porción determinada del texto."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "en el texto"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "encontrar la primera aparición del texto"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "encontrar la última aparición del texto"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Devuelve el índice de la primera/última ap Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 está vacío"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Devuelve verdadero si el texto proporcionado está vacío."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "crear texto con"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Crear un fragmento de texto al unir cualquier número de elementos."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "longitud de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Devuelve el número de letras (incluyendo espacios) en el texto proporcionado."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "imprimir %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Imprimir el texto, número u otro valor especificado."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Solicitar al usuario un número."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Solicitar al usuario un texto."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "solicitar número con el mensaje"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://es.wikipedia.org/wiki/Cadena_de_caracte Blockly.Msg.TEXT_TEXT_TOOLTIP = "Una letra, palabra o línea de texto."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "quitar espacios de ambos lados de"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "quitar espacios iniciales de"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "quitar espacios finales de"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Devuelve una copia del texto sin los espacios de uno o ambos extremos."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Hoy"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "elemento"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Crear 'establecer %1'"; diff --git a/msg/js/fa.js b/msg/js/fa.js index 6afda2fab10..48c25edbe46 100644 --- a/msg/js/fa.js +++ b/msg/js/fa.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "الحاق متن"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "به"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "الحاق متنی به متغیر «%1»."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "به حروف کوچک"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "به حروف بزرگ عنوان"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "به حروف بزرگ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "بازگرداندن کپی متن در حالتی متفاوت."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "گرفتن اولین حرف"; Blockly.Msg.TEXT_CHARAT_FROM_END = "گرفتن حرف # از آخر"; Blockly.Msg.TEXT_CHARAT_FROM_START = "گرفتن حرف #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "گرفتن آخرین حرف"; Blockly.Msg.TEXT_CHARAT_RANDOM = "گرفتن حرف تصادفی"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "حرفی در موقعیت مشخص‌شده بر می‌گرداند."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "افزودن یک مورد به متن."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "عضویت"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "اضافه‌کردن، حذف یا مرتب‌سازی بحش‌ها برای تنظیم مجدد این بلوک متنی."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "به حرف # از انتها"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "به حرف #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "به آخرین حرف"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "در متن"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "گرفتن زیرمتن از اولین حرف"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "گرفتن زیرمتن از حرف # به انتها"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "گرفتن زیرمتن از حرف #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "قسمت مشخصی‌شده‌ای از متن را بر می‌گرداند."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "در متن"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "اولین رخداد متن را بیاب"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "آخرین رخداد متن را بیاب"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "شاخصی از اولین آخرین رخ Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 خالی است"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "اضافه‌کردن صحیح اگر متن فراهم‌شده خالی است."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ایجاد متن با"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "یک تکه‌ای از متن را با چسپاندن همهٔ تعداد از موارد ایجاد می‌کند."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "طول %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "بازگرداندن عددی از حروف (شامل فاصله‌ها) در متن فراهم‌شده."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "چاپ %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "چاپ متن، عدد یا هر مقدار دیگر مشخص‌شده."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "اعلان برای کاربر با یک عدد."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "اعلان برای کاربر برای یک متن."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "اعلان برای عدد با پیام"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://fa.wikipedia.org/wiki/%D8%B1%D8%B4%D8%A Blockly.Msg.TEXT_TEXT_TOOLTIP = "یک حرف، کلمه یا خطی از متن."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "تراشیدن فاصله‌ها از هر دو طرف"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "تراشیدن فاصله‌ها از طرف چپ"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "تراشیدن فاصله‌ها از طرف چپ"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "کپی از متن با فاصله‌های حذف‌شده از یک یا هر دو پایان باز می‌گرداند."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "امروز"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "مورد"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "درست‌کردن «تنظیم %1»"; diff --git a/msg/js/fi.js b/msg/js/fi.js index f3ea927f252..1685fffc284 100644 --- a/msg/js/fi.js +++ b/msg/js/fi.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "lisää teksti"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "muuttujaan"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Lisää tekstiä muuttujaan '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "pienet kirjaimet"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "isot alkukirjaimet"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "isot kirjaimet"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Palauttaa kopion tekstistä eri kirjainkoossa."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "hae ensimmäinen kirjain"; Blockly.Msg.TEXT_CHARAT_FROM_END = "Hae kirjain nro (lopusta laskien)"; Blockly.Msg.TEXT_CHARAT_FROM_START = "Hae kirjain nro"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "hae viimeinen kirjain"; Blockly.Msg.TEXT_CHARAT_RANDOM = "hae satunnainen kirjain"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Palauttaa annetussa kohdassa olevan kirjaimen."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Lisää kohteen tekstiin."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "liitä"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Lisää, poista tai uudelleen järjestä osioita tässä lohkossa."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "kirjaimeen nro (lopusta laskien)"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "kirjaimeen nro"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "viimeiseen kirjaimeen"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "merkkijonosta"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "hae osa alkaen ensimmäisestä kirjaimesta"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "hae osa alkaen kirjaimesta nro (lopusta laskien)"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "hae osa alkaen kirjaimesta nro"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Palauttaa määrätyn osan tekstistä."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "tekstistä"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "etsi ensimmäinen esiintymä merkkijonolle"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "etsi viimeinen esiintymä merkkijonolle"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Palauttaa ensin annetun tekstin ensimmäisen Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 on tyhjä"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Palauttaa tosi, jos annettu teksti on tyhjä."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "luo teksti"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Luo merkkijonon liittämällä yhteen minkä tahansa määrän kohteita."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "%1:n pituus"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Palauttaa annetussa tekstissä olevien merkkien määrän (välilyönnit mukaan lukien)."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "tulosta %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Tulostaa annetun tekstin, numeron tia muun arvon."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Kehottaa käyttäjää syöttämään numeron."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Kehottaa käyttäjää syöttämään tekstiä."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "käyttäen annettua viestiä, kehottaa syöttämään numeron"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://fi.wikipedia.org/wiki/Merkkijono"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "Kirjain, sana tai rivi tekstiä."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "poistaa välilyönnit kummaltakin puolelta"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "poistaa välilyönnit vasemmalta puolelta"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "poistaa välilyönnit oikealta puolelta"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Palauttaa kopion tekstistä siten, että välilyönnit on poistettu yhdestä tai molemmista päistä."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Tänään"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "kohde"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Luo 'aseta %1'"; diff --git a/msg/js/fr.js b/msg/js/fr.js index bb613669241..1cfa9b6f4f2 100644 --- a/msg/js/fr.js +++ b/msg/js/fr.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ajouter le texte"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "à"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Ajouter du texte à la variable '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "en minuscules"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "en Majuscule Au Début De Chaque Mot"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "en MAJUSCULES"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Renvoyer une copie du texte dans une autre casse."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "obtenir la première lettre"; Blockly.Msg.TEXT_CHARAT_FROM_END = "obtenir la lettre # depuis la fin"; Blockly.Msg.TEXT_CHARAT_FROM_START = "obtenir la lettre #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "obtenir la dernière lettre"; Blockly.Msg.TEXT_CHARAT_RANDOM = "obtenir une lettre au hasard"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Renvoie la lettre à la position indiquée."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Ajouter un élément au texte."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "joindre"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Ajouter, supprimer, ou réordonner des sections pour reconfigurer ce bloc de texte."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "jusqu’à la lettre # depuis la fin"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "jusqu’à la lettre #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "jusqu’à la dernière lettre"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "dans le texte"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "obtenir la sous-chaîne depuis la première lettre"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "obtenir la sous-chaîne depuis la lettre # depuis la fin"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "obtenir la sous-chaîne depuis la lettre #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Renvoie une partie indiquée du texte."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "dans le texte"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "trouver la première occurrence de la chaîne"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "trouver la dernière occurrence de la chaîne"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Renvoie l’index de la première/dernière Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 est vide"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Renvoie vrai si le texte fourni est vide."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "créer le texte avec"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Créer un morceau de texte en agrégeant un nombre quelconque d’éléments."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "longueur de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Renvoie le nombre de lettres (espaces compris) dans le texte fourni."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "afficher %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Afficher le texte, le nombre ou une autre valeur spécifié."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Demander un nombre à l’utilisateur."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Demander un texte à l’utilisateur."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "invite pour un nombre avec un message"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Une lettre, un mot ou une ligne de texte."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "supprimer les espaces des deux côtés"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "supprimer les espaces du côté gauche"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "supprimer les espaces du côté droit"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Renvoyer une copie du texte avec les espaces supprimés d’un bout ou des deux."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Aujourd'hui"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "élément"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Créer 'fixer %1'"; diff --git a/msg/js/he.js b/msg/js/he.js index fd0ce293f9c..66408f1c299 100644 --- a/msg/js/he.js +++ b/msg/js/he.js @@ -408,38 +408,53 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; // untranslated Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "to"; // untranslated Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "לאותיות קטנות (עבור טקסט באנגלית)"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "לאותיות גדולות בתחילת כל מילה (עבור טקסט באנגלית)"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "לאותיות גדולות (עבור טקסט באנגלית)"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated -Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHARAT_FIRST = "In Text Get First Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_END = "In Text Get Letter # From End"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_START = "In Text Get Letter #"; // untranslated Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "in text"; // untranslated -Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_LAST = "In Text Get Last Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_RANDOM = "In Text Get Random Letter"; // untranslated Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in text"; // untranslated +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 is empty"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; // untranslated Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; // untranslated Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "הדפס %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "להדפיס טקסט, מספר או ערך אחר שצוין"; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "בקש מהמשתמש מספר."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "בקשה למשתמש להזין טקסט כלשהו."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "בקשה למספר עם הודעה"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "למחוק רווחים משני הקצוות"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "למחוק רווחים מימין"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "למחוק רווחים משמאל"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "להחזיר עותק של הטקסט לאחר מחיקת רווחים מאחד או משני הקצוות."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "היום"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "פריט"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "ליצור 'הגדר %1'"; diff --git a/msg/js/hi.js b/msg/js/hi.js index 495c23a8003..1568c4835a1 100644 --- a/msg/js/hi.js +++ b/msg/js/hi.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "से जोड़ें ये टेक Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "इस"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "कुछ टेक्स्ट इस चर '%1' से जोड़ें।"; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "छोटे अक्षर मे"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "टाइटल केस मे"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "बड़े अक्षर मे"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "टेक्स्ट की कॉपी भिन्न केस (अक्षर से संबंधित) मे रिटर्न करें।"; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "पहला अक्षर पाएँ"; Blockly.Msg.TEXT_CHARAT_FROM_END = "आखिर से अक्षर # पाएँ"; Blockly.Msg.TEXT_CHARAT_FROM_START = "अक्षर # पाएँ"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "आखरी अक्षर पाएँ"; Blockly.Msg.TEXT_CHARAT_RANDOM = "रैन्डम अक्षर पाएँ"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "बताई गयी जगह से अक्षर रिटर्न करता है"; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "सूची मे एक आइटम जोड़ें।"; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "जोड़"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "आखिर से यहाँ तक अक्षर #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "यहाँ तक अक्षर #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "यहाँ तक आखरी अक्षर"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "इस टेक्स्ट मे"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "पहले अक्षर से सबस्ट्रिंग पाएँ"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "आखरी अक्षर # से सबस्ट्रिंग पाएँ"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "अक्षर # से सबस्ट्रिंग पाएँ"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "टेक्स्ट का बताया गया अंश रिटर्न करता है"; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "इस टेक्स्ट मे"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "टेक्स्ट पहली बार जहाँ आया है उसे ढूढ़े"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "टेक्स्ट आखरी बार जहाँ आया है उसे ढूढ़े"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 खाली है"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "ट्रू रिटर्न करता है यदि दिया गया टेक्स्ट खाली है।"; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "इसके साथ टेक्स्ट बनाएँ"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "%1 की लंबाई"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "दिए गये टेक्स्ट मे अक्षरों की संख्या रिटर्न करता है (खाली स्थान मिला के)।"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "प्रिंट करें %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "दिया गया टेक्स्ट प्रिंट करें, संख्या या अन्य मान।"; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "यूज़र से संख्या के लिए प्रॉम्प्ट करें।"; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "यूज़र से कुछ टेक्स्ट के लिए प्रॉम्प्ट करें।"; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "सूचना के साथ संख्या के लिए प्रॉम्प्ट करें"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "एक अक्षर, शब्द, या टेक्स्ट की पंक्ति।"; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "रिक्त स्थान को इस टेक्स्ट के दोनों तरफ से निकालें"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "रिक्त स्थान को इस टेक्स्ट के बायें तरफ से निकालें"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "रिक्त स्थान को इस टेक्स्ट के दाईं तरफ से निकालें"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "आज"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "आइटम"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "सेट '%1' बनाएँ"; diff --git a/msg/js/hrx.js b/msg/js/hrx.js index 00bf7017f27..19a0be22844 100644 --- a/msg/js/hrx.js +++ b/msg/js/hrx.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Text oonhänge"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "An"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Text an die Variable \"%1\" oonhänge."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "umwandle in klenbuchstoobe"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "umwandle in Wörter"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "umwandle in GROSSBUCHSTOOBE"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Wandelt Schreibweise von Texte um, in Grossbuchstoobe, Klenbuchstoobe orrer den earste Buchstoob von jedes Wort gross und die annre klen."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "hol earschte Buchstoob"; Blockly.Msg.TEXT_CHARAT_FROM_END = "hol Buchstoob # von End"; Blockly.Msg.TEXT_CHARAT_FROM_START = "hol Buchstoob #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "hol letztes Wort"; Blockly.Msg.TEXT_CHARAT_RANDOM = "hol zufälliches Buchstoob"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Extrahiear en Buchstoob von en spezifizierte Position."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "En Element zum Text hinzufüche."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "verbinne"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Hinzufüche, entfernne und sortiere von Elemente."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "bis #te Buchstoob von hinne"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "bis Buchstoob #te"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "bis letzte Buchstoob"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in Text"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "earschte Buchstoob"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "hol #te Buchstoob von hinne"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "hol substring Buchstoob #te"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Schickt en bestimmstes Tel von dem Text retuar."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "im Text"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "Such der Begriff sein earstes Voarkommniss"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "Suche der Begriff sein letztes Vorkommniss."; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Findt das earste / letzte Voarkommniss von e Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 ist leer?"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Ist woahr (true), wenn der Text leer ist."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "Erstell Text aus"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Erstellt en Text doorrich das verbinne von mehre Textelemente."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "läng %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Die Oonzoohl von Zeiche in enem Text. (inkl. Leerzeiche)"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "Ausgäb %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Geb den Inhalt von en Variable aus."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Frocht den Benutzer noh en Zoohl."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Frocht den Benutzer noh enem Text."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Frächt noh Zoohl mit Hinweis"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "En Buchstoob, Text orrer Satz."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "entfern Leerzeiche von Oonfang und End Seite"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "entferne Leerzeiche von Oonfang Seite"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "entferne Leerzeiche von End Seite von"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Entfernt Leerzeiche vom Oonfang und / orrer End von en Text."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "Element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Generier/erzeiche \"Schreibe %1\""; diff --git a/msg/js/hu.js b/msg/js/hu.js index 617dcadf564..dd3eea4dd89 100644 --- a/msg/js/hu.js +++ b/msg/js/hu.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "szövegéhez fűzd hozzá"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "A"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Szöveget fűz a \"%1\" változó értékéhez."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "kisbetűs"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Címként Formázott"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "NAGYBETŰS"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "első betű"; Blockly.Msg.TEXT_CHARAT_FROM_END = "hátulról #. betű"; Blockly.Msg.TEXT_CHARAT_FROM_START = "#. betű"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "utolsó betű"; Blockly.Msg.TEXT_CHARAT_RANDOM = "véletlen betű"; Blockly.Msg.TEXT_CHARAT_TAIL = "karaktere"; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "A szöveg egy megadott karakterét adja eredményül."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Elem hozzáfűzése a szöveghez."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "összefűz"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Összefűzéssel, törléssel vagy rendezéssel kapcsolato sblokkok szöveg szerkesztéséhez."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "betűtől a hátulról számított"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "betűtől a(z)"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "betűtől az utolsó"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "a"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "szövegben válaszd ki az első"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "szövegben válaszd ki a hátulról a(z)"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "szövegben válaszd ki a(z)"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = "betűig tartó betűsort"; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "A megadott szövegrészletet adja eredményül."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "A(z)"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "szövegben a részlet első előfordulásának helye"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "szövegben a részlet utolsó előfordulásának helye"; Blockly.Msg.TEXT_INDEXOF_TAIL = "szövegnek"; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "A keresett szöveg első vagy utolsó előfo Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 üres sztring?"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Igaz, ha a vizsgált szöveg hossza 0."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "összefűz"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Tetszőleges számú szövegrészletet fűz össze egybefüggő szöveggé."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "%1 hossza"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "A megadott szöveg karaktereinek számát adja eredményül (beleértve a szóközöket)."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "Üzenet %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Megejelníti a megadott kaakterláncot üzenetként a képernyőn."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Számot kér be a felhasználótól."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Szöveget kér be a felhasználótól."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Kérj be számot"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://hu.wikipedia.org/wiki/String"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "Egy betű, szó vagy szöveg egy sora."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "szóközök levágása mindkét végéről"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "szóközök levágása az elejéről"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "szóközök levágása a végéről"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Levágja a megadott szöveg végeiről a szóközöket."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Ma"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "változó"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Készíts \"beállít %1\""; diff --git a/msg/js/ia.js b/msg/js/ia.js index 12819661383..8d4ef75aac2 100644 --- a/msg/js/ia.js +++ b/msg/js/ia.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "adjunger texto"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "a"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Adjunger un texto al variabile '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "in minusculas"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "con Initiales Majuscule"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "in MAJUSCULAS"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Retornar un copia del texto con differente majusculas/minusculas."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "prender le prime littera"; Blockly.Msg.TEXT_CHARAT_FROM_END = "prender ab le fin le littera №"; Blockly.Msg.TEXT_CHARAT_FROM_START = "prender le littera №"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "prender le ultime littera"; Blockly.Msg.TEXT_CHARAT_RANDOM = "prender un littera aleatori"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Retorna le littera presente al position specificate."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Adder un elemento al texto."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "unir"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Adde, remove o reordina sectiones pro reconfigurar iste bloco de texto."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "ab le fin usque al littera №"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "usque al littera №"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "usque al ultime littera"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in le texto"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "prender subcatena ab le prime littera"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "prender subcatena ab le fin ab le littera №"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "prender subcatena ab le littera №"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Retorna le parte specificate del texto."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in le texto"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "cercar le prime occurrentia del texto"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "cercar le ultime occurrentia del texto"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Retorna le indice del prime/ultime occurrent Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 es vacue"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Retorna ver si le texto fornite es vacue."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "crear texto con"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Crear un pecia de texto uniente un certe numero de elementos."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "longitude de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Retorna le numero de litteras (incluse spatios) in le texto fornite."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "scriber %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Scriber le texto, numero o altere valor specificate."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Peter un numero al usator."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Peter un texto al usator."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "peter un numero con le message"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Un littera, parola o linea de texto."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "remover spatios de ambe lateres de"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "remover spatios del sinistre latere de"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "remover spatios del dextre latere de"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Retornar un copia del texto con spatios eliminate de un extremitate o ambes."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "cosa"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Crea 'mitter %1'"; diff --git a/msg/js/id.js b/msg/js/id.js index 7500c770e0a..36a4909874f 100644 --- a/msg/js/id.js +++ b/msg/js/id.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "tambahkan teks"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "untuk"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Tambahkan beberapa teks ke variabel '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "menjadi huruf kecil"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "menjadi huruf pertama kapital"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "menjadi huruf kapital"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Kembalikan kopi dari text dengan kapitalisasi yang berbeda."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "ambil huruf pertama"; Blockly.Msg.TEXT_CHARAT_FROM_END = "ambil huruf nomor # dari belakang"; Blockly.Msg.TEXT_CHARAT_FROM_START = "ambil huruf ke #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "ambil huruf terakhir"; Blockly.Msg.TEXT_CHARAT_RANDOM = "ambil huruf secara acak"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Kembalikan karakter dari posisi tertentu."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Tambahkan suatu item ke dalam teks."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Tambah, ambil, atau susun ulang teks blok."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "pada huruf nomer # dari terakhir"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "pada huruf #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "pada huruf terakhir"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in teks"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "ambil bagian teks (substring) dari huruf pertama"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "ambil bagian teks (substring) dari huruf ke # dari terakhir"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "ambil bagian teks (substring) dari huruf no #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Mengembalikan spesifik bagian dari teks."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "dalam teks"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "temukan kejadian pertama dalam teks"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "temukan kejadian terakhir dalam teks"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Kembalikan indeks pertama dan terakhir dari Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 kosong"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Kembalikan benar (true) jika teks yang disediakan kosong."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "Buat teks dengan"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Buat teks dengan cara gabungkan sejumlah item."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "panjang dari %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Kembalikan sejumlah huruf (termasuk spasi) dari teks yang disediakan."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "cetak %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Cetak teks yant ditentukan, angka atau ninlai lainnya."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Meminta pengguna untuk memberi sebuah angka."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Meminta pengguna untuk memberi beberapa teks."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Meminta angka dengan pesan"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Huruf, kata atau baris teks."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "pangkas ruang dari kedua belah sisi"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "pangkas ruang dari sisi kiri"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "pangkas ruang dari sisi kanan"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Kembali salinan teks dengan spasi dihapus dari satu atau kedua ujungnya."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "item"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Membuat 'tetapkan %1'"; diff --git a/msg/js/is.js b/msg/js/is.js index d6b72066b23..5d3f97a9dfc 100644 --- a/msg/js/is.js +++ b/msg/js/is.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "bæta texta"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; Blockly.Msg.TEXT_APPEND_TO = "við"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Bæta texta við breytuna '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "í lágstafi"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "í Upphafstafi"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "í HÁSTAFI"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Skila afriti af textanum með annarri stafastöðu."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "sækja fyrsta staf"; Blockly.Msg.TEXT_CHARAT_FROM_END = "sækja staf # frá enda"; Blockly.Msg.TEXT_CHARAT_FROM_START = "sækja staf #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "sækja síðasta staf"; Blockly.Msg.TEXT_CHARAT_RANDOM = "sækja einhvern staf"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Skila staf á tilteknum stað."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Bæta atriði við textann."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "tengja"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Bæta við, fjarlægja eða umraða hlutum til að breyta skipan þessa textakubbs."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "að staf # frá enda"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "að staf #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "að síðasta staf"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "í texta"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "sækja textabút frá fyrsta staf"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "sækja textabút frá staf # frá enda"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "sækja textabút frá staf #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Skilar tilteknum hluta textans."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "í texta"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "finna fyrsta tilfelli texta"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "finna síðasta tilfelli texta"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Finnur fyrsta/síðasta tilfelli fyrri texta Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 er tómur"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Skilar sönnu ef gefni textinn er tómur."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "búa til texta með"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Búa til texta með því að tengja saman einhvern fjölda atriða."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; Blockly.Msg.TEXT_LENGTH_TITLE = "lengd %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Skilar fjölda stafa (með bilum) í gefna textanum."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; Blockly.Msg.TEXT_PRINT_TITLE = "prenta %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Prenta tiltekinn texta, tölu eða annað gildi."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Biðja notandann um tölu."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Biðja notandann um texta."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "biðja um tölu með skilaboðum"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Stafur, orð eða textalína."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "eyða bilum báðum megin við"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "eyða bilum vinstra megin við"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "eyða bilum hægra megin við"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Skila afriti af textanum þar sem möguleg bil við báða enda hafa verið fjarlægð."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Í dag"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "atriði"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Búa til 'stilla %1'"; diff --git a/msg/js/it.js b/msg/js/it.js index 08a8d388732..d2de65d8efb 100644 --- a/msg/js/it.js +++ b/msg/js/it.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "aggiungi il testo"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "a"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Aggiunge del testo alla variabile '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "in minuscolo"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "con Iniziali Maiuscole"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "in MAIUSCOLO"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Restituisce una copia del testo in un diverso formato maiuscole/minuscole."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "prendi la prima lettera"; Blockly.Msg.TEXT_CHARAT_FROM_END = "prendi la lettera # dalla fine"; Blockly.Msg.TEXT_CHARAT_FROM_START = "prendi la lettera #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "prendi l'ultima lettera"; Blockly.Msg.TEXT_CHARAT_RANDOM = "prendi lettera casuale"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Restituisce la lettera nella posizione indicata."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Aggiungi un elemento al testo."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "unisci"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Aggiungi, rimuovi o riordina le sezioni per riconfigurare questo blocco testo."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "alla lettera # dalla fine"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "alla lettera #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "all'ultima lettera"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "nel testo"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "prendi sotto-stringa dalla prima lettera"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "prendi sotto-stringa dalla lettera # dalla fine"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "prendi sotto-stringa dalla lettera #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Restituisce la porzione di testo indicata."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "nel testo"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "trova la prima occorrenza del testo"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "trova l'ultima occorrenza del testo"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Restituisce l'indice della prima occorrenza Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 è vuoto"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Restituisce vero se il testo fornito è vuoto."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "crea testo con"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Crea un blocco di testo unendo un certo numero di elementi."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "lunghezza di %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Restituisce il numero di lettere (inclusi gli spazi) nel testo fornito."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "scrivi %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Scrive il testo, numero o altro valore indicato."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Richiedi un numero all'utente."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Richiede del testo da parte dell'utente."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "richiedi numero con messaggio"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://it.wikipedia.org/wiki/Stringa_(informat Blockly.Msg.TEXT_TEXT_TOOLTIP = "Una lettera, una parola o una linea di testo."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "rimuovi spazi da entrambi gli estremi"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "rimuovi spazi a sinistra"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "rimuovi spazi a destra"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Restituisce una copia del testo con gli spazi rimossi ad uno o entrambe le estremità."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Oggi"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "elemento"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Crea 'imposta %1'"; diff --git a/msg/js/ja.js b/msg/js/ja.js index 4726a5838f2..b8d45ddceeb 100644 --- a/msg/js/ja.js +++ b/msg/js/ja.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "テキストを追加します。"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "宛先"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "変数 '%1' にいくつかのテキストを追加します。"; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "小文字に"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "タイトル ケースに"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "大文字に変換する"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "別のケースに、テキストのコピーを返します。"; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "最初の文字を得る"; Blockly.Msg.TEXT_CHARAT_FROM_END = "一番最後の言葉、キャラクターを所得"; Blockly.Msg.TEXT_CHARAT_FROM_START = "文字# を取得"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "最後の文字を得る"; Blockly.Msg.TEXT_CHARAT_RANDOM = "ランダムな文字を得る"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "指定された位置に文字を返します。"; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "テキスト をアイテム追加します。"; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "結合"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "追加、削除、またはセクションを順序変更して、ブロックを再構成します。"; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "文字列の# 終わりからの#"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "# の文字"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "最後のの文字"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "テキストで"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "部分文字列を取得する。"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "部分文字列を取得する #端から得る"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "文字列からの部分文字列を取得 #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "テキストの指定部分を返します。"; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "テキストで"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "テキストの最初の出現箇所を検索します。"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "テキストの最後に見つかったを検索します。"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "最初のテキストの二番目のてき Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 が空"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "指定されたテキストが空の場合は、true を返します。"; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "テキストを作成します。"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "任意の数の項目一部を一緒に接合してテキストの作成します。"; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "%1 の長さ"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "指定されたテキストの文字 (スペースを含む) の数を返します。"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "%1 を印刷します。"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "指定したテキスト、番号または他の値を印刷します。"; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "ユーザーにプロンプトして数字のインプットを求めます"; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "いくつかのテキストを、ユーザーに入力するようにプロンプト。"; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "メッセージを送って番号の入力を求める"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://ja.wikipedia.org/wiki/文字列"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "文字、単語、または行のテキスト。"; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "両端のスペースを取り除く"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "左端のスペースを取り除く"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "右端のスペースを取り除く"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "スペースを 1 つまたは両方の端から削除したのち、テキストのコピーを返します。"; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "今日"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "項目"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "'セット%1を作成します。"; diff --git a/msg/js/ko.js b/msg/js/ko.js index 241d1988b94..1515a5fed20 100644 --- a/msg/js/ko.js +++ b/msg/js/ko.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "내용 덧붙이기"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "다음"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "'%1' 의 마지막에 문장을 덧붙입니다."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "소문자로"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "첫 문자만 대문자로"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "대문자로"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "영문 대소문자 형태를 변경해 돌려줍니다."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "에서, 첫 번째 문자 얻기"; Blockly.Msg.TEXT_CHARAT_FROM_END = "에서, 마지막부터 # 번째 위치의 문자 얻기"; Blockly.Msg.TEXT_CHARAT_FROM_START = "에서, 앞에서부터 # 번째 위치의 문자 얻기"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "에서, 마지막 문자 얻기"; Blockly.Msg.TEXT_CHARAT_RANDOM = "에서, 랜덤하게 한 문자 얻기"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "특정 번째 위치에서, 문자를 얻어내 돌려줍니다."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "문장을 만들 조각 아이템"; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "가입"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "이 문장 블럭의 구성을 추가, 삭제, 재구성 합니다."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "끝에서부터 # 번째 문자까지"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "# 번째 문자까지"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "마지막 문자까지"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "문장"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "에서, 처음부터 얻어냄"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "에서, 마지막에서 # 번째부터 얻어냄"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "에서, 처음부터 # 번째 문자부터 얻어냄"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "문장 중 일부를 얻어내 돌려줍니다."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "문장"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "에서 다음 문장이 처음으로 나타난 위치 찾기 :"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "에서 다음 문장이 마지막으로 나타난 위치 찾기 :"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "어떤 문장이 가장 처음 나타난 위 Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1이 비어 있습니다"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "입력된 문장이, 빈 문장(\"\")이면 참(true) 값을 돌려줍니다."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "텍스트 만들기"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "여러 개의 아이템들을 연결해(묶어), 새로운 문장을 만듭니다."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "다음 문장의 문자 개수 %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "입력된 문장의, 문자 개수를 돌려줍니다.(공백문자 포함)"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "다음 내용 출력 %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "원하는 문장, 수, 값 등을 출력합니다."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "수 입력 받음."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "문장 입력 받음."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "다음 안내 멘트를 활용해 수 입력"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "문자, 단어, 문장."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "양쪽의 공백 문자 제거"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "왼쪽의 공백 문자 제거"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "오른쪽의 공백 문자 제거"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "문장의 왼쪽/오른쪽/양쪽에서 스페이스 문자를 제거해 돌려줍니다."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "ㅇㅎ눌"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "항목"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "'집합 %1' 생성"; diff --git a/msg/js/lb.js b/msg/js/lb.js index f6260b25171..0c5396b4371 100644 --- a/msg/js/lb.js +++ b/msg/js/lb.js @@ -408,38 +408,53 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Text drunhänken"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "to"; // untranslated Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated -Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHARAT_FIRST = "In Text Get First Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_END = "In Text Get Letter # From End"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_START = "In Text Get Letter #"; // untranslated Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "am Text"; -Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_LAST = "In Text Get Last Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_RANDOM = "In Text Get Random Letter"; // untranslated Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "En Element bei den Text derbäisetzen."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "bis de Buschtaf #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "op de leschte Buschtaw"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "am Text"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "am Text"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 ass eidel"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; // untranslated Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "Längt vu(n) %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "%1 drécken"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Freet de Benotzer en Text."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "E Buschtaf, e Wuert oder eng Textzeil."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Haut"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "Element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated diff --git a/msg/js/lrc.js b/msg/js/lrc.js index 204ad6cd5cf..d021112ef22 100644 --- a/msg/js/lrc.js +++ b/msg/js/lrc.js @@ -408,38 +408,53 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; // untranslated Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "سی"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "سی واج کؤچک"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "سی حرف گپ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated -Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHARAT_FIRST = "In Text Get First Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_END = "In Text Get Letter # From End"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_START = "In Text Get Letter #"; // untranslated Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "د متن"; -Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_LAST = "In Text Get Last Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_RANDOM = "In Text Get Random Letter"; // untranslated Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "پیوسن"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "سی واج# تا آخر"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "سی واج#"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "سی آخرین واج"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "د متن"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "د متن"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 حالیه"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "راس کردن متن وا"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; // untranslated Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; // untranslated Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "ئمروٙ"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "قلم"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated diff --git a/msg/js/lt.js b/msg/js/lt.js index 426b887017c..2606c22a0e6 100644 --- a/msg/js/lt.js +++ b/msg/js/lt.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "pridėk tekstą"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "prie"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = " mažosiom raidėm"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = " Pavadinimo Raidėmis"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = " DIDŽIOSIOM RAIDĖM"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "raidė pradinė"; Blockly.Msg.TEXT_CHARAT_FROM_END = "raidė nuo galo #"; Blockly.Msg.TEXT_CHARAT_FROM_START = "raidė nr."; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "raidė paskutinė"; Blockly.Msg.TEXT_CHARAT_RANDOM = "raidė atsitiktinė"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Pridėti teksto elementą."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "sujunk"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "iki raidės nuo galo #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "iki raidės #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "iki pabaigos"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "teksto"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "dalis nuo pradžios"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "dalis nuo raidės #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "dalis nuo raidės #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "tekste"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "rask,kur pirmą kartą paminėta"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "rask,kur paskutinį kartą paminėta"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 yra tuščias"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "tekstas iš:"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "teksto %1 ilgis"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Suranda teksto simbolių kiekį (įskaitant ir tarpus)"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "spausdinti %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "paprašyk įvesti skaičių :"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Tekstas (arba žodis, ar raidė)"; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "išvalyk tarpus šonuose"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "išvalyk tarpus pradžioje"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "išvalyk tarpus pabaigoje"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "elementas"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Sukurk \"priskirk %1\""; diff --git a/msg/js/mk.js b/msg/js/mk.js index 6761ce4304f..1a4de1645ed 100644 --- a/msg/js/mk.js +++ b/msg/js/mk.js @@ -408,38 +408,53 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; // untranslated Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "to"; // untranslated Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated -Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; // untranslated -Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHARAT_FIRST = "In Text Get First Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_END = "In Text Get Letter # From End"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_START = "In Text Get Letter #"; // untranslated Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "in text"; // untranslated -Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated -Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_LAST = "In Text Get Last Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_RANDOM = "In Text Get Random Letter"; // untranslated Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in text"; // untranslated +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 is empty"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; // untranslated Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; // untranslated Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; // untranslated Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "елемент"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated diff --git a/msg/js/ms.js b/msg/js/ms.js index 5dd34efa083..6df9db51e36 100644 --- a/msg/js/ms.js +++ b/msg/js/ms.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "Untuk"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "Kepada huruf kecil"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "Kepada HURUF BESAR"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "Dapatkan abjad terakhir"; Blockly.Msg.TEXT_CHARAT_RANDOM = "Dapatkan abjad rawak"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "Sertai"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "untuk huruf terakhir"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "dalam teks"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "dalam teks"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "mencari kejadian pertama teks"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "mencari kejadian terakhir teks"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Kembalikan Indeks kejadian pertama/terakhir Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 adalah kosong"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Kembalikan benar jika teks yang disediakan adalah kosong."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "hasilkan teks dengan"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Hasilkan sebahagian teks dengan menghubungkan apa jua nombor item."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "panjang %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Kembalikan jumlah huruf (termasuk ruang) dalam teks yang disediakan."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "cetak %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Cetak teks yang ditentukan, nombor atau nilai lain."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Peringatan kepada pengguna untuk nombor."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Peringatkan pengguna untuk sebahagian teks."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Prom untuk nombor dengan mesej"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://ms.wikipedia.org/wiki/Rentetan"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "Huruf, perkataan, atau baris teks."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "mengurangkan kawasan dari kedua-dua belah"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "mengurangkan ruang dari sebelah kiri"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "mengurangkan kawasan dari sisi kanan"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Kembali salinan teks dengan ruang yang dikeluarkan daripada satu atau hujung kedua belah."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Hari ini"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "Perkara"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Hasilkan 'set %1'"; diff --git a/msg/js/nb.js b/msg/js/nb.js index 5e5e00186c0..5b988d595a8 100644 --- a/msg/js/nb.js +++ b/msg/js/nb.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "tilføy tekst"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "til"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Tilføy tekst til variabelen '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "til små bokstaver"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "til store forbokstaver"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "til STORE BOKSTAVER"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Returnerer en kopi av teksten der store og små bokstaver er byttet om."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "hent første bokstav"; Blockly.Msg.TEXT_CHARAT_FROM_END = "hent bokstav # fra slutten"; Blockly.Msg.TEXT_CHARAT_FROM_START = "hent bokstav #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "hent den siste bokstaven"; Blockly.Msg.TEXT_CHARAT_RANDOM = "hent en tilfeldig bokstav"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returnerer bokstaven på angitt plassering."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Legg til et element til teksten."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "føy sammen"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Legg til, fjern eller forandre rekkefølgen for å forandre på denne tekstblokken."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "til bokstav # fra slutten"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "til bokstav #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "til siste bokstav"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "i tekst"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "hent delstreng fra første bokstav"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "hent delstreng fra bokstav # fra slutten"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "hent delstreng fra bokstav #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returnerer den angitte delen av teksten."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "i tekst"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "finn første forekomst av tekst"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "finn siste forekomst av tekst"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returnerer posisjonen for første/siste fore Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 er tom"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returnerer sann hvis den angitte teksten er tom."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "lage tekst med"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Opprett en tekst ved å sette sammen et antall elementer."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "lengden av %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returnerer antall bokstaver (inkludert mellomrom) i den angitte teksten."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "skriv ut %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Skriv ut angitt tekst, tall eller annet innhold."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Be brukeren om et tall."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Spør brukeren om tekst."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "spør om et tall med en melding"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "En bokstav, ett ord eller en linje med tekst."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "fjern mellomrom fra begge sider av"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "fjern mellomrom fra venstre side av"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "fjern mellomrom fra høyre side av"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Returner en kopi av teksten med mellomrom fjernet fra en eller begge sidene."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "I dag"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Opprett 'sett %1'"; diff --git a/msg/js/nl.js b/msg/js/nl.js index d8caa921167..f416ff0b979 100644 --- a/msg/js/nl.js +++ b/msg/js/nl.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "tekst"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; Blockly.Msg.TEXT_APPEND_TO = "voeg toe aan"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Voeg tekst toe aan de variabele \"%1\"."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "naar kleine letters"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "naar Hoofdletter Per Woord"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "naar HOOFDLETTERS"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Geef een kopie van de tekst met veranderde hoofdletters terug."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "haal eerste letter op"; Blockly.Msg.TEXT_CHARAT_FROM_END = "haal letter # op vanaf einde"; Blockly.Msg.TEXT_CHARAT_FROM_START = "haal letter # op"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "haal laatste letter op"; Blockly.Msg.TEXT_CHARAT_RANDOM = "haal willekeurige letter op"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Geeft de letter op de opgegeven positie terug."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Voegt een item aan de tekst toe."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "samenvoegen"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Toevoegen, verwijderen of volgorde veranderen van secties om dit tekstblok opnieuw in te stellen."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "van letter # tot einde"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "naar letter #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "naar laatste letter"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in tekst"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "haal subtekst op van eerste letter"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "haal subtekst op vanaf letter # vanaf einde"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "haal subtekst op vanaf letter #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Geeft het opgegeven onderdeel van de tekst terug."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in tekst"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "zoek eerste voorkomen van tekst"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "zoek het laatste voorkomen van tekst"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Geeft de index terug van de eerste/laatste a Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 is leeg"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Geeft \"waar\" terug, als de opgegeven tekst leeg is."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "maak tekst met"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Maakt een stuk tekst door één of meer items samen te voegen."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; Blockly.Msg.TEXT_LENGTH_TITLE = "lengte van %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Geeft het aantal tekens terug (inclusief spaties) in de opgegeven tekst."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; Blockly.Msg.TEXT_PRINT_TITLE = "tekst weergeven: %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Drukt de opgegeven tekst, getal of een andere waarde af."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Vraagt de gebruiker om een getal in te voeren."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Vraagt de gebruiker om invoer."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "vraagt de gebruiker om een getal met de tekst"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://nl.wikipedia.org/wiki/String_%28informa Blockly.Msg.TEXT_TEXT_TOOLTIP = "Een letter, woord of een regel tekst."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "spaties van beide kanten afhalen van"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "spaties van de linkerkant verwijderen van"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "spaties van de rechterkant verwijderen van"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Geeft een kopie van de tekst met verwijderde spaties van één of beide kanten."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Vandaag"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "item"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Maak \"verander %1\""; diff --git a/msg/js/oc.js b/msg/js/oc.js index 3e01e7b4b51..da211c4d1d7 100644 --- a/msg/js/oc.js +++ b/msg/js/oc.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "apondre lo tèxte"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "a"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "en minusculas"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "en MAJUSCULAS"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "obténer la primièra letra"; Blockly.Msg.TEXT_CHARAT_FROM_END = "obténer la letra # dempuèi la fin"; Blockly.Msg.TEXT_CHARAT_FROM_START = "obténer la letra #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "obténer la darrièra letra"; Blockly.Msg.TEXT_CHARAT_RANDOM = "obténer una letra a l'azard"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Renvia la letra a la posicion indicada."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "fins a la letra #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "dins lo tèxte"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "dins lo tèxte"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 es void"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; // untranslated Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "longor de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "afichar %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Crear 'fixar %1'"; diff --git a/msg/js/pl.js b/msg/js/pl.js index 1021587f3e4..512e8b4cef8 100644 --- a/msg/js/pl.js +++ b/msg/js/pl.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "dołącz tekst"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "do"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Dołącz tekst do zmiennej '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "zmień na małe litery"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "zmień na od Wielkich Liter"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "zmień na WIELKIE LITERY"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Zwraca kopię tekstu z inną wielkością liter."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "pobierz pierwszą literę"; Blockly.Msg.TEXT_CHARAT_FROM_END = "pobierz literę # od końca"; Blockly.Msg.TEXT_CHARAT_FROM_START = "pobierz literę #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "pobierz ostatnią literę"; Blockly.Msg.TEXT_CHARAT_RANDOM = "pobierz losową literę"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Zwraca literę z określonej pozycji."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Dodaj element do tekstu."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "połącz"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Dodaj, usuń lub zmień kolejność sekcji, aby zmodyfikować blok tekstowy."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "do litery # od końca"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "do litery #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "do ostatniej litery"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "w tekście"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "pobierz podciąg od pierwszej litery"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "pobierz podciąg od litery # od końca"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "pobierz podciąg od litery #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Zwraca określoną część tekstu."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "w tekście"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "znajdź pierwsze wystąpienie tekstu"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "znajdź ostatnie wystąpienie tekstu"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Zwraca indeks pierwszego/ostatniego wystąpi Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 jest pusty"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Zwraca prawda (true), jeśli podany tekst jest pusty."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "utwórz tekst z"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Tworzy fragment tekstu, łącząc ze sobą dowolną liczbę tekstów."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "długość %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Zwraca liczbę liter (łącznie ze spacjami) w podanym tekście."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "wydrukuj %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Drukuj określony tekst, liczbę lub coś innego."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Zapytaj użytkownika o liczbę."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Zapytaj użytkownika o jakiś tekst."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "poproś o liczbę z tą wiadomością"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Litera, wyraz lub linia tekstu."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "usuń spacje po obu stronach"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "usuń spacje z lewej strony"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "usuń spacje z prawej strony"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Zwraca kopię tekstu z usuniętymi spacjami z jednego lub z obu końców tekstu."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Utwórz blok 'ustaw %1'"; diff --git a/msg/js/pms.js b/msg/js/pms.js index 71faacfc978..7b73308a975 100644 --- a/msg/js/pms.js +++ b/msg/js/pms.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "taché ël test"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "a"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Taché dël test a la variàbil '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "an minùscul"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "an Majùscol A L'Ancamin Ëd Minca Paròla"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "an MAJÙSCOL"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "A smon na còpia dël test ant un caràter diferent."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "oten-e la prima litra"; Blockly.Msg.TEXT_CHARAT_FROM_END = "oten-e la litra # da la fin"; Blockly.Msg.TEXT_CHARAT_FROM_START = "oten-e la litra #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "oten-e l'ùltima litra"; Blockly.Msg.TEXT_CHARAT_RANDOM = "oten-e na litra a l'ancàpit"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "A smon la litra ant la posission ëspessificà."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Gionté n'element al test."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "gionze"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Gionté, gavé o riordiné le session për configuré torna ës blòch ëd test."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "fin-a a la litra # da la fin"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "fin-a a la litra #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "fin-a a l'ùltima litra"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "ant ël test"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "oten-e la sota-stringa da la prima litra"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "oten-e la sota-stringa da la litra # da la fin"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "oten-e la sota-stringa da la litra #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "A smon un tòch ëspessificà dël test."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "ant ël test"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "trové la prima ocorensa dël test"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "trové l'ùltima ocorensa dël test"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "A smon l'ìndes dla prima/ùltima ocorensa d Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 a l'é veuid"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "A smon ver se ël test fornì a l'é veuid."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "creé ël test con"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Creé un tòch ëd test an gionzend un nùmer qualsëssìa d'element."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "longheur ëd %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "A smon ël nùmer ëd litre (spassi comprèis) ant ël test fornì."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "smon-e %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Smon-e ël test, ël nùmer o n'àutr valor ëspessificà."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Ciamé un nùmer a l'utent."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Ciamé un test a l'utent."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "anvit për un nùmer con un mëssagi"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Na litra, na paròla o na linia ëd test."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "gavé jë spassi da le doe bande ëd"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "gavé jë spassi da la banda snistra ëd"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "gavé jë spassi da la banda drita ëd"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "A smon na còpia dël test con jë spassi gavà da n'estremità o da tute doe."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Ancheuj"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Creé 'fissé %1'"; diff --git a/msg/js/pt-br.js b/msg/js/pt-br.js index 2e52b88da7e..2ca8497188d 100644 --- a/msg/js/pt-br.js +++ b/msg/js/pt-br.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "acrescentar texto"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "para"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Acrescentar um pedaço de texto à variável \"%1\"."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "para minúsculas"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "para Nomes Próprios"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "para MAIÚSCULAS"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Retorna uma cópia do texto em um formato diferente."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "obter primeira letra"; Blockly.Msg.TEXT_CHARAT_FROM_END = "obter letra # a partir do final"; Blockly.Msg.TEXT_CHARAT_FROM_START = "obter letra nº"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "obter última letra"; Blockly.Msg.TEXT_CHARAT_RANDOM = "obter letra aleatória"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Retorna a letra na posição especificada."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Acrescentar um item ao texto."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "unir"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Acrescenta, remove ou reordena seções para reconfigurar este bloco de texto."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "até letra nº a partir do final"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "até letra nº"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "até última letra"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "no texto"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "obter trecho de primeira letra"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "obter trecho de letra nº a partir do final"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "obter trecho de letra nº"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Retorna o trecho de texto especificado."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "no texto"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "encontre a primeira ocorrência do item"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "encontre a última ocorrência do texto"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Retorna a posição da primeira/última ocor Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 é vazio"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Retorna verdadeiro se o texto fornecido for vazio."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "criar texto com"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Criar um pedaço de texto juntando qualquer número de itens."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "tamanho de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Retorna o número de letras (incluindo espaços) no texto fornecido."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "imprime %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Imprime o texto, número ou valor especificado."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Pede ao usuário um número."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Pede ao usuário um texto."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Pede um número com uma mensagem"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://pt.wikipedia.org/wiki/Cadeia_de_caracte Blockly.Msg.TEXT_TEXT_TOOLTIP = "Uma letra, palavra ou linha de texto."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "remover espaços de ambos os lados de"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "remover espaços à esquerda de"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "remover espaços à direita de"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Retorna uma cópia do texto com os espaços removidos de uma ou ambas extremidades."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Hoje"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "item"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Criar \"definir %1\""; diff --git a/msg/js/pt.js b/msg/js/pt.js index 91ae1500fc2..4cdccccb28a 100644 --- a/msg/js/pt.js +++ b/msg/js/pt.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "acrescentar texto"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "para"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Acrescentar um pedaço de texto à variável \"%1\"."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "para minúsculas"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "para Iniciais Maiúsculas"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "para MAIÚSCULAS"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Retorna uma cópia do texto em formato diferente."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "obter primeira letra"; Blockly.Msg.TEXT_CHARAT_FROM_END = "obter letra nº a partir do final"; Blockly.Msg.TEXT_CHARAT_FROM_START = "obter letra nº"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "obter última letra"; Blockly.Msg.TEXT_CHARAT_RANDOM = "obter letra aleatória"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Retorna a letra na posição especificada."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Acrescentar um item ao texto."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "unir"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Acrescenta, remove ou reordena seções para reconfigurar este bloco de texto."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "até letra nº a partir do final"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "até letra nº"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "até última letra"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "no texto"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "obter subsequência a partir da primeira letra"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "obter subsequência de tamanho # a partir do final"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "obter subsequência de tamanho #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Retorna a parte especificada do texto."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "no texto"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "primeira ocorrência do texto"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "última ocorrência do texto"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Retorna a posição da primeira/última ocor Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 está vazio"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Retorna verdadeiro se o texto fornecido estiver vazio."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "criar texto com"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Criar um pedaço de texto juntando qualquer número de itens."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "tamanho de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Devolve o número de letras (incluindo espaços) do texto fornecido."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "imprime %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Imprime o texto, número ou outro valor especificado."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Pede ao utilizador um número."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Pede ao utilizador um texto."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "pede um número com a mensagem"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "http://pt.wikipedia.org/wiki/Cadeia_de_caracter Blockly.Msg.TEXT_TEXT_TOOLTIP = "Uma letra, palavra ou linha de texto."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "remover espaços de ambos os lados"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "remover espaços à esquerda de"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "remover espaços à direita"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Retorna uma cópia do texto com os espaços removidos de uma ou ambas as extremidades."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Hoje"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "item"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Criar \"definir %1\""; diff --git a/msg/js/ro.js b/msg/js/ro.js index 254462ee579..5e897c9b424 100644 --- a/msg/js/ro.js +++ b/msg/js/ro.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Adăugaţi text"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "la"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Adăugaţi text la variabila '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "la litere mici"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "către Titlul de caz"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "la MAJUSCULE"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Întoarce o copie a textului într-un caz diferit."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "obţine prima litera"; Blockly.Msg.TEXT_CHARAT_FROM_END = "obţine litera # de la sfârșit"; Blockly.Msg.TEXT_CHARAT_FROM_START = "obtine litera #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "obţine o litera oarecare"; Blockly.Msg.TEXT_CHARAT_RANDOM = "obtine o litera oarecare"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returnează litera la poziția specificată."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Adaugă un element în text."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "alăturaţi-vă"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Adaugă, elimină sau reordonează secțiuni ca să reconfigureze blocul text."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "la litera # de la sfarsit"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "la litera #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "la ultima literă"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "în text"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "obţine un subșir de la prima literă"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "obține un subșir de la litera # de la sfârșit"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "obține subșir de la litera #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returnează o anumită parte din text."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "în text"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "găseşte prima apariţie a textului"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "găseşte ultima apariţie a textului"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returnează indicele primei/ultimei apariţi Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 este gol"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returnează adevărat dacă textul furnizat este gol."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "crează text cu"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Creaţi o bucată de text prin unirea oricărui număr de elemente."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "lungime de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returnează numărul de litere (inclusiv spaţiile) în textul furnizat."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "imprimare %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Afișează textul specificat, numărul sau altă valoare."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Solicită utilizatorul pentru un număr."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Solicită utilizatorul pentru text."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "solicită pentru număr cu mesaj"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "O literă, cuvânt sau linie de text."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "taie spațiile de pe ambele părți ale"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "tăiaţi spațiile din partea stângă a"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "taie spațiile din partea dreaptă a"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Returnează o copie a textului fără spațiile de la unul sau ambele capete."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Crează 'set %1'"; diff --git a/msg/js/ru.js b/msg/js/ru.js index 2de5b756a42..b0e4d6874b1 100644 --- a/msg/js/ru.js +++ b/msg/js/ru.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "добавить текст"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "к"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Добавить текст к переменной «%1»."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "в строчные буквы"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "в Заглавные Начальные Буквы"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "в ЗАГЛАВНЫЕ БУКВЫ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Возвращает копию текста с ЗАГЛАВНЫМИ или строчными буквами."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "взять первую букву"; Blockly.Msg.TEXT_CHARAT_FROM_END = "взять букву № с конца"; Blockly.Msg.TEXT_CHARAT_FROM_START = "взять букву №"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "взять последнюю букву"; Blockly.Msg.TEXT_CHARAT_RANDOM = "взять случайную букву"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Возвращает букву в указанной позиции."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Добавить элемент к тексту."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "соединить"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Добавьте, удалите, переставьте фрагменты для переделки текстового блока."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "по букву № с конца"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "по букву №"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "по последнюю букву"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "в тексте"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "взять подстроку с первой буквы"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "взять подстроку с буквы № с конца"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "взять подстроку с буквы №"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Возвращает указанную часть текста."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "в тексте"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "найти первое вхождение текста"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "найти последнее вхождение текста"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Возвращает номер позици Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 пуст"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Возвращает значение истина, если предоставленный текст пуст."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "создать текст из"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Создаёт фрагмент текста, объединяя любое число элементов"; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "длина %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Возвращает число символов (включая пробелы) в заданном тексте."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "напечатать %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Печатает текст, число или другой объект."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Запросить у пользователя число."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Запросить у пользователя текст."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "запросить число с подсказкой"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://ru.wikipedia.org/wiki/Строковы Blockly.Msg.TEXT_TEXT_TOOLTIP = "Буква, слово или строка текста."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "обрезать пробелы с двух сторон"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "обрезать пробелы слева"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "обрезать пробелы справа"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Возвращает копию текста с пробелами, удалеными с одного или обоих концов."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Сегодня"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "элемент"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Создать блок \"присвоить\" для %1"; diff --git a/msg/js/sc.js b/msg/js/sc.js index 4d2c923063a..198274ba745 100644 --- a/msg/js/sc.js +++ b/msg/js/sc.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "acciungi su testu"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "a"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Aciungit testu a sa variàbili '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "a minúdu"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "cun Primu lìtera a Mauschínu"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "a mauschínu"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Torrat una copia de su testu inditau mudendi mauschínu/minúdu."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "piga sa prima lìtera"; Blockly.Msg.TEXT_CHARAT_FROM_END = "piga sa lìtera # de sa fini"; Blockly.Msg.TEXT_CHARAT_FROM_START = "piga sa lìtera #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "piga s'urtima lìtera"; Blockly.Msg.TEXT_CHARAT_RANDOM = "piga una lìtera a brìtiu"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Torrat sa lìtera de su postu giau."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Acciungi unu item a su testu."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "auni a pari"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Aciungi, fùlia, o assenta is partis po torrai a sètiu custu brocu de testu."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "a sa lìtera # de sa fini"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "a sa lìtera #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "a s'urtima lìtera"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in su testu"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "piga suta-stringa de sa primu lìtera"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "piga suta-stringa de sa lìtera # fintzas a fini"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "piga suta-stringa de sa lìtera #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Torrat su testu inditau."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in su testu"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "circa prima ocasioni de su testu"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "circa urtima ocasioni de su testu"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Torrat s'indixi de sa primu/urtima ocasioni Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 est buidu"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Torrat berus si su testu giau est buidu."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "scri testu cun"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Fait unu testu ponendi a pari parigas de items."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "longària de %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Torrat su numeru de lìteras (cun is spàtzius) in su testu giau."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "scri %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Scri su testu, numeru o àteru valori."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Pregonta unu nùmeru a s'impitadore."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Pregonta testu a s'impitadore."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "pregonta po unu numeru"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Una lìtera, paràula, o linia de testu."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "bogat spàtzius de ambus càbudus de"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "bogat spàtzius de su càbudu de manca de"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "bogat spàtzius de su càbudu de dereta de"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Torrat una copia de su testu bogaus is spàtzius de unu o de ambus is càbudus."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Oi"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "item"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Fait 'imposta %1'"; diff --git a/msg/js/sk.js b/msg/js/sk.js index f4f1190787a..413d5fb51b8 100644 --- a/msg/js/sk.js +++ b/msg/js/sk.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "pridaj text"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "do"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Pridaj určitý text do premennej '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "na malé písmená"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "na Veľké Začiatočné Písmená"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "na VEĽKÉ PÍSMENÁ"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Vráť kópiu textu s inou veľkosťou písmen."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "zisti prvé písmeno"; Blockly.Msg.TEXT_CHARAT_FROM_END = "zisti # písmeno od konca"; Blockly.Msg.TEXT_CHARAT_FROM_START = "zisti písmeno #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "zisti posledné písmeno"; Blockly.Msg.TEXT_CHARAT_RANDOM = "vyber náhodné písmeno"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Vráti písmeno na určenej pozícii."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Pridaj prvok do textu."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "spoj"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Pridaj, odstráň alebo zmeň poradie oddielov v tomto textovom bloku."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "po # písmeno od konca"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "po písmeno #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "po koniec"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "v texte"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "vyber podreťazec od začiatku"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "vyber podreťazec od # písmena od konca"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "vyber podreťazec od písmena #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Vráti určenú časť textu."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "v texte"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "nájdi prvý výskyt textu"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "nájdi posledný výskyt textu"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Vráti index prvého/posledného výskytu pr Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 je prázdny"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Vráti hodnotu pravda, ak zadaný text je prázdny."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "vytvor text z"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Vytvor text spojením určitého počtu prvkov."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "dĺžka %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Vráti počet písmen (s medzerami) v zadanom texte."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "píš %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Napíš zadaný text, číslo alebo hodnotu."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Výzva pre používateľa na zadanie čísla."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Výzva pre používateľa na zadanie textu."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "výzva na zadanie čísla so správou"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Písmeno, slovo alebo riadok textu."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "odstráň medzery z oboch strán"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "odstráň medzery z ľavej strany"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "odstráň medzery z pravej strany"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Vráť kópiu textu bez medzier na jednom alebo oboch koncoch."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Dnes"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "prvok"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Vytvoriť \"nastaviť %1\""; diff --git a/msg/js/sq.js b/msg/js/sq.js index 939d5b4804b..1c9207426f4 100644 --- a/msg/js/sq.js +++ b/msg/js/sq.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "shto tekst"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "ne"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "shto tekst tek varibla '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "me shkronja te vogla shtypi"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Fillimi me shkronje te madhe shtypi"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "me shkronja te medha shtypi"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Kthe nje kopje te tekstit ne nje rast te ndryshem."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "merr shkronjen e pare"; Blockly.Msg.TEXT_CHARAT_FROM_END = "merr shkronjen # nga fundi"; Blockly.Msg.TEXT_CHARAT_FROM_START = "merr shkronjen #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "merr shkronjen e fundit"; Blockly.Msg.TEXT_CHARAT_RANDOM = "merr nje shkronje te rastesishme"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Kthe nje shkronje nga nje pozicion i caktuar."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Shto nje gje ne tekst"; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "bashkangjit"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Shto, fshij, ose rirregullo sektoret për ta rikonfiguruar këtë bllok teksti."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "ne shkronjen # nga fundi"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "ne shkronjen #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "tek shkronja e fundit"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "ne tekst"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "merr vlerat qe vazhdojne me shkronjen e pare"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "merr nenvargun nga shkronja # nga fundi"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "Merr nenvargun nga shkronja #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Pergjigjet me nje pjese te caktuar teksti."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "ne tekst"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "gjej rastisjen e pare te tekstit"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "gjej rastisjen e fundit te tekstit"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Pergjigjet me indeksin e pare/fundit te rast Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 eshte bosh"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Kthehet e vertete neqoftese teksti i dhene eshte bosh."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "krijo tekst me"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Krijo nje pjese te tekstit duke bashkuar se bashku disa sende"; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "gjatesi %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Pergjigjet me nje numer shkronjash (duke perfshire hapesire) ne tekstin e dhene."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "printo %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Printo tekstin e caktuar, numer ose vlere tjeter."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Kerkoji perdoruesit nje numer."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Kerkoji perdoruesit ca tekst."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "kerko nje numer me njoftim"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "http://en.wikipedia.org/wiki/String_(computer_s Blockly.Msg.TEXT_TEXT_TOOLTIP = "Nje shkronje, fjale, ose rresht teksti."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "prit hapesirat nga te dyja anet"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "prit hapesirat nga ana e majte"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "prit hapesirat nga ana e djathte"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Pergjigju me nje kopje te tekstit me hapesira te fshira nga njera ane ose te dyja anet."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "send"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Krijo 'vendos %1"; diff --git a/msg/js/sr.js b/msg/js/sr.js index bb3d1640212..dcf7f2ff397 100644 --- a/msg/js/sr.js +++ b/msg/js/sr.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "додај текст"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "на"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Додајте текст на променљиву „%1“."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "малим словима"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "свака реч великим словом"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "великим словима"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Враћа примерак текста са другачијом величином слова."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "преузми прво слово"; Blockly.Msg.TEXT_CHARAT_FROM_END = "преузми слово # са краја"; Blockly.Msg.TEXT_CHARAT_FROM_START = "преузми слово #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "преузми последње слово"; Blockly.Msg.TEXT_CHARAT_RANDOM = "преузми случајно слово"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Враћа слово на одређени положај."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Додајте ставку у текст."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "спајањем"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Додај, уклони, или другачије поредај одјелке како би изнова поставили овај текст блок."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "слову # са краја"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "слову #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "последњем слову"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "у тексту"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "преузми подниску из првог слова"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "преузми подниску из слова # са краја"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "преузми подниску из слова #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Враћа одређени део текста."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "у тексту"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "пронађи прво појављивање текста"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "пронађи последње појављивање текста"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Враћа однос првог/заднј Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 је празан"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Враћа тачно ако је доставлјени текст празан."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "напиши текст са"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Направити дио текста спајајући различите ставке."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "дужина текста %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Враћа број слова (уклјучујући размаке) у датом тексту."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "прикажи %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Прикажите одређени текст, број или другу вредност на екрану."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Питајте корисника за број."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Питајте корисника за унос текста."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "питај за број са поруком"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://sr.wikipedia.org/wiki/Ниска"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "Слово, реч или ред текста."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "скратити простор са обе стране"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "скратити простор са леве стране"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "скратити простор са десне стране"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Враћа копију текста са уклонјеним простором са једног од два краја."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "ставка"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Направи „постави %1“"; diff --git a/msg/js/sv.js b/msg/js/sv.js index 29d4c27a673..82a50b1e740 100644 --- a/msg/js/sv.js +++ b/msg/js/sv.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "lägg till text"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "till"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Lägg till lite text till variabeln '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "till gemener"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "till Versala Initialer"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "till VERSALER"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Returnerar en kopia av texten i ett annat skiftläge."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "hämta första bokstaven"; Blockly.Msg.TEXT_CHARAT_FROM_END = "hämta bokstaven # från slutet"; Blockly.Msg.TEXT_CHARAT_FROM_START = "hämta bokstaven #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "hämta sista bokstaven"; Blockly.Msg.TEXT_CHARAT_RANDOM = "hämta slumpad bokstav"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Ger tillbaka bokstaven på den specificerade positionen."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Lägg till ett föremål till texten."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "sammanfoga"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Lägg till, ta bort eller ändra ordningen för sektioner för att omkonfigurera detta textblock."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "till bokstav # från slutet"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "till bokstav #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "till sista bokstaven"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "i texten"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "få textdel från första bokstaven"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "få textdel från bokstav # från slutet"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "få textdel från bokstav #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Ger tillbaka en viss del av texten."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "i texten"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "hitta första förekomsten av texten"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "hitta sista förekomsten av texten"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Ger tillbaka indexet för den första/sista Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 är tom"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returnerar sant om den angivna texten är tom."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "skapa text med"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Skapa en textbit genom att sammanfoga ett valfritt antal föremål."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "längden på %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Ger tillbaka antalet bokstäver (inklusive mellanslag) i den angivna texten."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "skriv %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Skriv den angivna texten, talet eller annat värde."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Fråga användaren efter ett tal."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Fråga användaren efter lite text."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "fråga efter ett tal med meddelande"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://sv.wikipedia.org/wiki/Str%C3%A4ng_%28da Blockly.Msg.TEXT_TEXT_TOOLTIP = "En bokstav, ord eller textrad."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "ta bort mellanrum från båda sidorna av"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "ta bort mellanrum från vänstra sidan av"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "ta bort mellanrum från högra sidan av"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Returnerar en kopia av texten med borttagna mellanrum från en eller båda ändar."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Idag"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "föremål"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Skapa \"välj %1\""; diff --git a/msg/js/ta.js b/msg/js/ta.js index d7b2d67be5c..62592cd2cb4 100644 --- a/msg/js/ta.js +++ b/msg/js/ta.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "உரை சேர்க்க"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "இந்த மாறியிற்கு"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "'%1' மாறியில் உரையை சேர்"; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "சின்ன எழுத்துக்கு மாற்று"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "தலைப்பு எழுத்துக்கு மாற்று"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "பொரிய எழுத்துக்கு மாற்று"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "உரை நகல் எடுத்து பொரிய/சின்ன எழுத்து மாற்றி பின்கொடு."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "முதல் எழுத்தைப் பெறுக"; Blockly.Msg.TEXT_CHARAT_FROM_END = "முடிவில் இருந்து # எழுத்தை எடு"; Blockly.Msg.TEXT_CHARAT_FROM_START = "# எழுத்தை எடு"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "இறுதி எழுத்தைப் ப Blockly.Msg.TEXT_CHARAT_RANDOM = "சமவாய்ப்புள்ள எழுத்தை எடு"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "கூறிய இடத்தில் உள்ள எழுத்தை எடு"; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "உருபடியை உரையில் சேர்க்க."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "சேர்க்க"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "தொகுப்பு உரை திருத்துதம் செய்"; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "எழுத்து கடைசியில் இருந்து # வரை"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "எழுத்து # வரை"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "கடைசி எழுத்து வரை"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "உரையில்"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "-இல் உட்கணம் முதல் எழுத்திலிருந்து"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "-இல் உட்கணம் கடைசி # எழுத்திலிருந்து"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "-இல் உட்கணம் # எழுத்திலிருந்து"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "உரையின் குறியிடப்பட்ட சரம் பின்கொடு"; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "உரையில்"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "உரையில் முதல் தோற்ற இடத்தை பின்கொடு"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "உரையில் கடைசி தோற்ற இடத்தை பின்கொடு"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "இரண்டாவது உரையி Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 காலியானது"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "காலியானது என்றால் மெய் மதிப்பை பின்கொடு"; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "வைத்து உரை உருவாக்க"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "பல பொருட்களை ஒன்றாக சேர்வதன் மூலம் உரை உருவாக்க."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "%1ன் நீளம்"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "தொடரில் உள்ள எழுத்துக்களின் (இடைவெளிகளையும் சேர்த்து) எண்ணிகையை பின்கொடு."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "%1 அச்சிடுக"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "மதிப்பை அச்சிடு"; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "எண்-உள்ளீடு தூண்டுதலை காட்டு"; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "உரை-உள்ளீடு தூண்டுதலை காட்டு"; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "உரை கொண்டு எண்-உள்ளீடு தூண்டுதலை காட்டு"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://ta.wikipedia.org/wiki/%E0%AE%9A%E0%AE%B Blockly.Msg.TEXT_TEXT_TOOLTIP = "எழுத்து, சரம், சொல், அல்லது உரை சொற்தொடர்."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "இரு பக்கத்திலும் இடைவெளி எழுத்து நேர்த்தி செய்."; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "இடது பக்கத்தில் இடைவெளி எழுத்து நேர்த்தி செய்."; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "வலது பக்கத்தில் இடைவெளி எழுத்து நேர்த்தி செய்."; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "உரை நகல் எடுத்து இடைவெளி எழுத்து நீக்கி பின்கொடு."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "இன்று"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "உருப்படி"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "'%1 நியமி' உருவாக்கு"; diff --git a/msg/js/th.js b/msg/js/th.js index df5fd6ca6e3..8bdbf9240c9 100644 --- a/msg/js/th.js +++ b/msg/js/th.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ต่อด้วยข้อความ Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "นำเอา"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "ต่อข้อความให้ตัวแปร \"%1\""; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "เปลี่ยนเป็น ตัวพิมพ์เล็ก"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "เปลี่ยนเป็น ตัวอักษรแรกเป็นตัวพิมพ์ใหญ่"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "เปลี่ยนเป็น ตัวพิมพ์ใหญ่"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "คืนค่าสำเนาของข้อความในกรณีต่างๆ"; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "ดึง ตัวอักษรตัวแรก"; Blockly.Msg.TEXT_CHARAT_FROM_END = "ดึง ตัวอักษรตัวที่ # จากท้าย"; Blockly.Msg.TEXT_CHARAT_FROM_START = "ดึง ตัวอักษรตัวที่"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "ดึง ตัวอักษรตัวส Blockly.Msg.TEXT_CHARAT_RANDOM = "ถึงตัวอักษรแบบสุ่ม"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "คืนค่าตัวอักษรจากตำแหน่งที่ระบุ"; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "เพิ่มรายการเข้าไปในข้อความ"; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "รวม"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "เพิ่ม ลบ หรือจัดเรียงบล็อกข้อความนี้ใหม่"; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "จนถึง ตัวอักษรที่ # จากท้าย"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "จนถึง ตัวอักษรที่"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "จนถึง ตัวอักษรสุดท้าย"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "ในข้อความ"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "แยกข้อความย่อยตั้งแต่ ตัวอักษรแรก"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "แยกข้อความย่อยตั้งแต่ ตัวอักษรที่ # จากท้าย"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "แยกข้อความย่อยตั้งแต่ ตัวอักษรที่"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "คืนค่าบางส่วนของข้อความ"; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "ในข้อความ"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "หาข้อความแรกที่พบ"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "หาข้อความสุดท้ายที่พบ"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "คืนค่าตำแหน่งท Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 ว่าง"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "คืนค่าจริง ถ้าข้อความยังว่าง"; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "สร้างข้อความด้วย"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "สร้างข้อความด้วยการรวมจำนวนของรายการเข้าด้วยกัน"; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "ความยาวของ %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "คืนค่าความยาวของข้อความ (รวมช่องว่าง)"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "พิมพ์ %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "พิมพ์ข้อความ ตัวเลข หรือค่าอื่นๆ"; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "แสดงหน้าต่างให้ผู้ใช้ใส่ตัวเลข"; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "แสดงหน้าต่างให้ผู้ใช้ใส่ข้อความ"; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "แสดงหน้าต่างตัวเลข"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://th.wikipedia.org/wiki/สายอั Blockly.Msg.TEXT_TEXT_TOOLTIP = "ตัวหนังสือ คำ หรือข้อความ"; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "ลบช่องว่างทั้งสองข้างของ"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "ลบช่องว่างด้านหน้าของ"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "ลบช่องว่างข้างท้ายของ"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "คืนค่าสำเนาของข้อความที่ลบเอาช่องว่างหน้าและหลังข้อความออกแล้ว"; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "วันนี้"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "รายการ"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "สร้าง \"กำหนด %1\""; diff --git a/msg/js/tl.js b/msg/js/tl.js index 41168baddd4..4f21881f9b1 100644 --- a/msg/js/tl.js +++ b/msg/js/tl.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "append text"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "to"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "in text"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 is empty"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "http://en.wikipedia.org/wiki/String_(computer_s Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "item"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; diff --git a/msg/js/tlh.js b/msg/js/tlh.js index 6eeecc2d0b0..c2d60b02e62 100644 --- a/msg/js/tlh.js +++ b/msg/js/tlh.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ghItlh"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "chel"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "machchoH"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "DojchoH"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "tInchoH"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "mu'Hom wa'DIch"; Blockly.Msg.TEXT_CHARAT_FROM_END = "mu'Hom # Qav"; Blockly.Msg.TEXT_CHARAT_FROM_START = "mu'Hom #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "mu'Hom Qav"; Blockly.Msg.TEXT_CHARAT_RANDOM = "mu'Hom SaHbe'"; Blockly.Msg.TEXT_CHARAT_TAIL = "Suq"; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "ghom"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "mojaq mu'Hom # Qav"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "mojaq mu'Hom #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "mojaq mu'Hom Qav"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "ghItlhDaq"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "ghItlhHom moHaq mu'Hom wa'DIch"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "ghItlhHom moHaq mu'Hom # Qav"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "ghItlhHom moHaq mu'Hom #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = "Suq"; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "ghItlhDaq"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "ghItlh wa'DIch Sam"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "ghItlh Qav Sam"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurren Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 chIm'a'"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ghItlh ghom"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "chuq %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "maq %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "mI' tlhob 'ej maq"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "poSnIHlogh pei"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "poSlogh pei"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "nIHlogh pei"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "Doch"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "chel 'choH %1'"; diff --git a/msg/js/tr.js b/msg/js/tr.js index 35da894241e..d25b5997f0a 100644 --- a/msg/js/tr.js +++ b/msg/js/tr.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Metin Ekle"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "e"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Değişken '%1' e bazı metinler ekleyin."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "küçük harf"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Baş Harfler Büyük"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "büyük harf"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Metnin bir kopyasını farklı bir harf durumunda (HEPSİ BÜYÜK - hepsi küçük) getirir."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "İlk harfini al"; Blockly.Msg.TEXT_CHARAT_FROM_END = "# dan sona harfleri al"; Blockly.Msg.TEXT_CHARAT_FROM_START = "# harfini al"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "son harfi al"; Blockly.Msg.TEXT_CHARAT_RANDOM = "Rastgele bir harf al"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Belirli pozisyonda ki bir harfi döndürür."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Metine bir öğe ekle."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "Katıl"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Bu metin bloğunu düzenlemek için bölüm ekle,sil veya yeniden görevlendir."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "Sondan # harfe"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "# harfe"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "son harfe"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "metinde"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "ilk harften başlayarak alt-string alma"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "n inci harften sona kadar alt-string alma"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "n inci harften alt-string alma"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Metinin belirli bir kısmını döndürür."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "metinde"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "Metnin ilk varolduğu yeri bul"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "Metnin son varolduğu yeri bul"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "İlk metnin ikinci metnin içindeki ilk ve s Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 boş"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Verilen metin boşsa true(doğru) değerini verir."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ile metin oluştur"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Herhangi bir sayıda ki öğeleri bir araya getirerek metnin bir parçasını oluştur."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "%1 in uzunluğu"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Yazı içerisinde verilen harflerin ( harf arasındaki boşluklar dahil) sayısını verir ."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "%1 ' i Yaz"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Belirli bir metni,sayıyı veya başka bir değeri yaz."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Kullanıcıdan sayı al ."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Kullanıcıdan Yazım al ."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Kullanıcıdan sayı al , istek mesajı göstererek"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Metnin bir harfi,kelimesi veya satırı."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "iki tarafından da boşlukları temizle"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "solundan boşlukları temizle"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "sağından boşlukları temizle"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Metnin bir veya her iki sondan da boşlukları silinmiş şekilde kopyasını verir."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Bugün"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "öge"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "'set %1' oluştur"; diff --git a/msg/js/uk.js b/msg/js/uk.js index c33b42a93b0..94bdc354480 100644 --- a/msg/js/uk.js +++ b/msg/js/uk.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "додати текст"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "до"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Додати деякий текст до змінної '%1'."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "до нижнього регістру"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Великі Перші Букви"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "до ВЕРХНЬОГО регістру"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "В іншому випадку повертає копію тексту."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "отримати перший символ"; Blockly.Msg.TEXT_CHARAT_FROM_END = "отримати символ # з кінця"; Blockly.Msg.TEXT_CHARAT_FROM_START = "отримати символ #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "отримати останній символ"; Blockly.Msg.TEXT_CHARAT_RANDOM = "отримати випадковий символ"; Blockly.Msg.TEXT_CHARAT_TAIL = "-ий."; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Повертає символ у зазначеній позиції."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Додати елемент до тексту."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "приєднати"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Додайте, вилучіть або змініть порядок секцій для переналаштування текстового блоку."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "до символу # з кінця"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "до символу #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "до останнього символу"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "у тексті"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "отримати підрядок від першого символу"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "отримати підрядок від символу # з кінця"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "отримати підрядок від символу #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = "-ого."; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Повертає заданий фрагмент тексту."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "у тексті"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "знайти перше входження тексту"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "знайти останнє входження тексту"; Blockly.Msg.TEXT_INDEXOF_TAIL = "."; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Повертає індекс першого Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 є порожнім"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Повертає істину, якщо вказаний текст порожній."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_8.html"; Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "створити текст з"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Створити фрагмент тексту шляхом з'єднування будь-якого числа елементів."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "довжина %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Повертає число символів (включно з пропусками) у даному тексті."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "друк %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Надрукувати заданий текст, числа або інші значення."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Запитати у користувача число."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Запитати у користувача деякий текст."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "запит числа з повідомленням"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://uk.wikipedia.org/wiki/Рядок_(пр Blockly.Msg.TEXT_TEXT_TOOLTIP = "Символ, слово або рядок тексту."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "вилучити крайні пропуски з обох кінців"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "вилучити пропуски з лівого боку"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "вилучити пропуски з правого боку"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Повертає копію тексту з вилученими пропусками з одного або обох кінців."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Сьогодні"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "елемент"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Створити 'встановити %1'"; diff --git a/msg/js/vi.js b/msg/js/vi.js index aca833599d1..45b1dd1f147 100644 --- a/msg/js/vi.js +++ b/msg/js/vi.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "thêm văn bản"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "ở cuối"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Thêm một mảng văn bản vào biến \"%1\"."; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "thành chữ thường"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "thành Chữ In Đầu Mỗi Từ"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "thành CHỮ IN HOA"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Hoàn trả văn bản sau khi chuyển đổi chữ in hoa hay thường."; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "lấy ký tự đầu tiên"; Blockly.Msg.TEXT_CHARAT_FROM_END = "lấy từ phía cuối, ký tự thứ"; Blockly.Msg.TEXT_CHARAT_FROM_START = "lấy ký tự thứ"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "lấy ký tự cuối cùng"; Blockly.Msg.TEXT_CHARAT_RANDOM = "lấy ký tự bất kỳ"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Hoàn trả ký tự ở vị trí đặt ra."; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "thêm vật mới vào văn bản."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "kết nối"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Thêm, bỏ, hoặc sắp xếp lại các thành phần để tạo dựng mảnh văn bản này."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "đến từ phía cuối, ký tự thứ"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "đến ký tự thứ"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "đến ký tự cuối cùng"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "trong văn bản"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "lấy từ ký tự đầu tiên"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "lấy từ phía cuối, ký tự thứ"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "lấy từ ký tự thứ"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Hoàn trả một mảng ký tự ấn định từ trong văn bản."; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "trong văn bản"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "tìm sự có mặt đầu tiên của"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "tìm sự có mặt cuối cùng của"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Hoàn trả vị trí xuất hiện đầu/c Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 trống không"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Hoàn trả “đúng nếu văn bản không có ký tự nào."; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = ""; Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "tạo văn bản từ"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Tạo một văn bản từ các thành phần."; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "độ dài của %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Hoàn trả số lượng ký tự (kể cả khoảng trắng) trong văn bản đầu vào."; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "in lên màng hình %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "In ra màng hình một văn bản, con số, hay một giá trị đầu vào khác."; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Xin người dùng nhập vào một con số."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Xin người dùng nhập vào một văn bản."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Xin người dùng nhập vào con số với dòng hướng dẫn"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/string_(computer_ Blockly.Msg.TEXT_TEXT_TOOLTIP = "Một ký tự, một từ, hay một dòng."; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "cắt các không gian từ cả hai mặt của"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "cắt các không gian từ bên trái của"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "cắt các không gian từ bên phải của"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "Hoàn trả bản sao của văn bản sau khi xóa khoảng trắng từ một hoặc hai bên."; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "Today"; // untranslated Blockly.Msg.VARIABLES_DEFAULT_NAME = "vật"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Tạo mảnh \"đặt vào %1\""; diff --git a/msg/js/zh-hans.js b/msg/js/zh-hans.js index a3d066439e9..62b22a270c2 100644 --- a/msg/js/zh-hans.js +++ b/msg/js/zh-hans.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "追加文本"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "在"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "将一些文本追加到变量“%1”。"; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "为小写"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "为首字母大写"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "为大写"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "使用不同的大小写复制这段文字。"; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "获得第一个字符"; Blockly.Msg.TEXT_CHARAT_FROM_END = "获得倒数第#个字符"; Blockly.Msg.TEXT_CHARAT_FROM_START = "获得字符#"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "获得最后一个字符"; Blockly.Msg.TEXT_CHARAT_RANDOM = "获取随机的字母"; Blockly.Msg.TEXT_CHARAT_TAIL = "空白"; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "返回位于指定位置的字母。"; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "将一个项添加到文本中。"; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "加入"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "添加、删除或重新排列各节来重新配置这个文本块。"; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "到倒数第#个字符"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "到字符#"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "到最后一个字符"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "自文本"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "取得一段字串自第一个字符"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "取得一段字串自#到末尾"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "取得一段字串自#"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = "空白"; Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "返回指定的部分文本。"; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "自文本"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "寻找第一个出现的文本"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "寻找最后一个出现的文本"; Blockly.Msg.TEXT_INDEXOF_TAIL = "空白"; @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "返回在第二个字串中的第一/最后 Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1是空的"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "如果提供的文本为空,则返回真。"; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "建立字串使用"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "通过串起任意数量的项以建立一段文字。"; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "%1的长度"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "返回文本的字符数(包括空格)。"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "打印%1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "打印指定的文字、数字或其他值。"; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "提示用户输入数字。"; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "提示用户输入一些文本。"; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "输入数字并显示提示消息"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://zh.wikipedia.org/wiki/字符串"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "一个字母、单词或一行文本。"; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "消除两侧空格"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "消除左侧空格"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "消除右侧空格"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "复制这段文字的同时删除两端多余的空格。"; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "今天"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "项目"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "创建“设定%1”"; diff --git a/msg/js/zh-hant.js b/msg/js/zh-hant.js index 855edfb1285..447c2cfa768 100644 --- a/msg/js/zh-hant.js +++ b/msg/js/zh-hant.js @@ -408,11 +408,15 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = "後加入文字"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "在"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "將一些文字追加到變量 '%1'。"; +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "轉成 小寫"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "轉成 首字母大寫"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "轉成 大寫"; +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "使用不同的大小寫複製這段文字。"; +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated Blockly.Msg.TEXT_CHARAT_FIRST = "取第一個字元"; Blockly.Msg.TEXT_CHARAT_FROM_END = "取得 倒數第 # 個字元"; Blockly.Msg.TEXT_CHARAT_FROM_START = "取得 字元 #"; @@ -422,24 +426,35 @@ Blockly.Msg.TEXT_CHARAT_LAST = "取最後一個字元"; Blockly.Msg.TEXT_CHARAT_RANDOM = "取隨機一個字元"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; Blockly.Msg.TEXT_CHARAT_TOOLTIP = "返回位於指定位置的字元。"; +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "將一個項目加入到字串中。"; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "加入"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "添加、 刪除或重新排列各區塊來此重新配置這個文字積木。"; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "到 倒數第 # 個字元"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "到 字元 #"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "到 最後一個字元"; +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "自字串"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "取得一段字串 自 第一個字元"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "取得一段字串自 #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "取得一段字串自 #"; +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "返回指定的部分文字。"; +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "在字串"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "尋找 第一個 出現的字串"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "尋找 最後一個 出現的字串"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated @@ -447,16 +462,22 @@ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "返回在第二個字串中的第一個/最 Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 為空"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "如果提供的字串為空,則返回 真。"; +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "建立字串使用"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "通過串起任意數量的項目來建立一段文字。"; +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "長度 %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "返回這串文字的字元數(含空格) 。"; +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "印出 %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "印出指定的文字、 數字或其他值。"; +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "輸入數字"; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "輸入文字"; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "輸入 數字 並顯示提示訊息"; @@ -465,13 +486,18 @@ Blockly.Msg.TEXT_TEXT_HELPURL = "https://zh.wikipedia.org/wiki/字串"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "字元、 單詞或一行文字。"; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "消除兩側空格"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "消除左側空格"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "消除右側空格"; +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated Blockly.Msg.TEXT_TRIM_TOOLTIP = "複製這段文字的同時刪除兩端多餘的空格。"; Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated Blockly.Msg.TODAY = "今天"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "變量"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "創立 '設定 %1'"; diff --git a/msg/json/en.json b/msg/json/en.json index c79d0342858..e4e12841b82 100644 --- a/msg/json/en.json +++ b/msg/json/en.json @@ -1,7 +1,7 @@ { "@metadata": { "author": "Ellen Spertus ", - "lastupdated": "2015-07-07 11:55:14.124266", + "lastupdated": "2015-07-08 11:04:04.571519", "locale": "en", "messagedocumentation" : "qqq" }, @@ -269,6 +269,7 @@ "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_JOIN_TYPEBLOCK": "Create Text With", "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.", @@ -276,18 +277,23 @@ "TEXT_APPEND_TO": "to", "TEXT_APPEND_APPENDTEXT": "append text", "TEXT_APPEND_TOOLTIP": "Append some text to variable '%1'.", + "TEXT_APPEND_TYPEBLOCK": "Append Text", "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_LENGTH_TYPEBLOCK": "Length of 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_ISEMPTY_TYPEBLOCK": "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 first text in the second text. Returns 0 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_INDEXOF_FIRST_TYPEBLOCK": "Find First Occurrence of Text", + "TEXT_INDEXOF_LAST_TYPEBLOCK": "Find Last Occurrence of Text", "TEXT_CHARAT_HELPURL": "https://github.com/google/blockly/wiki/Text#extracting-text", "TEXT_CHARAT_INPUT_INTEXT": "in text", "TEXT_CHARAT_FROM_START": "get letter #", @@ -297,6 +303,11 @@ "TEXT_CHARAT_RANDOM": "get random letter", "TEXT_CHARAT_TAIL": "", "TEXT_CHARAT_TOOLTIP": "Returns the letter at the specified position.", + "TEXT_CHARAT_FROM_START": "In Text Get Letter #", + "TEXT_CHARAT_FROM_END": "In Text Get Letter # From End", + "TEXT_CHARAT_FIRST": "In Text Get First Letter", + "TEXT_CHARAT_LAST": "In Text Get Last Letter", + "TEXT_CHARAT_RANDOM": "In Text Get Random Letter", "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", @@ -307,27 +318,45 @@ "TEXT_GET_SUBSTRING_END_FROM_END": "to letter # from end", "TEXT_GET_SUBSTRING_END_LAST": "to last letter", "TEXT_GET_SUBSTRING_TAIL": "", + "TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK": "Get Substring From Letter #", + "TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK": "Get Substring From Letter # From End", + "TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK": "Get Substring From First Letter", + "TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK": " To Letter #", + "TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK": " To Letter # From End", + "TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK": " To Last Letter", "TEXT_CONTAINS_HELPURL": "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains", "TEXT_CONTAINS_INPUT": "contains text %1 piece %2", "TEXT_CONTAINS_TOOLTIP": "Tests whether the piece is contained in the text.", + "TEXT_CONTAINS_TYPEBLOCK": "Text Contains", "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_CHANGECASE_UPPERCASE_TYPBLOCK": "Text to UPPER CASE", + "TEXT_CHANGECASE_LOWERCASE_TYPBLOCK": "Text to lower case", + "TEXT_CHANGECASE_TITLECASE_TYPBLOCK": "Text 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_TRIM_BOTH_TYPEBLOCK": "Trim Spaces From Both Sides Of Text", + "TEXT_TRIM_LEFT_TYPEBLOCK": "Trim Spaces From Left Side Of Text", + "TEXT_TRIM_RIGHT_TYPEBLOCK": "Trim Spaces From Right Side Of Text", "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_PRINT_TYPEBLOCK": "Print Text", "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.", + "TEXT_PROMPT_TEXT_TYPEBLOCK": "Prompt For Text With Message", + "TEXT_PROMPT_NUMBER_TYPEBLOCK": "Prompt For Number With Message", + "TEXT_COMMENT_TEXT": "Comment:", + "TEXT_COMMENT_TYPEBLOCK": "Comment", "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", @@ -480,5 +509,7 @@ "TEXT_TYPE_JAVA": "insert java code", "TEXT_TYPE_PYTHON": "insert python code", "TEXT_TOOLTIP_TYPE_JAVA": "Insert arbitrary Java code", - "TEXT_TOOLTIP_TYPE_PYTHON": "Insert arbitrary Python code" + "TEXT_TOOLTIP_TYPE_PYTHON": "Insert arbitrary Python code", + "TEXT_TYPE_JAVA_TYPEBLOCK": "insert java code", + "TEXT_TYPE_PYTHON_TYPEBLOCK": "insert python code" } diff --git a/msg/json/qqq.json b/msg/json/qqq.json index d2b6b2a87a5..59f4915ec89 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -263,6 +263,7 @@ "TEXT_JOIN_HELPURL": "url - Information on concatenating/appending pieces of text.", "TEXT_JOIN_TITLE_CREATEWITH": "block text - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation].", "TEXT_JOIN_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#text-creation create text with] for more information.", + "TEXT_JOIN_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_CREATE_JOIN_TITLE_JOIN": "block text - This is shown when the programmer wants to change the number of pieces of text being joined together. See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section.", "TEXT_CREATE_JOIN_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section.", "TEXT_CREATE_JOIN_ITEM_TOOLTIP": "block text - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section.", @@ -270,18 +271,23 @@ "TEXT_APPEND_TO": "block input text - Message preceding the name of a variable to which text should be appended. [[File:blockly-append-text.png]]", "TEXT_APPEND_APPENDTEXT": "block input text - Message following the variable and preceding the piece of text that should be appended, as shown below. [[File:blockly-append-text.png]]", "TEXT_APPEND_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#text-modification https://github.com/google/blockly/wiki/Text#text-modification] for more information.\n\nParameters:\n* %1 - the name of the variable to which text should be appended", + "TEXT_APPEND_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_LENGTH_HELPURL": "url - Information about text on computers (usually referred to as 'strings').", "TEXT_LENGTH_TITLE": "block text - See [https://github.com/google/blockly/wiki/Text#text-length https://github.com/google/blockly/wiki/Text#text-length]. \n\nParameters:\n* %1 - the piece of text to take the length of", "TEXT_LENGTH_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#text-length https://github.com/google/blockly/wiki/Text#text-length].", + "TEXT_LENGTH_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_ISEMPTY_HELPURL": "url - Information about empty pieces of text on computers (usually referred to as 'empty strings').", "TEXT_ISEMPTY_TITLE": "block text - See [https://github.com/google/blockly/wiki/Text#checking-for-empty-text https://github.com/google/blockly/wiki/Text#checking-for-empty-text]. \n\nParameters:\n* %1 - the piece of text to test for emptiness", "TEXT_ISEMPTY_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#checking-for-empty-text https://github.com/google/blockly/wiki/Text#checking-for-empty-text].", + "TEXT_ISEMPTY_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_INDEXOF_HELPURL": "url - Information about finding a character in a piece of text.", "TEXT_INDEXOF_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#finding-text https://github.com/google/blockly/wiki/Text#finding-text].", "TEXT_INDEXOF_INPUT_INTEXT": "block text - Title of blocks allowing users to find text. See [https://github.com/google/blockly/wiki/Text#finding-text https://github.com/google/blockly/wiki/Text#finding-text]. [[File:Blockly-find-text.png]].", "TEXT_INDEXOF_OPERATOR_FIRST": "dropdown - See [https://github.com/google/blockly/wiki/Text#finding-text https://github.com/google/blockly/wiki/Text#finding-text]. [[File:Blockly-find-text.png]].", "TEXT_INDEXOF_OPERATOR_LAST": "dropdown - See [https://github.com/google/blockly/wiki/Text#finding-text https://github.com/google/blockly/wiki/Text#finding-text]. This would replace 'find first occurrence of text' below. (For more information on how common text is factored out of dropdown menus, see [https://translatewiki.net/wiki/Translating:Blockly#Drop-Down_Menus https://translatewiki.net/wiki/Translating:Blockly#Drop-Down_Menus)].) [[File:Blockly-find-text.png]].", "TEXT_INDEXOF_TAIL": "block text - Optional text to follow the rightmost block in a [https://github.com/google/blockly/wiki/Text#finding-text https://github.com/google/blockly/wiki/Text#finding-text in text ... find block] (after the 'a' in the below picture). This will be the empty string in most languages. [[File:Blockly-find-text.png]].", + "TEXT_INDEXOF_FIRST_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_INDEXOF_LAST_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_CHARAT_HELPURL": "url - Information about extracting characters (letters, number, symbols, etc.) from text.", "TEXT_CHARAT_INPUT_INTEXT": "block text - Appears before the piece of text from which a letter (or number, punctuation character, etc.) should be extracted, as shown below. See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. [[File:Blockly-text-get.png]]", "TEXT_CHARAT_FROM_START": "dropdown - Indicates that the letter (or number, punctuation character, etc.) with the specified index should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. [[File:Blockly-text-get.png]]", @@ -291,6 +297,11 @@ "TEXT_CHARAT_RANDOM": "block text - Indicates that any letter (or number, punctuation mark, etc.) in the following piece of text should be randomly selected. See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. [[File:Blockly-text-get.png]]", "TEXT_CHARAT_TAIL": "block text - Text that goes after the rightmost block/dropdown when getting a single letter from a piece of text, as in [https://blockly-demo.appspot.com/static/apps/code/index.html#3m23km these blocks] or shown below. For most languages, this will be blank. [[File:Blockly-text-get.png]]", "TEXT_CHARAT_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. [[File:Blockly-text-get.png]]", + "TEXT_CHARAT_FROM_START": "Typeblock - Autocomplete for typeblocking", + "TEXT_CHARAT_FROM_END": "Typeblock - Autocomplete for typeblocking", + "TEXT_CHARAT_FIRST": "Typeblock - Autocomplete for typeblocking", + "TEXT_CHARAT_LAST": "Typeblock - Autocomplete for typeblocking", + "TEXT_CHARAT_RANDOM": "Typeblock - Autocomplete for typeblocking", "TEXT_GET_SUBSTRING_TOOLTIP": "See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].", "TEXT_GET_SUBSTRING_HELPURL": "url - Information about extracting characters from text. Reminder: urls are the lowest priority translations. Feel free to skip.", "TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "block text - Precedes a piece of text from which a portion should be extracted. [[File:Blockly-get-substring.png]]", @@ -301,27 +312,45 @@ "TEXT_GET_SUBSTRING_END_FROM_END": "dropdown - Indicates that the following number specifies the position (relative to the end position) of the end of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_END_LAST": "block text - Indicates that a region ending with the last letter of the preceding piece of text should be extracted. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_TAIL": "block text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text extracting a region of text]. In most languages, this will be the empty string. [[File:Blockly-get-substring.png]]", + "TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_CONTAINS_HELPURL": "url - Information about how the text contains block works", "TEXT_CONTAINS_INPUT": "Title for the Contains Text block. %1 corresponds to the Text input block which is of type 'String' %2 corresponds for the Piece input block which is of type 'String' see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains]", "TEXT_CONTAINS_TOOLTIP": "tooltip - Describes a block to adjust the case of letters. For more information on this block, see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains]", + "TEXT_CONTAINS_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_CHANGECASE_HELPURL": "url - Information about the case of letters (upper-case and lower-case).", "TEXT_CHANGECASE_TOOLTIP": "tooltip - Describes a block to adjust the case of letters. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", "TEXT_CHANGECASE_OPERATOR_UPPERCASE": "block text - Indicates that all of the letters in the following piece of text should be capitalized. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", "TEXT_CHANGECASE_OPERATOR_LOWERCASE": "block text - Indicates that all of the letters in the following piece of text should be converted to lower-case. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", "TEXT_CHANGECASE_OPERATOR_TITLECASE": "block text - Indicates that the first letter of each of the following words should be capitalized and the rest converted to lower-case. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].", + "TEXT_CHANGECASE_UPPERCASE_TYPBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_CHANGECASE_LOWERCASE_TYPBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_CHANGECASE_TITLECASE_TYPBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_TRIM_HELPURL": "url - Information about trimming (removing) text off the beginning and ends of pieces of text.", "TEXT_TRIM_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces https://github.com/google/blockly/wiki/Text#trimming-removing-spaces].", "TEXT_TRIM_OPERATOR_BOTH": "dropdown - Removes spaces from the beginning and end of a piece of text. See [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. Note that neither this nor the other options modify the original piece of text (that follows); the block just returns a version of the text without the specified spaces.", "TEXT_TRIM_OPERATOR_LEFT": "dropdown - Removes spaces from the beginning of a piece of text. See [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. Note that in right-to-left scripts, this will remove spaces from the right side.", "TEXT_TRIM_OPERATOR_RIGHT": "dropdown - Removes spaces from the end of a piece of text. See [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. Note that in right-to-left scripts, this will remove spaces from the left side.", + "TEXT_TRIM_BOTH_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_TRIM_LEFT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_TRIM_RIGHT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_PRINT_HELPURL": "url - Information about displaying text on computers.", "TEXT_PRINT_TITLE": "block text - Display the input on the screen. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text]. \n\nParameters:\n* %1 - the value to print", "TEXT_PRINT_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", + "TEXT_PRINT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "TEXT_PROMPT_HELPURL": "url - Information about getting text from users.", "TEXT_PROMPT_TYPE_TEXT": "dropdown - Specifies that a piece of text should be requested from the user with the following message. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", "TEXT_PROMPT_TYPE_NUMBER": "dropdown - Specifies that a number should be requested from the user with the following message. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", "TEXT_PROMPT_TOOLTIP_NUMBER": "dropdown - Precedes the message with which the user should be prompted for a number. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", "TEXT_PROMPT_TOOLTIP_TEXT": "dropdown - Precedes the message with which the user should be prompted for some text. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", + "TEXT_PROMPT_TEXT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_PROMPT_NUMBER_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_COMMENT_TEXT": "Title", + "TEXT_COMMENT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", "LISTS_CREATE_EMPTY_HELPURL": "url - Information on empty lists.", "LISTS_CREATE_EMPTY_TITLE": "block text - See [https://github.com/google/blockly/wiki/Lists#create-empty-list https://github.com/google/blockly/wiki/Lists#create-empty-list].", "LISTS_CREATE_EMPTY_TOOLTIP": "block text - See [https://github.com/google/blockly/wiki/Lists#create-empty-list https://github.com/google/blockly/wiki/Lists#create-empty-list].", @@ -474,5 +503,7 @@ "TEXT_TYPE_JAVA": "Block text", "TEXT_TYPE_PYTHON": "Block Text", "TEXT_TOOLTIP_TYPE_JAVA": "tooltip", - "TEXT_TOOLTIP_TYPE_PYTHON": "tooltip" + "TEXT_TOOLTIP_TYPE_PYTHON": "tooltip", + "TEXT_TYPE_JAVA_TYPEBLOCK": "typeblock - Typing to add the block", + "TEXT_TYPE_PYTHON_TYPEBLOCK": "typeblock - Typing to add the block" } diff --git a/msg/messages.js b/msg/messages.js index 3fe47339297..75e870604af 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -661,6 +661,8 @@ Blockly.Msg.TEXT_JOIN_HELPURL = 'https://github.com/google/blockly/wiki/Text#tex Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = 'create text with'; /// tooltip - See [https://github.com/google/blockly/wiki/Text#text-creation create text with] for more information. Blockly.Msg.TEXT_JOIN_TOOLTIP = 'Create a piece of text by joining together any number of items.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = 'Create Text With'; /// block text - This is shown when the programmer wants to change the number of pieces of text being joined together. See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section. Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = 'join'; @@ -682,6 +684,8 @@ Blockly.Msg.TEXT_APPEND_APPENDTEXT = 'append text'; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; /// tooltip - See [https://github.com/google/blockly/wiki/Text#text-modification https://github.com/google/blockly/wiki/Text#text-modification] for more information.\n\nParameters:\n* %1 - the name of the variable to which text should be appended Blockly.Msg.TEXT_APPEND_TOOLTIP = 'Append some text to variable "%1".'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = 'Append Text'; /// url - Information about text on computers (usually referred to as 'strings'). Blockly.Msg.TEXT_LENGTH_HELPURL = 'https://github.com/google/blockly/wiki/Text#text-modification'; @@ -690,6 +694,8 @@ Blockly.Msg.TEXT_LENGTH_HELPURL = 'https://github.com/google/blockly/wiki/Text#t Blockly.Msg.TEXT_LENGTH_TITLE = 'length of %1'; /// tooltip - See [https://github.com/google/blockly/wiki/Text#text-length https://github.com/google/blockly/wiki/Text#text-length]. Blockly.Msg.TEXT_LENGTH_TOOLTIP = 'Returns the number of letters (including spaces) in the provided text.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = 'Length of Text'; /// url - Information about empty pieces of text on computers (usually referred to as 'empty strings'). Blockly.Msg.TEXT_ISEMPTY_HELPURL = 'https://github.com/google/blockly/wiki/Text#checking-for-empty-text'; @@ -698,6 +704,8 @@ Blockly.Msg.TEXT_ISEMPTY_HELPURL = 'https://github.com/google/blockly/wiki/Text# Blockly.Msg.TEXT_ISEMPTY_TITLE = '%1 is empty'; /// tooltip - See [https://github.com/google/blockly/wiki/Text#checking-for-empty-text https://github.com/google/blockly/wiki/Text#checking-for-empty-text]. Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = 'Returns true if the provided text is empty.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = 'Text is Empty'; /// url - Information about finding a character in a piece of text. Blockly.Msg.TEXT_INDEXOF_HELPURL = 'https://github.com/google/blockly/wiki/Text#finding-text'; @@ -726,6 +734,10 @@ Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = 'find last occurrence of text'; /// (after the "a" in the below picture). This will be the empty string in most languages. /// [[File:Blockly-find-text.png]]. Blockly.Msg.TEXT_INDEXOF_TAIL = ''; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = 'Find First Occurrence of Text'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = 'Find Last Occurrence of Text'; /// url - Information about extracting characters (letters, number, symbols, etc.) from text. Blockly.Msg.TEXT_CHARAT_HELPURL = 'https://github.com/google/blockly/wiki/Text#extracting-text'; @@ -773,6 +785,16 @@ Blockly.Msg.TEXT_CHARAT_TAIL = ''; /// https://github.com/google/blockly/wiki/Text#extracting-a-single-character]. /// [[File:Blockly-text-get.png]] Blockly.Msg.TEXT_CHARAT_TOOLTIP = 'Returns the letter at the specified position.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CHARAT_FROM_START = 'In Text Get Letter #'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CHARAT_FROM_END = 'In Text Get Letter # From End'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CHARAT_FIRST = 'In Text Get First Letter'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CHARAT_LAST = 'In Text Get Last Letter'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CHARAT_RANDOM = 'In Text Get Random Letter'; /// See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text /// https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. @@ -830,6 +852,18 @@ Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = 'to last letter'; /// extracting a region of text]. In most languages, this will be the empty string. /// [[File:Blockly-get-substring.png]] Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ''; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = 'Get Substring From Letter #'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = 'Get Substring From Letter # From End'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = 'Get Substring From First Letter'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = ' To Letter #'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = ' To Letter # From End'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = ' To Last Letter'; /// url - Information about how the text contains block works Blockly.Msg.TEXT_CONTAINS_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains'; @@ -843,6 +877,8 @@ Blockly.Msg.TEXT_CONTAINS_INPUT = 'contains text %1 piece %2'; /// see [http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains /// http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains] Blockly.Msg.TEXT_CONTAINS_TOOLTIP = 'Tests whether the piece is contained in the text.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = 'Text Contains'; /// url - Information about the case of letters (upper-case and lower-case). Blockly.Msg.TEXT_CHANGECASE_HELPURL = 'https://github.com/google/blockly/wiki/Text#adjusting-text-case' @@ -860,6 +896,12 @@ Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = 'to UPPER CASE'; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = 'to lower case'; /// block text - Indicates that the first letter of each of the following words should be capitalized and the rest converted to lower-case. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case]. Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = 'to Title Case'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = 'Text to UPPER CASE'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = 'Text to lower case'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = 'Text to Title Case'; /// url - Information about trimming (removing) text off the beginning and ends of pieces of text. Blockly.Msg.TEXT_TRIM_HELPURL = 'https://github.com/google/blockly/wiki/Text#trimming-removing-spaces'; @@ -882,6 +924,12 @@ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = 'trim spaces from left side of'; /// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. /// Note that in right-to-left scripts, this will remove spaces from the left side. Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = 'trim spaces from right side of'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = 'Trim Spaces From Both Sides Of Text'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = 'Trim Spaces From Left Side Of Text'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = 'Trim Spaces From Right Side Of Text'; /// url - Information about displaying text on computers. Blockly.Msg.TEXT_PRINT_HELPURL = 'https://github.com/google/blockly/wiki/Text#printing-text'; @@ -893,6 +941,9 @@ Blockly.Msg.TEXT_PRINT_TITLE = 'print %1'; /// tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text /// https://github.com/google/blockly/wiki/Text#printing-text]. Blockly.Msg.TEXT_PRINT_TOOLTIP = 'Print the specified text, number or other value.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = 'Print Text'; + /// url - Information about getting text from users. Blockly.Msg.TEXT_PROMPT_HELPURL = 'https://github.com/google/blockly/wiki/Text#getting-input-from-the-user'; /// dropdown - Specifies that a piece of text should be requested from the user with @@ -911,6 +962,14 @@ Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = 'Prompt for user for a number.'; /// See [https://github.com/google/blockly/wiki/Text#printing-text /// https://github.com/google/blockly/wiki/Text#printing-text]. Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = 'Prompt for user for some text.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = 'Prompt For Text With Message'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = 'Prompt For Number With Message'; +/// Title +Blockly.Msg.TEXT_COMMENT_TEXT = 'Comment:'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = 'Comment'; // Lists Blocks. /// url - Information on empty lists. @@ -1365,3 +1424,7 @@ Blockly.Msg.TEXT_TYPE_PYTHON = 'insert python code'; Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = 'Insert arbitrary Java code'; /// tooltip Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = 'Insert arbitrary Python code'; +/// typeblock - Typing to add the block +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = 'insert java code'; +/// typeblock - Typing to add the block +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = 'insert python code'; From 9f314672ecc91d26d1122ce2834de66514734cb1 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Tue, 14 Jul 2015 10:30:33 -0400 Subject: [PATCH 07/84] Update Java generator to allow for specifying class and app names Override workspaceToCode so that the Java one automatically prepends the package/imports around the generated code. --- blockly_compressed.js | 8 ++-- core/block.js | 4 ++ generators/java.js | 100 ++++++++++++++++++++++++++++++++++++++---- java_compressed.js | 7 +-- 4 files changed, 103 insertions(+), 16 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 62ba0eec2d9..be3c7e5f09c 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1216,10 +1216,10 @@ Blockly.Block.prototype.appendStatementInput=function(a){return this.appendInput Blockly.Block.prototype.jsonInit=function(a){goog.asserts.assert(void 0==a.output||void 0==a.previousStatement,"Must not have both an output and a previousStatement.");this.setColour(a.colour);for(var b=0;void 0!==a["message"+b];)this.interpolate_(a["message"+b],a["args"+b]||[],a["lastDummyAlign"+b]),b++;void 0!==a.inputsInline&&this.setInputsInline(a.inputsInline);void 0!==a.output&&this.setOutput(!0,a.output);void 0!==a.previousStatement&&this.setPreviousStatement(!0,a.previousStatement);void 0!== a.nextStatement&&this.setNextStatement(!0,a.nextStatement);void 0!==a.tooltip&&this.setTooltip(a.tooltip);void 0!==a.helpUrl&&this.setHelpUrl(a.helpUrl)}; Blockly.Block.prototype.interpolate_=function(a,b,c){var d=Blockly.tokenizeInterpolation(a),e=[],f=0;a=[];for(var g=0;g} imports Array of libraries to add to the list * @return {string} code Java code for importing all libraries referenced */ -Blockly.Java.getImports = function(imports) { +Blockly.Java.getImports = function() { // Add any of the imports that the top level code needs - if (imports) { - for(var i = 0; i < imports.length; i++) { - Blockly.Java.addImport(imports[i]); + if (this.ExtraImports_) { + for(var i = 0; i < this.ExtraImports_.length; i++) { + this.addImport(this.ExtraImports_[i]); } } - var keys = goog.object.getValues(Blockly.Java.imports_); + var keys = goog.object.getValues(this.imports_); goog.array.sort(keys); return (keys.join("\n")); }; +/** + * Set the base class (if any) for the generated Java code + * @param {string} baseclass Name of a base class this workspace is derived from + */ +Blockly.Java.setExtraImports = function(extraImports) { + this.ExtraImports_ = extraImports; +} + + +/* + * Save away the base class implementation so we can call it but override it + * so that we get to modify the generated code. + */ +Blockly.Java.workspaceToCode_ = Blockly.Java.workspaceToCode; +/** + * Generate code for all blocks in the workspace to the specified language. + * @param {Blockly.Workspace} workspace Workspace to generate code from. + * @param {string} parms Any extra parameters to pass to the lower level block + * @return {string} Generated code. + */ +Blockly.Java.workspaceToCode = function(workspace, parms) { + // Generate the code first to get all of the required imports calculated. + var code = this.workspaceToCode_(workspace,parms); + var finalcode = 'package ' + this.getPackage() + ';\n\n' + + this.getImports() + '\n\n' + + 'public class ' + this.getAppName(); + if (this.getBaseclass()) { + finalcode += ' extends ' + this.getBaseclass(); + } + finalcode += ' {\n\n' + + code + '\n' + + '}\n'; + return finalcode; +} /** * Initialise the database of variable names. * @param {!Blockly.Workspace} workspace Workspace to generate code from. diff --git a/java_compressed.js b/java_compressed.js index f2d5d42e8d5..0f951e38966 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -5,9 +5,10 @@ // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern"); Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; -Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.EXTRAINDENT="";Blockly.Java.VariableTypes_={};Blockly.Java.AppName_="MyApp";Blockly.Java.needImports_="javax.json.Json javax.json.JsonArray javax.json.JsonObject javax.json.JsonReader javax.json.stream.JsonParsingException java.io.IOException java.io.StringReader".split(" "); -Blockly.Java.SetAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a;console.log(this.AppName_+" --- <"+a+">")};Blockly.Java.GetAppName=function(){return this.AppName_};Blockly.Java.GetVariableType=function(a){(a=Blockly.Java.VariableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.addImport=function(a){a="import "+a+";";Blockly.Java.imports_[a]=a}; -Blockly.Java.getImports=function(a){if(a)for(var b=0;b")};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; +Blockly.Java.GetVariableType=function(a){(a=Blockly.Java.VariableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a Date: Tue, 14 Jul 2015 10:35:27 -0400 Subject: [PATCH 08/84] Correct default Package --- generators/java.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generators/java.js b/generators/java.js index f19309444ab..20443f0077d 100644 --- a/generators/java.js +++ b/generators/java.js @@ -109,11 +109,11 @@ Blockly.Java.AppName_ = 'MyApp'; /** * Default Name of the application for use by all generated classes */ -Blockly.Java.Package_ = ''; +Blockly.Java.Package_ = 'demo'; /** * Base class (if any) for the generated Java code */ -Blockly.Java.Baseclass_ = 'demo'; +Blockly.Java.Baseclass_ = ''; /** * List of libraries used globally by the generated java code. These are * Processed by Blockly.Java.addImport From 7d882416845f3d6174dcf658390a542c71ca1299 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Wed, 15 Jul 2015 21:23:38 -0400 Subject: [PATCH 09/84] First pass of Java Unit tests Implemented many java functions to pass unit tests Corrected code generation for lists_create_with utilizing the new mutator for lists Fixed procedures_param_type mutator string to work with the new JSON templates --- blocks/text.js | 10 ++ blocks_compressed.js | 3 +- core/generator.js | 2 +- dart_compressed.js | 4 +- generators/dart/lists.js | 4 +- generators/dart/text.js | 8 +- generators/java.js | 27 +++-- generators/java/colour.js | 2 +- generators/java/lists.js | 76 +++++++------- generators/java/loops.js | 35 ++++++- generators/java/math.js | 183 +++++++++++++++++--------------- generators/java/procedures.js | 12 ++- generators/java/text.js | 186 ++++++++++++++++++++++----------- generators/javascript/lists.js | 4 +- generators/javascript/text.js | 10 +- generators/php/lists.js | 4 +- generators/php/text.js | 10 +- generators/python/lists.js | 4 +- generators/python/text.js | 8 +- java_compressed.js | 97 ++++++++--------- javascript_compressed.js | 10 +- msg/js/ar.js | 4 +- msg/js/az.js | 4 +- msg/js/bcc.js | 4 +- msg/js/be-tarask.js | 4 +- msg/js/bg.js | 4 +- msg/js/bn.js | 4 +- msg/js/br.js | 4 +- msg/js/ca.js | 4 +- msg/js/cs.js | 4 +- msg/js/da.js | 4 +- msg/js/de.js | 4 +- msg/js/el.js | 4 +- msg/js/en.js | 4 +- msg/js/es.js | 4 +- msg/js/fa.js | 4 +- msg/js/fi.js | 4 +- msg/js/fr.js | 4 +- msg/js/he.js | 4 +- msg/js/hi.js | 4 +- msg/js/hrx.js | 4 +- msg/js/hu.js | 4 +- msg/js/ia.js | 4 +- msg/js/id.js | 4 +- msg/js/is.js | 4 +- msg/js/it.js | 4 +- msg/js/ja.js | 4 +- msg/js/ko.js | 4 +- msg/js/lb.js | 4 +- msg/js/lrc.js | 4 +- msg/js/lt.js | 4 +- msg/js/mk.js | 4 +- msg/js/ms.js | 4 +- msg/js/nb.js | 4 +- msg/js/nl.js | 4 +- msg/js/oc.js | 4 +- msg/js/pl.js | 4 +- msg/js/pms.js | 4 +- msg/js/pt-br.js | 4 +- msg/js/pt.js | 4 +- msg/js/ro.js | 4 +- msg/js/ru.js | 4 +- msg/js/sc.js | 4 +- msg/js/sk.js | 4 +- msg/js/sq.js | 4 +- msg/js/sr.js | 4 +- msg/js/sv.js | 4 +- msg/js/ta.js | 4 +- msg/js/th.js | 4 +- msg/js/tl.js | 4 +- msg/js/tlh.js | 4 +- msg/js/tr.js | 4 +- msg/js/uk.js | 4 +- msg/js/vi.js | 4 +- msg/js/zh-hans.js | 4 +- msg/js/zh-hant.js | 4 +- msg/json/en.json | 6 +- msg/messages.js | 4 +- php_compressed.js | 6 +- python_compressed.js | 10 +- 80 files changed, 540 insertions(+), 405 deletions(-) diff --git a/blocks/text.js b/blocks/text.js index 3dc26cba73a..a03fb7667cc 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -129,6 +129,16 @@ Blockly.Blocks['text_append'] = { getVars: function() { return [this.getFieldValue('VAR')]; }, + /** + * Return all types of variables referenced by this block. + * @return {!Array.} List of variable names with their types. + * @this Blockly.Block + */ + getVarsTypes: function() { + var vartypes = {}; + vartypes[this.getFieldValue('VAR')] = ['String']; + return vartypes; + }, /** * Notification that a variable is renaming. * If the name matches one of this block's variables, rename it. diff --git a/blocks_compressed.js b/blocks_compressed.js index 5c51ed1da68..c14c6acf5bf 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -133,7 +133,8 @@ Blockly.Blocks.text={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_TEXT_HELPU Blockly.Blocks.text_join={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_JOIN_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.setOutput(!0,"String");this.appendAddSubGroup(Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH,"items",null,"-IGNORED-");this.itemCount_.items=2;this.updateShape_()},getAddSubName:function(a,b){return"ADD"+b},appendAddSubEmptyInput:function(a,b){return this.appendDummyInput(a).appendField(this.newQuote_(!0)).appendField(this.newQuote_(!1))},newQuote_:Blockly.Blocks.text.newQuote_,typeblock:[{entry:Blockly.Msg.TEXT_JOIN_WITH_TYPEBLOCK, mutatorAttributes:{items:2}}]}; Blockly.Blocks.text_append={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_APPEND_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendValueInput("TEXT").appendField(Blockly.Msg.TEXT_APPEND_TO).appendField(new Blockly.FieldVariable(Blockly.Msg.TEXT_APPEND_VARIABLE),"VAR").appendField(Blockly.Msg.TEXT_APPEND_APPENDTEXT);this.setPreviousStatement(!0);this.setNextStatement(!0);var a=this;this.setTooltip(function(){return Blockly.Msg.TEXT_APPEND_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})}, -getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},typeblock:Blockly.Msg.TEXT_APPEND_TYPEBLOCK};Blockly.Blocks.text_length={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_LENGTH_TOOLTIP,helpUrl:Blockly.Msg.TEXT_LENGTH_HELPURL})},typeblock:Blockly.Msg.TEXT_LENGTH_TYPEBLOCK}; +getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["String"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},typeblock:Blockly.Msg.TEXT_APPEND_TYPEBLOCK}; +Blockly.Blocks.text_length={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_LENGTH_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_LENGTH_TOOLTIP,helpUrl:Blockly.Msg.TEXT_LENGTH_HELPURL})},typeblock:Blockly.Msg.TEXT_LENGTH_TYPEBLOCK}; Blockly.Blocks.text_isEmpty={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_ISEMPTY_TITLE,args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_ISEMPTY_TOOLTIP,helpUrl:Blockly.Msg.TEXT_ISEMPTY_HELPURL})},typeblock:Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK}; Blockly.Blocks.text_contains={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_CONTAINS_INPUT,args0:[{type:"input_value",name:"TEXT",check:"String"},{type:"input_value",name:"PIECE",check:"String"}],output:"Boolean",colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.getToolTipString("text_contains_tooltip"),helpUrl:Blockly.getUrlString("text_contains_url")})},typeblock:Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK}; Blockly.Blocks.text_indexOf={init:function(){var a=[[Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST,"FIRST"],[Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.TEXT_INDEXOF_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.setOutput(!0,"Number");this.appendValueInput("VALUE").setCheck("String").appendField(Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT);this.appendValueInput("FIND").setCheck("String").appendField(new Blockly.FieldDropdown(a),"END");Blockly.Msg.TEXT_INDEXOF_TAIL&&this.appendDummyInput().appendField(Blockly.Msg.TEXT_INDEXOF_TAIL); diff --git a/core/generator.js b/core/generator.js index 83711dc205e..78e0c29fbb7 100644 --- a/core/generator.js +++ b/core/generator.js @@ -326,7 +326,7 @@ Blockly.Generator.prototype.FUNCTION_NAME_PLACEHOLDER_ = '{leCUI8hutHZI4480Dc}'; * The code gets output when Blockly.Generator.finish() is called. * * @param {string} desiredName The desired name of the function (e.g., isPrime). - * @param {!Array.} code A list of Python statements. + * @param {!Array.} code A list of statements. * @return {string} The actual name of the new function. This may differ * from desiredName if the former has already been taken by the user. * @private diff --git a/dart_compressed.js b/dart_compressed.js index 1e1fa0ad5e3..9951e5cfd95 100644 --- a/dart_compressed.js +++ b/dart_compressed.js @@ -19,7 +19,7 @@ Blockly.Dart.colour_blend=function(a){var b=Blockly.Dart.valueToCode(a,"COLOUR1" " int r1 = int.parse('0x${c1.substring(1, 3)}');"," int g1 = int.parse('0x${c1.substring(3, 5)}');"," int b1 = int.parse('0x${c1.substring(5, 7)}');"," int r2 = int.parse('0x${c2.substring(1, 3)}');"," int g2 = int.parse('0x${c2.substring(3, 5)}');"," int b2 = int.parse('0x${c2.substring(5, 7)}');"," num rn = (r1 * (1 - ratio) + r2 * ratio).round();"," String rs = rn.toInt().toRadixString(16);"," num gn = (g1 * (1 - ratio) + g2 * ratio).round();"," String gs = gn.toInt().toRadixString(16);", " num bn = (b1 * (1 - ratio) + b2 * ratio).round();"," String bs = bn.toInt().toRadixString(16);"," rs = '0$rs';"," rs = rs.substring(rs.length - 2);"," gs = '0$gs';"," gs = gs.substring(gs.length - 2);"," bs = '0$bs';"," bs = bs.substring(bs.length - 2);"," return '#$rs$gs$bs';","}"])+"("+b+", "+c+", "+a+")",Blockly.Dart.ORDER_UNARY_POSTFIX]}; // Copyright 2014 Google Inc. Apache License 2.0 -Blockly.Dart.lists={};Blockly.Dart.addReservedWords("Math");Blockly.Dart.lists_create_empty=function(a){return["[]",Blockly.Dart.ORDER_ATOMIC]};Blockly.Dart.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c result = new LinkedList<>();', + ' for(int x = 0; x < torepeat; x++) {', + ' result.add(item);', + ' }', + ' return result;', + '}']); + var code = functionName + '(' + argument0 + ',' + argument1 + ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; Blockly.Java['lists_length'] = function(block) { // List length. var argument0 = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_NONE) || '[]'; - return ['len(' + argument0 + ')', Blockly.Java.ORDER_FUNCTION_CALL]; + return [argument0 + '.size()', Blockly.Java.ORDER_FUNCTION_CALL]; }; Blockly.Java['lists_isEmpty'] = function(block) { // Is the list empty? var argument0 = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_NONE) || '[]'; - var code = 'not len(' + argument0 + ')'; + var code = argument0 + '.size() == 0'; return [code, Blockly.Java.ORDER_LOGICAL_NOT]; }; Blockly.Java['lists_indexOf'] = function(block) { // Find an item in the list. + var operator = block.getFieldValue('END') == 'FIRST' ? + 'indexOf' : 'lastIndexOf'; var argument0 = Blockly.Java.valueToCode(block, 'FIND', Blockly.Java.ORDER_NONE) || '[]'; var argument1 = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_MEMBER) || '\'\''; - var code; - if (block.getFieldValue('END') == 'FIRST') { - var functionName = Blockly.Java.provideFunction_( - 'first_index', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList, elem):', - ' try: theIndex = myList.index(elem) + 1', - ' except: theIndex = 0', - ' return theIndex']); - code = functionName + '(' + argument1 + ', ' + argument0 + ')'; - return [code, Blockly.Java.ORDER_FUNCTION_CALL]; - } else { - var functionName = Blockly.Java.provideFunction_( - 'last_index', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList, elem):', - ' try: theIndex = len(myList) - myList[::-1].index(elem)', - ' except: theIndex = 0', - ' return theIndex']); - code = functionName + '(' + argument1 + ', ' + argument0 + ')'; - return [code, Blockly.Java.ORDER_FUNCTION_CALL]; - } + var code = argument1 + '.' + operator + '(' + argument0 + ') + 1'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; Blockly.Java['lists_getIndex'] = function(block) { @@ -139,10 +135,10 @@ Blockly.Java['lists_getIndex'] = function(block) { at = parseInt(at, 10) - 1; } else { // If the index is dynamic, decrement it in code. - at = 'int(' + at + ' - 1)'; + at = '(' + at + ' - 1)'; } if (mode == 'GET') { - var code = list + '.getJsonElement(' + at + ')'; + var code = list + '.get(' + at + ')'; return [code, Blockly.Java.ORDER_MEMBER]; } else { var code = list + '.pop(' + at + ')'; @@ -165,21 +161,23 @@ Blockly.Java['lists_getIndex'] = function(block) { } } } else if (where == 'RANDOM') { - Blockly.Java.definitions_['import_random'] = 'import random'; + Blockly.Java.addImport('java.lang.Math'); if (mode == 'GET') { - code = 'random.choice(' + list + ')'; + code = list +'.get(Math.random() * ' + list + '.size())'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } else { var functionName = Blockly.Java.provideFunction_( 'lists_remove_random_item', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList):', - ' x = int(random.random() * len(myList))', - ' return myList.pop(x)']); + ['public static Object ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(LinkedList myList) {', + ' int x = (int)(Math.random() * myList.size());', + ' return myList.remove(x);', + '}']); code = functionName + '(' + list + ')'; if (mode == 'GET_REMOVE') { return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } else if (mode == 'REMOVE') { - return code + '\n'; + return code + ';\n'; } } } @@ -219,7 +217,7 @@ Blockly.Java['lists_setIndex'] = function(block) { if (mode == 'SET') { return list + '[-1] = ' + value + '\n'; } else if (mode == 'INSERT') { - return list + '.append(' + value + ')\n'; + return list + '.add(' + value + ');\n'; } } else if (where == 'FROM_START') { // Blockly uses one-based indicies. @@ -242,11 +240,11 @@ Blockly.Java['lists_setIndex'] = function(block) { return list + '.insert(-' + at + ', ' + value + ')\n'; } } else if (where == 'RANDOM') { - Blockly.Java.definitions_['import_random'] = 'import random'; + Blockly.Java.addImport('java.util.Random'); var code = cacheList(); var xVar = Blockly.Java.variableDB_.getDistinctName( 'tmp_x', Blockly.Variables.NAME_TYPE); - code += xVar + ' = int(random.random() * len(' + list + '))\n'; + code += xVar + ' = int(random.random() * ' + list + '.size())\n'; if (mode == 'SET') { code += list + '[' + xVar + '] = ' + value + '\n'; return code; diff --git a/generators/java/loops.js b/generators/java/loops.js index 1b52eeedaf5..25347f33fea 100644 --- a/generators/java/loops.js +++ b/generators/java/loops.js @@ -126,10 +126,37 @@ Blockly.Java['controls_for'] = function(block) { variable0 + direction + argument1 + '; ' + variable0 + doincrement + ')'; } else { - code += 'for (' + variable0 + ' = ' + argument0 + '; ' + - variable0 + '<=' + argument1 + '; ' + - variable0 + ' += ' + increment + ')'; - + // Cache non-trivial values to variables to prevent repeated look-ups. + var startVar = argument0; + if (!argument0.match(/^\w+$/) && !Blockly.isNumber(argument0)) { + startVar = Blockly.Java.variableDB_.getDistinctName( + variable0 + '_start', Blockly.Variables.NAME_TYPE); + code += 'double ' + startVar + ' = ' + argument0 + ';\n'; + } + var endVar = argument1; + if (!argument1.match(/^\w+$/) && !Blockly.isNumber(argument1)) { + var endVar = Blockly.Java.variableDB_.getDistinctName( + variable0 + '_end', Blockly.Variables.NAME_TYPE); + code += 'double ' + endVar + ' = ' + argument1 + ';\n'; + } + // Determine loop direction at start, in case one of the bounds + // changes during loop execution. + var incVar = Blockly.Java.variableDB_.getDistinctName( + variable0 + '_inc', Blockly.Variables.NAME_TYPE); + code += 'double ' + incVar + ' = '; + if (Blockly.isNumber(increment)) { + code += Math.abs(increment) + ';\n'; + } else { + code += 'Math.abs(' + increment + ');\n'; + } + code += 'if (' + startVar + ' > ' + endVar + ') {\n'; + code += Blockly.Java.INDENT + incVar + ' = -' + incVar + ';\n'; + code += '}\n'; + code += 'for (' + variable0 + ' = ' + startVar + ';\n' + + ' ' + incVar + ' >= 0 ? ' + + variable0 + ' <= ' + endVar + ' : ' + + variable0 + ' >= ' + endVar + ';\n' + + ' ' + variable0 + ' += ' + incVar + ')'; } code += ' {\n' + branch + diff --git a/generators/java/math.js b/generators/java/math.js index 25de2622bb6..a057c2d5f99 100644 --- a/generators/java/math.js +++ b/generators/java/math.js @@ -54,7 +54,13 @@ Blockly.Java['math_arithmetic'] = function(block) { var order = tuple[1]; var argument0 = Blockly.Java.valueToCode(block, 'A', order) || '0'; var argument1 = Blockly.Java.valueToCode(block, 'B', order) || '0'; - var code = argument0 + operator + argument1; + var code = ''; + if (operator === ' ** ') { + Blockly.Java.addImport('java.lang.Math'); + code = 'Math.pow(' + argument0 + ', ' + argument1 + ')'; + } else { + code = argument0 + operator + argument1; + } return [code, order]; // In case of 'DIVIDE', division between integers returns different results // in Java 2 and 3. However, is not an issue since Blockly does not @@ -74,7 +80,8 @@ Blockly.Java['math_single'] = function(block) { Blockly.Java.ORDER_UNARY_SIGN) || '0'; return ['-' + code, Blockly.Java.ORDER_UNARY_SIGN]; } - Blockly.Java.definitions_['import_math'] = 'import math'; + Blockly.Java.addImport('java.lang.Math'); + if (operator == 'SIN' || operator == 'COS' || operator == 'TAN') { arg = Blockly.Java.valueToCode(block, 'NUM', Blockly.Java.ORDER_MULTIPLICATIVE) || '0'; @@ -86,7 +93,7 @@ Blockly.Java['math_single'] = function(block) { // wrapping the code. switch (operator) { case 'ABS': - code = 'Math.fabs(' + arg + ')'; + code = 'Math.abs(' + arg + ')'; break; case 'ROOT': code = 'Math.sqrt(' + arg + ')'; @@ -104,7 +111,7 @@ Blockly.Java['math_single'] = function(block) { code = 'Math.pow(10,' + arg + ')'; break; case 'ROUND': - code = 'round(' + arg + ')'; + code = 'Math.round(' + arg + ')'; break; case 'ROUNDUP': code = 'Math.ceil(' + arg + ')'; @@ -113,13 +120,13 @@ Blockly.Java['math_single'] = function(block) { code = 'Math.floor(' + arg + ')'; break; case 'SIN': - code = 'Math.sin(' + arg + ' / 180.0 * Math.pi)'; + code = 'Math.sin(' + arg + ' / 180.0 * Math.PI)'; break; case 'COS': - code = 'Math.cos(' + arg + ' / 180.0 * Math.pi)'; + code = 'Math.cos(' + arg + ' / 180.0 * Math.PI)'; break; case 'TAN': - code = 'Math.tan(' + arg + ' / 180.0 * Math.pi)'; + code = 'Math.tan(' + arg + ' / 180.0 * Math.PI)'; break; } if (code) { @@ -129,13 +136,13 @@ Blockly.Java['math_single'] = function(block) { // wrapping the code. switch (operator) { case 'ASIN': - code = 'Math.asin(' + arg + ') / Math.pi * 180'; + code = 'Math.asin(' + arg + ') / Math.PI * 180'; break; case 'ACOS': - code = 'Math.acos(' + arg + ') / Math.pi * 180'; + code = 'Math.acos(' + arg + ') / Math.PI * 180'; break; case 'ATAN': - code = 'Math.atan(' + arg + ') / Math.pi * 180'; + code = 'Math.atan(' + arg + ') / Math.PI * 180'; break; default: throw 'Unknown math operator: ' + operator; @@ -146,17 +153,17 @@ Blockly.Java['math_single'] = function(block) { Blockly.Java['math_constant'] = function(block) { // Constants: PI, E, the Golden Ratio, sqrt(2), 1/sqrt(2), INFINITY. var CONSTANTS = { - 'PI': ['Math.pi', Blockly.Java.ORDER_MEMBER], - 'E': ['Math.e', Blockly.Java.ORDER_MEMBER], + 'PI': ['Math.PI', Blockly.Java.ORDER_MEMBER], + 'E': ['Math.E', Blockly.Java.ORDER_MEMBER], 'GOLDEN_RATIO': ['(1 + Math.sqrt(5)) / 2', Blockly.Java.ORDER_MULTIPLICATIVE], 'SQRT2': ['Math.sqrt(2)', Blockly.Java.ORDER_MEMBER], 'SQRT1_2': ['Math.sqrt(1.0 / 2)', Blockly.Java.ORDER_MEMBER], - 'INFINITY': ['float(\'inf\')', Blockly.Java.ORDER_ATOMIC] + 'INFINITY': ['Double.POSITIVE_INFINITY', Blockly.Java.ORDER_ATOMIC] }; var constant = block.getFieldValue('CONSTANT'); if (constant != 'INFINITY') { - Blockly.Java.definitions_['import_math'] = 'import math'; + Blockly.Java.addImport('java.lang.Math'); } return CONSTANTS[constant]; }; @@ -169,28 +176,38 @@ Blockly.Java['math_number_property'] = function(block) { var dropdown_property = block.getFieldValue('PROPERTY'); var code; if (dropdown_property == 'PRIME') { - Blockly.Java.definitions_['import_math'] = 'import math'; + Blockly.Java.addImport('java.lang.Math'); + var functionName = Blockly.Java.provideFunction_( 'math_isPrime', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(n):', - ' # https://en.wikipedia.org/wiki/Primality_test#Naive_methods', - ' # If n is not a number but a string, try parsing it.', - ' if type(n) not in (int, float, long):', - ' try:', - ' n = float(n)', - ' except:', - ' return False', - ' if n == 2 or n == 3:', - ' return True', - ' # False if n is negative, is 1, or not whole,' + + ['public static boolean ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(Object d) {', + ' // https://en.wikipedia.org/wiki/Primality_test#Naive_methods', + ' // If n is not a number but a string, try parsing it.', + ' double n;', + ' if (d instanceof Double) {', + ' n = (Double)d;', + ' } else if (d instanceof Integer) {', + ' n = (Integer)d;', + ' } else {', + ' return false;', + ' }', + ' if (n == 2 || n == 3) {', + ' return true;', + ' }', + ' // False if n is negative, is 1, or not whole,' + ' or if n is divisible by 2 or 3.', - ' if n <= 1 or n % 1 != 0 or n % 2 == 0 or n % 3 == 0:', - ' return False', - ' # Check all the numbers of form 6k +/- 1, up to sqrt(n).', - ' for x in range(6, int(Math.sqrt(n)) + 2, 6):', - ' if n % (x - 1) == 0 or n % (x + 1) == 0:', - ' return False', - ' return True']); + ' if ((n <= 1) || (n % 1 != 0) || (n % 2 == 0) || (n % 3 == 0)) {', + ' return false;', + ' }', + ' // Check all the numbers of form 6k +/- 1, up to sqrt(n).', + ' for (int x = 6; x <= Math.sqrt(n) + 1; x += 6) {', + ' if (n % (x - 1) == 0 || n % (x + 1) == 0) {', + ' return false;', + ' }', + ' }', + ' return true;', + '}']); code = functionName + '(' + number_to_check + ')'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } @@ -229,8 +246,7 @@ Blockly.Java['math_change'] = function(block) { Blockly.Java.ORDER_ADDITIVE) || '0'; var varName = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE); - return varName + ' = (' + varName + ' if type(' + varName + - ') in (int, float, long) else 0) + ' + argument0 + '\n'; + return varName + ' = ' + varName + ' + ' + argument0 + ';\n'; }; // Rounding functions have a single operand. @@ -259,10 +275,11 @@ Blockly.Java['math_on_list'] = function(block) { 'math_mean', // This operation excludes null and values that aren't int or float:', // math_mean([null, null, "aString", 1, 9]) == 5.0.', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList):', - ' localList = [e for e in myList if type(e) in (int, float, long)]', - ' if not localList: return', - ' return float(sum(localList)) / len(localList)']); + ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(Object myList) {', + '// TODO: Implement this function', + ' return 0;', + '}']); code = functionName + '(' + list + ')'; break; case 'MEDIAN': @@ -270,15 +287,11 @@ Blockly.Java['math_on_list'] = function(block) { 'math_median', // This operation excludes null values: // math_median([null, null, 1, 3]) == 2.0. - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(myList):', - ' localList = sorted([e for e in myList ' + - 'if type(e) in (int, float, long)])', - ' if not localList: return', - ' if len(localList) % 2 == 0:', - ' return (localList[len(localList) / 2 - 1] + ' + - 'localList[len(localList) / 2]) / 2.0', - ' else:', - ' return localList[(len(localList) - 1) / 2]']); + ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(Object myList) {', + '// TODO: Implement this function', + ' return 0;', + '}']); code = functionName + '(' + list + ')'; break; case 'MODE': @@ -287,43 +300,36 @@ Blockly.Java['math_on_list'] = function(block) { // As a list of numbers can contain more than one mode, // the returned result is provided as an array. // Mode of [3, 'x', 'x', 1, 1, 2, '3'] -> ['x', 1]. - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(some_list):', - ' modes = []', - ' # Using a lists of [item, count] to keep count rather than dict', - ' # to avoid "unhashable" errors when the counted item is ' + - 'itself a list or dict.', - ' counts = []', - ' maxCount = 1', - ' for item in some_list:', - ' found = False', - ' for count in counts:', - ' if count[0] == item:', - ' count[1] += 1', - ' maxCount = max(maxCount, count[1])', - ' found = True', - ' if not found:', - ' counts.append([item, 1])', - ' for counted_item, item_count in counts:', - ' if item_count == maxCount:', - ' modes.append(counted_item)', - ' return modes']); + ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(Object myList) {', + '// TODO: Implement this function', + ' return 0;', + '}']); code = functionName + '(' + list + ')'; break; case 'STD_DEV': - Blockly.Java.definitions_['import_math'] = 'import math'; + Blockly.Java.addImport('java.lang.Math'); var functionName = Blockly.Java.provideFunction_( 'math_standard_deviation', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(numbers):', - ' n = len(numbers)', - ' if n == 0: return', - ' mean = float(sum(numbers)) / n', - ' variance = sum((x - mean) ** 2 for x in numbers) / n', - ' return Math.sqrt(variance)']); + ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(Object myList) {', + '// TODO: Implement this function', + ' return 0;', + '}']); code = functionName + '(' + list + ')'; break; case 'RANDOM': - Blockly.Java.definitions_['import_random'] = 'import random'; - code = 'random.choice(' + list + ')'; + Blockly.Java.addImport('java.lang.Math'); + var functionName = Blockly.Java.provideFunction_( + 'math_random_list', + [ 'public static Object ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(List list) {', + ' int x = (int)(Math.floor(Math.random() * list.size()));', + ' return list.get(x);', + '}']); + list = Blockly.Java.valueToCode(block, 'LIST', + Blockly.Java.ORDER_NONE) || '[]'; + code = functionName + '(' + list + ')'; break; default: throw 'Unknown operator: ' + func; @@ -354,6 +360,7 @@ Blockly.Java['math_format_as_decimal'] = function(block) { }; Blockly.Java['math_constrain'] = function(block) { + Blockly.Java.addImport('java.lang.Math'); // Constrain a number between two limits. var argument0 = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_NONE) || '0'; @@ -361,24 +368,36 @@ Blockly.Java['math_constrain'] = function(block) { Blockly.Java.ORDER_NONE) || '0'; var argument2 = Blockly.Java.valueToCode(block, 'HIGH', Blockly.Java.ORDER_NONE) || 'float(\'inf\')'; - var code = 'min(max(' + argument0 + ', ' + argument1 + '), ' + + var code = 'Math.min(Math.max(' + argument0 + ', ' + argument1 + '), ' + argument2 + ')'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; Blockly.Java['math_random_int'] = function(block) { // Random integer between [X] and [Y]. - Blockly.Java.definitions_['import_random'] = 'import random'; + Blockly.Java.addImport('java.lang.Math'); var argument0 = Blockly.Java.valueToCode(block, 'FROM', Blockly.Java.ORDER_NONE) || '0'; var argument1 = Blockly.Java.valueToCode(block, 'TO', Blockly.Java.ORDER_NONE) || '0'; - var code = 'random.randint(' + argument0 + ', ' + argument1 + ')'; + var functionName = Blockly.Java.provideFunction_( + 'math_random_int', + [ 'public static int ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(int a, int b) {', + ' if (a > b) {', + ' // Swap a and b to ensure a is smaller.', + ' int c = a;', + ' a = b;', + ' b = c;', + ' }', + ' return (int)Math.floor(Math.random() * (b - a + 1) + a);', + '}']); + var code = functionName + '(' + argument0 + ', ' + argument1 + ')'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; Blockly.Java['math_random_float'] = function(block) { // Random fraction between 0 and 1. - Blockly.Java.definitions_['import_random'] = 'import random'; - return ['random.random()', Blockly.Java.ORDER_FUNCTION_CALL]; + Blockly.Java.addImport('java.lang.Math'); + return ['Math.random()', Blockly.Java.ORDER_FUNCTION_CALL]; }; diff --git a/generators/java/procedures.js b/generators/java/procedures.js index 27795bb2f0f..dbf6425912e 100644 --- a/generators/java/procedures.js +++ b/generators/java/procedures.js @@ -52,10 +52,12 @@ Blockly.Java['procedures_defreturn'] = function(block) { } var args = []; for (var x = 0; x < block.arguments_.length; x++) { - args[x] = Blockly.Java.variableDB_.getName(block.arguments_[x]['name'], - Blockly.Variables.NAME_TYPE); + var type = Blockly.Java.GetVariableType(block.arguments_[x]['name']); + args[x] = type + ' ' + + Blockly.Java.variableDB_.getName(block.arguments_[x]['name'], + Blockly.Variables.NAME_TYPE); } - var code = 'public ' + funcName + '(' + args.join(', ') + '){\n' + + var code = 'public void ' + funcName + '(' + args.join(', ') + '){\n' + branch + returnValue + "}"; code = Blockly.Java.scrub_(block, code); Blockly.Java.definitions_[funcName] = code; @@ -76,7 +78,7 @@ Blockly.Java['procedures_callreturn'] = function(block) { args[x] = Blockly.Java.valueToCode(block, 'ARG' + x, Blockly.Java.ORDER_NONE) || 'null'; } - var code = funcName + '(' + args.join(', ') + ')'; + var code = 'this.' + funcName + '(' + args.join(', ') + ')'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; @@ -89,7 +91,7 @@ Blockly.Java['procedures_callnoreturn'] = function(block) { args[x] = Blockly.Java.valueToCode(block, 'ARG' + x, Blockly.Java.ORDER_NONE) || 'null'; } - var code = funcName + '(' + args.join(', ') + ');\n'; + var code = 'this.' + funcName + '(' + args.join(', ') + ');\n'; return code; }; diff --git a/generators/java/text.js b/generators/java/text.js index d289bcb5475..e909243d674 100644 --- a/generators/java/text.js +++ b/generators/java/text.js @@ -35,34 +35,62 @@ Blockly.Java['text'] = function(block) { return [code, Blockly.Java.ORDER_ATOMIC]; }; +Blockly.Java['text'].defineToString_ = function() { + Blockly.Java.addImport('java.text.DecimalFormat'); + Blockly.Java.addImport('java.text.NumberFormat'); + + var functionName = Blockly.Java.provideFunction_( + 'blocklyToString', + [ 'public static String blocklyToString(Object object) {', + ' String result;', + ' if (object instanceof String) {', + ' result = (String) object;', + ' } else {', + ' // must be a number', + ' // might be a double', + ' try {', + ' Double d = (double) object;', + ' // it was a double, so keep going', + ' NumberFormat formatter = new DecimalFormat("#.#####");', + ' result = formatter.format(d);', + '', + ' } catch (Exception ex) {', + ' // not a double, see if it is an integer', + ' try {', + ' Integer i = (int) object;', + ' // format should be number with a decimal point', + ' result = i.toString();', + ' } catch (Exception ex2) {', + ' // not a double or integer', + ' result = "UNKNOWN";', + ' }', + ' }', + ' }', + '', + ' return result;', + '}' + ]); + return functionName; +}; + Blockly.Java['text_join'] = function(block) { // Create a string made up of any number of elements of any type. - //Should we allow joining by '-' or ',' or any other characters? + // Should we allow joining by '-' or ',' or any other characters? var code; - if (block.itemCount_ == 0) { - return ['\'\'', Blockly.Java.ORDER_ATOMIC]; - } else if (block.itemCount_ == 1) { - var argument0 = Blockly.Java.valueToCode(block, 'ADD0', - Blockly.Java.ORDER_NONE) || '\'\''; - code = 'str(' + argument0 + ')'; - return [code, Blockly.Java.ORDER_FUNCTION_CALL]; - } else if (block.itemCount_ == 2) { - var argument0 = Blockly.Java.valueToCode(block, 'ADD0', - Blockly.Java.ORDER_NONE) || '\'\''; - var argument1 = Blockly.Java.valueToCode(block, 'ADD1', - Blockly.Java.ORDER_NONE) || '\'\''; - var code = 'str(' + argument0 + ') + str(' + argument1 + ')'; - return [code, Blockly.Java.ORDER_UNARY_SIGN]; + if (block.itemCount_['items'] == 0) { + return ['""', Blockly.Java.ORDER_ATOMIC]; } else { - var code = []; - for (var n = 0; n < block.itemCount_; n++) { - code[n] = Blockly.Java.valueToCode(block, 'ADD' + n, - Blockly.Java.ORDER_NONE) || '\'\''; + var code = ''; + var extra = ''; + var functionName = Blockly.Java['text'].defineToString_(); + for (var n = 0; n < block.itemCount_['items']; n++) { + var item = Blockly.Java.valueToCode(block, 'ADD' + n, + Blockly.Java.ORDER_NONE); + if (item) { + code += extra + functionName + '(' + item + ')'; + extra = ' + '; + } } - var tempVar = Blockly.Java.variableDB_.getDistinctName('temp_value', - Blockly.Variables.NAME_TYPE); - code = '\'\'.join([str(' + tempVar + ') for ' + tempVar + ' in [' + - code.join(', ') + ']])'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } }; @@ -72,33 +100,40 @@ Blockly.Java['text_append'] = function(block) { var varName = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE); var argument0 = Blockly.Java.valueToCode(block, 'TEXT', - Blockly.Java.ORDER_NONE) || '\'\''; - return varName + ' = str(' + varName + ') + str(' + argument0 + ')\n'; + Blockly.Java.ORDER_NONE) || '""'; + // First we want to see if the input variable happens to be a non string type + var argument0Type = Blockly.Java.getValueType(block, 'TEXT'); + var functionName = Blockly.Java['text'].defineToString_(); + + // See if we need to convert the non-string to a string + return varName + ' = ' + varName + ' + ' + + functionName + '(' + argument0 + ');\n'; }; Blockly.Java['text_length'] = function(block) { // String length. var argument0 = Blockly.Java.valueToCode(block, 'VALUE', - Blockly.Java.ORDER_NONE) || '\'\''; - return ['len(' + argument0 + ')', Blockly.Java.ORDER_FUNCTION_CALL]; + Blockly.Java.ORDER_NONE) || '""'; + return [argument0 + '.length()', Blockly.Java.ORDER_FUNCTION_CALL]; }; Blockly.Java['text_isEmpty'] = function(block) { // Is the string null? var argument0 = Blockly.Java.valueToCode(block, 'VALUE', - Blockly.Java.ORDER_NONE) || '\'\''; - var code = 'not len(' + argument0 + ')'; + Blockly.Java.ORDER_NONE) || '""'; + var code = argument0 + '.isEmpty()'; return [code, Blockly.Java.ORDER_LOGICAL_NOT]; }; Blockly.Java['text_indexOf'] = function(block) { // Search the text for a substring. // Should we allow for non-case sensitive??? - var operator = block.getFieldValue('END') == 'FIRST' ? 'find' : 'rfind'; + var operator = block.getFieldValue('END') == 'FIRST' ? + 'indexOf' : 'lastIndexOf'; var argument0 = Blockly.Java.valueToCode(block, 'FIND', - Blockly.Java.ORDER_NONE) || '\'\''; + Blockly.Java.ORDER_NONE) || '""'; var argument1 = Blockly.Java.valueToCode(block, 'VALUE', - Blockly.Java.ORDER_MEMBER) || '\'\''; + Blockly.Java.ORDER_MEMBER) || '""'; var code = argument1 + '.' + operator + '(' + argument0 + ') + 1'; return [code, Blockly.Java.ORDER_MEMBER]; }; @@ -110,13 +145,13 @@ Blockly.Java['text_charAt'] = function(block) { var at = Blockly.Java.valueToCode(block, 'AT', Blockly.Java.ORDER_UNARY_SIGN) || '1'; var text = Blockly.Java.valueToCode(block, 'VALUE', - Blockly.Java.ORDER_MEMBER) || '\'\''; + Blockly.Java.ORDER_MEMBER) || '""'; switch (where) { case 'FIRST': - var code = text + '[0]'; + var code = text + '.charAt(0)'; return [code, Blockly.Java.ORDER_MEMBER]; case 'LAST': - var code = text + '[-1]'; + var code = text + '.charAt(' + text + '.length()-1)'; return [code, Blockly.Java.ORDER_MEMBER]; case 'FROM_START': // Blockly uses one-based indicies. @@ -127,18 +162,20 @@ Blockly.Java['text_charAt'] = function(block) { // If the index is dynamic, decrement it in code. at = 'int(' + at + ' - 1)'; } - var code = text + '[' + at + ']'; + var code = text + '.charAt(' + at + ')'; return [code, Blockly.Java.ORDER_MEMBER]; case 'FROM_END': - var code = text + '[-' + at + ']'; + var code = text + '.charAt(' + text + '.length()-' + at + ')'; return [code, Blockly.Java.ORDER_MEMBER]; case 'RANDOM': - Blockly.Java.definitions_['import_random'] = 'import random'; + Blockly.Java.addImport('java.lang.Math'); var functionName = Blockly.Java.provideFunction_( 'text_random_letter', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(text):', - ' x = int(random.random() * len(text))', - ' return text[x];']); + ['public static int ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(String text) {', + ' int x = (int)(Math.random() * text.length());', + ' return text.charAt(x);', + '}']); code = functionName + '(' + text + ')'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } @@ -148,7 +185,7 @@ Blockly.Java['text_charAt'] = function(block) { Blockly.Java['text_getSubstring'] = function(block) { // Get substring. var text = Blockly.Java.valueToCode(block, 'STRING', - Blockly.Java.ORDER_MEMBER) || '\'\''; + Blockly.Java.ORDER_MEMBER) || '""'; var where1 = block.getFieldValue('WHERE1'); var where2 = block.getFieldValue('WHERE2'); var at1 = Blockly.Java.valueToCode(block, 'AT1', @@ -156,7 +193,7 @@ Blockly.Java['text_getSubstring'] = function(block) { var at2 = Blockly.Java.valueToCode(block, 'AT2', Blockly.Java.ORDER_ADDITIVE) || '1'; if (where1 == 'FIRST' || (where1 == 'FROM_START' && at1 == '1')) { - at1 = ''; + at1 = '0'; } else if (where1 == 'FROM_START') { // Blockly uses one-based indicies. if (Blockly.isNumber(at1)) { @@ -164,13 +201,13 @@ Blockly.Java['text_getSubstring'] = function(block) { at1 = parseInt(at1, 10) - 1; } else { // If the index is dynamic, decrement it in code. - at1 = 'int(' + at1 + ' - 1)'; + at1 = '((int)' + at1 + ' - 1)'; } } else if (where1 == 'FROM_END') { if (Blockly.isNumber(at1)) { at1 = -parseInt(at1, 10); } else { - at1 = '-int(' + at1 + ')'; + at1 = '-((int)' + at1 + ')'; } } if (where2 == 'LAST' || (where2 == 'FROM_END' && at2 == '1')) { @@ -179,7 +216,7 @@ Blockly.Java['text_getSubstring'] = function(block) { if (Blockly.isNumber(at2)) { at2 = parseInt(at2, 10); } else { - at2 = 'int(' + at2 + ')'; + at2 = '((int)' + at2 + ')'; } } else if (where1 == 'FROM_END') { if (Blockly.isNumber(at2)) { @@ -191,38 +228,67 @@ Blockly.Java['text_getSubstring'] = function(block) { } else { // If the index is dynamic, increment it in code. // Add special case for -0. - Blockly.Java.definitions_['import_sys'] = 'import sys'; - at2 = 'int(1 - ' + at2 + ') or sys.maxsize'; +// Blockly.Java.definitions_['import_sys'] = 'import sys'; + at2 = '(1 - (int)' + at2 + ') or sys.maxsize'; } } - var code = text + '[' + at1 + ' : ' + at2 + ']'; + if (at2 !== '') { + at2 = ', ' + at2; + } + var code = text + '.substring(' + at1 + at2 + ')'; return [code, Blockly.Java.ORDER_MEMBER]; }; Blockly.Java['text_changeCase'] = function(block) { // Change capitalization. var OPERATORS = { - 'UPPERCASE': '.upper()', - 'LOWERCASE': '.lower()', - 'TITLECASE': '.title()' + 'UPPERCASE': '.toUpperCase()', + 'LOWERCASE': '.toLowerCase()', + 'TITLECASE': 'TITLECASE' }; var operator = OPERATORS[block.getFieldValue('CASE')]; var argument0 = Blockly.Java.valueToCode(block, 'TEXT', - Blockly.Java.ORDER_MEMBER) || '\'\''; - var code = argument0 + operator; + Blockly.Java.ORDER_MEMBER) || '""'; + var code = ''; + if (operator === 'TITLECASE') { + Blockly.Java.addImport('java.lang.StringBuilder'); + var functionName = Blockly.Java.provideFunction_( + 'toTitleCase', + [ 'public static String ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(String input) {', + ' StringBuilder titleCase = new StringBuilder();', + ' boolean nextTitleCase = true;', + '', + ' for (char c : input.toCharArray()) {', + ' if (Character.isSpaceChar(c)) {', + ' nextTitleCase = true;', + ' } else if (nextTitleCase) {', + ' c = Character.toTitleCase(c);', + ' nextTitleCase = false;', + ' }', + '', + ' titleCase.append(c);', + ' }', + '', + ' return titleCase.toString();', + '}']); + code = functionName + '(' + argument0 + ')'; + } else { + code = argument0 + operator; + } return [code, Blockly.Java.ORDER_MEMBER]; }; Blockly.Java['text_trim'] = function(block) { // Trim spaces. var OPERATORS = { - 'LEFT': '.lstrip()', - 'RIGHT': '.rstrip()', - 'BOTH': '.strip()' + 'LEFT': '.replaceAll("^\\\\s+", "")', + 'RIGHT': '.replaceAll("\\\\s+$", "")', + 'BOTH': '.trim()' }; var operator = OPERATORS[block.getFieldValue('MODE')]; var argument0 = Blockly.Java.valueToCode(block, 'TEXT', - Blockly.Java.ORDER_MEMBER) || '\'\''; + Blockly.Java.ORDER_MEMBER) || '""'; var code = argument0 + operator; return [code, Blockly.Java.ORDER_MEMBER]; }; @@ -230,7 +296,7 @@ Blockly.Java['text_trim'] = function(block) { Blockly.Java['text_print'] = function(block) { // Print statement. var argument0 = Blockly.Java.valueToCode(block, 'TEXT', - Blockly.Java.ORDER_NONE) || '\'\''; + Blockly.Java.ORDER_NONE) || '""'; return 'System.out.println(' + argument0 + '.toString());\n'; }; @@ -262,7 +328,7 @@ Blockly.Java['text_prompt_ext'] = function(block) { ' except NameError:', ' return input(msg)']); var msg = Blockly.Java.valueToCode(block, 'TEXT', - Blockly.Java.ORDER_NONE) || '\'\''; + Blockly.Java.ORDER_NONE) || '""'; var code = functionName + '(' + msg + ')'; var toNumber = block.getFieldValue('TYPE') == 'NUMBER'; if (toNumber) { diff --git a/generators/javascript/lists.js b/generators/javascript/lists.js index 564a8881642..dbb5cd8bf41 100644 --- a/generators/javascript/lists.js +++ b/generators/javascript/lists.js @@ -36,8 +36,8 @@ Blockly.JavaScript['lists_create_empty'] = function(block) { Blockly.JavaScript['lists_create_with'] = function(block) { // Create a list with any number of elements of any type. - var code = new Array(block.itemCount_); - for (var n = 0; n < block.itemCount_; n++) { + var code = new Array(block.itemCount_['items']); + for (var n = 0; n < block.itemCount_['items']; n++) { code[n] = Blockly.JavaScript.valueToCode(block, 'ADD' + n, Blockly.JavaScript.ORDER_COMMA) || 'null'; } diff --git a/generators/javascript/text.js b/generators/javascript/text.js index 7504f534fe2..988ee8f6435 100644 --- a/generators/javascript/text.js +++ b/generators/javascript/text.js @@ -38,14 +38,14 @@ Blockly.JavaScript['text'] = function(block) { Blockly.JavaScript['text_join'] = function(block) { // Create a string made up of any number of elements of any type. var code; - if (block.itemCount_ == 0) { + if (block.itemCount_['items'] == 0) { return ['\'\'', Blockly.JavaScript.ORDER_ATOMIC]; - } else if (block.itemCount_ == 1) { + } else if (block.itemCount_['items'] == 1) { var argument0 = Blockly.JavaScript.valueToCode(block, 'ADD0', Blockly.JavaScript.ORDER_NONE) || '\'\''; code = 'String(' + argument0 + ')'; return [code, Blockly.JavaScript.ORDER_FUNCTION_CALL]; - } else if (block.itemCount_ == 2) { + } else if (block.itemCount_['items'] == 2) { var argument0 = Blockly.JavaScript.valueToCode(block, 'ADD0', Blockly.JavaScript.ORDER_NONE) || '\'\''; var argument1 = Blockly.JavaScript.valueToCode(block, 'ADD1', @@ -53,8 +53,8 @@ Blockly.JavaScript['text_join'] = function(block) { code = 'String(' + argument0 + ') + String(' + argument1 + ')'; return [code, Blockly.JavaScript.ORDER_ADDITION]; } else { - code = new Array(block.itemCount_); - for (var n = 0; n < block.itemCount_; n++) { + code = new Array(block.itemCount_['items']); + for (var n = 0; n < block.itemCount_['items']; n++) { code[n] = Blockly.JavaScript.valueToCode(block, 'ADD' + n, Blockly.JavaScript.ORDER_COMMA) || '\'\''; } diff --git a/generators/php/lists.js b/generators/php/lists.js index 02e965e76c0..dd74871695d 100644 --- a/generators/php/lists.js +++ b/generators/php/lists.js @@ -36,8 +36,8 @@ Blockly.PHP['lists_create_empty'] = function(block) { Blockly.PHP['lists_create_with'] = function(block) { // Create a list with any number of elements of any type. - var code = new Array(block.itemCount_); - for (var n = 0; n < block.itemCount_; n++) { + var code = new Array(block.itemCount_['items']); + for (var n = 0; n < block.itemCount_['items']; n++) { code[n] = Blockly.PHP.valueToCode(block, 'ADD' + n, Blockly.PHP.ORDER_COMMA) || 'null'; } diff --git a/generators/php/text.js b/generators/php/text.js index d8fa96bc236..93f5862a4fb 100644 --- a/generators/php/text.js +++ b/generators/php/text.js @@ -38,14 +38,14 @@ Blockly.PHP['text'] = function(block) { Blockly.PHP['text_join'] = function(block) { // Create a string made up of any number of elements of any type. var code; - if (block.itemCount_ == 0) { + if (block.itemCount_['items'] == 0) { return ['\'\'', Blockly.PHP.ORDER_ATOMIC]; - } else if (block.itemCount_ == 1) { + } else if (block.itemCount_['items'] == 1) { var argument0 = Blockly.PHP.valueToCode(block, 'ADD0', Blockly.PHP.ORDER_NONE) || '\'\''; code = argument0; return [code, Blockly.PHP.ORDER_FUNCTION_CALL]; - } else if (block.itemCount_ == 2) { + } else if (block.itemCount_['items'] == 2) { var argument0 = Blockly.PHP.valueToCode(block, 'ADD0', Blockly.PHP.ORDER_NONE) || '\'\''; var argument1 = Blockly.PHP.valueToCode(block, 'ADD1', @@ -53,8 +53,8 @@ Blockly.PHP['text_join'] = function(block) { code = argument0 + ' . ' + argument1; return [code, Blockly.PHP.ORDER_ADDITION]; } else { - code = new Array(block.itemCount_); - for (var n = 0; n < block.itemCount_; n++) { + code = new Array(block.itemCount_['items']); + for (var n = 0; n < block.itemCount_['items']; n++) { code[n] = Blockly.PHP.valueToCode(block, 'ADD' + n, Blockly.PHP.ORDER_COMMA) || '\'\''; } diff --git a/generators/python/lists.js b/generators/python/lists.js index 09280184975..2fdd9c43086 100644 --- a/generators/python/lists.js +++ b/generators/python/lists.js @@ -36,8 +36,8 @@ Blockly.Python['lists_create_empty'] = function(block) { Blockly.Python['lists_create_with'] = function(block) { // Create a list with any number of elements of any type. - var code = new Array(block.itemCount_); - for (var n = 0; n < block.itemCount_; n++) { + var code = new Array(block.itemCount_['items']); + for (var n = 0; n < block.itemCount_['items']; n++) { code[n] = Blockly.Python.valueToCode(block, 'ADD' + n, Blockly.Python.ORDER_NONE) || 'None'; } diff --git a/generators/python/text.js b/generators/python/text.js index 3bae80526ed..cc079ee0593 100644 --- a/generators/python/text.js +++ b/generators/python/text.js @@ -39,14 +39,14 @@ Blockly.Python['text_join'] = function(block) { // Create a string made up of any number of elements of any type. //Should we allow joining by '-' or ',' or any other characters? var code; - if (block.itemCount_ == 0) { + if (block.itemCount_['items'] == 0) { return ['\'\'', Blockly.Python.ORDER_ATOMIC]; - } else if (block.itemCount_ == 1) { + } else if (block.itemCount_['items'] == 1) { var argument0 = Blockly.Python.valueToCode(block, 'ADD0', Blockly.Python.ORDER_NONE) || '\'\''; code = 'str(' + argument0 + ')'; return [code, Blockly.Python.ORDER_FUNCTION_CALL]; - } else if (block.itemCount_ == 2) { + } else if (block.itemCount_['items'] == 2) { var argument0 = Blockly.Python.valueToCode(block, 'ADD0', Blockly.Python.ORDER_NONE) || '\'\''; var argument1 = Blockly.Python.valueToCode(block, 'ADD1', @@ -55,7 +55,7 @@ Blockly.Python['text_join'] = function(block) { return [code, Blockly.Python.ORDER_UNARY_SIGN]; } else { var code = []; - for (var n = 0; n < block.itemCount_; n++) { + for (var n = 0; n < block.itemCount_['items']; n++) { code[n] = Blockly.Python.valueToCode(block, 'ADD' + n, Blockly.Python.ORDER_NONE) || '\'\''; } diff --git a/java_compressed.js b/java_compressed.js index 96b2e6d36aa..e0c9b9b7eb6 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -3,37 +3,36 @@ // Copyright 2012 Google Inc. Apache License 2.0 -Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern"); +Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern,equal"); Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; -Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.EXTRAINDENT="";Blockly.Java.VariableTypes_={};Blockly.Java.AppName_="MyApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_="";Blockly.Java.needImports_="javax.json.Json javax.json.JsonArray javax.json.JsonObject javax.json.JsonReader javax.json.stream.JsonParsingException java.io.IOException java.io.StringReader".split(" "); +Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.EXTRAINDENT="";Blockly.Java.VariableTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_="";Blockly.Java.needImports_=["java.io.IOException","java.io.StringReader"]; Blockly.Java.ExtraImports_=null;Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a;console.log(this.AppName_+" --- <"+a+">")};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; Blockly.Java.GetVariableType=function(a){(a=Blockly.Java.VariableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a result = new LinkedList<>();"," for(int x = 0; x < torepeat; x++) {"," result.add(item);"," }"," return result;","}"])+"("+b+","+a+")", +Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.lists_length=function(a){return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"[]")+".size()",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.lists_isEmpty=function(a){return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"[]")+".size() == 0",Blockly.Java.ORDER_LOGICAL_NOT]}; +Blockly.Java.lists_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"indexOf":"lastIndexOf",c=Blockly.Java.valueToCode(a,"FIND",Blockly.Java.ORDER_NONE)||"[]";return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"''")+"."+b+"("+c+") + 1",Blockly.Java.ORDER_FUNCTION_CALL]}; Blockly.Java.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_UNARY_SIGN)||"1";a=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"[]";if("FIRST"==c){if("GET"==b)return[a+".getJsonObject(0)",Blockly.Java.ORDER_MEMBER];c=a+".pop(0)";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("LAST"==c){if("GET"==b)return[a+"[-1]",Blockly.Java.ORDER_MEMBER]; -c=a+".pop()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("FROM_START"==c){d=Blockly.isNumber(d)?parseInt(d,10)-1:"int("+d+" - 1)";if("GET"==b)return[a+".getJsonElement("+d+")",Blockly.Java.ORDER_MEMBER];c=a+".pop("+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("FROM_END"==c){if("GET"==b)return[a+"[-"+d+"]",Blockly.Java.ORDER_MEMBER];c=a+".pop(-"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL]; -if("REMOVE"==b)return c+"\n"}else if("RANDOM"==c){Blockly.Java.definitions_.import_random="import random";if("GET"==b)return["random.choice("+a+")",Blockly.Java.ORDER_FUNCTION_CALL];c=Blockly.Java.provideFunction_("lists_remove_random_item",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(myList):"," x = int(random.random() * len(myList))"," return myList.pop(x)"])+"("+a+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}throw"Unhandled combination (lists_getIndex)."; -}; -Blockly.Java.lists_setIndex=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_NONE)||"1";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"None";if("FIRST"==d){if("SET"==c)return b+"[0] = "+a+"\n";if("INSERT"==c)return b+".insert(0, "+a+")\n"}else if("LAST"==d){if("SET"==c)return b+"[-1] = "+a+"\n";if("INSERT"==c)return b+".append("+a+ -")\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)";if("SET"==c)return b+"["+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert("+e+", "+a+")\n"}else if("FROM_END"==d){if("SET"==c)return b+"[-"+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert(-"+e+", "+a+")\n"}else if("RANDOM"==d){Blockly.Java.definitions_.import_random="import random";b.match(/^\w+$/)?d="":(d=Blockly.Java.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),e=d+" = "+b+"\n",b=d,d=e); -e=Blockly.Java.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);d+=e+" = int(random.random() * len("+b+"))\n";if("SET"==c)return d+(b+"["+e+"] = "+a+"\n");if("INSERT"==c)return d+=b+".insert("+e+", "+a+")\n"}throw"Unhandled combination (lists_setIndex).";}; +c=a+".pop()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("FROM_START"==c){d=Blockly.isNumber(d)?parseInt(d,10)-1:"("+d+" - 1)";if("GET"==b)return[a+".get("+d+")",Blockly.Java.ORDER_MEMBER];c=a+".pop("+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("FROM_END"==c){if("GET"==b)return[a+"[-"+d+"]",Blockly.Java.ORDER_MEMBER];c=a+".pop(-"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL]; +if("REMOVE"==b)return c+"\n"}else if("RANDOM"==c){Blockly.Java.addImport("java.lang.Math");if("GET"==b)return[a+".get(Math.random() * "+a+".size())",Blockly.Java.ORDER_FUNCTION_CALL];c=Blockly.Java.provideFunction_("lists_remove_random_item",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(LinkedList myList) {"," int x = (int)(Math.random() * myList.size());"," return myList.remove(x);","}"])+"("+a+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"== +b)return c+";\n"}throw"Unhandled combination (lists_getIndex).";}; +Blockly.Java.lists_setIndex=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_NONE)||"1";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"None";if("FIRST"==d){if("SET"==c)return b+"[0] = "+a+"\n";if("INSERT"==c)return b+".insert(0, "+a+")\n"}else if("LAST"==d){if("SET"==c)return b+"[-1] = "+a+"\n";if("INSERT"==c)return b+".add("+ +a+");\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)";if("SET"==c)return b+"["+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert("+e+", "+a+")\n"}else if("FROM_END"==d){if("SET"==c)return b+"[-"+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert(-"+e+", "+a+")\n"}else if("RANDOM"==d){Blockly.Java.addImport("java.util.Random");b.match(/^\w+$/)?d="":(d=Blockly.Java.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),e=d+" = "+b+"\n",b=d,d=e);e=Blockly.Java.variableDB_.getDistinctName("tmp_x", +Blockly.Variables.NAME_TYPE);d+=e+" = int(random.random() * "+b+".size())\n";if("SET"==c)return d+(b+"["+e+"] = "+a+"\n");if("INSERT"==c)return d+=b+".insert("+e+", "+a+")\n"}throw"Unhandled combination (lists_setIndex).";}; Blockly.Java.lists_getSublist=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Java.valueToCode(a,"AT1",Blockly.Java.ORDER_ADDITIVE)||"1";a=Blockly.Java.valueToCode(a,"AT2",Blockly.Java.ORDER_ADDITIVE)||"1";"FIRST"==c||"FROM_START"==c&&"1"==e?e="":"FROM_START"==c?e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)":"FROM_END"==c&&(e=Blockly.isNumber(e)?-parseInt(e,10):"-int("+e+")");"LAST"==d|| "FROM_END"==d&&"1"==a?a="":"FROM_START"==c?a=Blockly.isNumber(a)?parseInt(a,10):"int("+a+")":"FROM_END"==c&&(Blockly.isNumber(a)?(a=1-parseInt(a,10),0==a&&(a="")):(Blockly.Java.definitions_.import_sys="import sys",a="int(1 - "+a+") or sys.maxsize"));return[b+"["+e+" : "+a+"]",Blockly.Java.ORDER_MEMBER]}; Blockly.Java.lists_split=function(a){var b=a.getFieldValue("MODE");if("SPLIT"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_MEMBER)||"''",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_NONE),a=b+".split("+a+")";else if("JOIN"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_NONE)||"[]",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_MEMBER)||"''",a=a+".join("+b+")";else throw"Unknown mode: "+b;return[a,Blockly.Java.ORDER_FUNCTION_CALL]}; @@ -48,49 +47,53 @@ Blockly.Java.loops={};Blockly.Java.controls_repeat=function(a){var b=parseInt(a. Blockly.Java.controls_repeat_ext=function(a){var b=Blockly.Java.valueToCode(a,"TIMES",Blockly.Java.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")",c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; Blockly.Java.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Java.valueToCode(a,"BOOL",b?Blockly.Java.ORDER_LOGICAL_NOT:Blockly.Java.ORDER_NONE)||"false",d=Blockly.Java.statementToCode(a,"DO"),d=Blockly.Java.addLoopTrap(d,a.id)||Blockly.Java.PASS;b&&(c="!"+c);return"while ("+c+") {\n"+d+"} // end while\n"}; Blockly.Java.controls_for=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);Blockly.Java.GetVariableType(a.getFieldValue("VAR"));var c=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0",d=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0",e=Blockly.Java.valueToCode(a,"BY",Blockly.Java.ORDER_NONE)||"1",g=Blockly.Java.statementToCode(a,"DO"),g=Blockly.Java.addLoopTrap(g,a.id)||Blockly.Java.PASS;a="";if(Blockly.isNumber(c)&& -Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),h="<=",f="++";c>d&&(h=">=",e=-e);0>e?f=" -= "+Math.abs(e):1!=e&&(f=" += "+e);a+="for ("+b+" = "+c+"; "+b+h+d+"; "+b+f+")"}else a+="for ("+b+" = "+c+"; "+b+"<="+d+"; "+b+" += "+e+")";return a+(" {\n"+g+"} // end for\n")}; +Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),h="<=",f="++";c>d&&(h=">=",e=-e);0>e?f=" -= "+Math.abs(e):1!=e&&(f=" += "+e);a+="for ("+b+" = "+c+"; "+b+h+d+"; "+b+f+")"}else h=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(h=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="double "+h+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE), +a+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+="double "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("Math.abs("+e+");\n"),a=a+("if ("+h+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+h+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")";return a+=" {\n"+g+"} // end for\n"}; Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;return"for ("+c+" "+b+" :"+d+") {\n"+e+"} // end for\n"}; Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.math={};Blockly.Java.addReservedWords("math,random");Blockly.Java.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; -Blockly.Java.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Java.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Java.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Java.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Java.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Java.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Java.valueToCode(a,"A",b)||"0";a=Blockly.Java.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; -Blockly.Java.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Java.ORDER_UNARY_SIGN];Blockly.Java.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0":Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_NONE)||"0";switch(b){case "ABS":c="Math.fabs("+a+")";break;case "ROOT":c="Math.sqrt("+a+")";break; -case "LN":c="Math.log("+a+")";break;case "LOG10":c="Math.log10("+a+")";break;case "EXP":c="Math.exp("+a+")";break;case "POW10":c="Math.pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="Math.ceil("+a+")";break;case "ROUNDDOWN":c="Math.floor("+a+")";break;case "SIN":c="Math.sin("+a+" / 180.0 * Math.pi)";break;case "COS":c="Math.cos("+a+" / 180.0 * Math.pi)";break;case "TAN":c="Math.tan("+a+" / 180.0 * Math.pi)"}if(c)return[c,Blockly.Java.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c= -"Math.asin("+a+") / Math.pi * 180";break;case "ACOS":c="Math.acos("+a+") / Math.pi * 180";break;case "ATAN":c="Math.atan("+a+") / Math.pi * 180";break;default:throw"Unknown math operator: "+b;}return[c,Blockly.Java.ORDER_MULTIPLICATIVE]}; -Blockly.Java.math_constant=function(a){var b={PI:["Math.pi",Blockly.Java.ORDER_MEMBER],E:["Math.e",Blockly.Java.ORDER_MEMBER],GOLDEN_RATIO:["(1 + Math.sqrt(5)) / 2",Blockly.Java.ORDER_MULTIPLICATIVE],SQRT2:["Math.sqrt(2)",Blockly.Java.ORDER_MEMBER],SQRT1_2:["Math.sqrt(1.0 / 2)",Blockly.Java.ORDER_MEMBER],INFINITY:["float('inf')",Blockly.Java.ORDER_ATOMIC]};a=a.getFieldValue("CONSTANT");"INFINITY"!=a&&(Blockly.Java.definitions_.import_math="import math");return b[a]}; -Blockly.Java.math_number_property=function(a){var b=Blockly.Java.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Java.ORDER_MULTIPLICATIVE)||"0",c=a.getFieldValue("PROPERTY"),d;if("PRIME"==c)return Blockly.Java.definitions_.import_math="import math",d=Blockly.Java.provideFunction_("math_isPrime",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(n):"," # https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," # If n is not a number but a string, try parsing it."," if type(n) not in (int, float, long):", -" try:"," n = float(n)"," except:"," return False"," if n == 2 or n == 3:"," return True"," # False if n is negative, is 1, or not whole, or if n is divisible by 2 or 3."," if n <= 1 or n % 1 != 0 or n % 2 == 0 or n % 3 == 0:"," return False"," # Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for x in range(6, int(Math.sqrt(n)) + 2, 6):"," if n % (x - 1) == 0 or n % (x + 1) == 0:"," return False"," return True"])+"("+b+")",[d,Blockly.Java.ORDER_FUNCTION_CALL]; -switch(c){case "EVEN":d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d=b+" % 1 == 0";break;case "POSITIVE":d=b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE);if(!a||"0"==a)return["False",Blockly.Java.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Java.ORDER_RELATIONAL]}; -Blockly.Java.math_change=function(a){var b=Blockly.Java.valueToCode(a,"DELTA",Blockly.Java.ORDER_ADDITIVE)||"0";a=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = ("+a+" if type("+a+") in (int, float, long) else 0) + "+b+"\n"};Blockly.Java.math_round=Blockly.Java.math_single;Blockly.Java.math_trig=Blockly.Java.math_single; -Blockly.Java.math_on_list=function(a){var b=a.getFieldValue("OP");a=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";switch(b){case "SUM":b="sum("+a+")";break;case "MIN":b="min("+a+")";break;case "MAX":b="max("+a+")";break;case "AVERAGE":b=Blockly.Java.provideFunction_("math_mean",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(myList):"," localList = [e for e in myList if type(e) in (int, float, long)]"," if not localList: return"," return float(sum(localList)) / len(localList)"]); -b=b+"("+a+")";break;case "MEDIAN":b=Blockly.Java.provideFunction_("math_median",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(myList):"," localList = sorted([e for e in myList if type(e) in (int, float, long)])"," if not localList: return"," if len(localList) % 2 == 0:"," return (localList[len(localList) / 2 - 1] + localList[len(localList) / 2]) / 2.0"," else:"," return localList[(len(localList) - 1) / 2]"]);b=b+"("+a+")";break;case "MODE":b=Blockly.Java.provideFunction_("math_modes", -["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(some_list):"," modes = []"," # Using a lists of [item, count] to keep count rather than dict",' # to avoid "unhashable" errors when the counted item is itself a list or dict.'," counts = []"," maxCount = 1"," for item in some_list:"," found = False"," for count in counts:"," if count[0] == item:"," count[1] += 1"," maxCount = max(maxCount, count[1])"," found = True"," if not found:"," counts.append([item, 1])", -" for counted_item, item_count in counts:"," if item_count == maxCount:"," modes.append(counted_item)"," return modes"]);b=b+"("+a+")";break;case "STD_DEV":Blockly.Java.definitions_.import_math="import math";b=Blockly.Java.provideFunction_("math_standard_deviation",["def "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(numbers):"," n = len(numbers)"," if n == 0: return"," mean = float(sum(numbers)) / n"," variance = sum((x - mean) ** 2 for x in numbers) / n"," return Math.sqrt(variance)"]); -b=b+"("+a+")";break;case "RANDOM":Blockly.Java.definitions_.import_random="import random";b="random.choice("+a+")";break;default:throw"Unknown operator: "+b;}return[b,Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_modulo=function(a){var b=Blockly.Java.valueToCode(a,"DIVIDEND",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Java.ORDER_MULTIPLICATIVE]}; +Blockly.Java.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Java.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Java.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Java.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Java.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Java.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Java.valueToCode(a,"A",b)||"0";a=Blockly.Java.valueToCode(a,"B",b)||"0";var e="";" ** "===c?(Blockly.Java.addImport("java.lang.Math"),e="Math.pow("+d+", "+a+")"):e=d+c+a;return[e, +b]}; +Blockly.Java.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Java.ORDER_UNARY_SIGN];Blockly.Java.addImport("java.lang.Math");a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0":Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_NONE)||"0";switch(b){case "ABS":c="Math.abs("+a+")";break;case "ROOT":c="Math.sqrt("+a+")";break;case "LN":c="Math.log("+ +a+")";break;case "LOG10":c="Math.log10("+a+")";break;case "EXP":c="Math.exp("+a+")";break;case "POW10":c="Math.pow(10,"+a+")";break;case "ROUND":c="Math.round("+a+")";break;case "ROUNDUP":c="Math.ceil("+a+")";break;case "ROUNDDOWN":c="Math.floor("+a+")";break;case "SIN":c="Math.sin("+a+" / 180.0 * Math.PI)";break;case "COS":c="Math.cos("+a+" / 180.0 * Math.PI)";break;case "TAN":c="Math.tan("+a+" / 180.0 * Math.PI)"}if(c)return[c,Blockly.Java.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c="Math.asin("+ +a+") / Math.PI * 180";break;case "ACOS":c="Math.acos("+a+") / Math.PI * 180";break;case "ATAN":c="Math.atan("+a+") / Math.PI * 180";break;default:throw"Unknown math operator: "+b;}return[c,Blockly.Java.ORDER_MULTIPLICATIVE]}; +Blockly.Java.math_constant=function(a){var b={PI:["Math.PI",Blockly.Java.ORDER_MEMBER],E:["Math.E",Blockly.Java.ORDER_MEMBER],GOLDEN_RATIO:["(1 + Math.sqrt(5)) / 2",Blockly.Java.ORDER_MULTIPLICATIVE],SQRT2:["Math.sqrt(2)",Blockly.Java.ORDER_MEMBER],SQRT1_2:["Math.sqrt(1.0 / 2)",Blockly.Java.ORDER_MEMBER],INFINITY:["Double.POSITIVE_INFINITY",Blockly.Java.ORDER_ATOMIC]};a=a.getFieldValue("CONSTANT");"INFINITY"!=a&&Blockly.Java.addImport("java.lang.Math");return b[a]}; +Blockly.Java.math_number_property=function(a){var b=Blockly.Java.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Java.ORDER_MULTIPLICATIVE)||"0",c=a.getFieldValue("PROPERTY"),d;if("PRIME"==c)return Blockly.Java.addImport("java.lang.Math"),d=Blockly.Java.provideFunction_("math_isPrime",["public static boolean "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object d) {"," // https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," // If n is not a number but a string, try parsing it."," double n;"," if (d instanceof Double) {", +" n = (Double)d;"," } else if (d instanceof Integer) {"," n = (Integer)d;"," } else {"," return false;"," }"," if (n == 2 || n == 3) {"," return true;"," }"," // False if n is negative, is 1, or not whole, or if n is divisible by 2 or 3."," if ((n <= 1) || (n % 1 != 0) || (n % 2 == 0) || (n % 3 == 0)) {"," return false;"," }"," // Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for (int x = 6; x <= Math.sqrt(n) + 1; x += 6) {"," if (n % (x - 1) == 0 || n % (x + 1) == 0) {", +" return false;"," }"," }"," return true;","}"])+"("+b+")",[d,Blockly.Java.ORDER_FUNCTION_CALL];switch(c){case "EVEN":d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d=b+" % 1 == 0";break;case "POSITIVE":d=b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE);if(!a||"0"==a)return["False",Blockly.Java.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Java.ORDER_RELATIONAL]}; +Blockly.Java.math_change=function(a){var b=Blockly.Java.valueToCode(a,"DELTA",Blockly.Java.ORDER_ADDITIVE)||"0";a=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = "+a+" + "+b+";\n"};Blockly.Java.math_round=Blockly.Java.math_single;Blockly.Java.math_trig=Blockly.Java.math_single; +Blockly.Java.math_on_list=function(a){var b=a.getFieldValue("OP"),c=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";switch(b){case "SUM":a="sum("+c+")";break;case "MIN":a="min("+c+")";break;case "MAX":a="max("+c+")";break;case "AVERAGE":b=Blockly.Java.provideFunction_("math_mean",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MEDIAN":b=Blockly.Java.provideFunction_("math_median", +["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MODE":b=Blockly.Java.provideFunction_("math_modes",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "STD_DEV":Blockly.Java.addImport("java.lang.Math");b=Blockly.Java.provideFunction_("math_standard_deviation",["public static double "+ +Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "RANDOM":Blockly.Java.addImport("java.lang.Math");b=Blockly.Java.provideFunction_("math_random_list",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list) {"," int x = (int)(Math.floor(Math.random() * list.size()));"," return list.get(x);","}"]);c=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";a=b+"("+c+")";break;default:throw"Unknown operator: "+ +b;}return[a,Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_modulo=function(a){var b=Blockly.Java.valueToCode(a,"DIVIDEND",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Java.ORDER_MULTIPLICATIVE]}; Blockly.Java.math_format_as_decimal=function(a){var b=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"PLACES",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return['new DecimalFormat("#.'+Array(++a).join("0")+'").format('+b+")",Blockly.Java.ORDER_MULTIPLICATIVE]}; -Blockly.Java.math_constrain=function(a){var b=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"0",c=Blockly.Java.valueToCode(a,"LOW",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"HIGH",Blockly.Java.ORDER_NONE)||"float('inf')";return["min(max("+b+", "+c+"), "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]}; -Blockly.Java.math_random_int=function(a){Blockly.Java.definitions_.import_random="import random";var b=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0";return["random.randint("+b+", "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_random_float=function(a){Blockly.Java.definitions_.import_random="import random";return["random.random()",Blockly.Java.ORDER_FUNCTION_CALL]}; +Blockly.Java.math_constrain=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"0",c=Blockly.Java.valueToCode(a,"LOW",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"HIGH",Blockly.Java.ORDER_NONE)||"float('inf')";return["Math.min(Math.max("+b+", "+c+"), "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]}; +Blockly.Java.math_random_int=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0";return[Blockly.Java.provideFunction_("math_random_int",["public static int "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(int a, int b) {"," if (a > b) {"," // Swap a and b to ensure a is smaller."," int c = a;"," a = b;"," b = c;"," }"," return (int)Math.floor(Math.random() * (b - a + 1) + a);", +"}"])+"("+b+", "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_random_float=function(a){Blockly.Java.addImport("java.lang.Math");return["Math.random()",Blockly.Java.ORDER_FUNCTION_CALL]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.procedures={}; Blockly.Java.procedures_defreturn=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=Blockly.Java.statementToCode(a,"STACK");Blockly.Java.STATEMENT_PREFIX&&(c=Blockly.Java.prefixLines(Blockly.Java.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.Java.INDENT)+c);Blockly.Java.INFINITE_LOOP_TRAP&&(c=Blockly.Java.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+c);var d=Blockly.Java.valueToCode(a,"RETURN",Blockly.Java.ORDER_NONE)||"";d?d=" return "+ -d+";\n":c||(c=Blockly.Java.PASS);for(var e=[],g=0;g", - "lastupdated": "2015-07-08 11:04:04.571519", + "lastupdated": "2015-07-15 21:07:52.106153", "locale": "en", "messagedocumentation" : "qqq" }, @@ -500,8 +500,8 @@ "PROCEDURES_MUTATORARG_TOOLTIP": "Add an input to the function.", "CLICK_ADD_TOOLTIP": "Add an element", "CLICK_REMOVE_TOOLTIP": "Remove this element", - "PROCEDURES_PARAM_NOTYPE": "with %1 %2", - "PROCEDURES_PARAM_WITH_TYPE": "with %1 as %2%3", + "PROCEDURES_PARAM_NOTYPE": "with %1 %2%3", + "PROCEDURES_PARAM_WITH_TYPE": "with %1 as %2%3%4", "PROCEDURES_HIGHLIGHT_DEF": "Highlight function definition", "PROCEDURES_CREATE_DO": "Create '%1'", "PROCEDURES_IFRETURN_TOOLTIP": "If a value is true, then return a second value.", diff --git a/msg/messages.js b/msg/messages.js index 75e870604af..c5a94c10198 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -1395,12 +1395,12 @@ Blockly.Msg.CLICK_REMOVE_TOOLTIP = 'Remove this element'; /// This is the string for creating a parameter line on a function. /// %1 corresponds to the name of the parameter as a FieldTextInput /// %2 corresponds to the - icon for removing the field -Blockly.Msg.PROCEDURES_PARAM_NOTYPE = 'with %1 %2'; +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = 'with %1 %2%3'; /// This is the string for creating a parameter line on a function. /// %1 corresponds to the name of the parameter as a FieldTextInput /// %2 corresponds to the type of the parameter as a FieldScopeVariable /// %3 corresponds to the - icon for removing the field -Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = 'with %1 as %2%3'; +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = 'with %1 as %2%3%4'; /// context menu - This appears on the context menu for function calls. Selecting /// it causes the corresponding function definition to be highlighted (as shown at diff --git a/php_compressed.js b/php_compressed.js index 251dbb88eab..c30075047e9 100644 --- a/php_compressed.js +++ b/php_compressed.js @@ -16,7 +16,7 @@ Blockly.PHP.colour_rgb=function(a){var b=Blockly.PHP.valueToCode(a,"RED",Blockly Blockly.PHP.colour_blend=function(a){var b=Blockly.PHP.valueToCode(a,"COLOUR1",Blockly.PHP.ORDER_COMMA)||"'#000000'",c=Blockly.PHP.valueToCode(a,"COLOUR2",Blockly.PHP.ORDER_COMMA)||"'#000000'";a=Blockly.PHP.valueToCode(a,"RATIO",Blockly.PHP.ORDER_COMMA)||.5;return[Blockly.PHP.provideFunction_("colour_blend",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($c1, $c2, $ratio) {"," $ratio = max(min($ratio, 1), 0);"," $r1 = hexdec(substr($c1, 1, 2));"," $g1 = hexdec(substr($c1, 3, 2));"," $b1 = hexdec(substr($c1, 5, 2));", " $r2 = hexdec(substr($c2, 1, 2));"," $g2 = hexdec(substr($c2, 3, 2));"," $b2 = hexdec(substr($c2, 5, 2));"," $r = round($r1 * (1 - $ratio) + $r2 * $ratio);"," $g = round($g1 * (1 - $ratio) + $g2 * $ratio);"," $b = round($b1 * (1 - $ratio) + $b2 * $ratio);",' $hex = "#";',' $hex .= str_pad(dechex($r), 2, "0", STR_PAD_LEFT);',' $hex .= str_pad(dechex($g), 2, "0", STR_PAD_LEFT);',' $hex .= str_pad(dechex($b), 2, "0", STR_PAD_LEFT);'," return $hex;","}"])+"("+b+", "+c+", "+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]}; // Copyright 2015 Google Inc. Apache License 2.0 -Blockly.PHP.lists={};Blockly.PHP.lists_create_empty=function(a){return["array()",Blockly.PHP.ORDER_ATOMIC]};Blockly.PHP.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c Date: Thu, 16 Jul 2015 08:25:06 -0400 Subject: [PATCH 10/84] Recover lost changes to unittest_java --- tests/generators/unittest_java.js | 167 +++++++++++++++++++----------- 1 file changed, 107 insertions(+), 60 deletions(-) diff --git a/tests/generators/unittest_java.js b/tests/generators/unittest_java.js index 047826ba9de..065d43a52ed 100644 --- a/tests/generators/unittest_java.js +++ b/tests/generators/unittest_java.js @@ -28,89 +28,135 @@ Blockly.Java['unittest_main'] = function(block) { // Container for unit tests. var resultsVar = Blockly.Java.variableDB_.getName('unittestResults', Blockly.Variables.NAME_TYPE); + + Blockly.Java.addImport('java.util.LinkedList'); + Blockly.Java.addImport('java.util.List'); + Blockly.Java.addImport('java.lang.StringBuilder'); + var functionName = Blockly.Java.provideFunction_( 'unittest_report', - [ 'function ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '() {', + [ 'public String ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '() {', ' // Create test report.', - ' var report = [];', - ' var summary = [];', - ' var fails = 0;', - ' for (var x = 0; x < ' + resultsVar + '.length; x++) {', - ' if (' + resultsVar + '[x][0]) {', - ' summary.push(".");', + ' LinkedList report = new LinkedList<>();', + ' LinkedList summary = new LinkedList<>();', + ' StringBuilder result = new StringBuilder();', + ' int fails = 0;', + ' for (int x = 0; x < ' + resultsVar + '.size(); x++) {', + ' if ((boolean)(((LinkedList)' + resultsVar + '.get(x)).get(0))) {', + ' summary.add(".");', ' } else {', - ' summary.push("F");', + ' summary.add("F");', ' fails++;', - ' report.push("");', - ' report.push("FAIL: " + ' + resultsVar + '[x][2]);', - ' report.push(' + resultsVar + '[x][1]);', + ' report.add("");', + ' report.add("FAIL: " + (String)((LinkedList)' + resultsVar + + '.get(x)).get(2));', + ' report.add((String)((LinkedList)' + resultsVar + '.get(x)).get(1));', ' }', ' }', - ' report.unshift(summary.join(""));', - ' report.push("");', - ' report.push("Number of tests run: " + ' + resultsVar + - '.length);', - ' report.push("");', - ' if (fails) {', - ' report.push("FAILED (failures=" + fails + ")");', + ' for(String x: summary) {', + ' result.append(x);', + ' result.append("\\n");', + ' }', + ' report.add("");', + ' report.add("Number of tests run: " + ' + resultsVar + + '.size());', + ' report.add("");', + ' if (fails > 0) {', + ' report.add("FAILED (failures=" + fails + ")");', ' } else {', - ' report.push("OK");', + ' report.add("OK");', ' }', - ' return report.join("\\n");', + ' for(String x: report) {', + ' result.append(x);', + ' result.append("\\n");', + ' }', + ' return result.toString();', '}']); // Setup global to hold test results. - var code = resultsVar + ' = [];\n'; + var code = resultsVar + ' = new LinkedList();\n'; // Run tests (unindented). code += Blockly.Java.statementToCode(block, 'DO') .replace(/^ /, '').replace(/\n /g, '\n'); + var reportVar = Blockly.Java.variableDB_.getDistinctName( 'report', Blockly.Variables.NAME_TYPE); - code += 'var ' + reportVar + ' = ' + functionName + '();\n'; - // Destroy results. - code += resultsVar + ' = null;\n'; + code += 'String ' + reportVar + ' = this.' + functionName + '();\n'; // Send the report to the console (that's where errors will go anyway). - code += 'console.log(' + reportVar + ');\n'; + code += 'System.out.print(' + reportVar + ');\n'; + + code = 'public void myMain(String[] args) {\n' + + Blockly.Java.prefixLines(/** @type {string} */ (code), + Blockly.Java.INDENT) + + '}\n'+ + 'public static void main(String[] args) {\n'+ + ' // Create the class\n' + + ' '+ Blockly.Java.getAppName() + + ' app = new '+ Blockly.Java.getAppName() + '();\n' + + ' app.myMain(args);\n'+ + '}\n'; return code; }; -Blockly.Java['unittest_main'].defineAssert_ = function(block) { +Blockly.Java['unittest_main'].defineAssert_ = function() { var resultsVar = Blockly.Java.variableDB_.getName('unittestResults', Blockly.Variables.NAME_TYPE); - var functionName = Blockly.Java.provideFunction_( - 'assertEquals', - [ 'function ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + - '(actual, expected, message) {', - ' // Asserts that a value equals another value.', - ' if (!' + resultsVar + ') {', - ' throw "Orphaned assert: " + message;', - ' }', - ' function equals(a, b) {', - ' if (a === b) {', - ' return true;', - ' } else if ((typeof a == "number") && (typeof b == "number") &&', - ' (a.toPrecision(15) == b.toPrecision(15))) {', - ' return true;', - ' } else if (a instanceof Array && b instanceof Array) {', - ' if (a.length != b.length) {', + var functionEquals = Blockly.Java.provideFunction_( + 'equals', + [ 'public static boolean ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(Object a, Object b) {', + '', + ' if (a.equals(b)) {', + ' return true;', + ' } else if (a == b) {', + ' return true;', + ' } else if (((a instanceof Double) || (a instanceof Integer)) &&', + ' ((b instanceof Double) || (b instanceof Integer))) {', + ' double v1,v2;', + ' if (a instanceof Double) {', + ' v1 = (Double)a;', + ' } else {', + ' v1 = (Integer)a;', + ' }', + ' if (b instanceof Double) {', + ' v2 = (Double)b;', + ' } else {', + ' v2 = (Integer)b;', + ' }', + ' return((v1 * 100000.0) == (v2 * 100000.0));', + ' } else if (a instanceof List && b instanceof List) {', + ' List aList = (List)a;', + ' List bList = (List)b;', + '', + ' if (aList.size() != bList.size()) {', + ' return false;', + ' }', + ' for (int i = 0; i < aList.size(); i++) {', + ' if (!equals(aList.get(i), bList.get(i))) {', ' return false;', ' }', - ' for (var i = 0; i < a.length; i++) {', - ' if (!equals(a[i], b[i])) {', - ' return false;', - ' }', - ' }', - ' return true;', ' }', - ' return false;', + ' return true;', ' }', - ' if (equals(actual, expected)) {', - ' ' + resultsVar + '.push([true, "OK", message]);', + ' return false;', + '}']); + var functionName = Blockly.Java.provideFunction_( + 'assertEquals', + [ 'public void ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(Object actual, Object expected, String message) {', + ' LinkedList result = new LinkedList();', + ' // Asserts that a value equals another value.', + ' if (' + functionEquals + '(actual,expected)) {', + ' result.add(true);', + ' result.add("OK");', + ' result.add(message);', ' } else {', - ' ' + resultsVar + '.push([false, ' + - '"Expected: " + expected + "\\nActual: " + actual, message]);', + ' result.add(false);', + ' result.add("Expected: " + expected + "\\nActual: " + actual);', + ' result.add(message);', ' }', + ' ' + resultsVar + '.add(result);', '}']); - return functionName; + return 'this.' + functionName; }; Blockly.Java['unittest_assertequals'] = function(block) { @@ -148,13 +194,14 @@ Blockly.Java['unittest_fail'] = function(block) { var message = Blockly.Java.quote_(block.getFieldValue('MESSAGE')); var functionName = Blockly.Java.provideFunction_( 'unittest_fail', - [ 'function ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + - '(message) {', + [ 'public void ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(String message) {', ' // Always assert an error.', - ' if (!' + resultsVar + ') {', - ' throw "Orphaned assert fail: " + message;', - ' }', - ' ' + resultsVar + '.push([false, "Fail.", message]);', + ' LinkedList result = new LinkedList();', + ' result.add(false);', + ' result.add("Fail.");', + ' result.add(message);', + ' ' + resultsVar + '.add(result);', '}']); return functionName + '(' + message + ');\n'; }; From 412f4c86e21621b13de2059be367149dc308a385 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Thu, 16 Jul 2015 09:39:01 -0400 Subject: [PATCH 11/84] Add intermediate variable to get around limitation of java not allowing while(false) --- generators/java/loops.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/generators/java/loops.js b/generators/java/loops.js index 25347f33fea..ee4a44146b7 100644 --- a/generators/java/loops.js +++ b/generators/java/loops.js @@ -76,6 +76,14 @@ Blockly.Java['controls_whileUntil'] = function(block) { var branch = Blockly.Java.statementToCode(block, 'DO'); branch = Blockly.Java.addLoopTrap(branch, block.id) || Blockly.Java.PASS; + + if ((until && (argument0 === 'true')) || (!until && (argument0 === 'false'))){ + var argvar = Blockly.Java.variableDB_.getDistinctName( + argument0, Blockly.Variables.NAME_TYPE); + Blockly.Java.stashStatement('boolean ' + argvar + ' = ' + argument0 + ';\n'); + argument0 = argvar; + } + if (until) { argument0 = '!' + argument0; } From a9e8747f4285b7505b5f97ebcdf91ca593cb50e7 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Thu, 16 Jul 2015 14:54:14 -0400 Subject: [PATCH 12/84] Make text unit test work for java Fix bug in python generator which references the wrong variable. --- blockly_compressed.js | 15 ++++--- generators/java.js | 87 ++++++++++++++++++++++++++++++++---- generators/java/text.js | 85 ++++++++++++----------------------- generators/java/variables.js | 14 ++++++ generators/python/text.js | 4 +- java_compressed.js | 46 ++++++++++--------- python_compressed.js | 2 +- 7 files changed, 157 insertions(+), 96 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index cd7ef81a13f..9291ba43fd6 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1172,10 +1172,11 @@ function(){b.workspaceChanged_()});this.updateColour()}else this.svgDialog_=null Blockly.Mutator.prototype.workspaceChanged_=function(){if(0==Blockly.dragMode_)for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++){var d=c.getRelativeToSurfaceXY(),e=c.getHeightWidth();20>d.y+e.height&&c.moveBy(0,20-e.height-d.y)}this.rootBlock_.workspace==this.workspace_&&(a=this.block_.rendered,this.block_.rendered=!1,this.block_.compose(this.rootBlock_),this.block_.rendered=a,this.block_.initSvg(),this.block_.rendered&&this.block_.render(),this.resizeBubble_(),this.block_.workspace.fireChangeEvent(), goog.Timer.callOnce(this.block_.bumpNeighbours_,Blockly.BUMP_DELAY,this.block_))};Blockly.Mutator.prototype.getFlyoutMetrics_=function(){return{viewHeight:this.workspaceHeight_,viewWidth:this.workspaceWidth_,absoluteTop:0,absoluteLeft:0}};Blockly.Mutator.prototype.dispose=function(){this.block_.mutator=null;Blockly.Icon.prototype.dispose.call(this)}; // Copyright 2012 Google Inc. Apache License 2.0 -Blockly.Warning=function(a){Blockly.Warning.superClass_.constructor.call(this,a);this.createIcon()};goog.inherits(Blockly.Warning,Blockly.Icon);Blockly.Warning.prototype.png_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAANyAAADcgBffIlqAAAAAd0SU1FB98DGgApDBpIGrEAAAGfSURBVDjLnZM9S2NREIbfc2P8AF27BXshpIzK5g9ssUj8C2tnYyUoiBGSyk4sbCLs1vkRgoW1jYWFICwsMV2Se3JPboLe+FhcNCZcjXFgOMzHeec9M2ekDwTIAEUgo68IsOQczdNTIudoAksTg/g+5+UyDxKUyzz4PueTsvhZr+NmZkCC6Wmo1QiAX58FmLKWf4VCDPCiGxtgLf+B9FiQXo+9y0ucBIUCnJ3B+noMdHGBC0P2xrH4HoYEmUx8qVQCgMPD2F5ehjDEjTbZe2s4p5NKRenb2+Qid3dSpaK0tTp+j8VKq0VncXHQh2IxZrK/P/AtLECjQQf4McQEMNbq786O5qwdANfr8Xl/P/AFgbS7qzlr9Qcwr4EoYvPmBud5wxPJ5+HqCtbWhv3GwPU1Lor4/fKMeedo5vPDiRKsrsLWFuRyybFOhxbwTd0upWqVcDQpaTqjWq0SdruU5PvUkiol/ZNRzeXA96mp3aaRzSYnjdNsFtptGiYI2PY8HaVSmu33xWf3K5WS6ffVe3rSgXnzT+YlpSfY00djjJOkZ/wpr41bQMIsAAAAAElFTkSuQmCC"; -Blockly.Warning.textToDom_=function(a){var b=Blockly.createSvgElement("text",{"class":"blocklyText blocklyBubbleText",y:Blockly.Bubble.BORDER_WIDTH},null);a=a.split("\n");for(var c=0;c")};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; -Blockly.Java.GetVariableType=function(a){(a=Blockly.Java.VariableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a")};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; +Blockly.Java.GetVariableType=function(a){(a=Blockly.Java.variableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.GetBlocklyType=function(a){return Blockly.Java.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;ad&&(h=">=",e=-e);0>e?f=" -= "+Math.abs(e):1!=e&&(f=" += "+e);a+="for ("+b+" = "+c+"; "+b+h+d+"; "+b+f+")"}else h=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(h=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="double "+h+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE), -a+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+="double "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("Math.abs("+e+");\n"),a=a+("if ("+h+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+h+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")";return a+=" {\n"+g+"} // end for\n"}; +Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),f="<=",h="++";c>d&&(f=">=",e=-e);0>e?h=" -= "+Math.abs(e):1!=e&&(h=" += "+e);a+="for ("+b+" = "+c+"; "+b+f+d+"; "+b+h+")"}else f=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(f=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="double "+f+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE), +a+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+="double "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("Math.abs("+e+");\n"),a=a+("if ("+f+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+f+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")";return a+=" {\n"+g+"} // end for\n"}; Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;return"for ("+c+" "+b+" :"+d+") {\n"+e+"} // end for\n"}; Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";}; // Copyright 2012 Google Inc. Apache License 2.0 @@ -74,29 +77,28 @@ Blockly.Java.math_random_int=function(a){Blockly.Java.addImport("java.lang.Math" // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.procedures={}; Blockly.Java.procedures_defreturn=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=Blockly.Java.statementToCode(a,"STACK");Blockly.Java.STATEMENT_PREFIX&&(c=Blockly.Java.prefixLines(Blockly.Java.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.Java.INDENT)+c);Blockly.Java.INFINITE_LOOP_TRAP&&(c=Blockly.Java.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+c);var d=Blockly.Java.valueToCode(a,"RETURN",Blockly.Java.ORDER_NONE)||"";d?d=" return "+ -d+";\n":c||(c=Blockly.Java.PASS);for(var e=[],g=0;g Date: Thu, 16 Jul 2015 17:34:29 -0400 Subject: [PATCH 13/84] Completion of lists generators for Java Implement Remainder of Lists for Java. All Lists unit test cases now pass Fix bug in python lists --- generators/java/lists.js | 117 +++++++++++++++++++++++-------------- generators/python/lists.js | 4 +- 2 files changed, 76 insertions(+), 45 deletions(-) diff --git a/generators/java/lists.js b/generators/java/lists.js index 3a526475bd8..ba5123d9fe1 100644 --- a/generators/java/lists.js +++ b/generators/java/lists.js @@ -43,7 +43,7 @@ Blockly.Java['lists_create_with'] = function(block) { } Blockly.Java.addImport('java.util.Arrays'); - code = 'Arrays.asList(' + code.join(', ') + ')'; + code = 'new LinkedList(Arrays.asList(' + code.join(', ') + '))'; return [code, Blockly.Java.ORDER_ATOMIC]; }; @@ -106,26 +106,26 @@ Blockly.Java['lists_getIndex'] = function(block) { if (where == 'FIRST') { if (mode == 'GET') { - var code = list + '.getJsonObject(0)'; + var code = list + '.getFirst()'; return [code, Blockly.Java.ORDER_MEMBER]; } else { - var code = list + '.pop(0)'; + var code = list + '.removeFirst()'; if (mode == 'GET_REMOVE') { return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } else if (mode == 'REMOVE') { - return code + '\n'; + return code + ';\n'; } } } else if (where == 'LAST') { if (mode == 'GET') { - var code = list + '[-1]'; + var code = list + '.getLast()'; return [code, Blockly.Java.ORDER_MEMBER]; } else { - var code = list + '.pop()'; + var code = list + '.removeLast()'; if (mode == 'GET_REMOVE') { return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } else if (mode == 'REMOVE') { - return code + '\n'; + return code + ';\n'; } } } else if (where == 'FROM_START') { @@ -138,32 +138,32 @@ Blockly.Java['lists_getIndex'] = function(block) { at = '(' + at + ' - 1)'; } if (mode == 'GET') { - var code = list + '.get(' + at + ')'; + var code = list + '.get((int)' + at + ')'; return [code, Blockly.Java.ORDER_MEMBER]; } else { - var code = list + '.pop(' + at + ')'; + var code = list + '.remove((int)' + at + ')'; if (mode == 'GET_REMOVE') { return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } else if (mode == 'REMOVE') { - return code + '\n'; + return code + ';\n'; } } } else if (where == 'FROM_END') { if (mode == 'GET') { - var code = list + '[-' + at + ']'; + var code = list + '.get(' + list + '.size() - (int)' + at + ')'; return [code, Blockly.Java.ORDER_MEMBER]; } else { - var code = list + '.pop(-' + at + ')'; + var code = list + '.remove(' + list + '.size() - (int)' + at + ')'; if (mode == 'GET_REMOVE') { return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } else if (mode == 'REMOVE') { - return code + '\n'; + return code + ';\n'; } } } else if (where == 'RANDOM') { Blockly.Java.addImport('java.lang.Math'); if (mode == 'GET') { - code = list +'.get(Math.random() * ' + list + '.size())'; + code = list +'.get((int)(Math.random() * ' + list + '.size()))'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } else { var functionName = Blockly.Java.provideFunction_( @@ -209,13 +209,13 @@ Blockly.Java['lists_setIndex'] = function(block) { } if (where == 'FIRST') { if (mode == 'SET') { - return list + '[0] = ' + value + '\n'; + return list + '.set(0, ' + value + ');\n'; } else if (mode == 'INSERT') { - return list + '.insert(0, ' + value + ')\n'; + return list + '.addFirst(' + value + ');\n'; } } else if (where == 'LAST') { if (mode == 'SET') { - return list + '[-1] = ' + value + '\n'; + return list + '.set(' + list + '.size()-1, ' + value + ');\n'; } else if (mode == 'INSERT') { return list + '.add(' + value + ');\n'; } @@ -226,30 +226,38 @@ Blockly.Java['lists_setIndex'] = function(block) { at = parseInt(at, 10) - 1; } else { // If the index is dynamic, decrement it in code. - at = 'int(' + at + ' - 1)'; + at = '((int)' + at + ' - 1)'; } if (mode == 'SET') { - return list + '[' + at + '] = ' + value + '\n'; + return list + '.set(' + at + ', ' + value + ');\n'; } else if (mode == 'INSERT') { - return list + '.insert(' + at + ', ' + value + ')\n'; + return list + '.add(' + at + ', ' + value + ');\n'; } } else if (where == 'FROM_END') { + // Blockly uses one-based indicies. + if (Blockly.isNumber(at)) { + // If the index is a naked number, decrement it right now. + at = parseInt(at, 10); + } else { + // If the index is dynamic, decrement it in code. + at = '((int)' + at + ')'; + } if (mode == 'SET') { - return list + '[-' + at + '] = ' + value + '\n'; + return list + '.set(' + list + '.size() -'+ at + ', ' + value + ');\n'; } else if (mode == 'INSERT') { - return list + '.insert(-' + at + ', ' + value + ')\n'; + return list + '.add(' + list + '.size() -'+ at + ', ' + value + ');\n'; } } else if (where == 'RANDOM') { Blockly.Java.addImport('java.util.Random'); var code = cacheList(); var xVar = Blockly.Java.variableDB_.getDistinctName( 'tmp_x', Blockly.Variables.NAME_TYPE); - code += xVar + ' = int(random.random() * ' + list + '.size())\n'; + code += 'int ' + xVar + ' = (int)(Math.random() * ' + list + '.size());\n'; if (mode == 'SET') { - code += list + '[' + xVar + '] = ' + value + '\n'; + code += list + '.set(' + xVar + ', ' + value + ');\n'; return code; } else if (mode == 'INSERT') { - code += list + '.insert(' + xVar + ', ' + value + ')\n'; + code += list + '.add(' + xVar + ', ' + value + ');\n'; return code; } } @@ -267,7 +275,7 @@ Blockly.Java['lists_getSublist'] = function(block) { var at2 = Blockly.Java.valueToCode(block, 'AT2', Blockly.Java.ORDER_ADDITIVE) || '1'; if (where1 == 'FIRST' || (where1 == 'FROM_START' && at1 == '1')) { - at1 = ''; + at1 = '0'; } else if (where1 == 'FROM_START') { // Blockly uses one-based indicies. if (Blockly.isNumber(at1)) { @@ -275,38 +283,46 @@ Blockly.Java['lists_getSublist'] = function(block) { at1 = parseInt(at1, 10) - 1; } else { // If the index is dynamic, decrement it in code. - at1 = 'int(' + at1 + ' - 1)'; + at1 = '((int)' + at1 + ' - 1)'; } } else if (where1 == 'FROM_END') { if (Blockly.isNumber(at1)) { - at1 = -parseInt(at1, 10); + at1 = parseInt(at1, 10); } else { - at1 = '-int(' + at1 + ')'; + at1 = '((int)' + at1 + ')'; } + at1 = list + '.size() - ' + at1; } if (where2 == 'LAST' || (where2 == 'FROM_END' && at2 == '1')) { - at2 = ''; - } else if (where1 == 'FROM_START') { + at2 = list + '.size()-1'; + } else if (where2 == 'FROM_START') { if (Blockly.isNumber(at2)) { - at2 = parseInt(at2, 10); + at2 = parseInt(at2, 10) - 1; } else { - at2 = 'int(' + at2 + ')'; + at2 = '((int)' + at2 + '-1)'; } - } else if (where1 == 'FROM_END') { + } else if (where2 == 'FROM_END') { if (Blockly.isNumber(at2)) { // If the index is a naked number, increment it right now. - // Add special case for -0. - at2 = 1 - parseInt(at2, 10); - if (at2 == 0) { - at2 = ''; - } + at2 = parseInt(at2, 10); + at2 = list + '.size() - ' + at2; } else { // If the index is dynamic, increment it in code. - Blockly.Java.definitions_['import_sys'] = 'import sys'; - at2 = 'int(1 - ' + at2 + ') or sys.maxsize'; + at2 = list + '.size() - ((int)' + at2 + '-1)'; } } - var code = list + '[' + at1 + ' : ' + at2 + ']'; + var functionName = Blockly.Java.provideFunction_( + 'lists_sublist', + ['public static LinkedList ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(List list, int startIndex, int endIndex) {', + ' LinkedList result = new LinkedList<>();', + ' int sizeList = list.size();', + ' for(int x = startIndex; x <= endIndex && x < sizeList; x++) {', + ' result.add(list.get(x));', + ' }', + ' return result;', + '}']); + var code = functionName + '(' + list + ', ' + at1 + ', ' + at2 + ')'; return [code, Blockly.Java.ORDER_MEMBER]; }; @@ -318,13 +334,28 @@ Blockly.Java['lists_split'] = function(block) { Blockly.Java.ORDER_MEMBER) || '\'\''; var value_delim = Blockly.Java.valueToCode(block, 'DELIM', Blockly.Java.ORDER_NONE); - var code = value_input + '.split(' + value_delim + ')'; + var code = 'new LinkedList(Arrays.asList(' + value_input + + '.split(' + value_delim + ')))'; } else if (mode == 'JOIN') { var value_input = Blockly.Java.valueToCode(block, 'INPUT', Blockly.Java.ORDER_NONE) || '[]'; var value_delim = Blockly.Java.valueToCode(block, 'DELIM', Blockly.Java.ORDER_MEMBER) || '\'\''; var code = value_delim + '.join(' + value_input + ')'; + var functionName = Blockly.Java.provideFunction_( + 'lists_join', + ['public static String ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(List list, String separator) {', + ' StringBuilder result = new StringBuilder();', + ' String extra = "";', + ' for (String elem : list) {', + ' result.append(extra);', + ' result.append(elem);', + ' extra = separator;', + ' }', + ' return result.toString();', + '}']); + var code = functionName + '(' + value_input + ', ' + value_delim + ')'; } else { throw 'Unknown mode: ' + mode; } diff --git a/generators/python/lists.js b/generators/python/lists.js index 2fdd9c43086..ba195ee3f56 100644 --- a/generators/python/lists.js +++ b/generators/python/lists.js @@ -288,13 +288,13 @@ Blockly.Python['lists_getSublist'] = function(block) { } if (where2 == 'LAST' || (where2 == 'FROM_END' && at2 == '1')) { at2 = ''; - } else if (where1 == 'FROM_START') { + } else if (where2 == 'FROM_START') { if (Blockly.isNumber(at2)) { at2 = parseInt(at2, 10); } else { at2 = 'int(' + at2 + ')'; } - } else if (where1 == 'FROM_END') { + } else if (where2 == 'FROM_END') { if (Blockly.isNumber(at2)) { // If the index is a naked number, increment it right now. // Add special case for -0. From fe58ccd590640ab79d5d405fcf5c97162313d325 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Thu, 16 Jul 2015 18:10:26 -0400 Subject: [PATCH 14/84] Complete colour Java implementation All colour unit test cases now run for java --- generators/java.js | 2 ++ generators/java/colour.js | 57 ++++++++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 19 deletions(-) diff --git a/generators/java.js b/generators/java.js index c711c0a056a..2bcc605d369 100644 --- a/generators/java.js +++ b/generators/java.js @@ -323,6 +323,8 @@ Blockly.Java.init = function(workspace, imports) { type = 'Boolean'; } else if (type === 'String') { type = 'String'; + } else if (type === 'Colour') { + type = 'String'; } else if (type === 'Number') { type = 'double'; } else if (type !== '') { diff --git a/generators/java/colour.js b/generators/java/colour.js index 779a9067406..804e1492d1a 100644 --- a/generators/java/colour.js +++ b/generators/java/colour.js @@ -31,14 +31,21 @@ goog.require('Blockly.Java'); Blockly.Java['colour_picker'] = function(block) { // Colour picker. - var code = '\'' + block.getFieldValue('COLOUR') + '\''; + var code = '"' + block.getFieldValue('COLOUR') + '"'; return [code, Blockly.Java.ORDER_ATOMIC]; }; Blockly.Java['colour_random'] = function(block) { // Generate a random colour. Blockly.Java.addImport('java.util.Random'); - var code = '\'#%06x\' % random.randint(0, 2**24 - 1)'; + var functionName = Blockly.Java.provideFunction_( + 'colour_random', + [ 'public static String ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '() {', + ' double num = Math.floor(Math.random() * Math.pow(2, 24));', + ' return String.format("#%06x", (int)num);', + '}']); + var code = functionName + '()'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; @@ -46,11 +53,13 @@ Blockly.Java['colour_rgb'] = function(block) { // Compose a colour from RGB components expressed as percentages. var functionName = Blockly.Java.provideFunction_( 'colour_rgb', - [ 'def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(r, g, b):', - ' r = round(min(100, max(0, r)) * 2.55)', - ' g = round(min(100, max(0, g)) * 2.55)', - ' b = round(min(100, max(0, b)) * 2.55)', - ' return \'#%02x%02x%02x\' % (r, g, b)']); + [ 'public static String ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(double r, double g, double b) {', + ' r = Math.round(Math.max(Math.min(r, 100), 0) * 2.55);', + ' g = Math.round(Math.max(Math.min(g, 100), 0) * 2.55);', + ' b = Math.round(Math.max(Math.min(b, 100), 0) * 2.55);', + ' return String.format("#%02x%02x%02x", (int)r, (int)g, (int)b);', + '}']); var r = Blockly.Java.valueToCode(block, 'RED', Blockly.Java.ORDER_NONE) || 0; var g = Blockly.Java.valueToCode(block, 'GREEN', @@ -65,20 +74,30 @@ Blockly.Java['colour_blend'] = function(block) { // Blend two colours together. var functionName = Blockly.Java.provideFunction_( 'colour_blend', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + - '(colour1, colour2, ratio):', - ' r1, r2 = int(colour1[1:3], 16), int(colour2[1:3], 16)', - ' g1, g2 = int(colour1[3:5], 16), int(colour2[3:5], 16)', - ' b1, b2 = int(colour1[5:7], 16), int(colour2[5:7], 16)', - ' ratio = min(1, max(0, ratio))', - ' r = round(r1 * (1 - ratio) + r2 * ratio)', - ' g = round(g1 * (1 - ratio) + g2 * ratio)', - ' b = round(b1 * (1 - ratio) + b2 * ratio)', - ' return \'#%02x%02x%02x\' % (r, g, b)']); + ['public static String ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(String c1, String c2, double ratio) {', + ' int r = 0;', + ' int g = 0;', + ' int b = 0;', + ' try {', + ' ratio = Math.max(Math.min(ratio, 1), 0);', + ' int r1 = Integer.parseInt(c1.substring(1, 3), 16);', + ' int g1 = Integer.parseInt(c1.substring(3, 5), 16);', + ' int b1 = Integer.parseInt(c1.substring(5, 7), 16);', + ' int r2 = Integer.parseInt(c2.substring(1, 3), 16);', + ' int g2 = Integer.parseInt(c2.substring(3, 5), 16);', + ' int b2 = Integer.parseInt(c2.substring(5, 7), 16);', + ' r = (int)Math.round(r1 * (1 - ratio) + r2 * ratio);', + ' g = (int)Math.round(g1 * (1 - ratio) + g2 * ratio);', + ' b = (int)Math.round(b1 * (1 - ratio) + b2 * ratio);', + ' } catch (Exception ex) {', + ' }', + ' return String.format("#%02x%02x%02x", r, g, b);', + '}']); var colour1 = Blockly.Java.valueToCode(block, 'COLOUR1', - Blockly.Java.ORDER_NONE) || '\'#000000\''; + Blockly.Java.ORDER_NONE) || '"#000000"'; var colour2 = Blockly.Java.valueToCode(block, 'COLOUR2', - Blockly.Java.ORDER_NONE) || '\'#000000\''; + Blockly.Java.ORDER_NONE) || '"#000000"'; var ratio = Blockly.Java.valueToCode(block, 'RATIO', Blockly.Java.ORDER_NONE) || 0; var code = functionName + '(' + colour1 + ', ' + colour2 + ', ' + ratio + ')'; From b12dd4c09101d765de137bbce3f9cf0d2034f92c Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 17 Jul 2015 08:51:05 -0400 Subject: [PATCH 15/84] Clean up Java code generator Use more generic objects. Add import for stringBuilder Support string compares for Logic_compare --- blocks/variables.js | 2 +- core/variables.js | 2 +- generators/java.js | 13 +++---------- generators/java/lists.js | 1 + generators/java/logic.js | 35 ++++++++++++++++++++++++++--------- generators/java/variables.js | 16 ++++++++-------- 6 files changed, 40 insertions(+), 29 deletions(-) diff --git a/blocks/variables.js b/blocks/variables.js index 8c19b7019c4..c51f52606af 100644 --- a/blocks/variables.js +++ b/blocks/variables.js @@ -183,7 +183,7 @@ Blockly.Blocks['hash_variables_get'] = { */ getVarsTypes: function() { var vartypes = {}; - vartypes[this.getFieldValue('VAR')] = ['JSON']; + vartypes[this.getFieldValue('VAR')] = ['Object']; return vartypes; }, diff --git a/core/variables.js b/core/variables.js index a40043c912a..e60df519b98 100644 --- a/core/variables.js +++ b/core/variables.js @@ -135,7 +135,7 @@ Blockly.Variables.allVariablesTypes = function(root) { else if (variableHash[key].length === 1) { variableList[key] = variableHash[key][0]; } - else if (goog.array.indexOf(variableHash[key], 'JSON') !== -1) { + else if (goog.array.indexOf(variableHash[key], 'Object') !== -1) { variableList[key] = variableHash[key][0]; } else { // Conflict of types and JSON isn't one of them. For now we will diff --git a/generators/java.js b/generators/java.js index 2bcc605d369..a188d972fec 100644 --- a/generators/java.js +++ b/generators/java.js @@ -124,14 +124,7 @@ Blockly.Java.Baseclass_ = ''; * List of libraries used globally by the generated java code. These are * Processed by Blockly.Java.addImport */ -Blockly.Java.needImports_ = [//'javax.json.Json', - //'javax.json.JsonArray', - //'javax.json.JsonObject', - //'javax.json.JsonReader', - //'javax.json.stream.JsonParsingException', - 'java.io.IOException', - 'java.io.StringReader' - ]; +Blockly.Java.needImports_ = []; /** * List of libraries used by the caller's generated java code. These will * be processed by Blockly.Java.addImport @@ -315,8 +308,8 @@ Blockly.Java.init = function(workspace, imports) { for (var x = 0; x < variables.length; x++) { var key = variables[x]; var type = Blockly.Java.blocklyTypes_[key]; - if (type === 'JSON') { - type = 'JsonObject'; + if (type === 'Object') { + type = 'Object'; } else if (type === 'Array') { type = 'LinkedList'; } else if (type === 'Boolean') { diff --git a/generators/java/lists.js b/generators/java/lists.js index ba5123d9fe1..a835787196f 100644 --- a/generators/java/lists.js +++ b/generators/java/lists.js @@ -342,6 +342,7 @@ Blockly.Java['lists_split'] = function(block) { var value_delim = Blockly.Java.valueToCode(block, 'DELIM', Blockly.Java.ORDER_MEMBER) || '\'\''; var code = value_delim + '.join(' + value_input + ')'; + Blockly.Java.addImport('java.lang.StringBuilder'); var functionName = Blockly.Java.provideFunction_( 'lists_join', ['public static String ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + diff --git a/generators/java/logic.js b/generators/java/logic.js index a9c94f6c480..ccf92f078b4 100644 --- a/generators/java/logic.js +++ b/generators/java/logic.js @@ -56,18 +56,35 @@ Blockly.Java['controls_if'] = function(block) { Blockly.Java['logic_compare'] = function(block) { // Comparison operator. var OPERATORS = { - 'EQ': '==', - 'NEQ': '!=', - 'LT': '<', - 'LTE': '<=', - 'GT': '>', - 'GTE': '>=' + 'EQ': '==', // a.equals(b) + 'NEQ': '!=', // !a.equals(b) + 'LT': '<', // a.compareTo(b) < 0 + 'LTE': '<=', // a.compareTo(b) <= 0 + 'GT': '>', // a.compareTo(b) > 0 + 'GTE': '>=' // a.compareTo(b) >= 0 }; var operator = OPERATORS[block.getFieldValue('OP')]; + var argument0Type = Blockly.Java.getValueType(block, 'A'); + var argument1Type = Blockly.Java.getValueType(block, 'B'); + var isString = false; + var code = ''; var order = Blockly.Java.ORDER_RELATIONAL; - var argument0 = Blockly.Java.valueToCode(block, 'A', order) || '0'; - var argument1 = Blockly.Java.valueToCode(block, 'B', order) || '0'; - var code = argument0 + ' ' + operator + ' ' + argument1; + if (goog.array.contains(argument0Type, 'String') || + goog.array.contains(argument1Type, 'String')) { + var argument0 = Blockly.Java.valueToCode(block, 'A', order) || '""'; + var argument1 = Blockly.Java.valueToCode(block, 'B', order) || '""'; + if (operator === '==') { + code = argument0 + '.equals(' + argument1 + ')'; + } else if (operator === '!=') { + code = '!' + argument0 + '.equals(' + argument1 + ')'; + } else { + code = argument0 + '.compareTo(' + argument1 + ') ' + operator + ' 0'; + } + } else { + var argument0 = Blockly.Java.valueToCode(block, 'A', order) || '0'; + var argument1 = Blockly.Java.valueToCode(block, 'B', order) || '0'; + code = argument0 + ' ' + operator + ' ' + argument1; + } return [code, order]; }; diff --git a/generators/java/variables.js b/generators/java/variables.js index 77d150782ee..4aa6aa68a3d 100644 --- a/generators/java/variables.js +++ b/generators/java/variables.js @@ -74,10 +74,10 @@ Blockly.Java['hash_variables_get'] = function(block) { if (varName) { var vartype = Blockly.Java.GetVariableType(varName); - if (vartype === 'JsonArray') { - getter = 'getJsonArray'; - } else if (vartype === 'JsonObject') { - getter = 'getJsonObject'; + if (vartype === 'Array') { + getter = 'get'; + } else if (vartype === 'Object') { + getter = 'get'; } } } @@ -104,10 +104,10 @@ Blockly.Java['hash_parmvariables_get'] = function(block) { if (varName) { var vartype = Blockly.Java.GetVariableType(varName); - if (vartype === 'JsonArray') { - getter = 'getJsonArray'; - } else if (vartype === 'JsonObject') { - getter = 'getJsonObject'; + if (vartype === 'Array') { + getter = 'get'; + } else if (vartype === 'Object') { + getter = 'get'; } } } From 9fc6bb3e3442c407805bfaf533f17010f7c2e691 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 17 Jul 2015 13:28:07 -0400 Subject: [PATCH 16/84] Added Pended Statement Stash --- core/generator.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/core/generator.js b/core/generator.js index 78e0c29fbb7..b5d15f0c1cc 100644 --- a/core/generator.js +++ b/core/generator.js @@ -70,7 +70,11 @@ Blockly.Generator.prototype.STATEMENT_PREFIX = null; * upper level block */ Blockly.Generator.prototype.STATEMENT_STASH = ''; - +/** + * Pending stash of lines to output. It will be output if anything else is + * output in the meantime + */ +Blockly.Generator.prototype.STATEMENT_STASH_PEND = ''; /** * Generate code for all blocks in the workspace to the specified language. * @param {Blockly.Workspace} workspace Workspace to generate code from. @@ -356,9 +360,17 @@ Blockly.Generator.prototype.getStatementStash = function() { /** * Saves away lines of code to insert before the current statement * @param {string} code any lines of code to stash away + * @param {string} pending any lines of code to pend for stashing. */ -Blockly.Generator.prototype.stashStatement = function(code) { +Blockly.Generator.prototype.stashStatement = function(code, pending) { + if (pending != null) { + this.STATEMENT_STASH_PEND = pending; + } if (code) { + if (this.STATEMENT_STASH_PEND != '') { + this.STATEMENT_STASH += this.STATEMENT_STASH_PEND; + this.STATEMENT_STASH_PEND = ''; + } this.STATEMENT_STASH += code; } }; From a9adb47da0d3ee4f6d4c0e601f2c6bf6e6779dd8 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Sun, 19 Jul 2015 17:03:10 -0400 Subject: [PATCH 17/84] Created AddSubMulti Created appendAddSubMulti so that the existing blocks and generators refer to itemCount_ as a scalar instead of an array. Fixed SERIALIZABLE setting in FieldImage and FieldClickImage Added an accessor function for the itemCount_ values to allow for AddSub to work with both single and multiple items. --- blockly_compressed.js | 32 +++++----- blocks/lists.js | 2 +- blocks/text.js | 2 +- blocks_compressed.js | 6 +- core/block.js | 106 ++++++++++++++++++++++++++------- core/field_image.js | 2 +- dart_compressed.js | 4 +- generators/dart/lists.js | 4 +- generators/dart/text.js | 8 +-- generators/java.js | 70 +++++++++++----------- generators/java/lists.js | 4 +- generators/java/logic.js | 4 +- generators/java/text.js | 4 +- generators/javascript/lists.js | 4 +- generators/javascript/text.js | 10 ++-- generators/php/lists.js | 4 +- generators/php/text.js | 10 ++-- generators/python/lists.js | 4 +- generators/python/text.js | 8 +-- java_compressed.js | 67 +++++++++++---------- javascript_compressed.js | 10 ++-- php_compressed.js | 6 +- python_compressed.js | 12 ++-- 23 files changed, 224 insertions(+), 159 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 9291ba43fd6..205a52298ff 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1179,7 +1179,7 @@ b.height)}else this.bubble_.dispose(),this.body_=this.bubble_=null};Blockly.Warn Blockly.Warning.prototype.removeText=function(a){void 0!==this.text_[a]&&(delete this.text_[a],0===Object.keys(this.text_).length||1===Object.keys(this.text_).length&&!this.text_.default_?this.dispose():this.isVisible()&&(this.setVisible(!1),this.setVisible(!0)))};Blockly.Warning.prototype.dispose=function(){this.block_.warning=null;Blockly.Icon.prototype.dispose.call(this)}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.FieldImage=function(a,b,c,d){this.sourceBlock_=null;this.height_=Number(c);this.width_=Number(b);this.size_={height:this.height_+10,width:this.width_};this.text_=d||"";this.setSrc(a)};goog.inherits(Blockly.FieldImage,Blockly.Field);Blockly.FieldImage.prototype.clone=function(){return new Blockly.FieldImage(this.getSrc(),this.width_,this.height_,this.getText())};Blockly.FieldImage.prototype.rectElement_=null;Blockly.FieldImage.prototype.EDITABLE=!1; -Blockly.FieldLabel.prototype.SERIALIZABLE=!1; +Blockly.FieldImage.prototype.SERIALIZABLE=!1; Blockly.FieldImage.prototype.init=function(a){if(!this.sourceBlock_){this.sourceBlock_=a;var b=6-Blockly.BlockSvg.FIELD_HEIGHT;this.fieldGroup_=Blockly.createSvgElement("g",{},null);this.imageElement_=Blockly.createSvgElement("image",{height:this.height_+"px",width:this.width_+"px",y:b},this.fieldGroup_);this.setSrc(this.src_);goog.userAgent.GECKO&&(this.rectElement_=Blockly.createSvgElement("rect",{height:this.height_+"px",width:this.width_+"px",y:b,"fill-opacity":0},this.fieldGroup_));a.getSvgRoot().appendChild(this.fieldGroup_); a=this.rectElement_||this.imageElement_;a.tooltip=this.sourceBlock_;Blockly.Tooltip.bindMouseEvents(a)}};Blockly.FieldImage.prototype.dispose=function(){goog.dom.removeNode(this.fieldGroup_);this.rectElement_=this.imageElement_=this.fieldGroup_=null};Blockly.FieldImage.prototype.setTooltip=function(a){(this.rectElement_||this.imageElement_).tooltip=a};Blockly.FieldImage.prototype.getSrc=function(){return this.src_}; Blockly.FieldImage.prototype.setSrc=function(a){null!==a&&(this.src_=a,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(a)?a:""))};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a)};Blockly.FieldImage.prototype.render_=function(){}; @@ -1217,8 +1217,8 @@ Blockly.Block.prototype.appendStatementInput=function(a){return this.appendInput Blockly.Block.prototype.jsonInit=function(a){goog.asserts.assert(void 0==a.output||void 0==a.previousStatement,"Must not have both an output and a previousStatement.");this.setColour(a.colour);for(var b=0;void 0!==a["message"+b];)this.interpolate_(a["message"+b],a["args"+b]||[],a["lastDummyAlign"+b]),b++;void 0!==a.inputsInline&&this.setInputsInline(a.inputsInline);void 0!==a.output&&this.setOutput(!0,a.output);void 0!==a.previousStatement&&this.setPreviousStatement(!0,a.previousStatement);void 0!== a.nextStatement&&this.setNextStatement(!0,a.nextStatement);void 0!==a.tooltip&&this.setTooltip(a.tooltip);void 0!==a.helpUrl&&this.setHelpUrl(a.helpUrl)}; Blockly.Block.prototype.interpolate_=function(a,b,c){var d=Blockly.tokenizeInterpolation(a),e=[],f=0;a=[];for(var g=0;gd&&this.itemCount_[a]--;0==this.itemCount_[a]&&this.removeInput(this.getAddSubName(a,0),!0);(d=this.getInput(this.getAddSubName(a,c)))&&d.connection&&d.connection.targetConnection&&d.connection.targetConnection.sourceBlock_.unplug(!0,!0);for(c+=1;ce&&(d[a]--,this.setItemCount(a,d[a]));0==d[a]&&this.removeInput(this.getAddSubName(a,0),!0);(d=this.getInput(this.getAddSubName(a,c)))&&d.connection&&d.connection.targetConnection&&d.connection.targetConnection.sourceBlock_.unplug(!0,!0);for(c+=1;c minitems) { - this.itemCount_[name]--; + if (itemCount[name] > minitems) { + itemCount[name]--; + this.setItemCount(name, itemCount[name]); } - if (this.itemCount_[name] == 0) { + if (itemCount[name] == 0) { // If we drop down to 0 then we remove the block and let redraw // give us back one with the right name on it this.removeInput(this.getAddSubName(name,0),true); @@ -1411,6 +1420,25 @@ Blockly.Block.prototype.getAddSubName = function(name,pos) { return name+pos; } +/** + * Gets the itemCount array for an AddSub item. + * @return {Object} Data for the items and itemcount. + */ +Blockly.Block.prototype.getItemCount = function() { + return {'items': this.itemCount_}; +} + +/** + * Sets the itemCount value for an AddSub item + * @param {string} name The name of the input type field. + * @param {number} val the new value for the field + */ +Blockly.Block.prototype.setItemCount = function(name, val) { + if (name === 'items') { + this.itemCount_ = val; + } +} + /** * Creates the empty item for an addsub block * @param {string} name The name of the input type field. @@ -1434,8 +1462,9 @@ Blockly.Block.prototype.appendAddSubInput = function(name,pos,title) { var newName = this.getAddSubName(name,pos); var inputItem = null; var field = null; + var itemCount = this.getItemCount(); - if (this.itemCount_[name]) { + if (itemCount[name]) { inputItem = this.appendValueInput(newName) .setCheck(this.checks_[name]) .setAlign(Blockly.ALIGN_RIGHT); @@ -1470,17 +1499,18 @@ Blockly.Block.prototype.appendAddSubInput = function(name,pos,title) { * @throws {goog.asserts.AssertionError} if the field is not present. */ Blockly.Block.prototype.updateAddSubShape = function() { - for (var name in this.itemCount_) { - if (this.itemCount_.hasOwnProperty(name)) { + var itemCount = this.getItemCount(); + for (var name in itemCount) { + if (itemCount.hasOwnProperty(name)) { // First get rid of anything which is beyond our count - var pos = this.itemCount_[name]; + var pos = itemCount[name]; var elemName = this.getAddSubName(name,pos); while(this.getInput(elemName) != null) { this.removeInput(elemName); pos++; elemName = this.getAddSubName(name,pos); } - if (this.itemCount_[name]) { + if (itemCount[name]) { // Now add in the ones which we are missing. Note that // we need to make sure that they get put AFTER the one of // the same number @@ -1500,7 +1530,7 @@ Blockly.Block.prototype.updateAddSubShape = function() { } if (inputIndex !== -1) { inputIndex++; - for (pos = 1; pos < this.itemCount_[name];pos++,inputIndex++) { + for (pos = 1; pos < itemCount[name];pos++,inputIndex++) { var newName = this.getAddSubName(name,pos); var inputItem = this.getInput(newName); if (inputItem == null) { @@ -1524,7 +1554,7 @@ Blockly.Block.prototype.updateAddSubShape = function() { var subFieldName0 = name0+'_sub'; var hasSubField0 = this.getField(subFieldName0); // Now see what the main one has for fields - if (this.itemCount_[name] === 1) { + if (itemCount[name] === 1) { // Shouldn't have a sub field if this is the only entry if (hasSubField0) { inputItem.removeField(subFieldName0); @@ -1566,9 +1596,10 @@ Blockly.Block.prototype.updateAddSubShape = function() { * @this Blockly.Block */ Blockly.Block.prototype.domToMutationAddSub = function(xmlElement) { - for (var name in this.itemCount_) { - if (this.itemCount_.hasOwnProperty(name)) { - this.itemCount_[name] = parseInt(xmlElement.getAttribute(name),10); + var itemCount = this.getItemCount(); + for (var name in itemCount) { + if (itemCount.hasOwnProperty(name)) { + this.setItemCount(name, parseInt(xmlElement.getAttribute(name),10)); } } this.updateAddSubShape(); @@ -1581,9 +1612,10 @@ Blockly.Block.prototype.domToMutationAddSub = function(xmlElement) { */ Blockly.Block.prototype.mutationToDomAddSub = function() { var container = document.createElement('mutation'); - for (var name in this.itemCount_) { - if (this.itemCount_.hasOwnProperty(name)) { - container.setAttribute(name, this.itemCount_[name]); + var itemCount = this.getItemCount(); + for (var name in itemCount) { + if (itemCount.hasOwnProperty(name)) { + container.setAttribute(name, itemCount[name]); } } return container; @@ -1606,8 +1638,7 @@ Blockly.Block.prototype.appendAddSubGroup = function(title,name,checks, this.updateShape_ = this.updateAddSubShape; var root = this; - if (typeof this.itemCount_ === 'undefined') { - this.itemCount_ = {}; + if (typeof this.titles_ === 'undefined') { this.checks_ = {}; this.titles_ = {}; } @@ -1615,7 +1646,38 @@ Blockly.Block.prototype.appendAddSubGroup = function(title,name,checks, if (emptytitle) { this.titles_[name] = {normal: title, empty: emptytitle}; } - this.itemCount_[name] = 1; + this.setItemCount(name, 1); this.checks_[name] = checks; this.appendAddSubInput(name, 0, title); } + +/** + * Gets the itemCount array for an AddSub item with multiple elements + * @return {Object} Data for the items and itemcount. + */ +Blockly.Block.prototype.getMultiItemCount = function() { + return this.itemCount_; +} +/** + * Sets the itemCount value for an AddSub item with multiple elements + * @param {string} name The name of the input type field. + * @param {number} val the new value for the field + */ +Blockly.Block.prototype.setMultiItemCount = function(name, val) { + this.itemCount_[name] = val; +} + +Blockly.Block.prototype.appendAddSubMulti = function(title,name,checks, + emptytitle) { + if (typeof this.itemCount_ === 'undefined') { + this.itemCount_ = {}; + } + // + // Because we have multiple items on our blocks, we override the method + // of storing the item count value + // + this.getItemCount = this.getMultiItemCount; + this.setItemCount = this.setMultiItemCount; + + this.appendAddSubGroup(title,name,checks,emptytitle); +} diff --git a/core/field_image.js b/core/field_image.js index 118fd94219b..519b165281a 100644 --- a/core/field_image.js +++ b/core/field_image.js @@ -72,7 +72,7 @@ Blockly.FieldImage.prototype.rectElement_ = null; * Editable fields are saved by the XML renderer, non-editable fields are not. */ Blockly.FieldImage.prototype.EDITABLE = false; -Blockly.FieldLabel.prototype.SERIALIZABLE = false; +Blockly.FieldImage.prototype.SERIALIZABLE = false; /** * Install this image on a block. diff --git a/dart_compressed.js b/dart_compressed.js index 9951e5cfd95..1e1fa0ad5e3 100644 --- a/dart_compressed.js +++ b/dart_compressed.js @@ -19,7 +19,7 @@ Blockly.Dart.colour_blend=function(a){var b=Blockly.Dart.valueToCode(a,"COLOUR1" " int r1 = int.parse('0x${c1.substring(1, 3)}');"," int g1 = int.parse('0x${c1.substring(3, 5)}');"," int b1 = int.parse('0x${c1.substring(5, 7)}');"," int r2 = int.parse('0x${c2.substring(1, 3)}');"," int g2 = int.parse('0x${c2.substring(3, 5)}');"," int b2 = int.parse('0x${c2.substring(5, 7)}');"," num rn = (r1 * (1 - ratio) + r2 * ratio).round();"," String rs = rn.toInt().toRadixString(16);"," num gn = (g1 * (1 - ratio) + g2 * ratio).round();"," String gs = gn.toInt().toRadixString(16);", " num bn = (b1 * (1 - ratio) + b2 * ratio).round();"," String bs = bn.toInt().toRadixString(16);"," rs = '0$rs';"," rs = rs.substring(rs.length - 2);"," gs = '0$gs';"," gs = gs.substring(gs.length - 2);"," bs = '0$bs';"," bs = bs.substring(bs.length - 2);"," return '#$rs$gs$bs';","}"])+"("+b+", "+c+", "+a+")",Blockly.Dart.ORDER_UNARY_POSTFIX]}; // Copyright 2014 Google Inc. Apache License 2.0 -Blockly.Dart.lists={};Blockly.Dart.addReservedWords("Math");Blockly.Dart.lists_create_empty=function(a){return["[]",Blockly.Dart.ORDER_ATOMIC]};Blockly.Dart.lists_create_with=function(a){for(var b=Array(a.itemCount_.items),c=0;c")};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; -Blockly.Java.GetVariableType=function(a){(a=Blockly.Java.variableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.GetBlocklyType=function(a){return Blockly.Java.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a")};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; +Blockly.Java.GetVariableType=function(a){(a=this.variableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a result = new LinkedList<>();"," for(int x = 0; x < torepeat; x++) {"," result.add(item);"," }"," return result;","}"])+"("+b+","+a+")", Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.lists_length=function(a){return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"[]")+".size()",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.lists_isEmpty=function(a){return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"[]")+".size() == 0",Blockly.Java.ORDER_LOGICAL_NOT]}; Blockly.Java.lists_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"indexOf":"lastIndexOf",c=Blockly.Java.valueToCode(a,"FIND",Blockly.Java.ORDER_NONE)||"[]";return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"''")+"."+b+"("+c+") + 1",Blockly.Java.ORDER_FUNCTION_CALL]}; -Blockly.Java.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_UNARY_SIGN)||"1";a=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"[]";if("FIRST"==c){if("GET"==b)return[a+".getJsonObject(0)",Blockly.Java.ORDER_MEMBER];c=a+".pop(0)";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("LAST"==c){if("GET"==b)return[a+"[-1]",Blockly.Java.ORDER_MEMBER]; -c=a+".pop()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("FROM_START"==c){d=Blockly.isNumber(d)?parseInt(d,10)-1:"("+d+" - 1)";if("GET"==b)return[a+".get("+d+")",Blockly.Java.ORDER_MEMBER];c=a+".pop("+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+"\n"}else if("FROM_END"==c){if("GET"==b)return[a+"[-"+d+"]",Blockly.Java.ORDER_MEMBER];c=a+".pop(-"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL]; -if("REMOVE"==b)return c+"\n"}else if("RANDOM"==c){Blockly.Java.addImport("java.lang.Math");if("GET"==b)return[a+".get(Math.random() * "+a+".size())",Blockly.Java.ORDER_FUNCTION_CALL];c=Blockly.Java.provideFunction_("lists_remove_random_item",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(LinkedList myList) {"," int x = (int)(Math.random() * myList.size());"," return myList.remove(x);","}"])+"("+a+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"== -b)return c+";\n"}throw"Unhandled combination (lists_getIndex).";}; -Blockly.Java.lists_setIndex=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_NONE)||"1";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"None";if("FIRST"==d){if("SET"==c)return b+"[0] = "+a+"\n";if("INSERT"==c)return b+".insert(0, "+a+")\n"}else if("LAST"==d){if("SET"==c)return b+"[-1] = "+a+"\n";if("INSERT"==c)return b+".add("+ -a+");\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)";if("SET"==c)return b+"["+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert("+e+", "+a+")\n"}else if("FROM_END"==d){if("SET"==c)return b+"[-"+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert(-"+e+", "+a+")\n"}else if("RANDOM"==d){Blockly.Java.addImport("java.util.Random");b.match(/^\w+$/)?d="":(d=Blockly.Java.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),e=d+" = "+b+"\n",b=d,d=e);e=Blockly.Java.variableDB_.getDistinctName("tmp_x", -Blockly.Variables.NAME_TYPE);d+=e+" = int(random.random() * "+b+".size())\n";if("SET"==c)return d+(b+"["+e+"] = "+a+"\n");if("INSERT"==c)return d+=b+".insert("+e+", "+a+")\n"}throw"Unhandled combination (lists_setIndex).";}; -Blockly.Java.lists_getSublist=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Java.valueToCode(a,"AT1",Blockly.Java.ORDER_ADDITIVE)||"1";a=Blockly.Java.valueToCode(a,"AT2",Blockly.Java.ORDER_ADDITIVE)||"1";"FIRST"==c||"FROM_START"==c&&"1"==e?e="":"FROM_START"==c?e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)":"FROM_END"==c&&(e=Blockly.isNumber(e)?-parseInt(e,10):"-int("+e+")");"LAST"==d|| -"FROM_END"==d&&"1"==a?a="":"FROM_START"==c?a=Blockly.isNumber(a)?parseInt(a,10):"int("+a+")":"FROM_END"==c&&(Blockly.isNumber(a)?(a=1-parseInt(a,10),0==a&&(a="")):(Blockly.Java.definitions_.import_sys="import sys",a="int(1 - "+a+") or sys.maxsize"));return[b+"["+e+" : "+a+"]",Blockly.Java.ORDER_MEMBER]}; -Blockly.Java.lists_split=function(a){var b=a.getFieldValue("MODE");if("SPLIT"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_MEMBER)||"''",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_NONE),a=b+".split("+a+")";else if("JOIN"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_NONE)||"[]",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_MEMBER)||"''",a=a+".join("+b+")";else throw"Unknown mode: "+b;return[a,Blockly.Java.ORDER_FUNCTION_CALL]}; +Blockly.Java.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_UNARY_SIGN)||"1";a=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"[]";if("FIRST"==c){if("GET"==b)return[a+".getFirst()",Blockly.Java.ORDER_MEMBER];c=a+".removeFirst()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("LAST"==c){if("GET"==b)return[a+".getLast()", +Blockly.Java.ORDER_MEMBER];c=a+".removeLast()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("FROM_START"==c){d=Blockly.isNumber(d)?parseInt(d,10)-1:"("+d+" - 1)";if("GET"==b)return[a+".get((int)"+d+")",Blockly.Java.ORDER_MEMBER];c=a+".remove((int)"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("FROM_END"==c){if("GET"==b)return[a+".get("+a+".size() - (int)"+d+")",Blockly.Java.ORDER_MEMBER]; +c=a+".remove("+a+".size() - (int)"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("RANDOM"==c){Blockly.Java.addImport("java.lang.Math");if("GET"==b)return[a+".get((int)(Math.random() * "+a+".size()))",Blockly.Java.ORDER_FUNCTION_CALL];c=Blockly.Java.provideFunction_("lists_remove_random_item",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(LinkedList myList) {"," int x = (int)(Math.random() * myList.size());"," return myList.remove(x);", +"}"])+"("+a+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}throw"Unhandled combination (lists_getIndex).";}; +Blockly.Java.lists_setIndex=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_NONE)||"1";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"None";if("FIRST"==d){if("SET"==c)return b+".set(0, "+a+");\n";if("INSERT"==c)return b+".addFirst("+a+");\n"}else if("LAST"==d){if("SET"==c)return b+".set("+b+".size()-1, "+a+");\n";if("INSERT"== +c)return b+".add("+a+");\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseInt(e,10)-1:"((int)"+e+" - 1)";if("SET"==c)return b+".set("+e+", "+a+");\n";if("INSERT"==c)return b+".add("+e+", "+a+");\n"}else if("FROM_END"==d){e=Blockly.isNumber(e)?parseInt(e,10):"((int)"+e+")";if("SET"==c)return b+".set("+b+".size() -"+e+", "+a+");\n";if("INSERT"==c)return b+".add("+b+".size() -"+e+", "+a+");\n"}else if("RANDOM"==d){Blockly.Java.addImport("java.util.Random");b.match(/^\w+$/)?d="":(d=Blockly.Java.variableDB_.getDistinctName("tmp_list", +Blockly.Variables.NAME_TYPE),e=d+" = "+b+"\n",b=d,d=e);e=Blockly.Java.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);d+="int "+e+" = (int)(Math.random() * "+b+".size());\n";if("SET"==c)return d+(b+".set("+e+", "+a+");\n");if("INSERT"==c)return d+=b+".add("+e+", "+a+");\n"}throw"Unhandled combination (lists_setIndex).";}; +Blockly.Java.lists_getSublist=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Java.valueToCode(a,"AT1",Blockly.Java.ORDER_ADDITIVE)||"1";a=Blockly.Java.valueToCode(a,"AT2",Blockly.Java.ORDER_ADDITIVE)||"1";"FIRST"==c||"FROM_START"==c&&"1"==e?e="0":"FROM_START"==c?e=Blockly.isNumber(e)?parseInt(e,10)-1:"((int)"+e+" - 1)":"FROM_END"==c&&(e=Blockly.isNumber(e)?parseInt(e,10):"((int)"+e+")",e=b+".size() - "+ +e);"LAST"==d||"FROM_END"==d&&"1"==a?a=b+".size()-1":"FROM_START"==d?a=Blockly.isNumber(a)?parseInt(a,10)-1:"((int)"+a+"-1)":"FROM_END"==d&&(Blockly.isNumber(a)?(a=parseInt(a,10),a=b+".size() - "+a):a=b+".size() - ((int)"+a+"-1)");return[Blockly.Java.provideFunction_("lists_sublist",["public static LinkedList "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list, int startIndex, int endIndex) {"," LinkedList result = new LinkedList<>();"," int sizeList = list.size();"," for(int x = startIndex; x <= endIndex && x < sizeList; x++) {", +" result.add(list.get(x));"," }"," return result;","}"])+"("+b+", "+e+", "+a+")",Blockly.Java.ORDER_MEMBER]}; +Blockly.Java.lists_split=function(a){var b=a.getFieldValue("MODE");if("SPLIT"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_MEMBER)||"''",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_NONE),a="new LinkedList(Arrays.asList("+b+".split("+a+")))";else if("JOIN"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_NONE)||"[]",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_MEMBER)||"''",Blockly.Java.addImport("java.lang.StringBuilder"),a=Blockly.Java.provideFunction_("lists_join", +["public static String "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list, String separator) {"," StringBuilder result = new StringBuilder();",' String extra = "";'," for (String elem : list) {"," result.append(extra);"," result.append(elem);"," extra = separator;"," }"," return result.toString();","}"])+"("+b+", "+a+")";else throw"Unknown mode: "+b;return[a,Blockly.Java.ORDER_FUNCTION_CALL]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.logic={}; Blockly.Java.controls_if=function(a){for(var b=0,c=Blockly.Java.valueToCode(a,"IF"+b,Blockly.Java.ORDER_NONE)||"false",d=Blockly.Java.statementToCode(a,"DO"+b)||Blockly.Java.PASS,e="if ("+c+") {\n"+d,b=1;b<=a.elseifCount_;b++)c=Blockly.Java.valueToCode(a,"IF"+b,Blockly.Java.ORDER_NONE)||"false",d=Blockly.Java.statementToCode(a,"DO"+b)||Blockly.Java.PASS,e+="} else if ("+c+") {\n"+d;a.elseCount_&&(d=Blockly.Java.statementToCode(a,"ELSE")||Blockly.Java.PASS,e+="} else {\n"+d);return e+"}\n"}; -Blockly.Java.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Java.ORDER_RELATIONAL,d=Blockly.Java.valueToCode(a,"A",c)||"0";a=Blockly.Java.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]}; -Blockly.Java.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?" && ":" || ",c="and"==b?Blockly.Java.ORDER_LOGICAL_AND:Blockly.Java.ORDER_LOGICAL_OR,d=Blockly.Java.valueToCode(a,"A",c);a=Blockly.Java.valueToCode(a,"B",c);if(d||a){var e=" && "==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+b+a,c]};Blockly.Java.logic_negate=function(a){return["!("+(Blockly.Java.valueToCode(a,"BOOL",Blockly.Java.ORDER_LOGICAL_NOT)||"true")+")",Blockly.Java.ORDER_LOGICAL_NOT]}; -Blockly.Java.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_null=function(a){return["null",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_ternary=function(a){var b=Blockly.Java.valueToCode(a,"IF",Blockly.Java.ORDER_CONDITIONAL)||"false",c=Blockly.Java.valueToCode(a,"THEN",Blockly.Java.ORDER_CONDITIONAL)||"null";a=Blockly.Java.valueToCode(a,"ELSE",Blockly.Java.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Java.ORDER_CONDITIONAL]}; +Blockly.Java.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Java.getValueType(a,"A"),d=Blockly.Java.getValueType(a,"B"),e="",g=Blockly.Java.ORDER_RELATIONAL;c&&goog.array.contains(c,"String")||d&&goog.array.contains(d,"String")?(c=Blockly.Java.valueToCode(a,"A",g)||'""',a=Blockly.Java.valueToCode(a,"B",g)||'""',e="=="===b?c+".equals("+a+")":"!="===b?"!"+c+".equals("+a+")":c+".compareTo("+a+") "+b+" 0"):(c=Blockly.Java.valueToCode(a, +"A",g)||"0",a=Blockly.Java.valueToCode(a,"B",g)||"0",e=c+" "+b+" "+a);return[e,g]};Blockly.Java.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?" && ":" || ",c="and"==b?Blockly.Java.ORDER_LOGICAL_AND:Blockly.Java.ORDER_LOGICAL_OR,d=Blockly.Java.valueToCode(a,"A",c);a=Blockly.Java.valueToCode(a,"B",c);if(d||a){var e=" && "==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+b+a,c]}; +Blockly.Java.logic_negate=function(a){return["!("+(Blockly.Java.valueToCode(a,"BOOL",Blockly.Java.ORDER_LOGICAL_NOT)||"true")+")",Blockly.Java.ORDER_LOGICAL_NOT]};Blockly.Java.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_null=function(a){return["null",Blockly.Java.ORDER_ATOMIC]}; +Blockly.Java.logic_ternary=function(a){var b=Blockly.Java.valueToCode(a,"IF",Blockly.Java.ORDER_CONDITIONAL)||"false",c=Blockly.Java.valueToCode(a,"THEN",Blockly.Java.ORDER_CONDITIONAL)||"null";a=Blockly.Java.valueToCode(a,"ELSE",Blockly.Java.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Java.ORDER_CONDITIONAL]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.loops={};Blockly.Java.controls_repeat=function(a){var b=parseInt(a.getFieldValue("TIMES"),10),c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; Blockly.Java.controls_repeat_ext=function(a){var b=Blockly.Java.valueToCode(a,"TIMES",Blockly.Java.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")",c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; @@ -82,7 +85,7 @@ Blockly.Java.procedures_callreturn=function(a){for(var b=Blockly.Java.variableDB Blockly.Java.procedures_callnoreturn=function(a){for(var b=Blockly.Java.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=[],d=0;d Date: Mon, 20 Jul 2015 08:18:03 -0400 Subject: [PATCH 18/84] Fix incorrect call to getIcons causing render errors --- core/block_svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_svg.js b/core/block_svg.js index 0bfa7b99676..f3e6f408657 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -1369,7 +1369,7 @@ Blockly.BlockSvg.prototype.render = function(opt_bubble) { cursorX = -cursorX; } // Move the icons into position. - var icons = this.getIcons(true); + var icons = this.getIcons(false); for (var i = 0; i < icons.length; i++) { cursorX = icons[i].renderIcon(cursorX); } From 1cf09343cff312946ff49941264b92f65ed222d1 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Wed, 22 Jul 2015 13:33:07 -0400 Subject: [PATCH 19/84] Update Java code generator With this push, the only unit test for Java not running is the math() functions to operate on arrays Implemented variable type returns Changed local parameters so that they are the color of the procedure block instead of a variable block so that users can distinguish Also Remove unused clone functions --- blockly_compressed.js | 7 +- blocks/loops.js | 20 ++ blocks/procedures.js | 44 ++- blocks/variables.js | 46 ++- blocks_compressed.js | 44 +-- core/field_clickimage.js | 10 - core/field_scope_variable.js | 9 - core/variables.js | 27 +- generators/java.js | 588 +++++++++++++++++++++++++++++++++- generators/java/logic.js | 36 ++- generators/java/loops.js | 56 +++- generators/java/procedures.js | 21 +- generators/java/variables.js | 20 +- java_compressed.js | 56 ++-- tests/generators/unittest.js | 7 +- 15 files changed, 864 insertions(+), 127 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 23437846c55..88c6988a91a 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1185,7 +1185,7 @@ Blockly.FieldImage.prototype.setSrc=function(a){null!==a&&(this.src_=a,this.imag Blockly.FieldClickImage=function(a,b,c,d,e){Blockly.FieldClickImage.superClass_.constructor.call(this,a,b,c,"");this.setChangeHandler(e)};goog.inherits(Blockly.FieldClickImage,Blockly.FieldImage);Blockly.FieldClickImage.prototype.EDITABLE=!0;Blockly.FieldLabel.prototype.SERIALIZABLE=!1;Blockly.FieldClickImage.prototype.CURSOR="default"; Blockly.FieldClickImage.prototype.updateEditable=function(){this.sourceBlock_.isInFlyout||!this.EDITABLE?Blockly.addClass_(this.fieldGroup_,"blocklyIconGroupReadonly"):Blockly.removeClass_(this.fieldGroup_,"blocklyIconGroupReadonly")}; Blockly.FieldClickImage.prototype.init=function(a){this.sourceBlock_||(Blockly.FieldClickImage.superClass_.init.call(this,a),Blockly.addClass_(this.fieldGroup_,"blocklyIconGroup"),Blockly.addClass_(this.fieldGroup_,"blocklyIconFading"),this.updateEditable(),this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_())}; -Blockly.FieldClickImage.prototype.clone=function(){return new Blockly.FieldClickImage(this.getSrc(),this.width_,this.height_,this.text_,this.changeHandler_)};Blockly.FieldClickImage.prototype.showEditor_=function(){if(this.changeHandler_){var a=Blockly.dragMode_;Blockly.dragMode_=0;this.changeHandler_.call(this.sourceBlock_,this);Blockly.dragMode_=a}}; +Blockly.FieldClickImage.prototype.showEditor_=function(){if(this.changeHandler_){var a=Blockly.dragMode_;Blockly.dragMode_=0;this.changeHandler_.call(this.sourceBlock_,this);Blockly.dragMode_=a}}; // Copyright 2011 Google Inc. Apache License 2.0 Blockly.Block=function(){goog.asserts.assert(0==arguments.length,"Please use Blockly.Block.obtain.")};Blockly.Block.obtain=function(a,b){if(Blockly.Realtime.isEnabled())return Blockly.Realtime.obtainBlock(a,b);var c=a.rendered?new Blockly.BlockSvg:new Blockly.Block;c.initialize(a,b);return c};Blockly.Block.prototype.initialize=function(a,b){this.id=Blockly.Blocks.genUid();a.addTopBlock(this);this.fill(a,b)}; Blockly.Block.prototype.fill=function(a,b){this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.inputsInline=void 0;this.disabled=this.rendered=!1;this.tooltip="";this.contextMenu=!0;this.parentBlock_=null;this.childBlocks_=[];this.editable_=this.movable_=this.deletable_=!0;this.collapsed_=!1;this.comment=null;this.xy_=new goog.math.Coordinate(0,0);this.workspace=a;this.isInFlyout=a.isFlyout;this.RTL=a.RTL;if(b){this.type=b;var c=Blockly.Blocks[b];goog.asserts.assertObject(c, @@ -1370,8 +1370,9 @@ Blockly.FieldTextArea.prototype.onHtmlInputChange_=function(a){Blockly.FieldText Blockly.FieldTextArea.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.fieldGroup_.getBBox();a.style.width=b.width+"px";a.style.height=b.height+"px";b=this.getAbsoluteXY_();if(this.RTL){var c=this.borderRect_.getBBox();b.x+=c.width;b.x-=a.offsetWidth}b.y+=1;goog.userAgent.WEBKIT&&(b.y-=3);a.style.left=b.x+"px";a.style.top=b.y+"px"}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Variables={};Blockly.Variables.NAME_TYPE="VARIABLE";Blockly.Variables.allVariables=function(a){var b;if(a.getDescendants)b=a.getDescendants();else if(a.getAllBlocks)b=a.getAllBlocks();else throw"Not Block or Workspace: "+a;a=Object.create(null);for(var c=0;c} List of variable names with their types. + * @this Blockly.Block + */ + getVarsTypes: function() { + var vartypes = {}; + vartypes[this.getFieldValue('VAR')] = ['Number']; + return vartypes; + }, /** * Notification that a variable is renaming. * If the name matches one of this block's variables, rename it. @@ -261,6 +271,16 @@ Blockly.Blocks['controls_forEach'] = { getVars: function() { return [this.getFieldValue('VAR')]; }, + /** + * Return all types of variables referenced by this block. + * @return {!Array.} List of variable names with their types. + * @this Blockly.Block + */ + getVarsTypes: function() { + var vartypes = {}; + vartypes[this.getFieldValue('VAR')] = ['Object']; + return vartypes; + }, /** * Notification that a variable is renaming. * If the name matches one of this block's variables, rename it. diff --git a/blocks/procedures.js b/blocks/procedures.js index e2625a030b6..9d9f5c1244d 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -185,6 +185,7 @@ Blockly.Blocks['procedures_defnoreturn'] = { // Initialize procedure's callers with blank IDs. Blockly.Procedures.mutateCallers(this.getFieldValue('NAME'), this.workspace, this.arguments_); + this.workspace.fireChangeEvent(); }, /** * Modify the string for a parameter @@ -305,11 +306,20 @@ Blockly.Blocks['procedures_defnoreturn'] = { */ getVarsTypes: function() { var vartypes = {}; + var funcName = this.getFieldValue('NAME')+'.'; for (var i = 0; i < this.arguments_.length; i++) { if (this.arguments_[i]['type']) { - vartypes[this.arguments_[i]['name']] = this.arguments_[i]['type']; + vartypes[funcName + this.arguments_[i]['name']] = + this.arguments_[i]['type']; } } + var retItem = this.getInput('RETURN'); + if (retItem && + retItem.connection && + retItem.connection.targetConnection && + retItem.connection.targetConnection.check_) { + vartypes[funcName] = retItem.connection.targetConnection.check_; + } return vartypes; }, /** @@ -319,8 +329,6 @@ Blockly.Blocks['procedures_defnoreturn'] = { * @param {string} newName Renamed variable. * @this Blockly.Block */ - // TODO: In theory you shouldn't be able to rename parameters from outside the - // scope of the function. renameVar: function(oldName, newName) { var change = false; for (var i = 0; i < this.arguments_.length; i++) { @@ -626,6 +634,35 @@ Blockly.Blocks['procedures_callnoreturn'] = { } } }, + /** + * Return all types of variables referenced by this block. + * @return {!Array.} List of variable names with their types. + * @this Blockly.Block + */ + getVarsTypes: function() { + var vartypes = {}; + var funcName = this.getFieldValue('NAME')+'.'; + for (var i = 0; i < this.arguments_.length; i++) { + var parmInput = this.getInput('ARG' + i); + // First we want to see if there is an old block with the same ID as + // this argument. + var parmName = this.arguments_[i]['name']; + if (parmInput && + parmInput.connection && + parmInput.connection.targetConnection && + parmInput.connection.targetConnection.check_) { + vartypes[funcName+parmName] = + parmInput.connection.targetConnection.check_; + } + } + // If we return something, provide that information too + if (this.outputConnection && + this.outputConnection.targetConnection && + this.outputConnection.targetConnection.check_) { + vartypes[funcName] = this.outputConnection.targetConnection.check_; + } + return vartypes; + }, /** * Add menu option to find the definition block for this call. * @param {!Array} options List of menu options to add to. @@ -663,6 +700,7 @@ Blockly.Blocks['procedures_callreturn'] = { }, getProcedureCall: Blockly.Blocks['procedures_callnoreturn'].getProcedureCall, renameProcedure: Blockly.Blocks['procedures_callnoreturn'].renameProcedure, + getVarsTypes: Blockly.Blocks['procedures_callnoreturn'].getVarsTypes, setProcedureParameters: Blockly.Blocks['procedures_callnoreturn'].setProcedureParameters, renderArgs_: Blockly.Blocks['procedures_callnoreturn'].renderArgs_, diff --git a/blocks/variables.js b/blocks/variables.js index c51f52606af..607adc0fadf 100644 --- a/blocks/variables.js +++ b/blocks/variables.js @@ -48,6 +48,7 @@ Blockly.Blocks['variables_get'] = { this.setOutput(true); this.setTooltip(Blockly.Msg.VARIABLES_GET_TOOLTIP); this.contextMenuMsg_ = Blockly.Msg.VARIABLES_GET_CREATE_SET; + this.procedurePrefix_ = ''; }, /** * Return all variables referenced by this block. @@ -68,7 +69,7 @@ Blockly.Blocks['variables_get'] = { if (this.outputConnection && this.outputConnection.targetConnection && this.outputConnection.targetConnection.check_) { - vartypes[this.getFieldValue('VAR')] = + vartypes[this.procedurePrefix_+this.getFieldValue('VAR')] = this.outputConnection.targetConnection.check_; } return vartypes; @@ -85,6 +86,41 @@ Blockly.Blocks['variables_get'] = { this.setFieldValue(newName, 'VAR'); } }, + /** + * Called whenever anything on the workspace changes. + * Add warning if this flow block is not nested inside a loop. + * @this Blockly.Block + */ + onchange: function() { + var legal = false; + // Is the block nested in a procedure? + var block = this; + do { + if (block.getProcedureDef) { + break; + } + block = block.getSurroundParent(); + } while (block); + + var colour = Blockly.Blocks.variables.HUE; + // See if our variable name is any of the parameters of this function + if (block && block.getProcedureDef) { + var varName = this.getFieldValue('VAR'); + var tuple = block.getProcedureDef.call(block); + var params = tuple[1]; + for(var i = 0; i < params.length; i++) { + if (params[i]['name'] === varName) { + colour = Blockly.Blocks.procedures.HUE; + this.procedurePrefix_ = tuple[0]+'.'; + break; + } + } + } + + if (colour != this.getColour()) { + this.setColour(colour); + } + }, contextMenuType_: 'variables_set', /** * Add menu option to create getter/setter block for this setter/getter. @@ -130,8 +166,10 @@ Blockly.Blocks['variables_set'] = { "tooltip": Blockly.Msg.VARIABLES_SET_TOOLTIP, "helpUrl": Blockly.Msg.VARIABLES_SET_HELPURL }); + this.procedurePrefix_ = ''; this.contextMenuMsg_ = Blockly.Msg.VARIABLES_SET_CREATE_GET; }, + onchange: Blockly.Blocks['variables_get'].onchange, getVars: Blockly.Blocks['variables_get'].getVars, renameVar: Blockly.Blocks['variables_get'].renameVar, contextMenuType_: 'variables_get', @@ -148,7 +186,7 @@ Blockly.Blocks['variables_set'] = { valField.connection && valField.connection.targetConnection && valField.connection.targetConnection.check_) { - vartypes[this.getFieldValue('VAR')] = + vartypes[this.procedurePrefix_+this.getFieldValue('VAR')] = valField.connection.targetConnection.check_; } return vartypes; @@ -172,8 +210,10 @@ Blockly.Blocks['hash_variables_get'] = { .appendField(Blockly.Msg.VARIABLES_GET_TAIL); this.setOutput(true); this.contextMenuMsg_ = Blockly.Msg.VARIABLES_GET_CREATE_SET; + this.procedurePrefix_ = ''; this.contextMenuType_ = 'hash_variables_set'; }, + onchange: Blockly.Blocks['variables_get'].onchange, getVars: Blockly.Blocks['variables_get'].getVars, renameVar: Blockly.Blocks['variables_get'].renameVar, /** @@ -298,10 +338,12 @@ Blockly.Blocks['hash_variables_set'] = { "tooltip": Blockly.getToolTipString('variables_hash_param_set_tooltip'), //Blockly.Msg.VARIABLES_SET_TOOLTIP, "helpUrl": Blockly.getUrlString('variables_hash_param_set_url') //Blockly.Msg.VARIABLES_SET_HELPURL, }); + this.procedurePrefix_ = ''; this.contextMenuMsg_ = Blockly.Msg.VARIABLES_SET_CREATE_GET; this.contextMenuType_ = 'hash_variables_get'; }, + onchange: Blockly.Blocks['hash_variables_get'].onchange, getVars: Blockly.Blocks['hash_variables_get'].getVars, renameVar: Blockly.Blocks['hash_variables_get'].renameVar, getScopeVars: Blockly.Blocks['hash_variables_get'].getScopeVars, diff --git a/blocks_compressed.js b/blocks_compressed.js index 6f0afa93a8c..0acb6e8a89b 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -61,10 +61,10 @@ Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Bloc Blockly.Blocks.controls_whileUntil={init:function(){var a=[[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]];this.setHelpUrl(Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendValueInput("BOOL").setCheck("Boolean").appendField(new Blockly.FieldDropdown(a),"MODE");this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO);this.setPreviousStatement(!0);this.setNextStatement(!0); var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})},typeblock:[{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK,fields:{MODE:"WHILE"}},{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK,fields:{MODE:"UNTIL"}}]}; Blockly.Blocks.controls_for={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOR_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOR_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOR_INPUT_DO); -var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:function(a){if(!this.isCollapsed()){var b={enabled:!0},c=this.getFieldValue("VAR");b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR"); -c=goog.dom.createDom("block",null,c);c.setAttribute("type","variables_get");b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)}},typeblock:[{entry:Blockly.Msg.CONTROLS_FOR_TYPEBLOCK,values:{FROM:1,TO:10,BY:1}}]}; +var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Number"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:function(a){if(!this.isCollapsed()){var b={enabled:!0},c=this.getFieldValue("VAR");b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1", +c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR");c=goog.dom.createDom("block",null,c);c.setAttribute("type","variables_get");b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)}},typeblock:[{entry:Blockly.Msg.CONTROLS_FOR_TYPEBLOCK,values:{FROM:1,TO:10,BY:1}}]}; Blockly.Blocks.controls_forEach={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOREACH_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOREACH_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO);var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1", -a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}; +a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Object"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}; Blockly.Blocks.controls_flow_statements={init:function(){var a=[[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"FLOW");this.setPreviousStatement(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("FLOW");return{BREAK:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK, CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){var a=!1,b=this;do{if("controls_repeat"==b.type||"controls_repeat_ext"==b.type||"controls_forEach"==b.type||"controls_for"==b.type||"controls_whileUntil"==b.type){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)},typeblock:[{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK,fields:{FLOW:"BREAK"}},{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK, fields:{FLOW:"CONTINUE"}}]}; @@ -104,12 +104,12 @@ Blockly.Blocks.procedures_defnoreturn={init:function(){var a=new Blockly.FieldCl "NAME").appendField(a);this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP);this.setInputsInline(!1);this.arguments_=[];this.argid=0;this.setStatements_(!0);this.statementConnection_=null;this.hasReturnValue_=!1},doAddField:function(a){a=this.arguments_.length;for(var b="param"+a,c=!0;c;)for(var c=!1,d=0;d'); } /** @@ -189,12 +191,14 @@ Blockly.Java.getBaseclass = function() { /** * Get the Java type of a variable by name * @param {string} variable Name of the variable to get the type for - * @return {string} type Java type for the variablee + * @return {string} type Java type for the variable */ -Blockly.Java.GetVariableType = function(variable) { - var type = this.variableTypes_[variable]; +Blockly.Java.GetVariableType = function(name) { + var type = this.variableTypes_[name]; if (!type) { - type = 'string/*UNKNOWN_TYPE*/'; + type = 'String/*UNKNOWN_TYPE*/'; +// type = 'Var'; + Blockly.Java.provideVarClass(); } return type; }; @@ -202,7 +206,7 @@ Blockly.Java.GetVariableType = function(variable) { /** * Get the Java type of a variable by name * @param {string} variable Name of the variable to get the type for - * @return {string} type Java type for the variablee + * @return {string} type Java type for the variable */ Blockly.Java.GetBlocklyType = function(variable) { return this.blocklyTypes_[variable]; @@ -243,6 +247,20 @@ Blockly.Java.setExtraImports = function(extraImports) { this.ExtraImports_ = extraImports; } +Blockly.Java.getClasses = function() { + var code = ''; + for (var name in this.classes_) { + code += this.classes_[name]; + } + if (code) { + code += '\n\n'; + } + return code; +} + +Blockly.Java.setExtraClass = function(name, code) { + this.classes_[name] = code.join('\n')+'\n'; +} /* * Save away the base class implementation so we can call it but override it @@ -260,6 +278,7 @@ Blockly.Java.workspaceToCode = function(workspace, parms) { var code = this.workspaceToCode_(workspace,parms); var finalcode = 'package ' + this.getPackage() + ';\n\n' + this.getImports() + '\n\n' + + this.getClasses() + 'public class ' + this.getAppName(); if (this.getBaseclass()) { finalcode += ' extends ' + this.getBaseclass(); @@ -278,6 +297,520 @@ Blockly.Java.getValueType = function(block, field) { return targetBlock.outputConnection.check_; } + +Blockly.Java.provideVarClass = function() { + + Blockly.Java.addImport('java.text.DecimalFormat'); + Blockly.Java.addImport('java.text.NumberFormat'); + Blockly.Java.addImport('java.util.LinkedList'); + Blockly.Java.addImport('java.util.Objects'); + + var VarCode = [ + '/**', + ' *', + ' * @author bmoon', + ' */', + 'final class Var {', + '', + ' public enum Type {', + '', + ' STRING, INT, DOUBLE, LIST, UNKNOWN', + ' };', + '', + ' private Type _type;', + ' private Object _object;', + ' private static final NumberFormat _formatter = new DecimalFormat("#.#####");', + '', + ' /**', + ' * Construct a Var with an UNKNOWN type', + ' * ', + ' */', + ' public Var() {', + ' _type = Type.UNKNOWN;', + ' } // end var', + ' /**', + ' * Construct a Var and assign its contained object to that specified.', + ' * ', + ' * @param object The value to set this object to', + ' */', + ' public Var(Object object) {', + ' setObject(object);', + ' } // end var', + ' /**', + ' * Construct a Var from a given Var', + ' * ', + ' * @param var var to construct this one from', + ' */', + ' public Var(Var var) {', + ' setObject(var.getObject());', + ' } // end var', + '', + ' /**', + ' * Static constructor to make a var from some value.', + ' * ', + ' * @param val some value to construct a var around', + ' * @return the Var object', + ' */', + ' public static Var valueOf(Object val) {', + ' return new Var(val);', + ' } // end valueOf', + ' /**', + ' * Get the type of the underlying object', + ' * ', + ' * @return Will return the object\'s type as defined by Type', + ' */', + ' public Type getType() {', + ' return _type;', + ' } // end getType', + ' /**', + ' * Get the contained object', + ' * ', + ' * @return the object', + ' */', + ' public Object getObject() {', + ' return _object;', + ' } // end getObject', + ' /**', + ' * Clone Object', + ' * ', + ' * @return a new object equal to this one', + ' */', + ' public Object cloneObject() {', + ' Var tempVar = new Var(this);', + ' return tempVar.getObject();', + ' } // end cloneObject', + ' /**', + ' * Get object as an int. Does not make sense for a "LIST" type object', + ' * ', + ' * @return an integer whose value equals this object', + ' */', + ' public int getObjectAsInt() {', + ' switch (getType()) {', + ' case STRING:', + ' return Integer.parseInt((String) getObject());', + ' case INT:', + ' return (int) getObject();', + ' case DOUBLE:', + ' return new Double((double) getObject()).intValue();', + ' case LIST:', + ' // has no meaning', + ' break;', + ' default:', + ' // has no meaning', + ' break;', + ' }', + ' return 0;', + ' } // end getObjectAsInt', + ' /**', + ' * Get object as a double. Does not make sense for a "LIST" type object.', + ' * ', + ' * @return a double whose value equals this object', + ' */', + ' public double getObjectAsDouble() {', + ' switch (getType()) {', + ' case STRING:', + ' return Double.parseDouble((String) getObject());', + ' case INT:', + ' return new Integer((int )getObject()).doubleValue();', + ' case DOUBLE:', + ' return (double )getObject();', + ' case LIST:', + ' // has no meaning', + ' break;', + ' default:', + ' // has no meaning', + ' break;', + ' }', + ' return 0.0;', + ' } // end get object as double', + ' /**', + ' * Get object as a string.', + ' * ', + ' * @return The string value of the object. Note that for lists, this is a', + ' * comma separated list of the form {x,y,z,...}', + ' */', + ' public String getObjectAsString() {', + ' return this.toString();', + ' } // end gotObjectAsString', + ' /**', + ' * Get the object as a list.', + ' * ', + ' * @return a LinkedList whose elements are of type Var', + ' */', + ' public LinkedList getObjectAsList() {', + ' return (LinkedList) getObject();', + ' } // end getObjectAsList', + ' /**', + ' * If this object is a linked list, then calling this method will', + ' * return the Var at the index indicated', + ' * ', + ' * @param index the index of the Var to read (0 based)', + ' * @return the Var at that index', + ' */', + ' public Var get(int index) {', + ' return ((LinkedList) getObject()).get(index);', + ' } // end get', + ' /**', + ' * If this object is a linked list, then calling this method will', + ' * return the size of the linked list.', + ' * ', + ' * @return size of list', + ' */', + ' public int size() {', + ' return ((LinkedList) getObject()).size();', + ' } // end size', + ' /**', + ' * Set the value of of a list at the index specified. Note that this is', + ' * only value if this object is a list and also note that index must be in', + ' * bounds.', + ' * ', + ' * @param index the index into which the Var will be inserted', + ' * @param var the var to insert', + ' */', + ' public void set(int index, Var var) {', + ' ((LinkedList) getObject()).add(index, var);', + ' } // end set', + ' /**', + ' * Add all values from one List to another. Both lists are Var objects that', + ' * contain linked lists.', + ' * ', + ' * @param var The list to add', + ' */', + ' public void addAll(Var var) {', + ' ((LinkedList) getObject()).addAll(var.getObjectAsList());', + ' } // end addAll', + ' /**', + ' * Set the value of the underlying object. Note that the type of Var will be', + ' * determined when setObject is called.', + ' * ', + ' * @param val the value to set this Var to', + ' */', + ' public void setObject(Object val) {', + ' this._object = val;', + ' inferType();', + ' } // end setObject', + ' /**', + ' * Add a new member to a Var that contains a list. If the Var current is not', + ' * of type "LIST", then this Var will be converted to a list, its current value', + ' * will then be stored as the first member and this new member added to it.', + ' * ', + ' * @param member The new member to add to the list', + ' */', + ' public void add(Var member) {', + ' if (_type.equals(Var.Type.LIST)) {', + ' // already a list', + ' ((LinkedList) _object).add(member);', + ' } else {', + ' // not current a list, change it', + ' LinkedList temp = new LinkedList<>();', + ' temp.add(new Var(member));', + ' setObject(temp);', + ' }', + ' } // end add', + ' /**', + ' * Increment Object by some value.', + ' * ', + ' * @param inc The value to increment by', + ' */', + ' public void incrementObject(double inc) {', + ' switch (getType()) {', + ' case STRING:', + ' // has no meaning', + ' break;', + ' case INT:', + ' this.setObject((double) (this.getObjectAsInt() + inc));', + ' break;', + ' case DOUBLE:', + ' this.setObject((double) (this.getObjectAsDouble() + inc));', + ' break;', + ' case LIST:', + ' for (Var myVar : this.getObjectAsList()) {', + ' myVar.incrementObject(inc);', + ' }', + ' break;', + ' default:', + ' // has no meaning', + ' break;', + ' } // end switch', + ' } // end incrementObject', + ' /**', + ' * Increment Object by some value', + ' * ', + ' * @param inc The value to increment by', + ' */', + ' public void incrementObject(int inc) {', + ' switch (getType()) {', + ' case STRING:', + ' // has no meaning', + ' break;', + ' case INT:', + ' this.setObject((int) (this.getObjectAsInt() + inc));', + ' break;', + ' case DOUBLE:', + ' this.setObject((double) (this.getObjectAsDouble() + inc));', + ' break;', + ' case LIST:', + ' for (Var myVar : this.getObjectAsList()) {', + ' myVar.incrementObject(inc);', + ' }', + ' break;', + ' default:', + ' // has no meaning', + ' break;', + ' }// end switch', + ' } // end incrementObject', + '', + ' @Override', + ' public int hashCode() {', + ' int hash = 5;', + ' hash = 43 * hash + Objects.hashCode(this._type);', + ' hash = 43 * hash + Objects.hashCode(this._object);', + ' return hash;', + ' }', + ' /**', + ' * Test to see if this object equals another one. This is done by converting', + ' * both objects to strings and then doing a string compare.', + ' * @param obj', + ' * @return ', + ' */', + ' @Override', + ' public boolean equals(Object obj) {', + ' if (obj == null) {', + ' return false;', + ' }', + ' final Var other = Var.valueOf(obj);', + ' return this.toString().equals(other.toString());', + ' } // end equals', + ' /**', + ' * Check to see if this Var is less than some other var.', + ' * ', + ' * @param var the var to compare to', + ' * @return true if it is less than', + ' */', + ' public boolean lessThan(Var var) {', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;', + ' case INT:', + ' return this.getObjectAsInt() < var.getObjectAsDouble();', + ' case DOUBLE:', + ' return this.getObjectAsDouble() < var.getObjectAsDouble();', + ' case LIST:', + ' if (size() != var.size()) {', + ' return false;', + ' }', + ' if (!var.getType().equals(Var.Type.LIST)) {', + ' return false;', + ' }', + ' int index = 0;', + ' for (Var myVar : this.getObjectAsList()) {', + ' if (!myVar.lessThan(var.get(index))) {', + ' return false;', + ' }', + ' }', + ' return true;', + ' default:', + ' return false;', + ' }// end switch', + ' } // end less than', + ' /**', + ' * Check to see if this var is less than or equal to some other var', + ' * ', + ' * @param var the var to compare to', + ' * @return true if this is less than or equal to var', + ' */', + ' public boolean lessThanOrEqual(Var var) {', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;', + ' case INT:', + ' return this.getObjectAsInt() <= var.getObjectAsDouble();', + ' case DOUBLE:', + ' return this.getObjectAsDouble() <= var.getObjectAsDouble();', + ' case LIST:', + ' if (size() != var.size()) {', + ' return false;', + ' }', + ' if (!var.getType().equals(Var.Type.LIST)) {', + ' return false;', + ' }', + ' int index = 0;', + ' for (Var myVar : this.getObjectAsList()) {', + ' if (!myVar.lessThanOrEqual(var.get(index))) {', + ' return false;', + ' }', + ' }', + ' return true;', + ' default:', + ' return false;', + ' }// end switch', + ' } // end lessThanOrEqual', + ' /**', + ' * Check to see if this var is greater than a given var.', + ' * ', + ' * @param var the var to compare to.', + ' * @return true if this object is grater than the given var', + ' */', + ' public boolean greaterThan(Var var) {', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;', + ' case INT:', + ' return this.getObjectAsInt() > var.getObjectAsDouble();', + ' case DOUBLE:', + ' return this.getObjectAsDouble() > var.getObjectAsDouble();', + ' case LIST:', + ' if (size() != var.size()) {', + ' return false;', + ' }', + ' if (!var.getType().equals(Var.Type.LIST)) {', + ' return false;', + ' }', + ' int index = 0;', + ' for (Var myVar : this.getObjectAsList()) {', + ' if (!myVar.greaterThan(var.get(index))) {', + ' return false;', + ' }', + ' } // end myVar', + ' return true;', + ' default:', + ' return false;', + ' }// end switch', + ' } // end greaterThan', + ' /**', + ' * Check to see if this var is greater than or equal to a given var', + ' * ', + ' * @param var the var to compare to', + ' * @return true if this var is greater than or equal to the given var', + ' */', + ' public boolean greaterThanOrEqual(Var var) {', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;', + ' case INT:', + ' return this.getObjectAsInt() >= var.getObjectAsDouble();', + ' case DOUBLE:', + ' return this.getObjectAsDouble() >= var.getObjectAsDouble();', + ' case LIST:', + ' if (size() != var.size()) {', + ' return false;', + ' }', + ' if (!var.getType().equals(Var.Type.LIST)) {', + ' return false;', + ' }', + ' int index = 0;', + ' for (Var myVar : this.getObjectAsList()) {', + ' if (!myVar.greaterThanOrEqual(var.get(index))) {', + ' return false;', + ' }', + ' } // end for myVar', + ' return true;', + ' default:', + ' return false;', + ' }// end switch', + ' } // end greaterThanOrEqual', + ' /**', + ' * Compare this object\'s value to another', + ' * ', + ' * @param val the object to compare to', + ' * @return the value 0 if this is equal to the argument; a value less than 0 if this ', + ' * is numerically less than the argument; and a value greater than 0 if this is numerically ', + ' * greater than the argument (signed comparison).', + ' */', + ' public int compareTo(Object val) {', + ' Var var = new Var(val);', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString());', + ' case INT:', + ' if (var.getType().equals(Var.Type.INT)) {', + ' return ((Integer )this.getObjectAsInt()).compareTo(var.getObjectAsInt());', + ' } else {', + ' return ((Double )this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());', + ' }', + ' case DOUBLE:', + ' return ((Double )this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());', + ' case LIST:', + ' // doesn\'t make sense', + ' return Integer.MAX_VALUE;', + ' default:', + ' // doesn\'t make sense', + ' return Integer.MAX_VALUE;', + ' }// end switch', + ' } // end compareTo', + ' ', + ' /**', + ' * Convert this Var to a string format.', + ' * ', + ' * @return the string format of this var', + ' */', + ' @Override', + ' public String toString() {', + ' switch (getType()) {', + ' case STRING:', + ' return getObject().toString();', + ' case INT:', + ' Integer i = (int) getObject();', + ' return i.toString();', + ' case DOUBLE:', + ' Double d = (double) _object;', + ' return _formatter.format(d);', + ' case LIST:', + ' LinkedList ll = (LinkedList) getObject();', + ' StringBuilder sb = new StringBuilder();', + ' boolean first = true;', + ' for (Var v : ll) {', + ' if (first) {', + ' first = false;', + ' sb.append("{");', + ' } else {', + ' sb.append(", ");', + ' }', + ' sb.append(v.toString());', + ' } // end for each Var', + ' sb.append("}");', + ' return sb.toString();', + ' default:', + ' return getObject().toString();', + ' }// end switch', + ' } // end toString', + ' ', + ' /**', + ' * Internal method for inferring the "object type" of this object. When', + ' * it is done, it sets the private member value of _type. This will be', + ' * referenced later on when various method calls are made on this object.', + ' */', + ' private void inferType() {', + ' if (_object instanceof String) {', + ' _type = Type.STRING;', + ' } else {', + ' // must be a number or a list', + ' // try to see if its a double', + ' try {', + ' Double d = (double) _object;', + ' // it was a double, so keep going', + ' _type = Type.DOUBLE;', + ' } catch (Exception ex) {', + ' // not a double, see if it is an integer', + ' try {', + ' Integer i = (int) _object;', + ' // it was an integer', + ' _type = Type.INT;', + ' } catch (Exception ex2) {', + ' // not a double or integer, might be an array', + ' if (_object instanceof LinkedList) {', + ' _type = Type.LIST;', + ' } else {', + ' _type = Type.UNKNOWN;', + ' }', + ' } // end not an integer', + ' } // end not a double', + ' } // end else not a string', + ' } // end inferType', + '}' + ]; + Blockly.Java.classes_['Var'] = VarCode.join('\n')+'\n'; +} /** * Initialise the database of variable names. * @param {!Blockly.Workspace} workspace Workspace to generate code from. @@ -290,6 +823,8 @@ Blockly.Java.init = function(workspace, imports) { this.functionNames_ = Object.create(null); // Create a dictionary of all the libraries which would be needed this.imports_ = Object.create(null); + // Dictionary of any extra classes to output + this.classes_ = Object.create(null); // Start with the defaults that all the code depends on for(var i = 0; i < this.needImports_.length; i++) { this.addImport(this.needImports_[i]); @@ -303,45 +838,66 @@ Blockly.Java.init = function(workspace, imports) { var defvars = []; var variables = Blockly.Variables.allVariables(workspace); + var varsToOutput = variables.length; this.blocklyTypes_ = Blockly.Variables.allVariablesTypes(workspace); - + // Make sure all the type variables are pushed. This is because we + // Don't return the special function parameters in the allVariables list + for(var name in this.blocklyTypes_) { + variables.push(name); + } + var needVarClass = false; for (var x = 0; x < variables.length; x++) { var key = variables[x]; + var initializer = ''; var type = this.blocklyTypes_[key]; if (type === 'Object') { type = 'Object'; } else if (type === 'Array') { type = 'LinkedList'; + } else if (type === 'Var') { + type = 'Var'; + initializer = ' = new Var(0)'; + needVarClass = true; } else if (type === 'Boolean') { type = 'Boolean'; + initializer = ' = false;'; } else if (type === 'String') { type = 'String'; + initializer = ' = ""'; } else if (type === 'Colour') { type = 'String'; } else if (type === 'Number') { type = 'double'; - } else if (type !== '') { + } else if (typeof type !== 'undefined' && type !== '') { if (Blockly.Blocks[type] && Blockly.Blocks[type].GBPClass ) { type = Blockly.Blocks[type].GBPClass; } else { - console.log('Unknown type for '+key+' using Object for'+type); - type = 'Object/*UNKNOWN_TYPE for '+type+'*/'; + console.log('Unknown type for '+key+' using Var for '+type); + type = 'Var'; + initializer = ' = new Var(0)'; + needVarClass = true; } } else { // Unknown type - console.log('Unknown type for '+key+' using String'); - type = 'String/*UNKNOWN_TYPE*/'; + console.log('Unknown type for '+key+' using Object'); + type = 'Object'; } this.variableTypes_[key] = type; - defvars.push('protected ' + - type + ' '+ + if (x < varsToOutput) { + defvars.push('protected ' + + type + ' '+ this.variableDB_.getName(variables[x], Blockly.Variables.NAME_TYPE) + + initializer + ';'); + } } this.definitions_['variables'] = defvars.join('\n'); + if (needVarClass) { + Blockly.Java.provideVarClass(); + } }; /** @@ -402,6 +958,8 @@ Blockly.Java.toStringCode = function(item) { // Pure numbers get quoted if (Blockly.isNumber(item)) { item = '"' + item + '"'; + } else if(Blockly.Java.GetVariableType(item) === 'Var') { + item = item + '.toString()'; } else { // It is something else so we need to convert it on the fly this.addImport('java.text.DecimalFormat'); diff --git a/generators/java/logic.js b/generators/java/logic.js index 7aa28df8be4..f0341913099 100644 --- a/generators/java/logic.js +++ b/generators/java/logic.js @@ -66,13 +66,31 @@ Blockly.Java['logic_compare'] = function(block) { var operator = OPERATORS[block.getFieldValue('OP')]; var argument0Type = Blockly.Java.getValueType(block, 'A'); var argument1Type = Blockly.Java.getValueType(block, 'B'); - var isString = false; + var useFunctions = false; var code = ''; var order = Blockly.Java.ORDER_RELATIONAL; - if ((argument0Type && goog.array.contains(argument0Type, 'String')) || - (argument1Type && goog.array.contains(argument1Type, 'String'))) { - var argument0 = Blockly.Java.valueToCode(block, 'A', order) || '""'; - var argument1 = Blockly.Java.valueToCode(block, 'B', order) || '""'; + var argument0 = Blockly.Java.valueToCode(block, 'A', order); + var argument1 = Blockly.Java.valueToCode(block, 'B', order); + if (argument0.slice(-14) === '.cloneObject()' ) { + useFunctions = true; + argument0 = argument0.slice(0,-14); + } else if (argument1.slice(-14) === '.cloneObject()' ) { + useFunctions = true; + var temp = argument0; + argument0 = '!' + argument1.slice(0,-14); + argument1 = temp; + } else if ((argument0Type && goog.array.contains(argument0Type, 'String')) || + (argument1Type && goog.array.contains(argument1Type, 'String'))) { + useFunctions = true; + } + + if (useFunctions) { + if (!argument0) { + argument0 = '""'; + } + if (!argument1) { + argument1 = '""'; + } if (operator === '==') { code = argument0 + '.equals(' + argument1 + ')'; } else if (operator === '!=') { @@ -81,8 +99,12 @@ Blockly.Java['logic_compare'] = function(block) { code = argument0 + '.compareTo(' + argument1 + ') ' + operator + ' 0'; } } else { - var argument0 = Blockly.Java.valueToCode(block, 'A', order) || '0'; - var argument1 = Blockly.Java.valueToCode(block, 'B', order) || '0'; + if (!argument0) { + argument0 = 0; + } + if (!argument1) { + argument1 = 0; + } code = argument0 + ' ' + operator + ' ' + argument1; } return [code, order]; diff --git a/generators/java/loops.js b/generators/java/loops.js index ee4a44146b7..06e824a3313 100644 --- a/generators/java/loops.js +++ b/generators/java/loops.js @@ -107,6 +107,8 @@ Blockly.Java['controls_for'] = function(block) { branch = Blockly.Java.addLoopTrap(branch, block.id) || Blockly.Java.PASS; + var variable0Type = Blockly.Java.GetVariableType(block.getFieldValue('VAR')); + var code = ''; var range; @@ -125,14 +127,21 @@ Blockly.Java['controls_for'] = function(block) { direction = '>='; increment = -increment; } - if (increment < 0) { - doincrement = ' -= ' + Math.abs(increment); - } else if (increment != 1) { - doincrement = ' += ' + increment; + if (variable0Type === 'Var') { + code = 'for (' + variable0 + '.setObject(' + argument0 + '); ' + + variable0 + '.getObjectAsDouble() ' + + direction + argument1 + '; ' + + variable0 + '.incrementObject(' + increment + ')) '; + } else { + if (increment < 0) { + doincrement = ' -= ' + Math.abs(increment); + } else if (increment != 1) { + doincrement = ' += ' + increment; + } + code += 'for (' + variable0 + ' = ' + argument0 + '; ' + + variable0 + direction + argument1 + '; ' + + variable0 + doincrement + ')'; } - code += 'for (' + variable0 + ' = ' + argument0 + '; ' + - variable0 + direction + argument1 + '; ' + - variable0 + doincrement + ')'; } else { // Cache non-trivial values to variables to prevent repeated look-ups. var startVar = argument0; @@ -160,11 +169,19 @@ Blockly.Java['controls_for'] = function(block) { code += 'if (' + startVar + ' > ' + endVar + ') {\n'; code += Blockly.Java.INDENT + incVar + ' = -' + incVar + ';\n'; code += '}\n'; - code += 'for (' + variable0 + ' = ' + startVar + ';\n' + - ' ' + incVar + ' >= 0 ? ' + - variable0 + ' <= ' + endVar + ' : ' + - variable0 + ' >= ' + endVar + ';\n' + - ' ' + variable0 + ' += ' + incVar + ')'; + if (variable0Type === 'Var') { + code += 'for (' + variable0 + '.setObject(' + startVar + ');\n' + + ' ' + incVar + ' >= 0 ? ' + + variable0 + '.getObjectAsDouble() <= ' + endVar + ' : ' + + variable0 + '.getObjectAsDouble() >= ' + endVar + ';\n' + + variable0 + '.incrementObject(' + incVar + ')) '; + } else { + code += 'for (' + variable0 + ' = ' + startVar + ';\n' + + ' ' + incVar + ' >= 0 ? ' + + variable0 + ' <= ' + endVar + ' : ' + + variable0 + ' >= ' + endVar + ';\n' + + ' ' + variable0 + ' += ' + incVar + ')'; + } } code += ' {\n' + branch + @@ -180,9 +197,22 @@ Blockly.Java['controls_forEach'] = function(block) { var argument0 = Blockly.Java.valueToCode(block, 'LIST', Blockly.Java.ORDER_RELATIONAL) || '[]'; var branch = Blockly.Java.statementToCode(block, 'DO'); + var setvar0; branch = Blockly.Java.addLoopTrap(branch, block.id) || Blockly.Java.PASS; - var code = 'for (' +vartype0 + ' ' + variable0 + ' :' + argument0 + ') {\n' + + var loopVar = Blockly.Java.variableDB_.getDistinctName( + 'it', Blockly.Variables.NAME_TYPE); + if (vartype0 === 'Var') { + setvar0 = variable0 + '.setObject(' + loopVar + '.next())'; + } else { + setvar0 = variable0 + ' = ' + loopVar + '.next()'; + } + + Blockly.Java.addImport('java.util.Iterator'); + var code = 'for (Iterator ' + loopVar + ' = ' + + argument0 + '.iterator(); ' + loopVar + '.hasNext();) {\n'+ + ' ' + setvar0 + ';\n' + branch + '} // end for\n'; return code; }; diff --git a/generators/java/procedures.js b/generators/java/procedures.js index dbf6425912e..9c187654743 100644 --- a/generators/java/procedures.js +++ b/generators/java/procedures.js @@ -31,7 +31,8 @@ goog.require('Blockly.Java'); Blockly.Java['procedures_defreturn'] = function(block) { // Define a procedure with a return value. - var funcName = Blockly.Java.variableDB_.getName(block.getFieldValue('NAME'), + var funcPrefix = block.getFieldValue('NAME'); + var funcName = Blockly.Java.variableDB_.getName(funcPrefix, Blockly.Procedures.NAME_TYPE); var branch = Blockly.Java.statementToCode(block, 'STACK'); if (Blockly.Java.STATEMENT_PREFIX) { @@ -43,21 +44,33 @@ Blockly.Java['procedures_defreturn'] = function(block) { branch = Blockly.Java.INFINITE_LOOP_TRAP.replace(/%1/g, '"' + block.id + '"') + branch; } + var retType = 'void'; + if (this.hasReturnValue_) { + retType = Blockly.Java.GetVariableType(funcPrefix + '.'); + } + var returnValue = Blockly.Java.valueToCode(block, 'RETURN', Blockly.Java.ORDER_NONE) || ''; if (returnValue) { - returnValue = ' return ' + returnValue + ';\n'; + if (retType === 'Var') { + returnValue = ' return Var.valueOf(' + returnValue + ');\n'; + } else { + returnValue = ' return ' + returnValue + ';\n'; + } } else if (!branch) { branch = Blockly.Java.PASS; } var args = []; for (var x = 0; x < block.arguments_.length; x++) { - var type = Blockly.Java.GetVariableType(block.arguments_[x]['name']); + var type = Blockly.Java.GetVariableType(funcPrefix + '.' + + block.arguments_[x]['name']); args[x] = type + ' ' + Blockly.Java.variableDB_.getName(block.arguments_[x]['name'], Blockly.Variables.NAME_TYPE); } - var code = 'public void ' + funcName + '(' + args.join(', ') + '){\n' + + + var code = 'public ' + retType + ' ' + + funcName + '(' + args.join(', ') + '){\n' + branch + returnValue + "}"; code = Blockly.Java.scrub_(block, code); Blockly.Java.definitions_[funcName] = code; diff --git a/generators/java/variables.js b/generators/java/variables.js index 4aa6aa68a3d..6d7e9604de8 100644 --- a/generators/java/variables.js +++ b/generators/java/variables.js @@ -33,6 +33,10 @@ Blockly.Java['variables_get'] = function(block) { // Variable getter. var code = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE); + if(Blockly.Java.GetVariableType(this.procedurePrefix_+block.getFieldValue('VAR')) === 'Var') { + code += '.cloneObject()'; + } + return [code, Blockly.Java.ORDER_ATOMIC]; }; @@ -47,16 +51,20 @@ Blockly.Java['variables_set'] = function(block) { var sourceType = Blockly.Java.getValueType(block, 'VALUE'); var destType = Blockly.Java.GetBlocklyType(block.getFieldValue('VAR')); var compatible = false; - for (var i = 0; i < sourceType.length; i++) { - if (sourceType[i] === destType) { + + if (sourceType && goog.array.contains(sourceType, destType)) { compatible = true; - break; - } } if (destType === 'String' && !compatible) { argument0 = Blockly.Java.toStringCode(argument0); } - return varName + ' = ' + argument0 + ';\n'; + var code = varName; + if(Blockly.Java.GetVariableType(this.procedurePrefix_+block.getFieldValue('VAR')) === 'Var') { + code += '.setObject(' + argument0 + ');\n'; + } else { + code += ' = ' + argument0 + ';\n'; + } + return code; }; Blockly.Java['hash_variables_get'] = function(block) { @@ -72,7 +80,7 @@ Blockly.Java['hash_variables_get'] = function(block) { var varName = blockVariables[y]; // Variable name may be null if the block is only half-built. if (varName) { - var vartype = Blockly.Java.GetVariableType(varName); + var vartype = Blockly.Java.GetVariableType(this.procedurePrefix_+varName); if (vartype === 'Array') { getter = 'get'; diff --git a/java_compressed.js b/java_compressed.js index 13b046b32c3..b9cd2abef0b 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -6,17 +6,20 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern,equal"); Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_="";Blockly.Java.needImports_=[]; -Blockly.Java.ExtraImports_=null;Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a;console.log(this.AppName_+" --- <"+a+">")};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; -Blockly.Java.GetVariableType=function(a){(a=this.variableTypes_[a])||(a="string/*UNKNOWN_TYPE*/");return a};Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n /**\n * If this object is a linked list, then calling this method will\n * return the Var at the index indicated\n * \n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n /**\n * If this object is a linked list, then calling this method will\n * return the size of the linked list.\n * \n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n /**\n * Set the value of of a list at the index specified. Note that this is\n * only value if this object is a list and also note that index must be in\n * bounds.\n * \n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n * \n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n * \n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n } // end setObject\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current value\n * will then be stored as the first member and this new member added to it.\n * \n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n /**\n * Increment Object by some value.\n * \n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n /**\n * Increment Object by some value\n * \n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n * @param obj\n * @return \n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n /**\n * Check to see if this Var is less than some other var.\n * \n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n /**\n * Check to see if this var is less than or equal to some other var\n * \n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n /**\n * Check to see if this var is greater than a given var.\n * \n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n /**\n * Check to see if this var is greater than or equal to a given var\n * \n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n /**\n * Compare this object\'s value to another\n * \n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0 if this \n * is numerically less than the argument; and a value greater than 0 if this is numerically \n * greater than the argument (signed comparison).\n */\n public int compareTo(Object val) {\n Var var = new Var(val);\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer )this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double )this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double )this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n \n /**\n * Convert this Var to a string format.\n * \n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n \n /**\n * Internal method for inferring the "object type" of this object. When\n * it is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n}\n'}; +Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.imports_=Object.create(null);this.classes_=Object.create(null);for(var c=0;c",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Java.getValueType(a,"A"),d=Blockly.Java.getValueType(a,"B"),e="",g=Blockly.Java.ORDER_RELATIONAL;c&&goog.array.contains(c,"String")||d&&goog.array.contains(d,"String")?(c=Blockly.Java.valueToCode(a,"A",g)||'""',a=Blockly.Java.valueToCode(a,"B",g)||'""',e="=="===b?c+".equals("+a+")":"!="===b?"!"+c+".equals("+a+")":c+".compareTo("+a+") "+b+" 0"):(c=Blockly.Java.valueToCode(a, -"A",g)||"0",a=Blockly.Java.valueToCode(a,"B",g)||"0",e=c+" "+b+" "+a);return[e,g]};Blockly.Java.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?" && ":" || ",c="and"==b?Blockly.Java.ORDER_LOGICAL_AND:Blockly.Java.ORDER_LOGICAL_OR,d=Blockly.Java.valueToCode(a,"A",c);a=Blockly.Java.valueToCode(a,"B",c);if(d||a){var e=" && "==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+b+a,c]}; -Blockly.Java.logic_negate=function(a){return["!("+(Blockly.Java.valueToCode(a,"BOOL",Blockly.Java.ORDER_LOGICAL_NOT)||"true")+")",Blockly.Java.ORDER_LOGICAL_NOT]};Blockly.Java.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_null=function(a){return["null",Blockly.Java.ORDER_ATOMIC]}; -Blockly.Java.logic_ternary=function(a){var b=Blockly.Java.valueToCode(a,"IF",Blockly.Java.ORDER_CONDITIONAL)||"false",c=Blockly.Java.valueToCode(a,"THEN",Blockly.Java.ORDER_CONDITIONAL)||"null";a=Blockly.Java.valueToCode(a,"ELSE",Blockly.Java.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Java.ORDER_CONDITIONAL]}; +Blockly.Java.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Java.getValueType(a,"A"),d=Blockly.Java.getValueType(a,"B"),e=!1,f="",g=Blockly.Java.ORDER_RELATIONAL,f=Blockly.Java.valueToCode(a,"A",g);a=Blockly.Java.valueToCode(a,"B",g);if(".cloneObject()"===f.slice(-14))e=!0,f=f.slice(0,-14);else if(".cloneObject()"===a.slice(-14))e=!0,c=f,f="!"+a.slice(0,-14),a=c;else if(c&&goog.array.contains(c,"String")||d&&goog.array.contains(d, +"String"))e=!0;e?(f||(f='""'),a||(a='""'),f="=="===b?f+".equals("+a+")":"!="===b?"!"+f+".equals("+a+")":f+".compareTo("+a+") "+b+" 0"):(f||(f=0),a||(a=0),f=f+" "+b+" "+a);return[f,g]}; +Blockly.Java.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?" && ":" || ",c="and"==b?Blockly.Java.ORDER_LOGICAL_AND:Blockly.Java.ORDER_LOGICAL_OR,d=Blockly.Java.valueToCode(a,"A",c);a=Blockly.Java.valueToCode(a,"B",c);if(d||a){var e=" && "==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+b+a,c]};Blockly.Java.logic_negate=function(a){return["!("+(Blockly.Java.valueToCode(a,"BOOL",Blockly.Java.ORDER_LOGICAL_NOT)||"true")+")",Blockly.Java.ORDER_LOGICAL_NOT]}; +Blockly.Java.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_null=function(a){return["null",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_ternary=function(a){var b=Blockly.Java.valueToCode(a,"IF",Blockly.Java.ORDER_CONDITIONAL)||"false",c=Blockly.Java.valueToCode(a,"THEN",Blockly.Java.ORDER_CONDITIONAL)||"null";a=Blockly.Java.valueToCode(a,"ELSE",Blockly.Java.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Java.ORDER_CONDITIONAL]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.loops={};Blockly.Java.controls_repeat=function(a){var b=parseInt(a.getFieldValue("TIMES"),10),c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; Blockly.Java.controls_repeat_ext=function(a){var b=Blockly.Java.valueToCode(a,"TIMES",Blockly.Java.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")",c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; Blockly.Java.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Java.valueToCode(a,"BOOL",b?Blockly.Java.ORDER_LOGICAL_NOT:Blockly.Java.ORDER_NONE)||"false",d=Blockly.Java.statementToCode(a,"DO"),d=Blockly.Java.addLoopTrap(d,a.id)||Blockly.Java.PASS;if(b&&"true"===c||!b&&"false"===c)a=Blockly.Java.variableDB_.getDistinctName(c,Blockly.Variables.NAME_TYPE),Blockly.Java.stashStatement("boolean "+a+" = "+c+";\n"),c=a;b&&(c="!"+c);return"while ("+c+") {\n"+d+"} // end while\n"}; -Blockly.Java.controls_for=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);Blockly.Java.GetVariableType(a.getFieldValue("VAR"));var c=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0",d=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0",e=Blockly.Java.valueToCode(a,"BY",Blockly.Java.ORDER_NONE)||"1",g=Blockly.Java.statementToCode(a,"DO"),g=Blockly.Java.addLoopTrap(g,a.id)||Blockly.Java.PASS;a="";if(Blockly.isNumber(c)&& -Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),f="<=",h="++";c>d&&(f=">=",e=-e);0>e?h=" -= "+Math.abs(e):1!=e&&(h=" += "+e);a+="for ("+b+" = "+c+"; "+b+f+d+"; "+b+h+")"}else f=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(f=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="double "+f+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE), -a+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+="double "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("Math.abs("+e+");\n"),a=a+("if ("+f+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+f+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")";return a+=" {\n"+g+"} // end for\n"}; -Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;return"for ("+c+" "+b+" :"+d+") {\n"+e+"} // end for\n"}; -Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";}; +Blockly.Java.controls_for=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);Blockly.Java.GetVariableType(a.getFieldValue("VAR"));var c=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0",d=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0",e=Blockly.Java.valueToCode(a,"BY",Blockly.Java.ORDER_NONE)||"1",f=Blockly.Java.statementToCode(a,"DO"),f=Blockly.Java.addLoopTrap(f,a.id)||Blockly.Java.PASS;a=Blockly.Java.GetVariableType(a.getFieldValue("VAR")); +var g="";if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),k="<=",l="++";c>d&&(k=">=",e=-e);"Var"===a?g="for ("+b+".setObject("+c+"); "+b+".getObjectAsDouble() "+k+d+"; "+b+".incrementObject("+e+")) ":(0>e?l=" -= "+Math.abs(e):1!=e&&(l=" += "+e),g+="for ("+b+" = "+c+"; "+b+k+d+"; "+b+l+")")}else k=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(k=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE), +g+="double "+k+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),g+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),g+="double "+d+" = ",g=Blockly.isNumber(e)?g+(Math.abs(e)+";\n"):g+("Math.abs("+e+");\n"),g=g+("if ("+k+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),g+="}\n",g="Var"===a?g+("for ("+b+".setObject("+k+");\n "+d+" >= 0 ? "+ +b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+c+";\n"+b+".incrementObject("+d+")) "):g+("for ("+b+" = "+k+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")");return g+=" {\n"+f+"} // end for\n"}; +Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("it",Blockly.Variables.NAME_TYPE);b="Var"===c?b+".setObject("+a+".next())":b+" = "+a+".next()";Blockly.Java.addImport("java.util.Iterator"); +return"for (Iterator "+a+" = "+d+".iterator(); "+a+".hasNext();) {\n "+b+";\n"+e+"} // end for\n"};Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.math={};Blockly.Java.addReservedWords("math,random");Blockly.Java.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; Blockly.Java.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Java.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Java.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Java.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Java.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Java.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Java.valueToCode(a,"A",b)||"0";a=Blockly.Java.valueToCode(a,"B",b)||"0";var e="";" ** "===c?(Blockly.Java.addImport("java.lang.Math"),e="Math.pow("+d+", "+a+")"):e=d+c+a;return[e, @@ -79,9 +83,9 @@ Blockly.Java.math_random_int=function(a){Blockly.Java.addImport("java.lang.Math" "}"])+"("+b+", "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_random_float=function(a){Blockly.Java.addImport("java.lang.Math");return["Math.random()",Blockly.Java.ORDER_FUNCTION_CALL]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.procedures={}; -Blockly.Java.procedures_defreturn=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=Blockly.Java.statementToCode(a,"STACK");Blockly.Java.STATEMENT_PREFIX&&(c=Blockly.Java.prefixLines(Blockly.Java.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.Java.INDENT)+c);Blockly.Java.INFINITE_LOOP_TRAP&&(c=Blockly.Java.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+c);var d=Blockly.Java.valueToCode(a,"RETURN",Blockly.Java.ORDER_NONE)||"";d?d=" return "+ -d+";\n":c||(c=Blockly.Java.PASS);for(var e=[],g=0;g Date: Wed, 22 Jul 2015 14:33:50 -0400 Subject: [PATCH 20/84] Implement stub functions for sum/min/max Finalized the Java code generator stubs. At this point in time, all unit test cases work with the exception of the returns from the Java min/max/mode/median, etc functions. However all the code compiles cleanly --- generators/java/math.js | 47 +++++++++++++++++++++++++++++++++-------- java_compressed.js | 9 ++++---- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/generators/java/math.js b/generators/java/math.js index a057c2d5f99..6d0709e70a8 100644 --- a/generators/java/math.js +++ b/generators/java/math.js @@ -262,13 +262,40 @@ Blockly.Java['math_on_list'] = function(block) { var code; switch (func) { case 'SUM': - code = 'sum(' + list + ')'; + var functionName = Blockly.Java.provideFunction_( + 'math_sum', + // This operation excludes null and values that aren't int or float:', + // math_mean([null, null, "aString", 1, 9]) == 5.0.', + ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(List myList) {', + '// TODO: Implement this function', + ' return 0;', + '}']); + code = functionName + '(' + list + ')'; break; case 'MIN': - code = 'min(' + list + ')'; + var functionName = Blockly.Java.provideFunction_( + 'math_min', + // This operation excludes null and values that aren't int or float:', + // math_mean([null, null, "aString", 1, 9]) == 5.0.', + ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(List myList) {', + '// TODO: Implement this function', + ' return 0;', + '}']); + code = functionName + '(' + list + ')'; break; case 'MAX': - code = 'max(' + list + ')'; + var functionName = Blockly.Java.provideFunction_( + 'math_max', + // This operation excludes null and values that aren't int or float:', + // math_mean([null, null, "aString", 1, 9]) == 5.0.', + ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(List myList) {', + '// TODO: Implement this function', + ' return 0;', + '}']); + code = functionName + '(' + list + ')'; break; case 'AVERAGE': var functionName = Blockly.Java.provideFunction_( @@ -276,7 +303,7 @@ Blockly.Java['math_on_list'] = function(block) { // This operation excludes null and values that aren't int or float:', // math_mean([null, null, "aString", 1, 9]) == 5.0.', ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + - '(Object myList) {', + '(List myList) {', '// TODO: Implement this function', ' return 0;', '}']); @@ -288,22 +315,24 @@ Blockly.Java['math_on_list'] = function(block) { // This operation excludes null values: // math_median([null, null, 1, 3]) == 2.0. ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + - '(Object myList) {', + '(List myList) {', '// TODO: Implement this function', ' return 0;', '}']); code = functionName + '(' + list + ')'; break; case 'MODE': + Blockly.Java.addImport('java.util.LinkedList'); var functionName = Blockly.Java.provideFunction_( 'math_modes', // As a list of numbers can contain more than one mode, // the returned result is provided as an array. // Mode of [3, 'x', 'x', 1, 1, 2, '3'] -> ['x', 1]. - ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + - '(Object myList) {', + ['public static LinkedList ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + + '(List myList) {', + 'LinkedList result = new LinkedList<>();', '// TODO: Implement this function', - ' return 0;', + ' return result;', '}']); code = functionName + '(' + list + ')'; break; @@ -312,7 +341,7 @@ Blockly.Java['math_on_list'] = function(block) { var functionName = Blockly.Java.provideFunction_( 'math_standard_deviation', ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + - '(Object myList) {', + '(List myList) {', '// TODO: Implement this function', ' return 0;', '}']); diff --git a/java_compressed.js b/java_compressed.js index b9cd2abef0b..e22b3c72f9c 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -73,10 +73,11 @@ Blockly.Java.math_number_property=function(a){var b=Blockly.Java.valueToCode(a," " n = (Double)d;"," } else if (d instanceof Integer) {"," n = (Integer)d;"," } else {"," return false;"," }"," if (n == 2 || n == 3) {"," return true;"," }"," // False if n is negative, is 1, or not whole, or if n is divisible by 2 or 3."," if ((n <= 1) || (n % 1 != 0) || (n % 2 == 0) || (n % 3 == 0)) {"," return false;"," }"," // Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for (int x = 6; x <= Math.sqrt(n) + 1; x += 6) {"," if (n % (x - 1) == 0 || n % (x + 1) == 0) {", " return false;"," }"," }"," return true;","}"])+"("+b+")",[d,Blockly.Java.ORDER_FUNCTION_CALL];switch(c){case "EVEN":d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d=b+" % 1 == 0";break;case "POSITIVE":d=b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE);if(!a||"0"==a)return["False",Blockly.Java.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Java.ORDER_RELATIONAL]}; Blockly.Java.math_change=function(a){var b=Blockly.Java.valueToCode(a,"DELTA",Blockly.Java.ORDER_ADDITIVE)||"0";a=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = "+a+" + "+b+";\n"};Blockly.Java.math_round=Blockly.Java.math_single;Blockly.Java.math_trig=Blockly.Java.math_single; -Blockly.Java.math_on_list=function(a){var b=a.getFieldValue("OP"),c=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";switch(b){case "SUM":a="sum("+c+")";break;case "MIN":a="min("+c+")";break;case "MAX":a="max("+c+")";break;case "AVERAGE":b=Blockly.Java.provideFunction_("math_mean",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MEDIAN":b=Blockly.Java.provideFunction_("math_median", -["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MODE":b=Blockly.Java.provideFunction_("math_modes",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "STD_DEV":Blockly.Java.addImport("java.lang.Math");b=Blockly.Java.provideFunction_("math_standard_deviation",["public static double "+ -Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(Object myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "RANDOM":Blockly.Java.addImport("java.lang.Math");b=Blockly.Java.provideFunction_("math_random_list",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list) {"," int x = (int)(Math.floor(Math.random() * list.size()));"," return list.get(x);","}"]);c=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";a=b+"("+c+")";break;default:throw"Unknown operator: "+ -b;}return[a,Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_modulo=function(a){var b=Blockly.Java.valueToCode(a,"DIVIDEND",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Java.ORDER_MULTIPLICATIVE]}; +Blockly.Java.math_on_list=function(a){var b=a.getFieldValue("OP"),c=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";switch(b){case "SUM":b=Blockly.Java.provideFunction_("math_sum",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MIN":b=Blockly.Java.provideFunction_("math_min",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function", +" return 0;","}"]);a=b+"("+c+")";break;case "MAX":b=Blockly.Java.provideFunction_("math_max",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "AVERAGE":b=Blockly.Java.provideFunction_("math_mean",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MEDIAN":b=Blockly.Java.provideFunction_("math_median", +["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MODE":Blockly.Java.addImport("java.util.LinkedList");b=Blockly.Java.provideFunction_("math_modes",["public static LinkedList "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","LinkedList result = new LinkedList<>();","// TODO: Implement this function"," return result;","}"]);a=b+"("+c+")";break;case "STD_DEV":Blockly.Java.addImport("java.lang.Math"); +b=Blockly.Java.provideFunction_("math_standard_deviation",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "RANDOM":Blockly.Java.addImport("java.lang.Math");b=Blockly.Java.provideFunction_("math_random_list",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list) {"," int x = (int)(Math.floor(Math.random() * list.size()));"," return list.get(x);","}"]);c=Blockly.Java.valueToCode(a, +"LIST",Blockly.Java.ORDER_NONE)||"[]";a=b+"("+c+")";break;default:throw"Unknown operator: "+b;}return[a,Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_modulo=function(a){var b=Blockly.Java.valueToCode(a,"DIVIDEND",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Java.ORDER_MULTIPLICATIVE]}; Blockly.Java.math_format_as_decimal=function(a){var b=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"PLACES",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return['new DecimalFormat("#.'+Array(++a).join("0")+'").format('+b+")",Blockly.Java.ORDER_MULTIPLICATIVE]}; Blockly.Java.math_constrain=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"0",c=Blockly.Java.valueToCode(a,"LOW",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"HIGH",Blockly.Java.ORDER_NONE)||"float('inf')";return["Math.min(Math.max("+b+", "+c+"), "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]}; Blockly.Java.math_random_int=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0";return[Blockly.Java.provideFunction_("math_random_int",["public static int "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(int a, int b) {"," if (a > b) {"," // Swap a and b to ensure a is smaller."," int c = a;"," a = b;"," b = c;"," }"," return (int)Math.floor(Math.random() * (b - a + 1) + a);", From bafe05ac8545c1098d5a58075829866407cf01e7 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Tue, 28 Jul 2015 15:44:22 -0400 Subject: [PATCH 21/84] Implement final version of Java code generator We now pass all of the unit tests for Blockly --- blockly_compressed.js | 4 +- blocks/loops.js | 18 +- blocks_compressed.js | 6 +- core/variables.js | 7 + generators/java.js | 1240 +++++++++++++++++------------ generators/java/lists.js | 26 +- generators/java/logic.js | 61 +- generators/java/math.js | 92 +-- generators/java/text.js | 9 +- java_compressed.js | 70 +- tests/generators/unittest_java.js | 81 +- 11 files changed, 893 insertions(+), 721 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 691e5c8d0f0..e3474b6ad4a 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1372,8 +1372,8 @@ Blockly.FieldTextArea.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Variables={};Blockly.Variables.NAME_TYPE="VARIABLE";Blockly.Variables.allVariables=function(a){var b;if(a.getDescendants)b=a.getDescendants();else if(a.getAllBlocks)b=a.getAllBlocks();else throw"Not Block or Workspace: "+a;a=Object.create(null);for(var c=0;cd;d++){var e=1==d?a:b;e&&!e.outputConnection.checkType_(c)&&(c===this.prevParentConnection_?(this.setParent(null),c.sourceBlock_.bumpNeighbours_()):(e.setParent(null),e.bumpNeighbours_()))}this.prevParentConnection_=c},typeblock:Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK}; // Copyright 2012 Google Inc. Apache License 2.0 -Blockly.Blocks.loops={};Blockly.Blocks.loops.HUE=120;Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setChangeHandler(Blockly.FieldTextInput.nonnegativeIntegerValidator)}}; -Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_input",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setChangeHandler(Blockly.FieldTextInput.nonnegativeIntegerValidator)},typeblock:[{entry:Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK, -values:{TIMES:10}}]}; +Blockly.Blocks.loops={};Blockly.Blocks.loops.HUE=120; +Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO)},typeblock:[{entry:Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK,values:{TIMES:10}}]}; +Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_input",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setChangeHandler(Blockly.FieldTextInput.nonnegativeIntegerValidator)}}; Blockly.Blocks.controls_whileUntil={init:function(){var a=[[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]];this.setHelpUrl(Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendValueInput("BOOL").setCheck("Boolean").appendField(new Blockly.FieldDropdown(a),"MODE");this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO);this.setPreviousStatement(!0);this.setNextStatement(!0); var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})},typeblock:[{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK,fields:{MODE:"WHILE"}},{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK,fields:{MODE:"UNTIL"}}]}; Blockly.Blocks.controls_for={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOR_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOR_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOR_INPUT_DO); diff --git a/core/variables.js b/core/variables.js index a0a5300c588..74486b35092 100644 --- a/core/variables.js +++ b/core/variables.js @@ -112,6 +112,13 @@ Blockly.Variables.allVariablesTypes = function(root) { var blockVariablesTypes = func.call(blocks[x]); for (var key in blockVariablesTypes) { if (blockVariablesTypes.hasOwnProperty(key)) { + // For purposes of types, Colours are strings. We want to convert + // them all to strings + for (var slot = 0; slot < blockVariablesTypes[key].length; slot++) { + if (blockVariablesTypes[key][slot] === 'Colour') { + blockVariablesTypes[key][slot] = 'String'; + } + } if (typeof variableHash[key] === 'undefined') { variableHash[key] = blockVariablesTypes[key]; } else { diff --git a/generators/java.js b/generators/java.js index 12d4e31e2be..eb8719cdeb3 100644 --- a/generators/java.js +++ b/generators/java.js @@ -94,6 +94,10 @@ Blockly.Java.PASS = ' {}\n'; * Closure code for a section */ Blockly.Java.POSTFIX = ''; +/** + * The method of indenting. Java prefers four spaces by convention + */ +Blockly.Java.INDENT = ' '; /** * Any extra indent to be added to the currently generating code block */ @@ -196,7 +200,7 @@ Blockly.Java.getBaseclass = function() { Blockly.Java.GetVariableType = function(name) { var type = this.variableTypes_[name]; if (!type) { - type = 'String/*UNKNOWN_TYPE*/'; + type = 'String'; // type = 'Var'; Blockly.Java.provideVarClass(); } @@ -278,14 +282,15 @@ Blockly.Java.workspaceToCode = function(workspace, parms) { var code = this.workspaceToCode_(workspace,parms); var finalcode = 'package ' + this.getPackage() + ';\n\n' + this.getImports() + '\n\n' + - this.getClasses() + 'public class ' + this.getAppName(); if (this.getBaseclass()) { finalcode += ' extends ' + this.getBaseclass(); } finalcode += ' {\n\n' + code + '\n' + - '}\n'; + '}\n\n' + + this.getClasses() + ; return finalcode; } @@ -302,7 +307,12 @@ Blockly.Java.provideVarClass = function() { Blockly.Java.addImport('java.text.DecimalFormat'); Blockly.Java.addImport('java.text.NumberFormat'); + Blockly.Java.addImport('java.lang.Math'); + Blockly.Java.addImport('java.util.Arrays'); + Blockly.Java.addImport('java.util.Collections'); Blockly.Java.addImport('java.util.LinkedList'); + Blockly.Java.addImport('java.util.HashMap'); + Blockly.Java.addImport('java.util.Map'); Blockly.Java.addImport('java.util.Objects'); var VarCode = [ @@ -310,503 +320,641 @@ Blockly.Java.provideVarClass = function() { ' *', ' * @author bmoon', ' */', - 'final class Var {', + 'final class Var implements Comparable {', + '', + ' public enum Type {', + '', + ' STRING, INT, DOUBLE, LIST, UNKNOWN', + ' };', + '', + ' private Type _type;', + ' private Object _object;', + ' private static final NumberFormat _formatter = new DecimalFormat("#.#####");', + '', + ' /**', + ' * Construct a Var with an UNKNOWN type', + ' *', + ' */', + ' public Var() {', + ' _type = Type.UNKNOWN;', + ' } // end var', + '', + ' /**', + ' * Construct a Var and assign its contained object to that specified.', + ' *', + ' * @param object The value to set this object to', + ' */', + ' public Var(Object object) {', + ' setObject(object);', + ' } // end var', + '', + ' /**', + ' * Construct a Var from a given Var', + ' *', + ' * @param var var to construct this one from', + ' */', + ' public Var(Var var) {', + ' setObject(var.getObject());', + ' } // end var', + '', + ' /**', + ' * Static constructor to make a var from some value.', + ' *', + ' * @param val some value to construct a var around', + ' * @return the Var object', + ' */', + ' public static Var valueOf(Object val) {', + ' return new Var(val);', + ' } // end valueOf', + '', + ' /**', + ' * Get the type of the underlying object', + ' *', + ' * @return Will return the object\'s type as defined by Type', + ' */', + ' public Type getType() {', + ' return _type;', + ' } // end getType', + '', + ' /**', + ' * Get the contained object', + ' *', + ' * @return the object', + ' */', + ' public Object getObject() {', + ' return _object;', + ' } // end getObject', + '', + ' /**', + ' * Clone Object', + ' *', + ' * @return a new object equal to this one', + ' */', + ' public Object cloneObject() {', + ' Var tempVar = new Var(this);', + ' return tempVar.getObject();', + ' } // end cloneObject', + '', + ' /**', + ' * Get object as an int. Does not make sense for a "LIST" type object', + ' *', + ' * @return an integer whose value equals this object', + ' */', + ' public int getObjectAsInt() {', + ' switch (getType()) {', + ' case STRING:', + ' return Integer.parseInt((String) getObject());', + ' case INT:', + ' return (int) getObject();', + ' case DOUBLE:', + ' return new Double((double) getObject()).intValue();', + ' case LIST:', + ' // has no meaning', + ' break;', + ' default:', + ' // has no meaning', + ' break;', + ' }', + ' return 0;', + ' } // end getObjectAsInt', '', - ' public enum Type {', + ' /**', + ' * Get object as a double. Does not make sense for a "LIST" type object.', + ' *', + ' * @return a double whose value equals this object', + ' */', + ' public double getObjectAsDouble() {', + ' switch (getType()) {', + ' case STRING:', + ' return Double.parseDouble((String) getObject());', + ' case INT:', + ' return new Integer((int) getObject()).doubleValue();', + ' case DOUBLE:', + ' return (double) getObject();', + ' case LIST:', + ' // has no meaning', + ' break;', + ' default:', + ' // has no meaning', + ' break;', + ' }', + ' return 0.0;', + ' } // end get object as double', '', - ' STRING, INT, DOUBLE, LIST, UNKNOWN', - ' };', + ' /**', + ' * Get object as a string.', + ' *', + ' * @return The string value of the object. Note that for lists, this is a', + ' * comma separated list of the form {x,y,z,...}', + ' */', + ' public String getObjectAsString() {', + ' return this.toString();', + ' } // end gotObjectAsString', '', - ' private Type _type;', - ' private Object _object;', - ' private static final NumberFormat _formatter = new DecimalFormat("#.#####");', + ' /**', + ' * Get the object as a list.', + ' *', + ' * @return a LinkedList whose elements are of type Var', + ' */', + ' public LinkedList getObjectAsList() {', + ' return (LinkedList) getObject();', + ' } // end getObjectAsList', '', - ' /**', - ' * Construct a Var with an UNKNOWN type', - ' * ', - ' */', - ' public Var() {', - ' _type = Type.UNKNOWN;', - ' } // end var', - ' /**', - ' * Construct a Var and assign its contained object to that specified.', - ' * ', - ' * @param object The value to set this object to', - ' */', - ' public Var(Object object) {', - ' setObject(object);', - ' } // end var', - ' /**', - ' * Construct a Var from a given Var', - ' * ', - ' * @param var var to construct this one from', - ' */', - ' public Var(Var var) {', - ' setObject(var.getObject());', - ' } // end var', + ' /**', + ' * If this object is a linked list, then calling this method will return the', + ' * Var at the index indicated', + ' *', + ' * @param index the index of the Var to read (0 based)', + ' * @return the Var at that index', + ' */', + ' public Var get(int index) {', + ' return ((LinkedList) getObject()).get(index);', + ' } // end get', '', - ' /**', - ' * Static constructor to make a var from some value.', - ' * ', - ' * @param val some value to construct a var around', - ' * @return the Var object', - ' */', - ' public static Var valueOf(Object val) {', - ' return new Var(val);', - ' } // end valueOf', - ' /**', - ' * Get the type of the underlying object', - ' * ', - ' * @return Will return the object\'s type as defined by Type', - ' */', - ' public Type getType() {', - ' return _type;', - ' } // end getType', - ' /**', - ' * Get the contained object', - ' * ', - ' * @return the object', - ' */', - ' public Object getObject() {', - ' return _object;', - ' } // end getObject', - ' /**', - ' * Clone Object', - ' * ', - ' * @return a new object equal to this one', - ' */', - ' public Object cloneObject() {', - ' Var tempVar = new Var(this);', - ' return tempVar.getObject();', - ' } // end cloneObject', - ' /**', - ' * Get object as an int. Does not make sense for a "LIST" type object', - ' * ', - ' * @return an integer whose value equals this object', - ' */', - ' public int getObjectAsInt() {', - ' switch (getType()) {', - ' case STRING:', - ' return Integer.parseInt((String) getObject());', - ' case INT:', - ' return (int) getObject();', - ' case DOUBLE:', - ' return new Double((double) getObject()).intValue();', - ' case LIST:', - ' // has no meaning', - ' break;', - ' default:', - ' // has no meaning', - ' break;', + ' /**', + ' * If this object is a linked list, then calling this method will return the', + ' * size of the linked list.', + ' *', + ' * @return size of list', + ' */', + ' public int size() {', + ' return ((LinkedList) getObject()).size();', + ' } // end size', + '', + ' /**', + ' * Set the value of of a list at the index specified. Note that this is only', + ' * value if this object is a list and also note that index must be in', + ' * bounds.', + ' *', + ' * @param index the index into which the Var will be inserted', + ' * @param var the var to insert', + ' */', + ' public void set(int index, Var var) {', + ' ((LinkedList) getObject()).add(index, var);', + ' } // end set', + '', + ' /**', + ' * Add all values from one List to another. Both lists are Var objects that', + ' * contain linked lists.', + ' *', + ' * @param var The list to add', + ' */', + ' public void addAll(Var var) {', + ' ((LinkedList) getObject()).addAll(var.getObjectAsList());', + ' } // end addAll', + '', + ' /**', + ' * Set the value of the underlying object. Note that the type of Var will be', + ' * determined when setObject is called.', + ' *', + ' * @param val the value to set this Var to', + ' */', + ' public void setObject(Object val) {', + ' this._object = val;', + ' inferType();', + ' // make sure each element of List is Var if type is list', + ' if (_type.equals(Var.Type.LIST)) {', + ' LinkedList myList = new LinkedList<>();', + ' for (Object obj : this.getObjectAsList()) {', + ' myList.add(new Var(obj));', + ' }', + ' this._object = myList;', + ' }', + ' } // end setObject', + '', + ' /**', + ' * Add a new member to a Var that contains a list. If the Var current is not', + ' * of type "LIST", then this Var will be converted to a list, its current', + ' * value will then be stored as the first member and this new member added', + ' * to it.', + ' *', + ' * @param member The new member to add to the list', + ' */', + ' public void add(Var member) {', + ' if (_type.equals(Var.Type.LIST)) {', + ' // already a list', + ' ((LinkedList) _object).add(member);', + ' } else {', + ' // not current a list, change it', + ' LinkedList temp = new LinkedList<>();', + ' temp.add(new Var(member));', + ' setObject(temp);', + ' }', + ' } // end add', + '', + ' /**', + ' * Increment Object by some value.', + ' *', + ' * @param inc The value to increment by', + ' */', + ' public void incrementObject(double inc) {', + ' switch (getType()) {', + ' case STRING:', + ' // has no meaning', + ' break;', + ' case INT:', + ' this.setObject((double) (this.getObjectAsInt() + inc));', + ' break;', + ' case DOUBLE:', + ' this.setObject((double) (this.getObjectAsDouble() + inc));', + ' break;', + ' case LIST:', + ' for (Var myVar : this.getObjectAsList()) {', + ' myVar.incrementObject(inc);', + ' }', + ' break;', + ' default:', + ' // has no meaning', + ' break;', + ' } // end switch', + ' } // end incrementObject', + '', + ' /**', + ' * Increment Object by some value', + ' *', + ' * @param inc The value to increment by', + ' */', + ' public void incrementObject(int inc) {', + ' switch (getType()) {', + ' case STRING:', + ' // has no meaning', + ' break;', + ' case INT:', + ' this.setObject((int) (this.getObjectAsInt() + inc));', + ' break;', + ' case DOUBLE:', + ' this.setObject((double) (this.getObjectAsDouble() + inc));', + ' break;', + ' case LIST:', + ' for (Var myVar : this.getObjectAsList()) {', + ' myVar.incrementObject(inc);', + ' }', + ' break;', + ' default:', + ' // has no meaning', + ' break;', + ' }// end switch', + ' } // end incrementObject', + '', + ' @Override', + ' public int hashCode() {', + ' int hash = 5;', + ' hash = 43 * hash + Objects.hashCode(this._type);', + ' hash = 43 * hash + Objects.hashCode(this._object);', + ' return hash;', ' }', - ' return 0;', - ' } // end getObjectAsInt', - ' /**', - ' * Get object as a double. Does not make sense for a "LIST" type object.', - ' * ', - ' * @return a double whose value equals this object', - ' */', - ' public double getObjectAsDouble() {', - ' switch (getType()) {', - ' case STRING:', - ' return Double.parseDouble((String) getObject());', - ' case INT:', - ' return new Integer((int )getObject()).doubleValue();', - ' case DOUBLE:', - ' return (double )getObject();', - ' case LIST:', - ' // has no meaning', - ' break;', - ' default:', - ' // has no meaning', - ' break;', + '', + ' /**', + ' * Test to see if this object equals another one. This is done by converting', + ' * both objects to strings and then doing a string compare.', + ' *', + ' * @param obj', + ' * @return', + ' */', + ' @Override', + ' public boolean equals(Object obj) {', + ' if (obj == null) {', + ' return false;', + ' }', + ' final Var other = Var.valueOf(obj);', + ' return this.toString().equals(other.toString());', + ' } // end equals', + '', + ' /**', + ' * Check to see if this Var is less than some other var.', + ' *', + ' * @param var the var to compare to', + ' * @return true if it is less than', + ' */', + ' public boolean lessThan(Var var) {', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;', + ' case INT:', + ' return this.getObjectAsInt() < var.getObjectAsDouble();', + ' case DOUBLE:', + ' return this.getObjectAsDouble() < var.getObjectAsDouble();', + ' case LIST:', + ' if (size() != var.size()) {', + ' return false;', + ' }', + ' if (!var.getType().equals(Var.Type.LIST)) {', + ' return false;', + ' }', + ' int index = 0;', + ' for (Var myVar : this.getObjectAsList()) {', + ' if (!myVar.lessThan(var.get(index))) {', + ' return false;', + ' }', + ' }', + ' return true;', + ' default:', + ' return false;', + ' }// end switch', + ' } // end less than', + '', + ' /**', + ' * Check to see if this var is less than or equal to some other var', + ' *', + ' * @param var the var to compare to', + ' * @return true if this is less than or equal to var', + ' */', + ' public boolean lessThanOrEqual(Var var) {', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;', + ' case INT:', + ' return this.getObjectAsInt() <= var.getObjectAsDouble();', + ' case DOUBLE:', + ' return this.getObjectAsDouble() <= var.getObjectAsDouble();', + ' case LIST:', + ' if (size() != var.size()) {', + ' return false;', + ' }', + ' if (!var.getType().equals(Var.Type.LIST)) {', + ' return false;', + ' }', + ' int index = 0;', + ' for (Var myVar : this.getObjectAsList()) {', + ' if (!myVar.lessThanOrEqual(var.get(index))) {', + ' return false;', + ' }', + ' }', + ' return true;', + ' default:', + ' return false;', + ' }// end switch', + ' } // end lessThanOrEqual', + '', + ' /**', + ' * Check to see if this var is greater than a given var.', + ' *', + ' * @param var the var to compare to.', + ' * @return true if this object is grater than the given var', + ' */', + ' public boolean greaterThan(Var var) {', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;', + ' case INT:', + ' return this.getObjectAsInt() > var.getObjectAsDouble();', + ' case DOUBLE:', + ' return this.getObjectAsDouble() > var.getObjectAsDouble();', + ' case LIST:', + ' if (size() != var.size()) {', + ' return false;', + ' }', + ' if (!var.getType().equals(Var.Type.LIST)) {', + ' return false;', + ' }', + ' int index = 0;', + ' for (Var myVar : this.getObjectAsList()) {', + ' if (!myVar.greaterThan(var.get(index))) {', + ' return false;', + ' }', + ' } // end myVar', + ' return true;', + ' default:', + ' return false;', + ' }// end switch', + ' } // end greaterThan', + '', + ' /**', + ' * Check to see if this var is greater than or equal to a given var', + ' *', + ' * @param var the var to compare to', + ' * @return true if this var is greater than or equal to the given var', + ' */', + ' public boolean greaterThanOrEqual(Var var) {', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;', + ' case INT:', + ' return this.getObjectAsInt() >= var.getObjectAsDouble();', + ' case DOUBLE:', + ' return this.getObjectAsDouble() >= var.getObjectAsDouble();', + ' case LIST:', + ' if (size() != var.size()) {', + ' return false;', + ' }', + ' if (!var.getType().equals(Var.Type.LIST)) {', + ' return false;', + ' }', + ' int index = 0;', + ' for (Var myVar : this.getObjectAsList()) {', + ' if (!myVar.greaterThanOrEqual(var.get(index))) {', + ' return false;', + ' }', + ' } // end for myVar', + ' return true;', + ' default:', + ' return false;', + ' }// end switch', + ' } // end greaterThanOrEqual', + '', + ' /**', + ' * Compare this object\'s value to another', + ' *', + ' * @param val the object to compare to', + ' * @return the value 0 if this is equal to the argument; a value less than 0', + ' * if this is numerically less than the argument; and a value greater than 0', + ' * if this is numerically greater than the argument (signed comparison).', + ' */', + ' @Override', + ' public int compareTo(Object val) {', + ' // only instantiate if val is not instance of Var', + ' Var var;', + ' if (val instanceof Var) {', + ' var = (Var) val;', + ' } else {', + ' var = new Var(val);', + ' }', + ' switch (getType()) {', + ' case STRING:', + ' return this.getObjectAsString().compareTo(var.getObjectAsString());', + ' case INT:', + ' if (var.getType().equals(Var.Type.INT)) {', + ' return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());', + ' } else {', + ' return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());', + ' }', + ' case DOUBLE:', + ' return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());', + ' case LIST:', + ' // doesn\'t make sense', + ' return Integer.MAX_VALUE;', + ' default:', + ' // doesn\'t make sense', + ' return Integer.MAX_VALUE;', + ' }// end switch', + ' } // end compareTo', + '', + ' /**', + ' * Convert this Var to a string format.', + ' *', + ' * @return the string format of this var', + ' */', + ' @Override', + ' public String toString() {', + ' switch (getType()) {', + ' case STRING:', + ' return getObject().toString();', + ' case INT:', + ' Integer i = (int) getObject();', + ' return i.toString();', + ' case DOUBLE:', + ' Double d = (double) _object;', + ' return _formatter.format(d);', + ' case LIST:', + ' LinkedList ll = (LinkedList) getObject();', + ' StringBuilder sb = new StringBuilder();', + ' boolean first = true;', + ' for (Var v : ll) {', + ' if (first) {', + ' first = false;', + ' sb.append("{");', + ' } else {', + ' sb.append(", ");', + ' }', + ' sb.append(v.toString());', + ' } // end for each Var', + ' sb.append("}");', + ' return sb.toString();', + ' default:', + ' return getObject().toString();', + ' }// end switch', + ' } // end toString', + '', + ' /**', + ' * Internal method for inferring the "object type" of this object. When it', + ' * is done, it sets the private member value of _type. This will be', + ' * referenced later on when various method calls are made on this object.', + ' */', + ' private void inferType() {', + ' if (_object instanceof String) {', + ' _type = Type.STRING;', + ' } else {', + ' // must be a number or a list', + ' // try to see if its a double', + ' try {', + ' Double d = (double) _object;', + ' // it was a double, so keep going', + ' _type = Type.DOUBLE;', + ' } catch (Exception ex) {', + ' // not a double, see if it is an integer', + ' try {', + ' Integer i = (int) _object;', + ' // it was an integer', + ' _type = Type.INT;', + ' } catch (Exception ex2) {', + ' // not a double or integer, might be an array', + ' if (_object instanceof LinkedList) {', + ' _type = Type.LIST;', + ' } else if (_object instanceof List) {', + ' _type = Type.LIST;', + ' _object = new LinkedList<>((List) _object);', + ' } else {', + ' _type = Type.UNKNOWN;', + ' }', + ' } // end not an integer', + ' } // end not a double', + ' } // end else not a string', + ' } // end inferType', + '', + ' static double math_sum(Var myList) {', + ' double sum = 0;', + ' LinkedList ll = myList.getObjectAsList();', + ' for (Var var : ll) {', + ' sum += var.getObjectAsDouble();', + ' }', + ' return sum;', ' }', - ' return 0.0;', - ' } // end get object as double', - ' /**', - ' * Get object as a string.', - ' * ', - ' * @return The string value of the object. Note that for lists, this is a', - ' * comma separated list of the form {x,y,z,...}', - ' */', - ' public String getObjectAsString() {', - ' return this.toString();', - ' } // end gotObjectAsString', - ' /**', - ' * Get the object as a list.', - ' * ', - ' * @return a LinkedList whose elements are of type Var', - ' */', - ' public LinkedList getObjectAsList() {', - ' return (LinkedList) getObject();', - ' } // end getObjectAsList', - ' /**', - ' * If this object is a linked list, then calling this method will', - ' * return the Var at the index indicated', - ' * ', - ' * @param index the index of the Var to read (0 based)', - ' * @return the Var at that index', - ' */', - ' public Var get(int index) {', - ' return ((LinkedList) getObject()).get(index);', - ' } // end get', - ' /**', - ' * If this object is a linked list, then calling this method will', - ' * return the size of the linked list.', - ' * ', - ' * @return size of list', - ' */', - ' public int size() {', - ' return ((LinkedList) getObject()).size();', - ' } // end size', - ' /**', - ' * Set the value of of a list at the index specified. Note that this is', - ' * only value if this object is a list and also note that index must be in', - ' * bounds.', - ' * ', - ' * @param index the index into which the Var will be inserted', - ' * @param var the var to insert', - ' */', - ' public void set(int index, Var var) {', - ' ((LinkedList) getObject()).add(index, var);', - ' } // end set', - ' /**', - ' * Add all values from one List to another. Both lists are Var objects that', - ' * contain linked lists.', - ' * ', - ' * @param var The list to add', - ' */', - ' public void addAll(Var var) {', - ' ((LinkedList) getObject()).addAll(var.getObjectAsList());', - ' } // end addAll', - ' /**', - ' * Set the value of the underlying object. Note that the type of Var will be', - ' * determined when setObject is called.', - ' * ', - ' * @param val the value to set this Var to', - ' */', - ' public void setObject(Object val) {', - ' this._object = val;', - ' inferType();', - ' } // end setObject', - ' /**', - ' * Add a new member to a Var that contains a list. If the Var current is not', - ' * of type "LIST", then this Var will be converted to a list, its current value', - ' * will then be stored as the first member and this new member added to it.', - ' * ', - ' * @param member The new member to add to the list', - ' */', - ' public void add(Var member) {', - ' if (_type.equals(Var.Type.LIST)) {', - ' // already a list', - ' ((LinkedList) _object).add(member);', - ' } else {', - ' // not current a list, change it', - ' LinkedList temp = new LinkedList<>();', - ' temp.add(new Var(member));', - ' setObject(temp);', + '', + ' static double math_min(Var myList) {', + ' double min = Double.MAX_VALUE;', + ' double d;', + ' LinkedList ll = myList.getObjectAsList();', + ' for (Var var : ll) {', + ' d = var.getObjectAsDouble();', + ' if (d < min) {', + ' min = d;', + ' }', + ' }', + ' return min;', ' }', - ' } // end add', - ' /**', - ' * Increment Object by some value.', - ' * ', - ' * @param inc The value to increment by', - ' */', - ' public void incrementObject(double inc) {', - ' switch (getType()) {', - ' case STRING:', - ' // has no meaning', - ' break;', - ' case INT:', - ' this.setObject((double) (this.getObjectAsInt() + inc));', - ' break;', - ' case DOUBLE:', - ' this.setObject((double) (this.getObjectAsDouble() + inc));', - ' break;', - ' case LIST:', - ' for (Var myVar : this.getObjectAsList()) {', - ' myVar.incrementObject(inc);', - ' }', - ' break;', - ' default:', - ' // has no meaning', - ' break;', - ' } // end switch', - ' } // end incrementObject', - ' /**', - ' * Increment Object by some value', - ' * ', - ' * @param inc The value to increment by', - ' */', - ' public void incrementObject(int inc) {', - ' switch (getType()) {', - ' case STRING:', - ' // has no meaning', - ' break;', - ' case INT:', - ' this.setObject((int) (this.getObjectAsInt() + inc));', - ' break;', - ' case DOUBLE:', - ' this.setObject((double) (this.getObjectAsDouble() + inc));', - ' break;', - ' case LIST:', - ' for (Var myVar : this.getObjectAsList()) {', - ' myVar.incrementObject(inc);', - ' }', - ' break;', - ' default:', - ' // has no meaning', - ' break;', - ' }// end switch', - ' } // end incrementObject', '', - ' @Override', - ' public int hashCode() {', - ' int hash = 5;', - ' hash = 43 * hash + Objects.hashCode(this._type);', - ' hash = 43 * hash + Objects.hashCode(this._object);', - ' return hash;', - ' }', - ' /**', - ' * Test to see if this object equals another one. This is done by converting', - ' * both objects to strings and then doing a string compare.', - ' * @param obj', - ' * @return ', - ' */', - ' @Override', - ' public boolean equals(Object obj) {', - ' if (obj == null) {', - ' return false;', + ' static double math_max(Var myList) {', + ' double max = Double.MIN_VALUE;', + ' double d;', + ' LinkedList ll = myList.getObjectAsList();', + ' for (Var var : ll) {', + ' d = var.getObjectAsDouble();', + ' if (d > max) {', + ' max = d;', + ' }', + ' }', + ' return max;', ' }', - ' final Var other = Var.valueOf(obj);', - ' return this.toString().equals(other.toString());', - ' } // end equals', - ' /**', - ' * Check to see if this Var is less than some other var.', - ' * ', - ' * @param var the var to compare to', - ' * @return true if it is less than', - ' */', - ' public boolean lessThan(Var var) {', - ' switch (getType()) {', - ' case STRING:', - ' return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;', - ' case INT:', - ' return this.getObjectAsInt() < var.getObjectAsDouble();', - ' case DOUBLE:', - ' return this.getObjectAsDouble() < var.getObjectAsDouble();', - ' case LIST:', - ' if (size() != var.size()) {', - ' return false;', - ' }', - ' if (!var.getType().equals(Var.Type.LIST)) {', - ' return false;', - ' }', - ' int index = 0;', - ' for (Var myVar : this.getObjectAsList()) {', - ' if (!myVar.lessThan(var.get(index))) {', - ' return false;', - ' }', - ' }', - ' return true;', - ' default:', - ' return false;', - ' }// end switch', - ' } // end less than', - ' /**', - ' * Check to see if this var is less than or equal to some other var', - ' * ', - ' * @param var the var to compare to', - ' * @return true if this is less than or equal to var', - ' */', - ' public boolean lessThanOrEqual(Var var) {', - ' switch (getType()) {', - ' case STRING:', - ' return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;', - ' case INT:', - ' return this.getObjectAsInt() <= var.getObjectAsDouble();', - ' case DOUBLE:', - ' return this.getObjectAsDouble() <= var.getObjectAsDouble();', - ' case LIST:', - ' if (size() != var.size()) {', - ' return false;', - ' }', - ' if (!var.getType().equals(Var.Type.LIST)) {', - ' return false;', - ' }', - ' int index = 0;', - ' for (Var myVar : this.getObjectAsList()) {', - ' if (!myVar.lessThanOrEqual(var.get(index))) {', - ' return false;', - ' }', - ' }', - ' return true;', - ' default:', - ' return false;', - ' }// end switch', - ' } // end lessThanOrEqual', - ' /**', - ' * Check to see if this var is greater than a given var.', - ' * ', - ' * @param var the var to compare to.', - ' * @return true if this object is grater than the given var', - ' */', - ' public boolean greaterThan(Var var) {', - ' switch (getType()) {', - ' case STRING:', - ' return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;', - ' case INT:', - ' return this.getObjectAsInt() > var.getObjectAsDouble();', - ' case DOUBLE:', - ' return this.getObjectAsDouble() > var.getObjectAsDouble();', - ' case LIST:', - ' if (size() != var.size()) {', - ' return false;', - ' }', - ' if (!var.getType().equals(Var.Type.LIST)) {', - ' return false;', - ' }', - ' int index = 0;', - ' for (Var myVar : this.getObjectAsList()) {', - ' if (!myVar.greaterThan(var.get(index))) {', - ' return false;', - ' }', - ' } // end myVar', - ' return true;', - ' default:', - ' return false;', - ' }// end switch', - ' } // end greaterThan', - ' /**', - ' * Check to see if this var is greater than or equal to a given var', - ' * ', - ' * @param var the var to compare to', - ' * @return true if this var is greater than or equal to the given var', - ' */', - ' public boolean greaterThanOrEqual(Var var) {', - ' switch (getType()) {', - ' case STRING:', - ' return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;', - ' case INT:', - ' return this.getObjectAsInt() >= var.getObjectAsDouble();', - ' case DOUBLE:', - ' return this.getObjectAsDouble() >= var.getObjectAsDouble();', - ' case LIST:', - ' if (size() != var.size()) {', - ' return false;', - ' }', - ' if (!var.getType().equals(Var.Type.LIST)) {', - ' return false;', - ' }', - ' int index = 0;', - ' for (Var myVar : this.getObjectAsList()) {', - ' if (!myVar.greaterThanOrEqual(var.get(index))) {', - ' return false;', - ' }', - ' } // end for myVar', - ' return true;', - ' default:', - ' return false;', - ' }// end switch', - ' } // end greaterThanOrEqual', - ' /**', - ' * Compare this object\'s value to another', - ' * ', - ' * @param val the object to compare to', - ' * @return the value 0 if this is equal to the argument; a value less than 0 if this ', - ' * is numerically less than the argument; and a value greater than 0 if this is numerically ', - ' * greater than the argument (signed comparison).', - ' */', - ' public int compareTo(Object val) {', - ' Var var = new Var(val);', - ' switch (getType()) {', - ' case STRING:', - ' return this.getObjectAsString().compareTo(var.getObjectAsString());', - ' case INT:', - ' if (var.getType().equals(Var.Type.INT)) {', - ' return ((Integer )this.getObjectAsInt()).compareTo(var.getObjectAsInt());', - ' } else {', - ' return ((Double )this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());', - ' }', - ' case DOUBLE:', - ' return ((Double )this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());', - ' case LIST:', - ' // doesn\'t make sense', - ' return Integer.MAX_VALUE;', - ' default:', - ' // doesn\'t make sense', - ' return Integer.MAX_VALUE;', - ' }// end switch', - ' } // end compareTo', - ' ', - ' /**', - ' * Convert this Var to a string format.', - ' * ', - ' * @return the string format of this var', - ' */', - ' @Override', - ' public String toString() {', - ' switch (getType()) {', - ' case STRING:', - ' return getObject().toString();', - ' case INT:', - ' Integer i = (int) getObject();', - ' return i.toString();', - ' case DOUBLE:', - ' Double d = (double) _object;', - ' return _formatter.format(d);', - ' case LIST:', - ' LinkedList ll = (LinkedList) getObject();', - ' StringBuilder sb = new StringBuilder();', - ' boolean first = true;', - ' for (Var v : ll) {', - ' if (first) {', - ' first = false;', - ' sb.append("{");', - ' } else {', - ' sb.append(", ");', - ' }', - ' sb.append(v.toString());', - ' } // end for each Var', - ' sb.append("}");', - ' return sb.toString();', - ' default:', - ' return getObject().toString();', - ' }// end switch', - ' } // end toString', - ' ', - ' /**', - ' * Internal method for inferring the "object type" of this object. When', - ' * it is done, it sets the private member value of _type. This will be', - ' * referenced later on when various method calls are made on this object.', - ' */', - ' private void inferType() {', - ' if (_object instanceof String) {', - ' _type = Type.STRING;', - ' } else {', - ' // must be a number or a list', - ' // try to see if its a double', - ' try {', - ' Double d = (double) _object;', - ' // it was a double, so keep going', - ' _type = Type.DOUBLE;', - ' } catch (Exception ex) {', - ' // not a double, see if it is an integer', - ' try {', - ' Integer i = (int) _object;', - ' // it was an integer', - ' _type = Type.INT;', - ' } catch (Exception ex2) {', - ' // not a double or integer, might be an array', - ' if (_object instanceof LinkedList) {', - ' _type = Type.LIST;', - ' } else {', - ' _type = Type.UNKNOWN;', - ' }', - ' } // end not an integer', - ' } // end not a double', - ' } // end else not a string', - ' } // end inferType', + '', + ' static double math_mean(Var myList) {', + ' return Var.math_sum(myList) / myList.size();', + ' }', + '', + ' static double math_median(Var myList) {', + ' LinkedList ll = myList.getObjectAsList();', + ' Collections.sort(ll);', + ' int length = myList.size();', + ' int middle = length / 2;', + ' if (length % 2 == 1) {', + ' return ll.get(middle).getObjectAsDouble();', + ' } else {', + ' double d1 = ll.get(middle - 1).getObjectAsDouble();', + ' double d2 = ll.get(middle).getObjectAsDouble();', + ' return (d1 + d2) / 2.0;', + ' }', + ' }', + '', + ' static Var math_modes(Var myList) {', + ' final Var modes = new Var();', + ' final Map countMap = new HashMap();', + ' double max = -1;', + ' double d;', + ' LinkedList ll = myList.getObjectAsList();', + ' for (Var var : ll) {', + ' d = var.getObjectAsDouble();', + ' double count = 0;', + ' if (countMap.containsKey(d)) {', + ' count = countMap.get(d) + 1;', + ' } else {', + ' count = 1;', + ' }', + ' countMap.put(d, count);', + ' if (count > max) {', + ' max = count;', + ' }', + ' }', + ' for (final Map.Entry tuple : countMap.entrySet()) {', + ' if (tuple.getValue() == max) {', + ' modes.add(Var.valueOf(tuple.getKey().doubleValue()));', + ' }', + ' }', + ' return modes;', + ' }', + '', + ' static double math_standard_deviation(Var myList) {', + ' double mean = math_mean(myList);', + ' double size = myList.size();', + ' double temp = 0;', + ' double d;', + ' LinkedList ll = myList.getObjectAsList();', + ' for (Var var : ll) {', + ' d = var.getObjectAsDouble();', + ' temp += (mean - d) * (mean - d);', + ' }', + ' double variance = temp / size;', + ' return Math.sqrt(variance);', + ' }', + '', '}' ]; Blockly.Java.classes_['Var'] = VarCode.join('\n')+'\n'; @@ -860,7 +1008,7 @@ Blockly.Java.init = function(workspace, imports) { needVarClass = true; } else if (type === 'Boolean') { type = 'Boolean'; - initializer = ' = false;'; + initializer = ' = false'; } else if (type === 'String') { type = 'String'; initializer = ' = ""'; @@ -907,15 +1055,69 @@ Blockly.Java.init = function(workspace, imports) { */ Blockly.Java.finish = function(code) { // Convert the definitions dictionary into a list. - var definitions = []; + var definitions = {}; + var funcs = [[],[]]; for (var name in this.definitions_) { + if (name === 'variables') { + continue; + } var def = this.definitions_[name]; - if (typeof def === "function") { - def = def.call(this); + var slot = 1; + // If the call back for the definition is a function we will asssume that + // it is not static + if (typeof def !== "function") { + // Since we have the text for the function, let's figure out if it is + // static and sort it first. Just look at the first two words of the + // function and if it has 'static' we are good + var head = def.split(" ",3); + if (goog.array.contains(head, 'static')) { + slot = 0; + } + } + funcs[slot].push(name); + } + + + // We have all the functions broken into two slots. So go through in order + // and get the statics and then the non-statics to output. + var allDefs = this.definitions_['variables'] + '\n\n'; + for(var slot = 0; slot < 2; slot++) { + var names = funcs[slot].sort(); + for (var pos = 0; pos < names.length; pos++) { + var def = this.definitions_[names[pos]]; + if (typeof def === "function") { + def = def.call(this); + } + + // Figure out the header to put on the function + var header = '/**\n' + + ' * Description goes here\n'; + var extra = ' *\n'; + var res1 = def.split("(", 2); + var res = res1[0]; // Get everything before the ( + var res2 = res.split(" "); + var rettype = res2[res2.length-2]; // The next to the last word + res = res1[1]; // Take the parameters after the ( + res2 = res.split(")",1); + res = res2[0].trim(); + if (res !== '') { + var args = res.split(","); + for (var arg = 0; arg < args.length; arg++) { + var argline = args[arg].split(" "); + header += extra + ' * @param ' + argline[argline.length-1] + '\n'; + extra = ''; + } + } + if (rettype !== 'void') { + header += extra + ' * @return ' + rettype + '\n'; + extra = ''; + } + header += ' */\n'; + + allDefs += header + def + '\n\n'; } - definitions.push(def); } - var allDefs = definitions.join('\n\n'); +// var allDefs = definitions.join('\n\n'); return allDefs.replace(/\n\n+/g, '\n\n').replace(/\n*$/, '\n\n\n') + code; }; @@ -968,30 +1170,30 @@ Blockly.Java.toStringCode = function(item) { var functionName = this.provideFunction_( 'blocklyToString', [ 'public static String blocklyToString(Object object) {', - ' String result;', - ' if (object instanceof String) {', - ' result = (String) object;', - ' } else {', - ' // must be a number', - ' // might be a double', - ' try {', - ' Double d = (double) object;', - ' // it was a double, so keep going', - ' NumberFormat formatter = new DecimalFormat("#.#####");', - ' result = formatter.format(d);', + ' String result;', + ' if (object instanceof String) {', + ' result = (String) object;', + ' } else {', + ' // must be a number', + ' // might be a double', + ' try {', + ' Double d = (double) object;', + ' // it was a double, so keep going', + ' NumberFormat formatter = new DecimalFormat("#.#####");', + ' result = formatter.format(d);', '', - ' } catch (Exception ex) {', - ' // not a double, see if it is an integer', - ' try {', - ' Integer i = (int) object;', - ' // format should be number with a decimal point', - ' result = i.toString();', - ' } catch (Exception ex2) {', - ' // not a double or integer', - ' result = "UNKNOWN";', - ' }', - ' }', - ' }', + ' } catch (Exception ex) {', + ' // not a double, see if it is an integer', + ' try {', + ' Integer i = (int) object;', + ' // format should be number with a decimal point', + ' result = i.toString();', + ' } catch (Exception ex2) {', + ' // not a double or integer', + ' result = "UNKNOWN";', + ' }', + ' }', + ' }', '', ' return result;', '}' diff --git a/generators/java/lists.js b/generators/java/lists.js index 04eb6c22937..ce58509e798 100644 --- a/generators/java/lists.js +++ b/generators/java/lists.js @@ -71,6 +71,9 @@ Blockly.Java['lists_length'] = function(block) { // List length. var argument0 = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_NONE) || '[]'; + if (argument0.slice(-14) === '.cloneObject()' ) { + argument0 = argument0.slice(0,-14) + '.getObjectAsList()'; + } return [argument0 + '.size()', Blockly.Java.ORDER_FUNCTION_CALL]; }; @@ -90,6 +93,9 @@ Blockly.Java['lists_indexOf'] = function(block) { Blockly.Java.ORDER_NONE) || '[]'; var argument1 = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_MEMBER) || '\'\''; + if (argument1.slice(-14) === '.cloneObject()' ) { + argument1 = argument1.slice(0,-14) + '.getObjectAsList()'; + } var code = argument1 + '.' + operator + '(' + argument0 + ') + 1'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; @@ -103,6 +109,9 @@ Blockly.Java['lists_getIndex'] = function(block) { Blockly.Java.ORDER_UNARY_SIGN) || '1'; var list = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_MEMBER) || '[]'; + if (list.slice(-14) === '.cloneObject()' ) { + list = list.slice(0,-14) + '.getObjectAsList()'; + } if (where == 'FIRST') { if (mode == 'GET') { @@ -195,6 +204,9 @@ Blockly.Java['lists_setIndex'] = function(block) { Blockly.Java.ORDER_NONE) || '1'; var value = Blockly.Java.valueToCode(block, 'TO', Blockly.Java.ORDER_NONE) || 'None'; + if (list.slice(-14) === '.cloneObject()' ) { + list = list.slice(0,-14) + '.getObjectAsList()'; + } // Cache non-trivial values to variables to prevent repeated look-ups. // Closure, which accesses and modifies 'list'. function cacheList() { @@ -274,6 +286,9 @@ Blockly.Java['lists_getSublist'] = function(block) { Blockly.Java.ORDER_ADDITIVE) || '1'; var at2 = Blockly.Java.valueToCode(block, 'AT2', Blockly.Java.ORDER_ADDITIVE) || '1'; + if (list.slice(-14) === '.cloneObject()' ) { + list = list.slice(0,-14) + '.getObjectAsList()'; + } if (where1 == 'FIRST' || (where1 == 'FROM_START' && at1 == '1')) { at1 = '0'; } else if (where1 == 'FROM_START') { @@ -341,17 +356,20 @@ Blockly.Java['lists_split'] = function(block) { Blockly.Java.ORDER_NONE) || '[]'; var value_delim = Blockly.Java.valueToCode(block, 'DELIM', Blockly.Java.ORDER_MEMBER) || '\'\''; - var code = value_delim + '.join(' + value_input + ')'; + if (value_input.slice(-14) === '.cloneObject()' ) { + value_input = value_input.slice(0,-14) + '.getObjectAsList()'; + } Blockly.Java.addImport('java.lang.StringBuilder'); + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'lists_join', ['public static String ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + - '(List list, String separator) {', + '(List list, String separator) {', ' StringBuilder result = new StringBuilder();', ' String extra = "";', - ' for (String elem : list) {', + ' for (Object elem : list) {', ' result.append(extra);', - ' result.append(elem);', + ' result.append(new Var(elem).getObjectAsString());', ' extra = separator;', ' }', ' return result.toString();', diff --git a/generators/java/logic.js b/generators/java/logic.js index f0341913099..1437267741e 100644 --- a/generators/java/logic.js +++ b/generators/java/logic.js @@ -56,58 +56,57 @@ Blockly.Java['controls_if'] = function(block) { Blockly.Java['logic_compare'] = function(block) { // Comparison operator. var OPERATORS = { - 'EQ': '==', // a.equals(b) - 'NEQ': '!=', // !a.equals(b) + 'EQ': '', // a.equals(b) + 'NEQ': '!', // !a.equals(b) 'LT': '<', // a.compareTo(b) < 0 'LTE': '<=', // a.compareTo(b) <= 0 'GT': '>', // a.compareTo(b) > 0 'GTE': '>=' // a.compareTo(b) >= 0 }; + + var FLIPOPERATORS = { + '': '', + '!' : '!', + '<' : '>', + '<=' : '>=', + '>' : '<', + '>=' : '<=' + }; var operator = OPERATORS[block.getFieldValue('OP')]; var argument0Type = Blockly.Java.getValueType(block, 'A'); var argument1Type = Blockly.Java.getValueType(block, 'B'); - var useFunctions = false; var code = ''; - var order = Blockly.Java.ORDER_RELATIONAL; - var argument0 = Blockly.Java.valueToCode(block, 'A', order); - var argument1 = Blockly.Java.valueToCode(block, 'B', order); + var argument0 = Blockly.Java.valueToCode(block, 'A', Blockly.Java.ORDER_RELATIONAL); + var argument1 = Blockly.Java.valueToCode(block, 'B', Blockly.Java.ORDER_RELATIONAL); if (argument0.slice(-14) === '.cloneObject()' ) { - useFunctions = true; argument0 = argument0.slice(0,-14); + if (argument1.slice(-14) === '.cloneObject()' ) { + argument1 = argument1.slice(0,-14); + } } else if (argument1.slice(-14) === '.cloneObject()' ) { - useFunctions = true; + operator = FLIPOPERATORS[operator]; var temp = argument0; - argument0 = '!' + argument1.slice(0,-14); + argument0 = argument1.slice(0,-14); argument1 = temp; } else if ((argument0Type && goog.array.contains(argument0Type, 'String')) || (argument1Type && goog.array.contains(argument1Type, 'String'))) { useFunctions = true; } - if (useFunctions) { - if (!argument0) { - argument0 = '""'; - } - if (!argument1) { - argument1 = '""'; - } - if (operator === '==') { - code = argument0 + '.equals(' + argument1 + ')'; - } else if (operator === '!=') { - code = '!' + argument0 + '.equals(' + argument1 + ')'; - } else { - code = argument0 + '.compareTo(' + argument1 + ') ' + operator + ' 0'; - } + if (!argument0) { + argument0 = '""'; } else { - if (!argument0) { - argument0 = 0; - } - if (!argument1) { - argument1 = 0; - } - code = argument0 + ' ' + operator + ' ' + argument1; + argument0 = 'Var.valueOf(' + argument0 + ')'; } - return [code, order]; + if (!argument1) { + argument1 = '""'; + } + if (operator === '' || operator === '!') { + code = operator + argument0 + '.equals(' + argument1 + ')'; + } else { + code = argument0 + '.compareTo(' + argument1 + ') ' + operator + ' 0'; + } + return [code, Blockly.Java.ORDER_RELATIONAL]; }; Blockly.Java['logic_operation'] = function(block) { diff --git a/generators/java/math.js b/generators/java/math.js index 308a8835e73..21ff55f3b09 100644 --- a/generators/java/math.js +++ b/generators/java/math.js @@ -262,96 +262,67 @@ Blockly.Java['math_on_list'] = function(block) { var code; switch (func) { case 'SUM': + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'math_sum', // This operation excludes null and values that aren't int or float:', // math_mean([null, null, "aString", 1, 9]) == 5.0.', ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(List myList) {', - ' int i;', - ' double sum = 0;', - ' for (i = 1; i < myList.size(); i++) {', - ' sum += (Double) myList.get(i);', - ' }', - ' return sum;', + ' return Var.math_sum(Var.valueOf(myList));', '}']); code = functionName + '(' + list + ')'; break; case 'MIN': + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'math_min', // This operation excludes null and values that aren't int or float:', // math_mean([null, null, "aString", 1, 9]) == 5.0.', ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(List myList) {', - ' double min = Double.MAX_VALUE;', - ' double d;', - ' int i;', - ' for (i = 1; i < myList.size(); i++) {', - ' d = (Double) myList.get(i);', - ' if (d < min) {', - ' min = d;', - ' }', - ' }', - ' return min;', + ' return Var.math_min(Var.valueOf(myList));', '}']); code = functionName + '(' + list + ')'; break; case 'MAX': + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'math_max', // This operation excludes null and values that aren't int or float:', // math_mean([null, null, "aString", 1, 9]) == 5.0.', ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(List myList) {', - ' double max = Double.MIN_VALUE;', - ' double d;', - ' int i;', - ' for (i = 1; i < myList.size(); i++) {', - ' d = (Double) myList.get(i);', - ' if (d > max) {', - ' max = d;', - ' }', - ' }', - ' return max;', + ' return Var.math_max(Var.valueOf(myList));', '}']); code = functionName + '(' + list + ')'; break; case 'AVERAGE': + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'math_mean', // This operation excludes null and values that aren't int or float:', // math_mean([null, null, "aString", 1, 9]) == 5.0.', ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(List myList) {', - ' return math_sum(myList) / myList.size();', + ' return Var.math_mean(Var.valueOf(myList));', '}']); code = functionName + '(' + list + ')'; break; case 'MEDIAN': - Blockly.Java.addImport('java.util.Collections'); + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'math_median', // This operation excludes null values: // math_median([null, null, 1, 3]) == 2.0. ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(List myList) {', - ' Collections.sort(myList);', - ' double median;', - ' int size = myList.size();', - ' if (myList.size() % 2 == 0) {', - ' median = ((double) myList.get(size / 2) + (double) myList.get(size / 2 - 1)) / 2;', - ' } else {', - ' median = (double) myList.get(size / 2);', - ' }', - ' return median;', + ' return Var.math_median(Var.valueOf(myList));', '}']); code = functionName + '(' + list + ')'; break; case 'MODE': - Blockly.Java.addImport('java.util.LinkedList'); - Blockly.Java.addImport('java.util.Map'); - Blockly.Java.addImport('java.util.HashMap'); + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'math_modes', // As a list of numbers can contain more than one mode, @@ -359,55 +330,22 @@ Blockly.Java['math_on_list'] = function(block) { // Mode of [3, 'x', 'x', 1, 1, 2, '3'] -> ['x', 1]. ['public static LinkedList ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(List myList) {', - ' final LinkedList modes = new LinkedList();', - ' final Map countMap = new HashMap();', - ' double max = -1;', - ' double d;', - ' int i;', - ' for (i = 1; i < myList.size(); i++) {', - ' d = (Double) myList.get(i);', - ' double count = 0;', - ' if (countMap.containsKey(d)) {', - ' count = countMap.get(d) + 1;', - ' } else {', - ' count = 1;', - ' }', - ' countMap.put(d, count);', - ' if (count > max) {', - ' max = count;', - ' }', - ' }', - ' for (final Map.Entry tuple : countMap.entrySet()) {', - ' if (tuple.getValue() == max) {', - ' modes.add(tuple.getKey());', - ' }', - ' }', - ' return modes;', + ' return Var.math_modes(Var.valueOf(myList)).getObjectAsList();', '}']); code = functionName + '(' + list + ')'; break; case 'STD_DEV': - Blockly.Java.addImport('java.lang.Math'); + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'math_standard_deviation', ['public static double ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(List myList) {', - ' double mean = math_mean(myList);', - ' double size = myList.size();', - ' double temp = 0;', - ' double d;', - ' int i;', - ' for (i = 1; i < myList.size(); i++) {', - ' d = (Double) myList.get(i);', - ' temp += (mean - d) * (mean - d);', - ' }', - ' double variance = temp / size;', - ' return Math.sqrt(variance);', + ' return Var.math_standard_deviation(Var.valueOf(myList));', '}']); code = functionName + '(' + list + ')'; break; case 'RANDOM': - Blockly.Java.addImport('java.lang.Math'); + Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'math_random_list', [ 'public static Object ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + diff --git a/generators/java/text.js b/generators/java/text.js index bd1bdce9aa3..9be56996c08 100644 --- a/generators/java/text.js +++ b/generators/java/text.js @@ -65,9 +65,16 @@ Blockly.Java['text_append'] = function(block) { // First we want to see if the input variable happens to be a non string type var argument0Type = Blockly.Java.getValueType(block, 'TEXT'); + var code = ''; + if (Blockly.Java.GetVariableType(block.getFieldValue('VAR')) === 'Var') { + code = varName + ' = new Var(' + varName + '.getObjectAsString() + ' + + Blockly.Java.toStringCode(argument0) + ');\n'; + } else { // See if we need to convert the non-string to a string - return varName + ' = ' + varName + ' + ' + + code = varName + ' = ' + varName + ' + ' + Blockly.Java.toStringCode(argument0) + ';\n'; + } + return code; }; Blockly.Java['text_length'] = function(block) { diff --git a/java_compressed.js b/java_compressed.js index e22b3c72f9c..e13149c79fc 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -5,19 +5,20 @@ // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern,equal"); Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; -Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_="";Blockly.Java.needImports_=[]; -Blockly.Java.ExtraImports_=null;Blockly.Java.classes_=[];Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; -Blockly.Java.GetVariableType=function(a){a=this.variableTypes_[a];a||(a="String/*UNKNOWN_TYPE*/",Blockly.Java.provideVarClass());return a};Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n /**\n * If this object is a linked list, then calling this method will\n * return the Var at the index indicated\n * \n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n /**\n * If this object is a linked list, then calling this method will\n * return the size of the linked list.\n * \n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n /**\n * Set the value of of a list at the index specified. Note that this is\n * only value if this object is a list and also note that index must be in\n * bounds.\n * \n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n * \n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n * \n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n } // end setObject\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current value\n * will then be stored as the first member and this new member added to it.\n * \n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n /**\n * Increment Object by some value.\n * \n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n /**\n * Increment Object by some value\n * \n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n * @param obj\n * @return \n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n /**\n * Check to see if this Var is less than some other var.\n * \n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n /**\n * Check to see if this var is less than or equal to some other var\n * \n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n /**\n * Check to see if this var is greater than a given var.\n * \n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n /**\n * Check to see if this var is greater than or equal to a given var\n * \n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n /**\n * Compare this object\'s value to another\n * \n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0 if this \n * is numerically less than the argument; and a value greater than 0 if this is numerically \n * greater than the argument (signed comparison).\n */\n public int compareTo(Object val) {\n Var var = new Var(val);\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer )this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double )this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double )this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n \n /**\n * Convert this Var to a string format.\n * \n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n \n /**\n * Internal method for inferring the "object type" of this object. When\n * it is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n}\n'}; +Blockly.Java.workspaceToCode=function(a,b){var c=this.workspaceToCode_(a,b),d="package "+this.getPackage()+";\n\n"+this.getImports()+"\n\npublic class "+this.getAppName();this.getBaseclass()&&(d+=" extends "+this.getBaseclass());return d+=" {\n\n"+c+"\n}\n\n"+this.getClasses()};Blockly.Java.getValueType=function(a,b){var c=a.getInputTargetBlock(b);return c?c.outputConnection.check_:""}; +Blockly.Java.provideVarClass=function(){Blockly.Java.addImport("java.text.DecimalFormat");Blockly.Java.addImport("java.text.NumberFormat");Blockly.Java.addImport("java.lang.Math");Blockly.Java.addImport("java.util.Arrays");Blockly.Java.addImport("java.util.Collections");Blockly.Java.addImport("java.util.LinkedList");Blockly.Java.addImport("java.util.HashMap");Blockly.Java.addImport("java.util.Map");Blockly.Java.addImport("java.util.Objects");Blockly.Java.classes_.Var='/**\n *\n * @author bmoon\n */\nfinal class Var implements Comparable {\n\n public enum Type {\n\n STRING, INT, DOUBLE, LIST, UNKNOWN\n };\n\n private Type _type;\n private Object _object;\n private static final NumberFormat _formatter = new DecimalFormat("#.#####");\n\n /**\n * Construct a Var with an UNKNOWN type\n *\n */\n public Var() {\n _type = Type.UNKNOWN;\n } // end var\n\n /**\n * Construct a Var and assign its contained object to that specified.\n *\n * @param object The value to set this object to\n */\n public Var(Object object) {\n setObject(object);\n } // end var\n\n /**\n * Construct a Var from a given Var\n *\n * @param var var to construct this one from\n */\n public Var(Var var) {\n setObject(var.getObject());\n } // end var\n\n /**\n * Static constructor to make a var from some value.\n *\n * @param val some value to construct a var around\n * @return the Var object\n */\n public static Var valueOf(Object val) {\n return new Var(val);\n } // end valueOf\n\n /**\n * Get the type of the underlying object\n *\n * @return Will return the object\'s type as defined by Type\n */\n public Type getType() {\n return _type;\n } // end getType\n\n /**\n * Get the contained object\n *\n * @return the object\n */\n public Object getObject() {\n return _object;\n } // end getObject\n\n /**\n * Clone Object\n *\n * @return a new object equal to this one\n */\n public Object cloneObject() {\n Var tempVar = new Var(this);\n return tempVar.getObject();\n } // end cloneObject\n\n /**\n * Get object as an int. Does not make sense for a "LIST" type object\n *\n * @return an integer whose value equals this object\n */\n public int getObjectAsInt() {\n switch (getType()) {\n case STRING:\n return Integer.parseInt((String) getObject());\n case INT:\n return (int) getObject();\n case DOUBLE:\n return new Double((double) getObject()).intValue();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0;\n } // end getObjectAsInt\n\n /**\n * Get object as a double. Does not make sense for a "LIST" type object.\n *\n * @return a double whose value equals this object\n */\n public double getObjectAsDouble() {\n switch (getType()) {\n case STRING:\n return Double.parseDouble((String) getObject());\n case INT:\n return new Integer((int) getObject()).doubleValue();\n case DOUBLE:\n return (double) getObject();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0.0;\n } // end get object as double\n\n /**\n * Get object as a string.\n *\n * @return The string value of the object. Note that for lists, this is a\n * comma separated list of the form {x,y,z,...}\n */\n public String getObjectAsString() {\n return this.toString();\n } // end gotObjectAsString\n\n /**\n * Get the object as a list.\n *\n * @return a LinkedList whose elements are of type Var\n */\n public LinkedList getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'}; Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.imports_=Object.create(null);this.classes_=Object.create(null);for(var c=0;ce;e++)for(var f=b[e].sort(),g=0;g result = new LinkedList<>();"," for(int x = 0; x < torepeat; x++) {"," result.add(item);"," }"," return result;","}"])+"("+b+","+a+")", -Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.lists_length=function(a){return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"[]")+".size()",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.lists_isEmpty=function(a){return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"[]")+".size() == 0",Blockly.Java.ORDER_LOGICAL_NOT]}; -Blockly.Java.lists_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"indexOf":"lastIndexOf",c=Blockly.Java.valueToCode(a,"FIND",Blockly.Java.ORDER_NONE)||"[]";return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"''")+"."+b+"("+c+") + 1",Blockly.Java.ORDER_FUNCTION_CALL]}; -Blockly.Java.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_UNARY_SIGN)||"1";a=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"[]";if("FIRST"==c){if("GET"==b)return[a+".getFirst()",Blockly.Java.ORDER_MEMBER];c=a+".removeFirst()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("LAST"==c){if("GET"==b)return[a+".getLast()", -Blockly.Java.ORDER_MEMBER];c=a+".removeLast()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("FROM_START"==c){d=Blockly.isNumber(d)?parseInt(d,10)-1:"("+d+" - 1)";if("GET"==b)return[a+".get((int)"+d+")",Blockly.Java.ORDER_MEMBER];c=a+".remove((int)"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("FROM_END"==c){if("GET"==b)return[a+".get("+a+".size() - (int)"+d+")",Blockly.Java.ORDER_MEMBER]; -c=a+".remove("+a+".size() - (int)"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("RANDOM"==c){Blockly.Java.addImport("java.lang.Math");if("GET"==b)return[a+".get((int)(Math.random() * "+a+".size()))",Blockly.Java.ORDER_FUNCTION_CALL];c=Blockly.Java.provideFunction_("lists_remove_random_item",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(LinkedList myList) {"," int x = (int)(Math.random() * myList.size());"," return myList.remove(x);", -"}"])+"("+a+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}throw"Unhandled combination (lists_getIndex).";}; -Blockly.Java.lists_setIndex=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_NONE)||"1";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"None";if("FIRST"==d){if("SET"==c)return b+".set(0, "+a+");\n";if("INSERT"==c)return b+".addFirst("+a+");\n"}else if("LAST"==d){if("SET"==c)return b+".set("+b+".size()-1, "+a+");\n";if("INSERT"== -c)return b+".add("+a+");\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseInt(e,10)-1:"((int)"+e+" - 1)";if("SET"==c)return b+".set("+e+", "+a+");\n";if("INSERT"==c)return b+".add("+e+", "+a+");\n"}else if("FROM_END"==d){e=Blockly.isNumber(e)?parseInt(e,10):"((int)"+e+")";if("SET"==c)return b+".set("+b+".size() -"+e+", "+a+");\n";if("INSERT"==c)return b+".add("+b+".size() -"+e+", "+a+");\n"}else if("RANDOM"==d){Blockly.Java.addImport("java.util.Random");b.match(/^\w+$/)?d="":(d=Blockly.Java.variableDB_.getDistinctName("tmp_list", -Blockly.Variables.NAME_TYPE),e=d+" = "+b+"\n",b=d,d=e);e=Blockly.Java.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);d+="int "+e+" = (int)(Math.random() * "+b+".size());\n";if("SET"==c)return d+(b+".set("+e+", "+a+");\n");if("INSERT"==c)return d+=b+".add("+e+", "+a+");\n"}throw"Unhandled combination (lists_setIndex).";}; -Blockly.Java.lists_getSublist=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Java.valueToCode(a,"AT1",Blockly.Java.ORDER_ADDITIVE)||"1";a=Blockly.Java.valueToCode(a,"AT2",Blockly.Java.ORDER_ADDITIVE)||"1";"FIRST"==c||"FROM_START"==c&&"1"==e?e="0":"FROM_START"==c?e=Blockly.isNumber(e)?parseInt(e,10)-1:"((int)"+e+" - 1)":"FROM_END"==c&&(e=Blockly.isNumber(e)?parseInt(e,10):"((int)"+e+")",e=b+".size() - "+ -e);"LAST"==d||"FROM_END"==d&&"1"==a?a=b+".size()-1":"FROM_START"==d?a=Blockly.isNumber(a)?parseInt(a,10)-1:"((int)"+a+"-1)":"FROM_END"==d&&(Blockly.isNumber(a)?(a=parseInt(a,10),a=b+".size() - "+a):a=b+".size() - ((int)"+a+"-1)");return[Blockly.Java.provideFunction_("lists_sublist",["public static LinkedList "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list, int startIndex, int endIndex) {"," LinkedList result = new LinkedList<>();"," int sizeList = list.size();"," for(int x = startIndex; x <= endIndex && x < sizeList; x++) {", -" result.add(list.get(x));"," }"," return result;","}"])+"("+b+", "+e+", "+a+")",Blockly.Java.ORDER_MEMBER]}; -Blockly.Java.lists_split=function(a){var b=a.getFieldValue("MODE");if("SPLIT"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_MEMBER)||"''",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_NONE),a="new LinkedList(Arrays.asList("+b+".split("+a+")))";else if("JOIN"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_NONE)||"[]",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_MEMBER)||"''",Blockly.Java.addImport("java.lang.StringBuilder"),a=Blockly.Java.provideFunction_("lists_join", -["public static String "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list, String separator) {"," StringBuilder result = new StringBuilder();",' String extra = "";'," for (String elem : list) {"," result.append(extra);"," result.append(elem);"," extra = separator;"," }"," return result.toString();","}"])+"("+b+", "+a+")";else throw"Unknown mode: "+b;return[a,Blockly.Java.ORDER_FUNCTION_CALL]}; +Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.lists_length=function(a){a=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"[]";".cloneObject()"===a.slice(-14)&&(a=a.slice(0,-14)+".getObjectAsList()");return[a+".size()",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.lists_isEmpty=function(a){return[(Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"[]")+".size() == 0",Blockly.Java.ORDER_LOGICAL_NOT]}; +Blockly.Java.lists_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"indexOf":"lastIndexOf",c=Blockly.Java.valueToCode(a,"FIND",Blockly.Java.ORDER_NONE)||"[]";a=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"''";".cloneObject()"===a.slice(-14)&&(a=a.slice(0,-14)+".getObjectAsList()");return[a+"."+b+"("+c+") + 1",Blockly.Java.ORDER_FUNCTION_CALL]}; +Blockly.Java.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_UNARY_SIGN)||"1";a=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_MEMBER)||"[]";".cloneObject()"===a.slice(-14)&&(a=a.slice(0,-14)+".getObjectAsList()");if("FIRST"==c){if("GET"==b)return[a+".getFirst()",Blockly.Java.ORDER_MEMBER];c=a+".removeFirst()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"== +b)return c+";\n"}else if("LAST"==c){if("GET"==b)return[a+".getLast()",Blockly.Java.ORDER_MEMBER];c=a+".removeLast()";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("FROM_START"==c){d=Blockly.isNumber(d)?parseInt(d,10)-1:"("+d+" - 1)";if("GET"==b)return[a+".get((int)"+d+")",Blockly.Java.ORDER_MEMBER];c=a+".remove((int)"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("FROM_END"==c){if("GET"== +b)return[a+".get("+a+".size() - (int)"+d+")",Blockly.Java.ORDER_MEMBER];c=a+".remove("+a+".size() - (int)"+d+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}else if("RANDOM"==c){Blockly.Java.addImport("java.lang.Math");if("GET"==b)return[a+".get((int)(Math.random() * "+a+".size()))",Blockly.Java.ORDER_FUNCTION_CALL];c=Blockly.Java.provideFunction_("lists_remove_random_item",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(LinkedList myList) {", +" int x = (int)(Math.random() * myList.size());"," return myList.remove(x);","}"])+"("+a+")";if("GET_REMOVE"==b)return[c,Blockly.Java.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}throw"Unhandled combination (lists_getIndex).";}; +Blockly.Java.lists_setIndex=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Java.valueToCode(a,"AT",Blockly.Java.ORDER_NONE)||"1";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"None";".cloneObject()"===b.slice(-14)&&(b=b.slice(0,-14)+".getObjectAsList()");if("FIRST"==d){if("SET"==c)return b+".set(0, "+a+");\n";if("INSERT"==c)return b+".addFirst("+a+");\n"}else if("LAST"== +d){if("SET"==c)return b+".set("+b+".size()-1, "+a+");\n";if("INSERT"==c)return b+".add("+a+");\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseInt(e,10)-1:"((int)"+e+" - 1)";if("SET"==c)return b+".set("+e+", "+a+");\n";if("INSERT"==c)return b+".add("+e+", "+a+");\n"}else if("FROM_END"==d){e=Blockly.isNumber(e)?parseInt(e,10):"((int)"+e+")";if("SET"==c)return b+".set("+b+".size() -"+e+", "+a+");\n";if("INSERT"==c)return b+".add("+b+".size() -"+e+", "+a+");\n"}else if("RANDOM"==d){Blockly.Java.addImport("java.util.Random"); +b.match(/^\w+$/)?d="":(d=Blockly.Java.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),e=d+" = "+b+"\n",b=d,d=e);e=Blockly.Java.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);d+="int "+e+" = (int)(Math.random() * "+b+".size());\n";if("SET"==c)return d+(b+".set("+e+", "+a+");\n");if("INSERT"==c)return d+=b+".add("+e+", "+a+");\n"}throw"Unhandled combination (lists_setIndex).";}; +Blockly.Java.lists_getSublist=function(a){var b=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Java.valueToCode(a,"AT1",Blockly.Java.ORDER_ADDITIVE)||"1";a=Blockly.Java.valueToCode(a,"AT2",Blockly.Java.ORDER_ADDITIVE)||"1";".cloneObject()"===b.slice(-14)&&(b=b.slice(0,-14)+".getObjectAsList()");"FIRST"==c||"FROM_START"==c&&"1"==e?e="0":"FROM_START"==c?e=Blockly.isNumber(e)?parseInt(e,10)-1:"((int)"+e+" - 1)":"FROM_END"== +c&&(e=Blockly.isNumber(e)?parseInt(e,10):"((int)"+e+")",e=b+".size() - "+e);"LAST"==d||"FROM_END"==d&&"1"==a?a=b+".size()-1":"FROM_START"==d?a=Blockly.isNumber(a)?parseInt(a,10)-1:"((int)"+a+"-1)":"FROM_END"==d&&(Blockly.isNumber(a)?(a=parseInt(a,10),a=b+".size() - "+a):a=b+".size() - ((int)"+a+"-1)");return[Blockly.Java.provideFunction_("lists_sublist",["public static LinkedList "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list, int startIndex, int endIndex) {"," LinkedList result = new LinkedList<>();", +" int sizeList = list.size();"," for(int x = startIndex; x <= endIndex && x < sizeList; x++) {"," result.add(list.get(x));"," }"," return result;","}"])+"("+b+", "+e+", "+a+")",Blockly.Java.ORDER_MEMBER]}; +Blockly.Java.lists_split=function(a){var b=a.getFieldValue("MODE");if("SPLIT"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_MEMBER)||"''",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_NONE),a="new LinkedList(Arrays.asList("+b+".split("+a+")))";else if("JOIN"==b)b=Blockly.Java.valueToCode(a,"INPUT",Blockly.Java.ORDER_NONE)||"[]",a=Blockly.Java.valueToCode(a,"DELIM",Blockly.Java.ORDER_MEMBER)||"''",".cloneObject()"===b.slice(-14)&&(b=b.slice(0,-14)+".getObjectAsList()"),Blockly.Java.addImport("java.lang.StringBuilder"), +Blockly.Java.provideVarClass(),a=Blockly.Java.provideFunction_("lists_join",["public static String "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list, String separator) {"," StringBuilder result = new StringBuilder();",' String extra = "";'," for (Object elem : list) {"," result.append(extra);"," result.append(new Var(elem).getObjectAsString());"," extra = separator;"," }"," return result.toString();","}"])+"("+b+", "+a+")";else throw"Unknown mode: "+b;return[a,Blockly.Java.ORDER_FUNCTION_CALL]}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.logic={}; Blockly.Java.controls_if=function(a){for(var b=0,c=Blockly.Java.valueToCode(a,"IF"+b,Blockly.Java.ORDER_NONE)||"false",d=Blockly.Java.statementToCode(a,"DO"+b)||Blockly.Java.PASS,e="if ("+c+") {\n"+d,b=1;b<=a.elseifCount_;b++)c=Blockly.Java.valueToCode(a,"IF"+b,Blockly.Java.ORDER_NONE)||"false",d=Blockly.Java.statementToCode(a,"DO"+b)||Blockly.Java.PASS,e+="} else if ("+c+") {\n"+d;a.elseCount_&&(d=Blockly.Java.statementToCode(a,"ELSE")||Blockly.Java.PASS,e+="} else {\n"+d);return e+"}\n"}; -Blockly.Java.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Java.getValueType(a,"A"),d=Blockly.Java.getValueType(a,"B"),e=!1,f="",g=Blockly.Java.ORDER_RELATIONAL,f=Blockly.Java.valueToCode(a,"A",g);a=Blockly.Java.valueToCode(a,"B",g);if(".cloneObject()"===f.slice(-14))e=!0,f=f.slice(0,-14);else if(".cloneObject()"===a.slice(-14))e=!0,c=f,f="!"+a.slice(0,-14),a=c;else if(c&&goog.array.contains(c,"String")||d&&goog.array.contains(d, -"String"))e=!0;e?(f||(f='""'),a||(a='""'),f="=="===b?f+".equals("+a+")":"!="===b?"!"+f+".equals("+a+")":f+".compareTo("+a+") "+b+" 0"):(f||(f=0),a||(a=0),f=f+" "+b+" "+a);return[f,g]}; +Blockly.Java.logic_compare=function(a){var b={"":"","!":"!","<":">","<=":">=",">":"<",">=":"<="},c={EQ:"",NEQ:"!",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],d=Blockly.Java.getValueType(a,"A"),e=Blockly.Java.getValueType(a,"B"),f=Blockly.Java.valueToCode(a,"A",Blockly.Java.ORDER_RELATIONAL);a=Blockly.Java.valueToCode(a,"B",Blockly.Java.ORDER_RELATIONAL);if(".cloneObject()"===f.slice(-14))f=f.slice(0,-14),".cloneObject()"===a.slice(-14)&&(a=a.slice(0,-14));else if(".cloneObject()"===a.slice(-14))c= +b[c],b=f,f=a.slice(0,-14),a=b;else if(d&&goog.array.contains(d,"String")||e&&goog.array.contains(e,"String"))useFunctions=!0;f=f?"Var.valueOf("+f+")":'""';a||(a='""');return[""===c||"!"===c?c+f+".equals("+a+")":f+".compareTo("+a+") "+c+" 0",Blockly.Java.ORDER_RELATIONAL]}; Blockly.Java.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?" && ":" || ",c="and"==b?Blockly.Java.ORDER_LOGICAL_AND:Blockly.Java.ORDER_LOGICAL_OR,d=Blockly.Java.valueToCode(a,"A",c);a=Blockly.Java.valueToCode(a,"B",c);if(d||a){var e=" && "==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+b+a,c]};Blockly.Java.logic_negate=function(a){return["!("+(Blockly.Java.valueToCode(a,"BOOL",Blockly.Java.ORDER_LOGICAL_NOT)||"true")+")",Blockly.Java.ORDER_LOGICAL_NOT]}; Blockly.Java.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_null=function(a){return["null",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_ternary=function(a){var b=Blockly.Java.valueToCode(a,"IF",Blockly.Java.ORDER_CONDITIONAL)||"false",c=Blockly.Java.valueToCode(a,"THEN",Blockly.Java.ORDER_CONDITIONAL)||"null";a=Blockly.Java.valueToCode(a,"ELSE",Blockly.Java.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Java.ORDER_CONDITIONAL]}; // Copyright 2012 Google Inc. Apache License 2.0 @@ -73,11 +74,11 @@ Blockly.Java.math_number_property=function(a){var b=Blockly.Java.valueToCode(a," " n = (Double)d;"," } else if (d instanceof Integer) {"," n = (Integer)d;"," } else {"," return false;"," }"," if (n == 2 || n == 3) {"," return true;"," }"," // False if n is negative, is 1, or not whole, or if n is divisible by 2 or 3."," if ((n <= 1) || (n % 1 != 0) || (n % 2 == 0) || (n % 3 == 0)) {"," return false;"," }"," // Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for (int x = 6; x <= Math.sqrt(n) + 1; x += 6) {"," if (n % (x - 1) == 0 || n % (x + 1) == 0) {", " return false;"," }"," }"," return true;","}"])+"("+b+")",[d,Blockly.Java.ORDER_FUNCTION_CALL];switch(c){case "EVEN":d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d=b+" % 1 == 0";break;case "POSITIVE":d=b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE);if(!a||"0"==a)return["False",Blockly.Java.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Java.ORDER_RELATIONAL]}; Blockly.Java.math_change=function(a){var b=Blockly.Java.valueToCode(a,"DELTA",Blockly.Java.ORDER_ADDITIVE)||"0";a=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = "+a+" + "+b+";\n"};Blockly.Java.math_round=Blockly.Java.math_single;Blockly.Java.math_trig=Blockly.Java.math_single; -Blockly.Java.math_on_list=function(a){var b=a.getFieldValue("OP"),c=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";switch(b){case "SUM":b=Blockly.Java.provideFunction_("math_sum",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MIN":b=Blockly.Java.provideFunction_("math_min",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function", -" return 0;","}"]);a=b+"("+c+")";break;case "MAX":b=Blockly.Java.provideFunction_("math_max",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "AVERAGE":b=Blockly.Java.provideFunction_("math_mean",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MEDIAN":b=Blockly.Java.provideFunction_("math_median", -["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "MODE":Blockly.Java.addImport("java.util.LinkedList");b=Blockly.Java.provideFunction_("math_modes",["public static LinkedList "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","LinkedList result = new LinkedList<>();","// TODO: Implement this function"," return result;","}"]);a=b+"("+c+")";break;case "STD_DEV":Blockly.Java.addImport("java.lang.Math"); -b=Blockly.Java.provideFunction_("math_standard_deviation",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {","// TODO: Implement this function"," return 0;","}"]);a=b+"("+c+")";break;case "RANDOM":Blockly.Java.addImport("java.lang.Math");b=Blockly.Java.provideFunction_("math_random_list",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list) {"," int x = (int)(Math.floor(Math.random() * list.size()));"," return list.get(x);","}"]);c=Blockly.Java.valueToCode(a, -"LIST",Blockly.Java.ORDER_NONE)||"[]";a=b+"("+c+")";break;default:throw"Unknown operator: "+b;}return[a,Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_modulo=function(a){var b=Blockly.Java.valueToCode(a,"DIVIDEND",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Java.ORDER_MULTIPLICATIVE]}; +Blockly.Java.math_on_list=function(a){var b=a.getFieldValue("OP"),c=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";switch(b){case "SUM":Blockly.Java.provideVarClass();b=Blockly.Java.provideFunction_("math_sum",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {"," return Var.math_sum(Var.valueOf(myList));","}"]);a=b+"("+c+")";break;case "MIN":Blockly.Java.provideVarClass();b=Blockly.Java.provideFunction_("math_min",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+ +"(List myList) {"," return Var.math_min(Var.valueOf(myList));","}"]);a=b+"("+c+")";break;case "MAX":Blockly.Java.provideVarClass();b=Blockly.Java.provideFunction_("math_max",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {"," return Var.math_max(Var.valueOf(myList));","}"]);a=b+"("+c+")";break;case "AVERAGE":Blockly.Java.provideVarClass();b=Blockly.Java.provideFunction_("math_mean",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {", +" return Var.math_mean(Var.valueOf(myList));","}"]);a=b+"("+c+")";break;case "MEDIAN":Blockly.Java.provideVarClass();b=Blockly.Java.provideFunction_("math_median",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {"," return Var.math_median(Var.valueOf(myList));","}"]);a=b+"("+c+")";break;case "MODE":Blockly.Java.provideVarClass();b=Blockly.Java.provideFunction_("math_modes",["public static LinkedList "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {"," return Var.math_modes(Var.valueOf(myList)).getObjectAsList();", +"}"]);a=b+"("+c+")";break;case "STD_DEV":Blockly.Java.provideVarClass();b=Blockly.Java.provideFunction_("math_standard_deviation",["public static double "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {"," return Var.math_standard_deviation(Var.valueOf(myList));","}"]);a=b+"("+c+")";break;case "RANDOM":Blockly.Java.provideVarClass();b=Blockly.Java.provideFunction_("math_random_list",["public static Object "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(List list) {"," int x = (int)(Math.floor(Math.random() * list.size()));", +" return list.get(x);","}"]);c=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_NONE)||"[]";a=b+"("+c+")";break;default:throw"Unknown operator: "+b;}return[a,Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_modulo=function(a){var b=Blockly.Java.valueToCode(a,"DIVIDEND",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"DIVISOR",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Java.ORDER_MULTIPLICATIVE]}; Blockly.Java.math_format_as_decimal=function(a){var b=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Java.valueToCode(a,"PLACES",Blockly.Java.ORDER_MULTIPLICATIVE)||"0";return['new DecimalFormat("#.'+Array(++a).join("0")+'").format('+b+")",Blockly.Java.ORDER_MULTIPLICATIVE]}; Blockly.Java.math_constrain=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"0",c=Blockly.Java.valueToCode(a,"LOW",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"HIGH",Blockly.Java.ORDER_NONE)||"float('inf')";return["Math.min(Math.max("+b+", "+c+"), "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]}; Blockly.Java.math_random_int=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0";return[Blockly.Java.provideFunction_("math_random_int",["public static int "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(int a, int b) {"," if (a > b) {"," // Swap a and b to ensure a is smaller."," int c = a;"," a = b;"," b = c;"," }"," return (int)Math.floor(Math.random() * (b - a + 1) + a);", @@ -91,8 +92,9 @@ Blockly.Java.procedures_callnoreturn=function(a){for(var b=Blockly.Java.variable Blockly.Java.procedures_ifreturn=function(a){var b="if ("+(Blockly.Java.valueToCode(a,"CONDITION",Blockly.Java.ORDER_NONE)||"False")+"){\n";a.hasReturnValue_?(a=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"None",b+=" return "+a+";\n}"):b+=" return;\n}";return b}; // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Java.texts={};Blockly.Java.text=function(a){return[Blockly.Java.quote_(a.getFieldValue("TEXT")),Blockly.Java.ORDER_ATOMIC]};Blockly.Java.text_join=function(a){var b;if(0==a.itemCount_)return['""',Blockly.Java.ORDER_ATOMIC];for(var c=b="",d=0;d Date: Thu, 30 Jul 2015 07:55:50 -0400 Subject: [PATCH 22/84] Fix lists unit test case to correspond to new mutation on lists_split Added join + JOIN @@ -2216,6 +2217,7 @@ list + SPLIT From e695d1da87d289d8397c626a0cc0701afab37608 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Thu, 13 Aug 2015 10:24:54 -0400 Subject: [PATCH 23/84] Add types for procedures Add support for types on procedures Add text_printf function Update FieldScopeVariable to handle empty value correctly Eliminate console.log in variables.js Add support for referencing the var class as an external class Fixed formatting width of Java code to be 4 spaces instead of 2 --- blockly_compressed.js | 4 +- blocks/procedures.js | 212 +++++++++++++++++++++--------- blocks/text.js | 192 +++++++++++++++++++++++++++ blocks_compressed.js | 44 ++++--- core/field_scope_variable.js | 12 +- core/variables.js | 1 - demos/realtime/index.html | 2 +- generators/java.js | 92 +++++++------ generators/java/logic.js | 3 - generators/java/text.js | 54 ++++++++ generators/python/text.js | 48 +++++++ java_compressed.js | 31 +++-- msg/js/ar.js | 12 ++ msg/js/az.js | 12 ++ msg/js/bcc.js | 12 ++ msg/js/be-tarask.js | 12 ++ msg/js/bg.js | 12 ++ msg/js/bn.js | 12 ++ msg/js/br.js | 12 ++ msg/js/ca.js | 12 ++ msg/js/cs.js | 12 ++ msg/js/da.js | 12 ++ msg/js/de.js | 12 ++ msg/js/el.js | 12 ++ msg/js/en.js | 12 ++ msg/js/es.js | 12 ++ msg/js/fa.js | 12 ++ msg/js/fi.js | 12 ++ msg/js/fr.js | 12 ++ msg/js/he.js | 12 ++ msg/js/hi.js | 12 ++ msg/js/hrx.js | 12 ++ msg/js/hu.js | 12 ++ msg/js/ia.js | 12 ++ msg/js/id.js | 12 ++ msg/js/is.js | 12 ++ msg/js/it.js | 12 ++ msg/js/ja.js | 12 ++ msg/js/ko.js | 12 ++ msg/js/lb.js | 12 ++ msg/js/lrc.js | 12 ++ msg/js/lt.js | 12 ++ msg/js/mk.js | 12 ++ msg/js/ms.js | 12 ++ msg/js/nb.js | 12 ++ msg/js/nl.js | 12 ++ msg/js/oc.js | 12 ++ msg/js/pl.js | 12 ++ msg/js/pms.js | 12 ++ msg/js/pt-br.js | 12 ++ msg/js/pt.js | 12 ++ msg/js/ro.js | 12 ++ msg/js/ru.js | 12 ++ msg/js/sc.js | 12 ++ msg/js/sk.js | 12 ++ msg/js/sq.js | 12 ++ msg/js/sr.js | 12 ++ msg/js/sv.js | 12 ++ msg/js/ta.js | 12 ++ msg/js/th.js | 12 ++ msg/js/tl.js | 12 ++ msg/js/tlh.js | 12 ++ msg/js/tr.js | 12 ++ msg/js/uk.js | 12 ++ msg/js/vi.js | 12 ++ msg/js/zh-hans.js | 12 ++ msg/js/zh-hant.js | 12 ++ msg/json/en.json | 14 +- msg/json/qqq.json | 12 ++ msg/messages.js | 34 ++++- python_compressed.js | 11 +- tests/generators/unittest_java.js | 148 ++++++++------------- 72 files changed, 1331 insertions(+), 243 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 3ff013ae35c..a3a403f91ec 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1326,8 +1326,8 @@ Blockly.bindEvent_(b,"blocklyWorkspaceChange",this,this.resizeEditor_)}};Blockly Blockly.FieldTextArea.prototype.onHtmlInputChange_=function(a){Blockly.FieldTextInput.prototype.onHtmlInputChange_.call(this,a);var b=Blockly.FieldTextInput.htmlInput_;a.keyCode==goog.events.KeyCodes.ESC?(this.setText(b.defaultValue),Blockly.WidgetDiv.hide()):(Blockly.FieldTextInput.prototype.onHtmlInputChange_.call(this,a),this.resizeEditor_())}; Blockly.FieldTextArea.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.fieldGroup_.getBBox();a.style.width=b.width+"px";a.style.height=b.height+"px";b=this.getAbsoluteXY_();if(this.RTL){var c=this.borderRect_.getBBox();b.x+=c.width;b.x-=a.offsetWidth}b.y+=1;goog.userAgent.WEBKIT&&(b.y-=3);a.style.left=b.x+"px";a.style.top=b.y+"px"};Blockly.Variables={};Blockly.Variables.NAME_TYPE="VARIABLE";Blockly.Variables.allVariables=function(a){var b;if(a.getDescendants)b=a.getDescendants();else if(a.getAllBlocks)b=a.getAllBlocks();else throw"Not Block or Workspace: "+a;a=Object.create(null);for(var c=0;c} List of hashkey names. + * @this Blockly.Block + */ + getScopeVars: function(varclass) { + var result = []; + if (varclass === 'Types') { + // Push out the default types that we want people to select + result.push('String'); + result.push('Number'); + result.push('Boolean'); + result.push('Array'); + for (var i = 0; i < this.arguments_.length; i++) { + if (this.arguments_[i]['type']) { + result.push(this.arguments_[i]['type']); + } + } + } + return result; + }, /** * Notification that a variable is renaming. * If the name matches one of this block's variables, rename it. @@ -494,31 +545,97 @@ Blockly.Blocks['procedures_callnoreturn'] = { // Switch off rendering while the block is rebuilt. var savedRendered = this.rendered; this.rendered = false; - // Update the quarkConnections_ with existing connections and remove them. - for (var i = this.arguments_.length - 1; i >= 0; i--) { + // Go through in four stages to update the block + // 1) Update all existing arguments with new names and types. If the + // name has changed, then we want to disconnect anything that + // is connected to it. If the type has changed, just update the + // type and the element will automatically disconnect (possibly). + // We want to figure out if it did get disconnected and if so remember + // it. Note that if an element has been deleted, we simply remove the + // element and add the connection to the be remembered. + // 2) Add elements for the new arguments added to the end of the list + // 3) Fix up the "with:" to indicate whether we have any parameters + // 4) Reconnect any elements which have been disconnected + + // -------------------------------------- + // Step 1 - update all existing arguments + // -------------------------------------- + for (var i = 0; i < this.arguments_.length; i++) { var input = this.getInput('ARG' + i); if (input) { var connection = input.connection.targetConnection; - if (connection) { - connection.sourceBlock_.unplug(true,true); - this.quarkConnections_[this.arguments_[i]['name']] = connection; + if (i > parameters.length) { // If it is no longer used + // Disconnect all argument blocks and remove all inputs. + this.removeInput('ARG' + i); + } else if (parameters[i]['name'] != this.arguments_[i]['name']) { + // if the name of the field has changed + this.setFieldValue(parameters[i]['name'], 'ARGn' + i); + if (connection) { + connection.sourceBlock_.unplug(true,true); + } + // Just in case the type has changed, update the type on the block + input.setCheck(parameters[i]['type']); + } else if (parameters[i]['type'] != this.arguments_[i]['type']) { + // The name is the same but the type has changed. When we update the + // type, it may automatically disconnect the block. + input.setCheck(parameters[i]['type']); + // If the connection stayed after changing the type, we don't + // need to remember it + if (input.connection.targetConnection) { + connection = null; + } + if (connection) { + // If we disconnected the block for any reason, we need to remember + // it so that we can reconnect it later on if things get better + this.quarkConnections_[this.arguments_[i]['name']] = connection; + } } - // Disconnect all argument blocks and remove all inputs. - this.removeInput('ARG' + i); } } // Rebuild the block's arguments. var oldArguments = this.arguments_; this.arguments_ = []; - for ( var i = 0; i < parameters.length; i++) { + for (var i = 0; i < parameters.length; i++) { this.arguments_.push({name: parameters[i]['name'], type: parameters[i]['type'], id: parameters[i]['id']}); } - this.renderArgs_(); - // Reconnect any child blocks. + // ------------------------------------------------------------------------ + // Step 2 - Add elements for the new arguments added to the end of the list + // ------------------------------------------------------------------------ + for (var i = oldArguments.length; i < this.arguments_.length; i++) { + // This parameter has been added, so we need to add an input for it + var input = this.appendValueInput('ARG' + i) + .setAlign(Blockly.ALIGN_RIGHT) + .appendField(this.arguments_[i]['name'],'ARGn' + i) + .setCheck(this.arguments_[i]['type']); + input.init(); + } + // -------------------------------------------- + // Step 3 - Add 'with:' if there are parameters + // -------------------------------------------- + var input = this.getInput('TOPROW'); + if (input) { + if (this.arguments_.length) { + if (!this.getField('WITH')) { + input.appendField(Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS, 'WITH'); + input.init(); + } + } else { + if (this.getField('WITH')) { + input.removeField('WITH'); + } + } + } + // ------------------------------------------------------- + // Step 4 - Reconnect any elements which have been disconnected + // ------------------------------------------------------- for (var i = 0; i < this.arguments_.length; i++) { var input = this.getInput('ARG' + i); + // By default we want to reconnect to a block with the same name, BUT + // if there is no block with the same name and there is a block with the + // same ID, we want to use it instead. + // // First we want to see if there is an old block with the same ID as // this argument. var quarkName = this.arguments_[i]['name']; @@ -536,14 +653,19 @@ Blockly.Blocks['procedures_callnoreturn'] = { if (quarkName && this.quarkConnections_[quarkName]) { var connection = this.quarkConnections_[quarkName]; - if (connection && - !connection.targetConnection && + if (!connection.targetConnection && connection.sourceBlock_.workspace == this.workspace) { - input.connection.connect(connection); + if (input.connection.checkType_(connection)) { + // If we can reconnect it, then do so and we no longer have to carry + // the old connection around. + input.connection.connect(connection); + delete this.quarkConnections_[quarkName]; + } + } else { + // This connection is no good or it has already been used + // Either way we won't use it in the future + delete this.quarkConnections_[quarkName]; } - // This connection is no good or it has already been used - // Either way we won't use it in the future - delete this.quarkConnections_[quarkName]; } } // Restore rendering and show the changes. @@ -553,33 +675,6 @@ Blockly.Blocks['procedures_callnoreturn'] = { this.render(); } }, - /** - * Render the arguments. - * @this Blockly.Block - * @private - */ - renderArgs_: function() { - for (var i = 0; i < this.arguments_.length; i++) { - var input = this.appendValueInput('ARG' + i) - .setAlign(Blockly.ALIGN_RIGHT) - .appendField(this.arguments_[i]['name']); - input.init(); - } - // Add 'with:' if there are parameters. - var input = this.getInput('TOPROW'); - if (input) { - if (this.arguments_.length) { - if (!this.getField('WITH')) { - input.appendField(Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS, 'WITH'); - input.init(); - } - } else { - if (this.getField('WITH')) { - input.removeField('WITH'); - } - } - } - }, /** * Create XML to represent the (non-editable) name and arguments. * @return {!Element} XML storage element. @@ -703,7 +798,6 @@ Blockly.Blocks['procedures_callreturn'] = { getVarsTypes: Blockly.Blocks['procedures_callnoreturn'].getVarsTypes, setProcedureParameters: Blockly.Blocks['procedures_callnoreturn'].setProcedureParameters, - renderArgs_: Blockly.Blocks['procedures_callnoreturn'].renderArgs_, mutationToDom: Blockly.Blocks['procedures_callnoreturn'].mutationToDom, domToMutation: Blockly.Blocks['procedures_callnoreturn'].domToMutation, renameVar: Blockly.Blocks['procedures_callnoreturn'].renameVar, diff --git a/blocks/text.js b/blocks/text.js index daab3b8efd9..ffd6450647d 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -629,6 +629,198 @@ Blockly.Blocks['text_print'] = { typeblock: Blockly.Msg.TEXT_PRINT_TYPEBLOCK }; +Blockly.Blocks['text_printf'] = { + /** + * Block for printf statement. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "message0": Blockly.Msg.TEXT_PRINTF_TITLE, + "args0": [ + { + "type": "input_value", + "name": "TEXT", + "check": 'String' + } + ], + // "output": 'String', + "colour": Blockly.Blocks.texts.HUE, + "tooltip": Blockly.Msg.TEXT_PRINTF_TOOLTIP, + "helpUrl": Blockly.Msg.TEXT_PRINTF_HELPURL + }); + this.itemCount_ = 1; + this.setPreviousStatement(true); + this.setNextStatement(true); + this.appendAddSubGroup(Blockly.Msg.TEXT_PRINTF_CREATEWITH, 'items',null, + '-IGNORED-'); + }, + /** + * Create XML to represent number of text inputs. + * @return {!Element} XML storage element. + * @this Blockly.Block + */ + mutationToDom: function() { + var container = document.createElement('mutation'); + container.setAttribute('items', this.itemCount_); + return container; + }, + /** + * Parse XML to restore the text inputs. + * @param {!Element} xmlElement XML storage element. + * @this Blockly.Block + */ + domToMutation: function(xmlElement) { + this.itemCount_ = parseInt(xmlElement.getAttribute('items'), 10); + this.updateShape_(); + }, + /** + * Populate the mutator's dialog with this block's components. + * @param {!Blockly.Workspace} workspace Mutator's workspace. + * @return {!Blockly.Block} Root block in mutator. + * @this Blockly.Block + */ + decompose: function(workspace) { + var containerBlock = Blockly.Block.obtain(workspace, + 'text_printf_container'); + containerBlock.initSvg(); + var connection = containerBlock.getInput('STACK').connection; + for (var i = 0; i < this.itemCount_; i++) { + var itemBlock = Blockly.Block.obtain(workspace, 'text_printf_item'); + itemBlock.initSvg(); + connection.connect(itemBlock.previousConnection); + connection = itemBlock.nextConnection; + } + return containerBlock; + }, + /** + * Reconfigure this block based on the mutator dialog's components. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + compose: function(containerBlock) { + var itemBlock = containerBlock.getInputTargetBlock('STACK'); + // Count number of inputs. + var connections = []; + var i = 0; + while (itemBlock) { + connections[i] = itemBlock.valueConnection_; + itemBlock = itemBlock.nextConnection && + itemBlock.nextConnection.targetBlock(); + i++; + } + this.itemCount_ = i; + this.updateShape_(); + }, + getAddSubName: function(name,pos) { + return 'ADD'+pos; + }, + appendAddSubEmptyInput: function(name,title) { + var inputItem = this.appendDummyInput(name) + .appendField(this.newQuote_(true)) + .appendField(this.newQuote_(false)); + return inputItem; + }, + newQuote_: Blockly.Blocks['text'].newQuote_, + typeblock: Blockly.Msg.TEXT_PRINT_TYPEBLOCK +}; + +Blockly.Blocks['text_sprintf'] = { + /** + * Block for sprintf statement. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "message0": Blockly.Msg.TEXT_SPRINTF_TITLE, + "args0": [ + { + "type": "input_value", + "name": "TEXT", + "check": 'String' + } + ], + "output": 'String', + "colour": Blockly.Blocks.texts.HUE, + "tooltip": Blockly.Msg.TEXT_SPRINTF_TOOLTIP, + "helpUrl": Blockly.Msg.TEXT_SPRINTF_HELPURL + }); + this.setPreviousStatement(false); + this.setNextStatement(false); + this.appendAddSubGroup(Blockly.Msg.TEXT_SPRINTF_CREATEWITH, 'items',null, + '-IGNORED-'); + this.setOutput(true, 'String'); + }, + /** + * Create XML to represent number of text inputs. + * @return {!Element} XML storage element. + * @this Blockly.Block + */ + mutationToDom: function() { + var container = document.createElement('mutation'); + container.setAttribute('items', this.itemCount_); + return container; + }, + /** + * Parse XML to restore the text inputs. + * @param {!Element} xmlElement XML storage element. + * @this Blockly.Block + */ + domToMutation: function(xmlElement) { + this.itemCount_ = parseInt(xmlElement.getAttribute('items'), 10); + this.updateShape_(); + }, + /** + * Populate the mutator's dialog with this block's components. + * @param {!Blockly.Workspace} workspace Mutator's workspace. + * @return {!Blockly.Block} Root block in mutator. + * @this Blockly.Block + */ + decompose: function(workspace) { + var containerBlock = Blockly.Block.obtain(workspace, + 'text_sprintf_container'); + containerBlock.initSvg(); + var connection = containerBlock.getInput('STACK').connection; + for (var i = 0; i < this.itemCount_; i++) { + var itemBlock = Blockly.Block.obtain(workspace, 'text_sprintf_item'); + itemBlock.initSvg(); + connection.connect(itemBlock.previousConnection); + connection = itemBlock.nextConnection; + } + return containerBlock; + }, + /** + * Reconfigure this block based on the mutator dialog's components. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + compose: function(containerBlock) { + var itemBlock = containerBlock.getInputTargetBlock('STACK'); + // Count number of inputs. + var connections = []; + var i = 0; + while (itemBlock) { + connections[i] = itemBlock.valueConnection_; + itemBlock = itemBlock.nextConnection && + itemBlock.nextConnection.targetBlock(); + i++; + } + this.itemCount_ = i; + this.updateShape_(); + }, + getAddSubName: function(name,pos) { + return 'ADD'+pos; + }, + appendAddSubEmptyInput: function(name,title) { + var inputItem = this.appendDummyInput(name) + .appendField(this.newQuote_(true)) + .appendField(this.newQuote_(false)); + return inputItem; + }, + newQuote_: Blockly.Blocks['text'].newQuote_, + typeblock: Blockly.Msg.TEXT_PRINT_TYPEBLOCK +}; + Blockly.Blocks['text_prompt_ext'] = { /** * Block for prompt function (external message). diff --git a/blocks_compressed.js b/blocks_compressed.js index 5a7c46db86b..f23e5266fa2 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -94,29 +94,31 @@ Blockly.Blocks.math_constrain={init:function(){this.jsonInit({message0:Blockly.M Blockly.Blocks.math_random_int={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:Blockly.Msg.MATH_RANDOM_INT_HELPURL})},typeblock:[{entry:Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK,values:{FROM:1,TO:100}}]}; Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM);this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)},typeblock:Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK};Blockly.Blocks.procedures={};Blockly.Blocks.procedures.HUE=290; Blockly.Blocks.procedures_defnoreturn={init:function(){var a=new Blockly.FieldClickImage(this.addPng,17,17);a.setPrivate({name:b,pos:0});a.setChangeHandler(this.doAddField);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.setColour(Blockly.Blocks.procedures.HUE);var b=Blockly.Procedures.findLegalName(Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,this),b=new Blockly.FieldTextInput(b,Blockly.Procedures.rename);b.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(b, -"NAME").appendField(a);this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP);this.setInputsInline(!1);this.arguments_=[];this.argid=0;this.setStatements_(!0);this.statementConnection_=null;this.hasReturnValue_=!1},doAddField:function(a){a=this.arguments_.length;for(var b="param"+a,c=!0;c;)for(var c=!1,d=0;da.length?this.removeInput("ARG"+c):a[c].name!=this.arguments_[c].name? +(this.setFieldValue(a[c].name,"ARGn"+c),e&&e.sourceBlock_.unplug(!0,!0),d.setCheck(a[c].type)):a[c].type!=this.arguments_[c].type&&(d.setCheck(a[c].type),d.connection.targetConnection&&(e=null),e&&(this.quarkConnections_[this.arguments_[c].name]=e))}}var f=this.arguments_;this.arguments_=[];for(c=0;c'}},{entry:Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK, fields:{TYPE:"NUMBER"},values:{TEXT:''}}]}; diff --git a/core/field_scope_variable.js b/core/field_scope_variable.js index b97c3f5ed74..a5ecd83b5e3 100644 --- a/core/field_scope_variable.js +++ b/core/field_scope_variable.js @@ -90,7 +90,7 @@ Blockly.FieldScopeVariable.prototype.init = function(block) { return; } - if (!this.getValue()) { + if (!this.getValue() && !this.msgEmpty_) { // Variables without names get uniquely named for this workspace. if (block.isInFlyout) { var workspace = block.workspace.targetWorkspace; @@ -110,9 +110,9 @@ Blockly.FieldScopeVariable.prototype.init = function(block) { */ Blockly.FieldScopeVariable.prototype.getValue = function() { var result = this.getText(); - if (result === this.msgEmpty_) { - result = ''; - } +// if (result === this.msgEmpty_) { +// result = ''; +// } return result; }; @@ -179,7 +179,7 @@ Blockly.FieldScopeVariable.dropdownCreate = function() { } // Ensure that the currently selected variable is an option. var name = this.getText(); - if (name && variableList.indexOf(name) == -1) { + if (name && name !== '' && variableList.indexOf(name) == -1) { variableList.push(name); } variableList.sort(goog.string.caseInsensitiveCompare); @@ -195,7 +195,7 @@ Blockly.FieldScopeVariable.dropdownCreate = function() { } // Variables are not language-specific, use the name as both the user-facing - // text and the internal representation. + // text and the internal representation except for the empty string if any var options = []; if (this.msgEmpty_) { options.push([this.msgEmpty_, '']); diff --git a/core/variables.js b/core/variables.js index 74486b35092..0238e37c1fe 100644 --- a/core/variables.js +++ b/core/variables.js @@ -108,7 +108,6 @@ Blockly.Variables.allVariablesTypes = function(root) { for (var t in variableHash) { temp += t + ':'+variableHash[t]+','; } - console.log('check:'+temp); var blockVariablesTypes = func.call(blocks[x]); for (var key in blockVariablesTypes) { if (blockVariablesTypes.hasOwnProperty(key)) { diff --git a/demos/realtime/index.html b/demos/realtime/index.html index 55cd13bba96..8c42c50c479 100644 --- a/demos/realtime/index.html +++ b/demos/realtime/index.html @@ -69,7 +69,7 @@

Blockly > {toolbox: document.getElementById('toolbox'), realtime: true, realtimeOptions: - {clientId: 'YOUR CLIENT ID HERE', + {clientId: '930808964100-qv9mank16ek1eioi2j83h00t4cg66gct.apps.googleusercontent.com', chatbox: {elementId: 'chatbox'}, collabElementId: 'collaborators'}}); diff --git a/generators/java.js b/generators/java.js index eb8719cdeb3..3b4a4862f31 100644 --- a/generators/java.js +++ b/generators/java.js @@ -134,6 +134,10 @@ Blockly.Java.needImports_ = []; * be processed by Blockly.Java.addImport */ Blockly.Java.ExtraImports_ = null; +/** + * Specifies that we want to have the Var Class inline instead of external + */ +Blockly.Java.INLINEVARCLASS = true; /** * List of additional classes used globally by the generated java code. */ @@ -250,6 +254,14 @@ Blockly.Java.getImports = function() { Blockly.Java.setExtraImports = function(extraImports) { this.ExtraImports_ = extraImports; } +/** + * Specify whether to inline the Var class or reference it externally + * @param {string} inlineclass Generate the Var class inline + */ +Blockly.Java.setVarClassInline = function(inlineclass) { + this.INLINEVARCLASS = inlineclass; +} + Blockly.Java.getClasses = function() { var code = ''; @@ -304,18 +316,19 @@ Blockly.Java.getValueType = function(block, field) { } Blockly.Java.provideVarClass = function() { + if (this.INLINEVARCLASS) { + Blockly.Java.addImport('java.text.DecimalFormat'); + Blockly.Java.addImport('java.text.NumberFormat'); + Blockly.Java.addImport('java.lang.Math'); + Blockly.Java.addImport('java.util.Arrays'); + Blockly.Java.addImport('java.util.Collections'); + Blockly.Java.addImport('java.util.LinkedList'); + Blockly.Java.addImport('java.util.List'); + Blockly.Java.addImport('java.util.HashMap'); + Blockly.Java.addImport('java.util.Map'); + Blockly.Java.addImport('java.util.Objects'); - Blockly.Java.addImport('java.text.DecimalFormat'); - Blockly.Java.addImport('java.text.NumberFormat'); - Blockly.Java.addImport('java.lang.Math'); - Blockly.Java.addImport('java.util.Arrays'); - Blockly.Java.addImport('java.util.Collections'); - Blockly.Java.addImport('java.util.LinkedList'); - Blockly.Java.addImport('java.util.HashMap'); - Blockly.Java.addImport('java.util.Map'); - Blockly.Java.addImport('java.util.Objects'); - - var VarCode = [ + var VarCode = [ '/**', ' *', ' * @author bmoon', @@ -957,7 +970,10 @@ Blockly.Java.provideVarClass = function() { '', '}' ]; - Blockly.Java.classes_['Var'] = VarCode.join('\n')+'\n'; + this.classes_['Var'] = VarCode.join('\n')+'\n'; + } else { + Blockly.Java.addImport('extreme.sdn.client.Var'); + } } /** * Initialise the database of variable names. @@ -1090,34 +1106,37 @@ Blockly.Java.finish = function(code) { } // Figure out the header to put on the function - var header = '/**\n' + - ' * Description goes here\n'; - var extra = ' *\n'; + var header = ''; var res1 = def.split("(", 2); - var res = res1[0]; // Get everything before the ( - var res2 = res.split(" "); - var rettype = res2[res2.length-2]; // The next to the last word - res = res1[1]; // Take the parameters after the ( - res2 = res.split(")",1); - res = res2[0].trim(); - if (res !== '') { - var args = res.split(","); - for (var arg = 0; arg < args.length; arg++) { - var argline = args[arg].split(" "); - header += extra + ' * @param ' + argline[argline.length-1] + '\n'; + if (res1.length >= 2) { + // Figure out the header to put on the function + var header = '/**\n' + + ' * Description goes here\n'; + var extra = ' *\n'; + var res = res1[0]; // Get everything before the ( + var res2 = res.split(" "); + var rettype = res2[res2.length-2]; // The next to the last word + res = res1[1]; // Take the parameters after the ( + res2 = res.split(")",1); + res = res2[0].trim(); + if (res !== '') { + var args = res.split(","); + for (var arg = 0; arg < args.length; arg++) { + var argline = args[arg].split(" "); + header += extra + ' * @param ' + argline[argline.length-1] + '\n'; + extra = ''; + } + } + if (rettype !== 'void') { + header += extra + ' * @return ' + rettype + '\n'; extra = ''; } + header += ' */\n'; } - if (rettype !== 'void') { - header += extra + ' * @return ' + rettype + '\n'; - extra = ''; - } - header += ' */\n'; allDefs += header + def + '\n\n'; } } -// var allDefs = definitions.join('\n\n'); return allDefs.replace(/\n\n+/g, '\n\n').replace(/\n*$/, '\n\n\n') + code; }; @@ -1128,7 +1147,7 @@ Blockly.Java.finish = function(code) { * @return {string} Legal line of code. */ Blockly.Java.scrubNakedValue = function(line) { - return line + '\n'; + return line + ';\n'; }; /** @@ -1138,12 +1157,7 @@ Blockly.Java.scrubNakedValue = function(line) { * @private */ Blockly.Java.quote_ = function(string) { - // TODO: This is a quick hack. Replace with goog.string.quote - string = string.replace(/\\/g, '\\\\') - .replace(/\n/g, '\\\n') - .replace(/\%/g, '\\%') - .replace(/"/g, '\\"'); - return '"' + string + '"'; + return goog.string.quote(string); }; /** diff --git a/generators/java/logic.js b/generators/java/logic.js index 1437267741e..25347fa7ccc 100644 --- a/generators/java/logic.js +++ b/generators/java/logic.js @@ -88,9 +88,6 @@ Blockly.Java['logic_compare'] = function(block) { var temp = argument0; argument0 = argument1.slice(0,-14); argument1 = temp; - } else if ((argument0Type && goog.array.contains(argument0Type, 'String')) || - (argument1Type && goog.array.contains(argument1Type, 'String'))) { - useFunctions = true; } if (!argument0) { diff --git a/generators/java/text.js b/generators/java/text.js index 9be56996c08..0894520407d 100644 --- a/generators/java/text.js +++ b/generators/java/text.js @@ -280,6 +280,60 @@ Blockly.Java['text_print'] = function(block) { return 'System.out.println(' + argument0 + '.toString());\n'; }; +Blockly.Java['text_printf'] = function(block) { + // Print statement. + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_NONE) || '""'; + return 'System.out.println(' + argument0 + '.toString());\n'; +}; + +Blockly.Java['text_printf'] = function(block) { + // Create a string made up of any number of elements of any type. + // Should we allow joining by '-' or ',' or any other characters? + var code; + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', Blockly.Java.ORDER_NONE) || '""'; + if (block.itemCount_ == 0) { + return ['""', Blockly.Java.ORDER_ATOMIC]; + } else { + var code = ''; + var extra = ''; + for (var n = 0; n < block.itemCount_; n++) { + var item = Blockly.Java.valueToCode(block, 'ADD' + n, + Blockly.Java.ORDER_NONE); + if (item) { + code += extra + Blockly.Java.toStringCode(item); + extra = ', '; + } + } + code = 'System.out.format(' + argument0 + ','+code+' );\n'; + return code; + } +}; + +Blockly.Java['text_sprintf'] = function(block) { + // Create a string made up of any number of elements of any type. + // Should we allow joining by '-' or ',' or any other characters? + var code; + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', Blockly.Java.ORDER_NONE) || '""'; + if (block.itemCount_ == 0) { + return ['""', Blockly.Java.ORDER_ATOMIC]; + } else { + var code = ''; + var extra = ''; + for (var n = 0; n < block.itemCount_; n++) { + var item = Blockly.Java.valueToCode(block, 'ADD' + n, + Blockly.Java.ORDER_NONE); + if (item) { + code += extra + Blockly.Java.toStringCode(item); + extra = ', '; + } + } + code = 'String.format(' + argument0 + ','+code+' )'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } +}; + + Blockly.Java['text_prompt'] = function(block) { // Prompt function (internal message). var functionName = Blockly.Java.provideFunction_( diff --git a/generators/python/text.js b/generators/python/text.js index f76c3972caa..1abdb690e91 100644 --- a/generators/python/text.js +++ b/generators/python/text.js @@ -234,6 +234,54 @@ Blockly.Python['text_print'] = function(block) { return 'print(' + argument0 + ')\n'; }; + +Blockly.Python['text_printf'] = function(block) { + // Create a string made up of any number of elements of any type. + // Should we allow joining by '-' or ',' or any other characters? + var code; + var argument0 = Blockly.Python.valueToCode(block, 'TEXT', Blockly.Python.ORDER_NONE) || '""'; + if (block.itemCount_ == 0) { + return ['""', Blockly.Python.ORDER_ATOMIC]; + } else { + var code = ''; + var extra = ''; + for (var n = 0; n < block.itemCount_; n++) { + var item = Blockly.Python.valueToCode(block, 'ADD' + n, + Blockly.Python.ORDER_NONE); + if (item) { + code += extra + 'str('+item+')'; + extra = ', '; + } + } + code = 'print "".format( ' + argument0 + ' % ('+code+' ))'; + return code; + } +}; + +Blockly.Python['text_sprintf'] = function(block) { + // Create a string made up of any number of elements of any type. + // Should we allow joining by '-' or ',' or any other characters? + var code; + var argument0 = Blockly.Python.valueToCode(block, 'TEXT', Blockly.Python.ORDER_NONE) || '""'; + Blockly.Python.definitions_['import_StringIO'] = 'import StringIO'; + if (block.itemCount_ == 0) { + return ['""', Blockly.Python.ORDER_ATOMIC]; + } else { + var code = ''; + var extra = ''; + for (var n = 0; n < block.itemCount_; n++) { + var item = Blockly.Python.valueToCode(block, 'ADD' + n, + Blockly.Python.ORDER_NONE); + if (item) { + code += extra + 'str('+item+')'; + extra = ', '; + } + } + code = '"".format( ' + argument0 + ' % ('+code+' ))'; + return [code, Blockly.Python.ORDER_FUNCTION_CALL]; + } +}; + Blockly.Python['text_prompt_ext'] = function(block) { // Prompt function. var functionName = Blockly.Python.provideFunction_( diff --git a/java_compressed.js b/java_compressed.js index 054f59ed405..925e2f96b8d 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -6,16 +6,18 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern,equal"); Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.INDENT=" ";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_=""; -Blockly.Java.needImports_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.classes_=[];Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; +Blockly.Java.needImports_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.INLINEVARCLASS=!0;Blockly.Java.classes_=[];Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; Blockly.Java.GetVariableType=function(a){a=this.variableTypes_[a];a||(a="String",Blockly.Java.provideVarClass());return a};Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'}; +Blockly.Java.provideVarClass=function(){this.INLINEVARCLASS?(Blockly.Java.addImport("java.text.DecimalFormat"),Blockly.Java.addImport("java.text.NumberFormat"),Blockly.Java.addImport("java.lang.Math"),Blockly.Java.addImport("java.util.Arrays"),Blockly.Java.addImport("java.util.Collections"),Blockly.Java.addImport("java.util.LinkedList"),Blockly.Java.addImport("java.util.List"),Blockly.Java.addImport("java.util.HashMap"),Blockly.Java.addImport("java.util.Map"),Blockly.Java.addImport("java.util.Objects"), +this.classes_.Var='/**\n *\n * @author bmoon\n */\nfinal class Var implements Comparable {\n\n public enum Type {\n\n STRING, INT, DOUBLE, LIST, UNKNOWN\n };\n\n private Type _type;\n private Object _object;\n private static final NumberFormat _formatter = new DecimalFormat("#.#####");\n\n /**\n * Construct a Var with an UNKNOWN type\n *\n */\n public Var() {\n _type = Type.UNKNOWN;\n } // end var\n\n /**\n * Construct a Var and assign its contained object to that specified.\n *\n * @param object The value to set this object to\n */\n public Var(Object object) {\n setObject(object);\n } // end var\n\n /**\n * Construct a Var from a given Var\n *\n * @param var var to construct this one from\n */\n public Var(Var var) {\n setObject(var.getObject());\n } // end var\n\n /**\n * Static constructor to make a var from some value.\n *\n * @param val some value to construct a var around\n * @return the Var object\n */\n public static Var valueOf(Object val) {\n return new Var(val);\n } // end valueOf\n\n /**\n * Get the type of the underlying object\n *\n * @return Will return the object\'s type as defined by Type\n */\n public Type getType() {\n return _type;\n } // end getType\n\n /**\n * Get the contained object\n *\n * @return the object\n */\n public Object getObject() {\n return _object;\n } // end getObject\n\n /**\n * Clone Object\n *\n * @return a new object equal to this one\n */\n public Object cloneObject() {\n Var tempVar = new Var(this);\n return tempVar.getObject();\n } // end cloneObject\n\n /**\n * Get object as an int. Does not make sense for a "LIST" type object\n *\n * @return an integer whose value equals this object\n */\n public int getObjectAsInt() {\n switch (getType()) {\n case STRING:\n return Integer.parseInt((String) getObject());\n case INT:\n return (int) getObject();\n case DOUBLE:\n return new Double((double) getObject()).intValue();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0;\n } // end getObjectAsInt\n\n /**\n * Get object as a double. Does not make sense for a "LIST" type object.\n *\n * @return a double whose value equals this object\n */\n public double getObjectAsDouble() {\n switch (getType()) {\n case STRING:\n return Double.parseDouble((String) getObject());\n case INT:\n return new Integer((int) getObject()).doubleValue();\n case DOUBLE:\n return (double) getObject();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0.0;\n } // end get object as double\n\n /**\n * Get object as a string.\n *\n * @return The string value of the object. Note that for lists, this is a\n * comma separated list of the form {x,y,z,...}\n */\n public String getObjectAsString() {\n return this.toString();\n } // end gotObjectAsString\n\n /**\n * Get the object as a list.\n *\n * @return a LinkedList whose elements are of type Var\n */\n public LinkedList getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): +Blockly.Java.addImport("extreme.sdn.client.Var")}; Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.imports_=Object.create(null);this.classes_=Object.create(null);for(var c=0;ce;e++)for(var f=b[e].sort(),g=0;ge;e++)for(var f=b[e].sort(),g=0;g","<=":">=",">":"<",">=":"<="},c={EQ:"",NEQ:"!",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],d=Blockly.Java.getValueType(a,"A"),e=Blockly.Java.getValueType(a,"B"),f=Blockly.Java.valueToCode(a,"A",Blockly.Java.ORDER_RELATIONAL);a=Blockly.Java.valueToCode(a,"B",Blockly.Java.ORDER_RELATIONAL);if(".cloneObject()"===f.slice(-14))f=f.slice(0,-14),".cloneObject()"===a.slice(-14)&&(a=a.slice(0,-14));else if(".cloneObject()"===a.slice(-14))c= -b[c],b=f,f=a.slice(0,-14),a=b;else if(d&&goog.array.contains(d,"String")||e&&goog.array.contains(e,"String"))useFunctions=!0;f=f?"Var.valueOf("+f+")":'""';a||(a='""');return[""===c||"!"===c?c+f+".equals("+a+")":f+".compareTo("+a+") "+c+" 0",Blockly.Java.ORDER_RELATIONAL]}; +Blockly.Java.logic_compare=function(a){var b={"":"","!":"!","<":">","<=":">=",">":"<",">=":"<="},c={EQ:"",NEQ:"!",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")];Blockly.Java.getValueType(a,"A");Blockly.Java.getValueType(a,"B");var d=Blockly.Java.valueToCode(a,"A",Blockly.Java.ORDER_RELATIONAL);a=Blockly.Java.valueToCode(a,"B",Blockly.Java.ORDER_RELATIONAL);".cloneObject()"===d.slice(-14)?(d=d.slice(0,-14),".cloneObject()"===a.slice(-14)&&(a=a.slice(0,-14))):".cloneObject()"===a.slice(-14)&& +(c=b[c],b=d,d=a.slice(0,-14),a=b);d=d?"Var.valueOf("+d+")":'""';a||(a='""');return[""===c||"!"===c?c+d+".equals("+a+")":d+".compareTo("+a+") "+c+" 0",Blockly.Java.ORDER_RELATIONAL]}; Blockly.Java.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?" && ":" || ",c="and"==b?Blockly.Java.ORDER_LOGICAL_AND:Blockly.Java.ORDER_LOGICAL_OR,d=Blockly.Java.valueToCode(a,"A",c);a=Blockly.Java.valueToCode(a,"B",c);if(d||a){var e=" && "==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+b+a,c]};Blockly.Java.logic_negate=function(a){return["!("+(Blockly.Java.valueToCode(a,"BOOL",Blockly.Java.ORDER_LOGICAL_NOT)||"true")+")",Blockly.Java.ORDER_LOGICAL_NOT]}; Blockly.Java.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_null=function(a){return["null",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_ternary=function(a){var b=Blockly.Java.valueToCode(a,"IF",Blockly.Java.ORDER_CONDITIONAL)||"false",c=Blockly.Java.valueToCode(a,"THEN",Blockly.Java.ORDER_CONDITIONAL)||"null";a=Blockly.Java.valueToCode(a,"ELSE",Blockly.Java.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Java.ORDER_CONDITIONAL]};Blockly.Java.loops={};Blockly.Java.controls_repeat=function(a){var b=parseInt(a.getFieldValue("TIMES"),10),c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; Blockly.Java.controls_repeat_ext=function(a){var b=Blockly.Java.valueToCode(a,"TIMES",Blockly.Java.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")",c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);return"for (int "+a+"=0; "+a+" < "+b+";"+a+"++) {\n"+c+"} // end for\n"}; Blockly.Java.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Java.valueToCode(a,"BOOL",b?Blockly.Java.ORDER_LOGICAL_NOT:Blockly.Java.ORDER_NONE)||"false",d=Blockly.Java.statementToCode(a,"DO"),d=Blockly.Java.addLoopTrap(d,a.id)||Blockly.Java.PASS;if(b&&"true"===c||!b&&"false"===c)a=Blockly.Java.variableDB_.getDistinctName(c,Blockly.Variables.NAME_TYPE),Blockly.Java.stashStatement("boolean "+a+" = "+c+";\n"),c=a;b&&(c="!"+c);return"while ("+c+") {\n"+d+"} // end while\n"}; Blockly.Java.controls_for=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);Blockly.Java.GetVariableType(a.getFieldValue("VAR"));var c=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0",d=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0",e=Blockly.Java.valueToCode(a,"BY",Blockly.Java.ORDER_NONE)||"1",f=Blockly.Java.statementToCode(a,"DO"),f=Blockly.Java.addLoopTrap(f,a.id)||Blockly.Java.PASS;a=Blockly.Java.GetVariableType(a.getFieldValue("VAR")); -var g="";if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),k="<=",l="++";c>d&&(k=">=",e=-e);"Var"===a?g="for ("+b+".setObject("+c+"); "+b+".getObjectAsDouble() "+k+d+"; "+b+".incrementObject("+e+")) ":(0>e?l=" -= "+Math.abs(e):1!=e&&(l=" += "+e),g+="for ("+b+" = "+c+"; "+b+k+d+"; "+b+l+")")}else k=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(k=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE), -g+="double "+k+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),g+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),g+="double "+d+" = ",g=Blockly.isNumber(e)?g+(Math.abs(e)+";\n"):g+("Math.abs("+e+");\n"),g=g+("if ("+k+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),g+="}\n",g="Var"===a?g+("for ("+b+".setObject("+k+");\n "+d+" >= 0 ? "+ -b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+c+";\n"+b+".incrementObject("+d+")) "):g+("for ("+b+" = "+k+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")");return g+=" {\n"+f+"} // end for\n"}; +var g="";if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),h="<=",l="++";c>d&&(h=">=",e=-e);"Var"===a?g="for ("+b+".setObject("+c+"); "+b+".getObjectAsDouble() "+h+d+"; "+b+".incrementObject("+e+")) ":(0>e?l=" -= "+Math.abs(e):1!=e&&(l=" += "+e),g+="for ("+b+" = "+c+"; "+b+h+d+"; "+b+l+")")}else h=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(h=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE), +g+="double "+h+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),g+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),g+="double "+d+" = ",g=Blockly.isNumber(e)?g+(Math.abs(e)+";\n"):g+("Math.abs("+e+");\n"),g=g+("if ("+h+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),g+="}\n",g="Var"===a?g+("for ("+b+".setObject("+h+");\n "+d+" >= 0 ? "+ +b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+c+";\n"+b+".incrementObject("+d+")) "):g+("for ("+b+" = "+h+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")");return g+=" {\n"+f+"} // end for\n"}; Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("it",Blockly.Variables.NAME_TYPE);b="Var"===c?b+".setObject("+a+".next())":b+" = "+a+".next()";Blockly.Java.addImport("java.util.Iterator"); return"for (Iterator "+a+" = "+d+".iterator(); "+a+".hasNext();) {\n "+b+";\n"+e+"} // end for\n"};Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Java.math={};Blockly.Java.addReservedWords("math,random");Blockly.Java.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; Blockly.Java.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Java.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Java.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Java.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Java.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Java.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Java.valueToCode(a,"A",b)||"0";a=Blockly.Java.valueToCode(a,"B",b)||"0";var e="";" ** "===c?(Blockly.Java.addImport("java.lang.Math"),e="Math.pow("+d+", "+a+")"):e=d+c+a;return[e, @@ -74,7 +76,7 @@ Blockly.Java.math_constrain=function(a){Blockly.Java.addImport("java.lang.Math") Blockly.Java.math_random_int=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0";return[Blockly.Java.provideFunction_("math_random_int",["public static int "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(int a, int b) {"," if (a > b) {"," // Swap a and b to ensure a is smaller."," int c = a;"," a = b;"," b = c;"," }"," return (int)Math.floor(Math.random() * (b - a + 1) + a);", "}"])+"("+b+", "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_random_float=function(a){Blockly.Java.addImport("java.lang.Math");return["Math.random()",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.procedures={}; Blockly.Java.procedures_defreturn=function(a){var b=a.getFieldValue("NAME"),c=Blockly.Java.variableDB_.getName(b,Blockly.Procedures.NAME_TYPE),d=Blockly.Java.statementToCode(a,"STACK");Blockly.Java.STATEMENT_PREFIX&&(d=Blockly.Java.prefixLines(Blockly.Java.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.Java.INDENT)+d);Blockly.Java.INFINITE_LOOP_TRAP&&(d=Blockly.Java.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+d);var e="void";this.hasReturnValue_&&(e=Blockly.Java.GetVariableType(b+"."));var f= -Blockly.Java.valueToCode(a,"RETURN",Blockly.Java.ORDER_NONE)||"";f?f="Var"===e?" return Var.valueOf("+f+");\n":" return "+f+";\n":d||(d=Blockly.Java.PASS);for(var g=[],k=0;k", - "lastupdated": "2015-08-13 08:14:56.525062", + "lastupdated": "2015-08-13 10:05:18.876513", "locale": "en", "messagedocumentation" : "qqq" }, @@ -348,6 +348,16 @@ "TEXT_PRINT_TITLE": "print %1", "TEXT_PRINT_TOOLTIP": "Print the specified text, number or other value.", "TEXT_PRINT_TYPEBLOCK": "Print Text", + "TEXT_PRINTF_HELPURL": "https://github.com/google/blockly/wiki/Text#printing-text", + "TEXT_PRINTF_TITLE": "printf format %1", + "TEXT_PRINTF_TOOLTIP": "Printf the specified text, number or other value.", + "TEXT_PRINTF_TYPEBLOCK": "Printf Text", + "TEXT_PRINTF_CREATEWITH": "create text with", + "TEXT_SPRINTF_HELPURL": "https://github.com/google/blockly/wiki/Text#printing-text", + "TEXT_SPRINTF_TITLE": "sprintf format %1", + "TEXT_SPRINTF_TOOLTIP": "Sprintf the specified text, number or other value.", + "TEXT_SPRINTF_TYPEBLOCK": "Sprintf Text", + "TEXT_SPRINTF_CREATEWITH": "create text with", "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", @@ -487,6 +497,8 @@ "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_NEWTYPE": "New Type...", + "PROCEDURES_NEWTYPETITLE": "New Type name:", "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", diff --git a/msg/json/qqq.json b/msg/json/qqq.json index 92cbed71566..0256c46bc01 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -342,6 +342,16 @@ "TEXT_PRINT_TITLE": "block text - Display the input on the screen. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text]. \n\nParameters:\n* %1 - the value to print", "TEXT_PRINT_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", "TEXT_PRINT_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_PRINTF_HELPURL": "url - Information about displaying text on computers.", + "TEXT_PRINTF_TITLE": "block text - Display the input on the screen. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text]. \n\nParameters:\n* %1 - the value to print", + "TEXT_PRINTF_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", + "TEXT_PRINTF_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_PRINTF_CREATEWITH": "", + "TEXT_SPRINTF_HELPURL": "url - Information about displaying text on computers.", + "TEXT_SPRINTF_TITLE": "block text - Display the input on the screen. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text]. \n\nParameters:\n* %1 - the value to print", + "TEXT_SPRINTF_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", + "TEXT_SPRINTF_TYPEBLOCK": "Typeblock - Autocomplete for typeblocking", + "TEXT_SPRINTF_CREATEWITH": "", "TEXT_PROMPT_HELPURL": "url - Information about getting text from users.", "TEXT_PROMPT_TYPE_TEXT": "dropdown - Specifies that a piece of text should be requested from the user with the following message. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", "TEXT_PROMPT_TYPE_NUMBER": "dropdown - Specifies that a number should be requested from the user with the following message. See [https://github.com/google/blockly/wiki/Text#printing-text https://github.com/google/blockly/wiki/Text#printing-text].", @@ -481,6 +491,8 @@ "PROCEDURES_DEFRETURN_HELPURL": "url - Information about defining [https://en.wikipedia.org/wiki/Procedure_(computer_science) functions] that have return values.", "PROCEDURES_DEFRETURN_RETURN": "block text - This imperative or infinite verb precedes the value that is used as the return value (output) of this function. See [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#6ot5y5 this sample function that returns a value].", "PROCEDURES_DEFRETURN_TOOLTIP": "tooltip", + "PROCEDURES_NEWTYPE": "dropdown choice - When the user clicks on a variable type block, this is one of the dropdown menu choices. It is used to define a new variable type", + "PROCEDURES_NEWTYPETITLE": "prompt - Prompts the user to enter the name for a new type.", "PROCEDURES_ALLOW_STATEMENTS": "Label for a checkbox that controls if statements are allowed in a function.", "PROCEDURES_DEF_DUPLICATE_WARNING": "alert - The user has created a function with two parameters that have the same name. Every parameter must have a different name.", "PROCEDURES_CALLNORETURN_HELPURL": "url - Information about calling [https://en.wikipedia.org/wiki/Procedure_(computer_science) functions] that do not return values.", diff --git a/msg/messages.js b/msg/messages.js index 1339dede4e4..e6532b1be86 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -944,6 +944,35 @@ Blockly.Msg.TEXT_PRINT_TOOLTIP = 'Print the specified text, number or other valu /// Typeblock - Autocomplete for typeblocking Blockly.Msg.TEXT_PRINT_TYPEBLOCK = 'Print Text'; +/// url - Information about displaying text on computers. +Blockly.Msg.TEXT_PRINTF_HELPURL = 'https://github.com/google/blockly/wiki/Text#printing-text'; +/// block text - Display the input on the screen. See +/// [https://github.com/google/blockly/wiki/Text#printing-text +/// https://github.com/google/blockly/wiki/Text#printing-text]. +/// \n\nParameters:\n* %1 - the value to print +Blockly.Msg.TEXT_PRINTF_TITLE = 'printf format %1'; +/// tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text +/// https://github.com/google/blockly/wiki/Text#printing-text]. +Blockly.Msg.TEXT_PRINTF_TOOLTIP = 'Printf the specified text, number or other value.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_PRINTF_TYPEBLOCK = 'Printf Text'; +Blockly.Msg.TEXT_PRINTF_CREATEWITH ='create text with'; + + +/// url - Information about displaying text on computers. +Blockly.Msg.TEXT_SPRINTF_HELPURL = 'https://github.com/google/blockly/wiki/Text#printing-text'; +/// block text - Display the input on the screen. See +/// [https://github.com/google/blockly/wiki/Text#printing-text +/// https://github.com/google/blockly/wiki/Text#printing-text]. +/// \n\nParameters:\n* %1 - the value to print +Blockly.Msg.TEXT_SPRINTF_TITLE = 'sprintf format %1'; +/// tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text +/// https://github.com/google/blockly/wiki/Text#printing-text]. +Blockly.Msg.TEXT_SPRINTF_TOOLTIP = 'Sprintf the specified text, number or other value.'; +/// Typeblock - Autocomplete for typeblocking +Blockly.Msg.TEXT_SPRINTF_TYPEBLOCK = 'Sprintf Text'; +Blockly.Msg.TEXT_SPRINTF_CREATEWITH ='create text with'; + /// url - Information about getting text from users. Blockly.Msg.TEXT_PROMPT_HELPURL = 'https://github.com/google/blockly/wiki/Text#getting-input-from-the-user'; /// dropdown - Specifies that a piece of text should be requested from the user with @@ -1349,10 +1378,13 @@ Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; /// (output) of this function. See /// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#6ot5y5 this sample /// function that returns a value]. - Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = 'return'; /// tooltip Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = 'Creates a function with an output.'; +/// dropdown choice - When the user clicks on a variable type block, this is one of the dropdown menu choices. It is used to define a new variable type +Blockly.Msg.PROCEDURES_NEWTYPE = 'New Type...'; +/// prompt - Prompts the user to enter the name for a new type. +Blockly.Msg.PROCEDURES_NEWTYPETITLE = 'New Type name:'; /// Label for a checkbox that controls if statements are allowed in a function. Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = 'allow statements'; diff --git a/python_compressed.js b/python_compressed.js index b5c2563fc80..fb83a0d3154 100644 --- a/python_compressed.js +++ b/python_compressed.js @@ -34,10 +34,10 @@ Blockly.Python.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"a Blockly.Python.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"True":"False",Blockly.Python.ORDER_ATOMIC]};Blockly.Python.logic_null=function(a){return["None",Blockly.Python.ORDER_ATOMIC]}; Blockly.Python.logic_ternary=function(a){var b=Blockly.Python.valueToCode(a,"IF",Blockly.Python.ORDER_CONDITIONAL)||"False",c=Blockly.Python.valueToCode(a,"THEN",Blockly.Python.ORDER_CONDITIONAL)||"None";a=Blockly.Python.valueToCode(a,"ELSE",Blockly.Python.ORDER_CONDITIONAL)||"None";return[c+" if "+b+" else "+a,Blockly.Python.ORDER_CONDITIONAL]};Blockly.Python.loops={};Blockly.Python.controls_repeat_ext=function(a){var b=a.getField("TIMES")?parseInt(a.getFieldValue("TIMES"),10):Blockly.Python.valueToCode(a,"TIMES",Blockly.Python.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")",c=Blockly.Python.statementToCode(a,"DO"),c=Blockly.Python.addLoopTrap(c,a.id)||Blockly.Python.PASS;return"for "+Blockly.Python.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE)+" in range("+b+"):\n"+c}; Blockly.Python.controls_repeat=Blockly.Python.controls_repeat_ext;Blockly.Python.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Python.valueToCode(a,"BOOL",b?Blockly.Python.ORDER_LOGICAL_NOT:Blockly.Python.ORDER_NONE)||"False",d=Blockly.Python.statementToCode(a,"DO"),d=Blockly.Python.addLoopTrap(d,a.id)||Blockly.Python.PASS;b&&(c="not "+c);return"while "+c+":\n"+d}; -Blockly.Python.controls_for=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0",d=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0",e=Blockly.Python.valueToCode(a,"BY",Blockly.Python.ORDER_NONE)||"1",g=Blockly.Python.statementToCode(a,"DO"),g=Blockly.Python.addLoopTrap(g,a.id)||Blockly.Python.PASS,f="",h=function(){return Blockly.Python.provideFunction_("upRange", +Blockly.Python.controls_for=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0",d=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0",e=Blockly.Python.valueToCode(a,"BY",Blockly.Python.ORDER_NONE)||"1",f=Blockly.Python.statementToCode(a,"DO"),f=Blockly.Python.addLoopTrap(f,a.id)||Blockly.Python.PASS,g="",h=function(){return Blockly.Python.provideFunction_("upRange", ["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):"," while start <= stop:"," yield start"," start += abs(step)"])},k=function(){return Blockly.Python.provideFunction_("downRange",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):"," while start >= stop:"," yield start"," start -= abs(step)"])};a=function(a,b,c){return"("+a+" <= "+b+") and "+h()+"("+a+", "+b+", "+c+") or "+k()+"("+a+", "+b+", "+c+")"};if(Blockly.isNumber(c)&&Blockly.isNumber(d)&& -Blockly.isNumber(e))c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),0===c%1&&0===d%1&&0===e%1?(c<=d?(d++,a=0==c&&1==e?d:c+", "+d,1!=e&&(a+=", "+e)):(d--,a=c+", "+d+", -"+e),a="range("+a+")"):(a=ca?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC]}; Blockly.Python.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Python.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Python.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Python.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Python.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Python.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Python.valueToCode(a,"A",b)||"0";a=Blockly.Python.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; Blockly.Python.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Python.ORDER_UNARY_SIGN];Blockly.Python.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_MULTIPLICATIVE)||"0":Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_NONE)||"0";switch(b){case "ABS":c="math.fabs("+a+")";break;case "ROOT":c="math.sqrt("+ @@ -57,7 +57,7 @@ Blockly.Python.math_format_as_decimal=function(a){var b=Blockly.Python.valueToCo Blockly.Python.math_constrain=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0",c=Blockly.Python.valueToCode(a,"LOW",Blockly.Python.ORDER_NONE)||"0";a=Blockly.Python.valueToCode(a,"HIGH",Blockly.Python.ORDER_NONE)||"float('inf')";return["min(max("+b+", "+c+"), "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]}; Blockly.Python.math_random_int=function(a){Blockly.Python.definitions_.import_random="import random";var b=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0";a=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0";return["random.randint("+b+", "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.math_random_float=function(a){Blockly.Python.definitions_.import_random="import random";return["random.random()",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.procedures={}; Blockly.Python.procedures_defreturn=function(a){for(var b=Blockly.Variables.allVariables(a),c=b.length-1;0<=c;c--){var d=b[c];-1==a.arguments_.indexOf(d)?b[c]=Blockly.Python.variableDB_.getName(d,Blockly.Variables.NAME_TYPE):b.splice(c,1)}b=b.length?" global "+b.join(", ")+"\n":"";c=Blockly.Python.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE);d=Blockly.Python.statementToCode(a,"STACK");Blockly.Python.STATEMENT_PREFIX&&(d=Blockly.Python.prefixLines(Blockly.Python.STATEMENT_PREFIX.replace(/%1/g,"'"+ -a.id+"'"),Blockly.Python.INDENT)+d);Blockly.Python.INFINITE_LOOP_TRAP&&(d=Blockly.Python.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+d);var e=Blockly.Python.valueToCode(a,"RETURN",Blockly.Python.ORDER_NONE)||"";e?e=" return "+e+"\n":d||(d=Blockly.Python.PASS);for(var g=[],f=0;f report = new LinkedList<>();', - ' LinkedList summary = new LinkedList<>();', - ' StringBuilder result = new StringBuilder();', - ' int fails = 0;', - ' for (int x = 0; x < ' + resultsVar + '.size(); x++) {', - ' if ((boolean)(((LinkedList)' + resultsVar + '.get(x)).get(0))) {', - ' summary.add(".");', - ' } else {', - ' summary.add("F");', - ' fails++;', - ' report.add("");', - ' report.add("FAIL: " + (String)((LinkedList)' + resultsVar + - '.get(x)).get(2));', - ' report.add((String)((LinkedList)' + resultsVar + '.get(x)).get(1));', + ' // Create test report.', + ' LinkedList report = new LinkedList<>();', + ' LinkedList summary = new LinkedList<>();', + ' StringBuilder result = new StringBuilder();', + ' int fails = 0;', + ' for (int x = 0; x < ' + resultsVar + '.size(); x++) {', + ' if ((boolean)(((LinkedList)' + resultsVar + '.get(x)).get(0))) {', + ' summary.add(".");', + ' } else {', + ' summary.add("F");', + ' fails++;', + ' report.add("");', + ' report.add("FAIL: " + (String)((LinkedList)' + resultsVar + + '.get(x)).get(2));', + ' report.add((String)((LinkedList)' + resultsVar + '.get(x)).get(1));', + ' }', + ' }', + ' for(String x: summary) {', + ' result.append(x);', + ' result.append("\\n");', ' }', - ' }', - ' for(String x: summary) {', - ' result.append(x);', - ' result.append("\\n");', - ' }', - ' report.add("");', - ' report.add("Number of tests run: " + ' + resultsVar + + ' report.add("");', + ' report.add("Number of tests run: " + ' + resultsVar + '.size());', - ' report.add("");', - ' if (fails > 0) {', - ' report.add("FAILED (failures=" + fails + ")");', - ' } else {', - ' report.add("OK");', - ' }', - ' for(String x: report) {', - ' result.append(x);', - ' result.append("\\n");', - ' }', - ' return result.toString();', + ' report.add("");', + ' if (fails > 0) {', + ' report.add("FAILED (failures=" + fails + ")");', + ' } else {', + ' report.add("OK");', + ' }', + ' for(String x: report) {', + ' result.append(x);', + ' result.append("\\n");', + ' }', + ' return result.toString();', '}']); // Setup global to hold test results. var code = resultsVar + ' = new LinkedList();\n'; @@ -89,10 +88,10 @@ Blockly.Java['unittest_main'] = function(block) { Blockly.Java.INDENT) + '}\n'+ 'public static void main(String[] args) {\n'+ - ' // Create the class\n' + - ' '+ Blockly.Java.getAppName() + + ' // Create the class\n' + + ' '+ Blockly.Java.getAppName() + ' app = new '+ Blockly.Java.getAppName() + '();\n' + - ' app.myMain(args);\n'+ + ' app.myMain(args);\n'+ '}\n'; return code; }; @@ -100,62 +99,23 @@ Blockly.Java['unittest_main'] = function(block) { Blockly.Java['unittest_main'].defineAssert_ = function() { var resultsVar = Blockly.Java.variableDB_.getName('unittestResults', Blockly.Variables.NAME_TYPE); -// var functionEquals = Blockly.Java.provideFunction_( -// 'equals', -// [ 'public static boolean ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + -// '(Object a, Object b) {', -// '', -// ' if (a.equals(b)) {', -// ' return true;', -// ' } else if (a == b) {', -// ' return true;', -// ' } else if (((a instanceof Double) || (a instanceof Integer)) &&', -// ' ((b instanceof Double) || (b instanceof Integer))) {', -// ' double v1,v2;', -// ' if (a instanceof Double) {', -// ' v1 = (Double)a;', -// ' } else {', -// ' v1 = (Integer)a;', -// ' }', -// ' if (b instanceof Double) {', -// ' v2 = (Double)b;', -// ' } else {', -// ' v2 = (Integer)b;', -// ' }', -// ' return((v1 * 100000.0) == (v2 * 100000.0));', -// ' } else if (a instanceof List && b instanceof List) {', -// ' List aList = (List)a;', -// ' List bList = (List)b;', -// '', -// ' if (aList.size() != bList.size()) {', -// ' return false;', -// ' }', -// ' for (int i = 0; i < aList.size(); i++) {', -// ' if (!equals(aList.get(i), bList.get(i))) {', -// ' return false;', -// ' }', -// ' }', -// ' return true;', -// ' }', -// ' return false;', -// '}']); Blockly.Java.provideVarClass(); var functionName = Blockly.Java.provideFunction_( 'assertEquals', [ 'public void ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(Object actual, Object expected, String message) {', - ' LinkedList result = new LinkedList();', - ' // Asserts that a value equals another value.', - ' if (Var.valueOf(actual).equals(Var.valueOf(expected))) {', - ' result.add(true);', - ' result.add("OK");', - ' result.add(message);', - ' } else {', - ' result.add(false);', - ' result.add("Expected: " + expected + "\\nActual: " + actual);', - ' result.add(message);', - ' }', - ' ' + resultsVar + '.add(result);', + ' LinkedList result = new LinkedList();', + ' // Asserts that a value equals another value.', + ' if (Var.valueOf(actual).equals(Var.valueOf(expected))) {', + ' result.add(true);', + ' result.add("OK");', + ' result.add(message);', + ' } else {', + ' result.add(false);', + ' result.add("Expected: " + expected + "\\nActual: " + actual);', + ' result.add(message);', + ' }', + ' ' + resultsVar + '.add(result);', '}']); return 'this.' + functionName; }; @@ -197,12 +157,12 @@ Blockly.Java['unittest_fail'] = function(block) { 'unittest_fail', [ 'public void ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(String message) {', - ' // Always assert an error.', - ' LinkedList result = new LinkedList();', - ' result.add(false);', - ' result.add("Fail.");', - ' result.add(message);', - ' ' + resultsVar + '.add(result);', + ' // Always assert an error.', + ' LinkedList result = new LinkedList();', + ' result.add(false);', + ' result.add("Fail.");', + ' result.add(message);', + ' ' + resultsVar + '.add(result);', '}']); return functionName + '(' + message + ');\n'; }; From 8212dae38fa3ac8b157aceccf35a30668fb77b80 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Sat, 15 Aug 2015 16:35:37 -0400 Subject: [PATCH 24/84] Merge branch 'google/master' Conflicts: blocks_compressed.js python_compressed.js --- dart_compressed.js | 2 +- demos/interpreter/acorn_interpreter.js | 172 +++++++++++++------------ generators/dart.js | 4 + generators/javascript.js | 4 + generators/php.js | 4 + generators/python.js | 4 + javascript_compressed.js | 2 +- php_compressed.js | 2 +- python_compressed.js | 3 +- 9 files changed, 112 insertions(+), 85 deletions(-) diff --git a/dart_compressed.js b/dart_compressed.js index fa12dd2f138..ce01b3b058f 100644 --- a/dart_compressed.js +++ b/dart_compressed.js @@ -7,7 +7,7 @@ Blockly.Dart=new Blockly.Generator("Dart");Blockly.Dart.addReservedWords("assert Blockly.Dart.ORDER_ATOMIC=0;Blockly.Dart.ORDER_UNARY_POSTFIX=1;Blockly.Dart.ORDER_UNARY_PREFIX=2;Blockly.Dart.ORDER_MULTIPLICATIVE=3;Blockly.Dart.ORDER_ADDITIVE=4;Blockly.Dart.ORDER_SHIFT=5;Blockly.Dart.ORDER_BITWISE_AND=6;Blockly.Dart.ORDER_BITWISE_XOR=7;Blockly.Dart.ORDER_BITWISE_OR=8;Blockly.Dart.ORDER_RELATIONAL=9;Blockly.Dart.ORDER_EQUALITY=10;Blockly.Dart.ORDER_LOGICAL_AND=11;Blockly.Dart.ORDER_LOGICAL_OR=12;Blockly.Dart.ORDER_CONDITIONAL=13;Blockly.Dart.ORDER_CASCADE=14; Blockly.Dart.ORDER_ASSIGNMENT=15;Blockly.Dart.ORDER_NONE=99; Blockly.Dart.init=function(a){Blockly.Dart.definitions_=Object.create(null);Blockly.Dart.functionNames_=Object.create(null);Blockly.Dart.variableDB_?Blockly.Dart.variableDB_.reset():Blockly.Dart.variableDB_=new Blockly.Names(Blockly.Dart.RESERVED_WORDS_);var b=[];a=Blockly.Variables.allVariables(a);for(var c=0;ca)++g;else if(47===a)if(a=l.charCodeAt(g+1),42===a){var a=n.onComment&&n.locations&&new e,b=g,f=l.indexOf("*/",g+=2);-1===f&&c(g-2,"Unterminated comment"); -g=f+2;if(n.locations){X.lastIndex=b;for(var d=void 0;(d=X.exec(l))&&d.index=a?a=N(!0):(++g,a=f(va)),a;case 40:return++g,f(I);case 41:return++g,f(E);case 59:return++g,f(J);case 44:return++g,f(K);case 91:return++g,f(ha); -case 93:return++g,f(ia);case 123:return++g,f(Y);case 125:return++g,f(S);case 58:return++g,f(Z);case 63:return++g,f(wa);case 48:if(a=l.charCodeAt(g+1),120===a||88===a)return g+=2,a=k(16),null==a&&c(x+2,"Expected hexadecimal number"),ja(l.charCodeAt(g))&&c(g,"Identifier directly after number"),a=f($,a);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return N(!1);case 34:case 39:t:{g++;for(var b="";;){g>=R&&c(x,"Unterminated string constant");var e=l.charCodeAt(g);if(e===a){++g; -a=f(ba,b);break t}if(92===e){var e=l.charCodeAt(++g),d=/^[0-7]+/.exec(l.slice(g,g+3));for(d&&(d=d[0]);d&&255=R)return f(na);var b=l.charCodeAt(g);if(ja(b)||92===b)return Wa();a=r(b);if(!1===a){b=String.fromCharCode(b);if("\\"===b||Xa.test(b))return Wa();c(g,"Unexpected character '"+b+"'")}return a}function t(a,b){var c=l.slice(g,g+b);g+=b;f(a,c)}function C(){for(var a="",b,e,d= -g;;){g>=R&&c(d,"Unterminated regular expression");a=l.charAt(g);la.test(a)&&c(d,"Unterminated regular expression");if(b)b=!1;else{if("["===a)e=!0;else if("]"===a&&e)e=!1;else if("/"===a&&!e)break;b="\\"===a}++g}a=l.slice(d,g);++g;(b=Ya())&&!/^[gmsiy]*$/.test(b)&&c(d,"Invalid regexp flag");try{var h=RegExp(a,b)}catch(k){k instanceof SyntaxError&&c(d,k.message),c(k)}return f(za,h)}function k(a,b){for(var c=g,e=0,f=0,d=null==b?Infinity:b;f=h?h-48:Infinity;if(h>=a)break;++g;e=e*a+h}return g===c||null!=b&&g-c!==b?null:e}function N(a){var b=g,e=!1,d=48===l.charCodeAt(g);a||null!==k(10)||c(b,"Invalid number");46===l.charCodeAt(g)&&(++g,k(10),e=!0);a=l.charCodeAt(g);if(69===a||101===a)a=l.charCodeAt(++g),43!==a&&45!==a||++g,null===k(10)&&c(b,"Invalid number"),e=!0;ja(l.charCodeAt(g))&&c(g,"Identifier directly after number");a=l.slice(b,g);var h;e?h=parseFloat(a):d&&1!==a.length?/[89]/.test(a)||B?c(b,"Invalid number"):h=parseInt(a, -8):h=parseInt(a,10);return f($,h)}function ka(a){a=k(16,a);null===a&&c(x,"Bad character escape sequence");return a}function Ya(){aa=!1;for(var a,b=!0,e=g;;){var f=l.charCodeAt(g);if(Za(f))aa&&(a+=l.charAt(g)),++g;else if(92===f){aa||(a=l.slice(e,g));aa=!0;117!=l.charCodeAt(++g)&&c(g,"Expecting Unicode escape sequence \\uXXXX");++g;var f=ka(4),d=String.fromCharCode(f);d||c(g-1,"Invalid Unicode escape");(b?ja(f):Za(f))||c(g-4,"Invalid Unicode escape");a+=d}else break;b=!1}return aa?a:l.slice(e,g)}function Wa(){var a= -Ya(),b=U;aa||(Kb(a)?b=Aa[a]:(n.forbidReserved&&(3===n.ecmaVersion?Lb:Mb)(a)||B&&$a(a))&&c(x,"The keyword '"+a+"' is reserved"));return f(b,a)}function s(){Ba=x;O=W;Ca=ga;z()}function Da(a){B=a;g=x;if(n.locations)for(;gb){var f=P(a);f.left=a;f.operator=H;a=p;s();f.right=Pa(Qa(),e,c);e=q(f,a===Ta||a===Ua?"LogicalExpression":"BinaryExpression");return Pa(e,b,c)}return a}function Qa(){if(p.prefix){var a=y(),b=p.isUpdate; -a.operator=H;Q=a.prefix=!0;s();a.argument=Qa();b?pa(a.argument):B&&"delete"===a.operator&&"Identifier"===a.argument.type&&c(a.start,"Deleting local variable in strict mode");return q(a,b?"UpdateExpression":"UnaryExpression")}for(b=fa(sa());p.postfix&&!oa();)a=P(b),a.operator=H,a.prefix=!1,a.argument=b,pa(b),s(),b=q(a,"UpdateExpression");return b}function fa(a,b){if(u(va)){var c=P(a);c.object=a;c.property=M(!0);c.computed=!1;return fa(q(c,"MemberExpression"),b)}return u(ha)?(c=P(a),c.object=a,c.property= -A(),c.computed=!0,v(ia),fa(q(c,"MemberExpression"),b)):!b&&u(I)?(c=P(a),c.callee=a,c.arguments=Ra(E,!1),fa(q(c,"CallExpression"),b)):a}function sa(){switch(p){case sb:var a=y();s();return q(a,"ThisExpression");case U:return M();case $:case ba:case za:return a=y(),a.value=H,a.raw=l.slice(x,W),s(),q(a,"Literal");case tb:case ub:case vb:return a=y(),a.value=p.atomValue,a.raw=p.keyword,s(),q(a,"Literal");case I:var a=ma,b=x;s();var e=A();e.start=b;e.end=W;n.locations&&(e.loc.start=a,e.loc.end=ga);n.ranges&& -(e.range=[b,W]);v(E);return e;case ha:return a=y(),s(),a.elements=Ra(ia,!0,!0),q(a,"ArrayExpression");case Y:a=y();b=!0;e=!1;a.properties=[];for(s();!u(S);){if(b)b=!1;else if(v(K),n.allowTrailingCommas&&u(S))break;var f={key:p===$||p===ba?sa():M(!0)},d=!1,g;u(Z)?(f.value=A(!0),g=f.kind="init"):5<=n.ecmaVersion&&"Identifier"===f.key.type&&("get"===f.key.name||"set"===f.key.name)?(d=e=!0,g=f.kind=f.key.name,f.key=p===$||p===ba?sa():M(!0),p!==I&&L(),f.value=La(y(),!1)):L();if("Identifier"===f.key.type&& -(B||e))for(var h=0;he?a.id:a.params[e],($a(f.name)||qa(f.name))&&c(f.start,"Defining '"+f.name+"' in strict mode"),0<=e)for(var d=0;da?36===a:91>a?!0:97>a?95===a:123>a?!0:170<=a&&Xa.test(String.fromCharCode(a))},Za=a.isIdentifierChar=function(a){return 48>a?36===a:58>a?!0:65>a?!1:91>a?!0:97>a?95===a:123>a?!0:170<=a&&Pb.test(String.fromCharCode(a))},aa,Ga={kind:"loop"},Nb={kind:"switch"}}; +var mod$$inline_58=function(a){function b(a){n=a||{};for(var b in Ua)Object.prototype.hasOwnProperty.call(n,b)||(n[b]=Ua[b]);wa=n.sourceFile||null}function c(a,b){var c=Ab(k,a);b+=" ("+c.line+":"+c.column+")";var e=new SyntaxError(b);e.pos=a;e.loc=c;e.raisedAt=g;throw e;}function d(a){function b(a){if(1==a.length)return c+="return str === "+JSON.stringify(a[0])+";";c+="switch(str){";for(var va=0;vaa)++g;else if(47===a)if(a=k.charCodeAt(g+1),42===a){var a=n.onComment&&n.locations&&new f,b=g,e=k.indexOf("*/",g+=2);-1===e&&c(g-2,"Unterminated comment"); +g=e+2;if(n.locations){Y.lastIndex=b;for(var d=void 0;(d=Y.exec(k))&&d.index=a?a=P(!0):(++g,a=e(xa)),a;case 40:return++g,e(J);case 41:return++g,e(F);case 59:return++g,e(K);case 44:return++g,e(L);case 91:return++g,e(ja); +case 93:return++g,e(ka);case 123:return++g,e(Z);case 125:return++g,e(T);case 58:return++g,e(aa);case 63:return++g,e(ya);case 48:if(a=k.charCodeAt(g+1),120===a||88===a)return g+=2,a=l(16),null==a&&c(y+2,"Expected hexadecimal number"),la(k.charCodeAt(g))&&c(g,"Identifier directly after number"),a=e(ba,a);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return P(!1);case 34:case 39:a:{g++;for(var b="";;){g>=S&&c(y,"Unterminated string constant");var f=k.charCodeAt(g);if(f===a){++g; +a=e(da,b);break a}if(92===f){var f=k.charCodeAt(++g),d=/^[0-7]+/.exec(k.slice(g,g+3));for(d&&(d=d[0]);d&&255=S)return e(pa);var b=k.charCodeAt(g);if(la(b)||92===b)return Ya();a=r(b);if(!1===a){b=String.fromCharCode(b);if("\\"===b||Za.test(b))return Ya();c(g,"Unexpected character '"+b+"'")}return a}function u(a,b){var c=k.slice(g,g+b);g+=b;e(a,c)}function D(){for(var a="",b,f,d=g;;){g>= +S&&c(d,"Unterminated regular expression");a=k.charAt(g);na.test(a)&&c(d,"Unterminated regular expression");if(b)b=!1;else{if("["===a)f=!0;else if("]"===a&&f)f=!1;else if("/"===a&&!f)break;b="\\"===a}++g}a=k.slice(d,g);++g;(b=$a())&&!/^[gmsiy]*$/.test(b)&&c(d,"Invalid regexp flag");return e(Ba,new RegExp(a,b))}function l(a,b){for(var c=g,f=0,e=0,d=null==b?Infinity:b;e=h?h-48:Infinity;if(h>=a)break;++g;f=f*a+h}return g===c||null!= +b&&g-c!==b?null:f}function P(a){var b=g,f=!1,d=48===k.charCodeAt(g);a||null!==l(10)||c(b,"Invalid number");46===k.charCodeAt(g)&&(++g,l(10),f=!0);a=k.charCodeAt(g);if(69===a||101===a)a=k.charCodeAt(++g),43!==a&&45!==a||++g,null===l(10)&&c(b,"Invalid number"),f=!0;la(k.charCodeAt(g))&&c(g,"Identifier directly after number");a=k.slice(b,g);var h;f?h=parseFloat(a):d&&1!==a.length?/[89]/.test(a)||C?c(b,"Invalid number"):h=parseInt(a,8):h=parseInt(a,10);return e(ba,h)}function ma(a){a=l(16,a);null===a&& +c(y,"Bad character escape sequence");return a}function $a(){ca=!1;for(var a,b=!0,f=g;;){var e=k.charCodeAt(g);if(ab(e))ca&&(a+=k.charAt(g)),++g;else if(92===e){ca||(a=k.slice(f,g));ca=!0;117!=k.charCodeAt(++g)&&c(g,"Expecting Unicode escape sequence \\uXXXX");++g;var e=ma(4),d=String.fromCharCode(e);d||c(g-1,"Invalid Unicode escape");(b?la(e):ab(e))||c(g-4,"Invalid Unicode escape");a+=d}else break;b=!1}return ca?a:k.slice(f,g)}function Ya(){var a=$a(),b=V;ca||(Lb(a)?b=Ca[a]:(n.forbidReserved&&(3=== +n.ecmaVersion?Mb:Nb)(a)||C&&bb(a))&&c(y,"The keyword '"+a+"' is reserved"));return e(b,a)}function t(){Da=y;M=X;Ea=ia;A()}function Fa(a){C=a;g=M;if(n.locations)for(;gb){var e=Q(a);e.left=a;e.operator=I;a=p;t();e.right=Ra(Sa(),f,c);f=q(e,a===Va||a===Wa?"LogicalExpression":"BinaryExpression");return Ra(f,b,c)}return a}function Sa(){if(p.prefix){var a=z(),b=p.isUpdate;a.operator=I;R=a.prefix=!0;t();a.argument= +Sa();b?ra(a.argument):C&&"delete"===a.operator&&"Identifier"===a.argument.type&&c(a.start,"Deleting local variable in strict mode");return q(a,b?"UpdateExpression":"UnaryExpression")}for(b=ha(ua());p.postfix&&!qa();)a=Q(b),a.operator=I,a.prefix=!1,a.argument=b,ra(b),t(),b=q(a,"UpdateExpression");return b}function ha(a,b){if(v(xa)){var c=Q(a);c.object=a;c.property=O(!0);c.computed=!1;return ha(q(c,"MemberExpression"),b)}return v(ja)?(c=Q(a),c.object=a,c.property=B(),c.computed=!0,w(ka),ha(q(c,"MemberExpression"), +b)):!b&&v(J)?(c=Q(a),c.callee=a,c.arguments=Ta(F,!1),ha(q(c,"CallExpression"),b)):a}function ua(){switch(p){case ub:var a=z();t();return q(a,"ThisExpression");case V:return O();case ba:case da:case Ba:return a=z(),a.value=I,a.raw=k.slice(y,X),t(),q(a,"Literal");case vb:case wb:case xb:return a=z(),a.value=p.atomValue,a.raw=p.keyword,t(),q(a,"Literal");case J:var a=oa,b=y;t();var f=B();f.start=b;f.end=X;n.locations&&(f.loc.start=a,f.loc.end=ia);n.ranges&&(f.range=[b,X]);w(F);return f;case ja:return a= +z(),t(),a.elements=Ta(ka,!0,!0),q(a,"ArrayExpression");case Z:a=z();b=!0;f=!1;a.properties=[];for(t();!v(T);){if(b)b=!1;else if(w(L),n.allowTrailingCommas&&v(T))break;var e={key:p===ba||p===da?ua():O(!0)},d=!1,h;v(aa)?(e.value=B(!0),h=e.kind="init"):5<=n.ecmaVersion&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)?(d=f=!0,h=e.kind=e.key.name,e.key=p===ba||p===da?ua():O(!0),p!==J&&N(),e.value=Na(z(),!1)):N();if("Identifier"===e.key.type&&(C||f))for(var g=0;gf?a.id:a.params[f],(bb(e.name)||sa(e.name))&&c(e.start,"Defining '"+e.name+"' in strict mode"),0<=f)for(var d=0;da?36===a:91>a?!0:97>a?95===a:123>a?!0:170<=a&&Za.test(String.fromCharCode(a))},ab=a.isIdentifierChar=function(a){return 48>a?36===a:58>a?!0:65>a?!1:91>a?!0:97>a?95===a:123>a?!0:170<=a&&Pb.test(String.fromCharCode(a))},ca,Ia={kind:"loop"},Ob={kind:"switch"}}; "object"==typeof exports&&"object"==typeof module?mod$$inline_58(exports):"function"==typeof define&&define.amd?define(["exports"],mod$$inline_58):mod$$inline_58(this.acorn||(this.acorn={})); -// JS-Interpreter: Copyright 2013 Google Inc, Apache 2.0 -var Interpreter=function(a,b){this.initFunc_=b;this.UNDEFINED=this.createPrimitive(void 0);this.ast=acorn.parse(a);var c=this.createScope(this.ast,null);this.stateStack=[{node:this.ast,scope:c,thisExpression:c}]};Interpreter.prototype.step=function(){if(0==this.stateStack.length)return!1;var a=this.stateStack[0];this["step"+a.node.type]();return!0};Interpreter.prototype.run=function(){for(;this.step(););}; -Interpreter.prototype.initGlobalScope=function(a){this.setProperty(a,"Infinity",this.createPrimitive(Infinity),!0);this.setProperty(a,"NaN",this.createPrimitive(NaN),!0);this.setProperty(a,"undefined",this.UNDEFINED,!0);this.setProperty(a,"window",a,!0);this.setProperty(a,"self",a,!1);this.initFunction(a);this.initObject(a);a.parent=this.OBJECT;this.initArray(a);this.initNumber(a);this.initString(a);this.initBoolean(a);this.initDate(a);this.initMath(a);var b=this,c;c=function(a){a=a||b.UNDEFINED; -return b.createPrimitive(isNaN(a.toNumber()))};this.setProperty(a,"isNaN",this.createNativeFunction(c));c=function(a){a=a||b.UNDEFINED;return b.createPrimitive(isFinite(a.toNumber()))};this.setProperty(a,"isFinite",this.createNativeFunction(c));c=function(a){a=a||b.UNDEFINED;return b.createPrimitive(parseFloat(a.toNumber()))};this.setProperty(a,"parseFloat",this.createNativeFunction(c));c=function(a,c){a=a||b.UNDEFINED;c=c||b.UNDEFINED;return b.createPrimitive(parseInt(a.toString(),c.toNumber()))}; -this.setProperty(a,"parseInt",this.createNativeFunction(c));c=this.createObject(this.FUNCTION);c.eval=!0;this.setProperty(c,"length",this.createPrimitive(1),!0);this.setProperty(a,"eval",c);for(var d="escape unescape decodeURI decodeURIComponent encodeURI encodeURIComponent".split(" "),e=0;ea?Math.max(this.length+a,0):Math.min(a,this.length);d=c(d,Infinity);d=Math.min(d,this.length-a);for(var m=b.createObject(b.ARRAY),r=a;r=a;r--)this.properties[r+arguments.length-2]=this.properties[r];this.length+=arguments.length-2;for(r=2;rm&&(m=this.length+m);var m= -Math.max(0,Math.min(m,this.length)),r=c(d,this.length);0>r&&(r=this.length+r);for(var r=Math.max(0,Math.min(r,this.length)),z=0;mh&&(h=this.length+h);for(h=Math.max(0,Math.min(h, +"unshift",this.createNativeFunction(d),!1,!0);d=function(){for(var a=0;aa?Math.max(this.length+a,0):Math.min(a,this.length);e=c(e,Infinity);e=Math.min(e,this.length-a);for(var m=b.createObject(b.ARRAY),r=a;r=a;r--)this.properties[r+arguments.length-2]=this.properties[r];this.length+=arguments.length-2;for(r=2;rm&&(m=this.length+m);var m= +Math.max(0,Math.min(m,this.length)),r=c(e,this.length);0>r&&(r=this.length+r);for(var r=Math.max(0,Math.min(r,this.length)),A=0;mh&&(h=this.length+h);for(h=Math.max(0,Math.min(h, this.length));hh&&(h=this.length+h);for(h=Math.max(0,Math.min(h,this.length));0<=h;h--){var m=b.getProperty(this,h);if(0==b.comp(m,a))return b.createPrimitive(h)}return b.createPrimitive(-1)};this.setProperty(this.ARRAY.properties.prototype, -"lastIndexOf",this.createNativeFunction(d),!1,!0)}; +"lastIndexOf",this.createNativeFunction(d),!1,!0);d=function(){for(var a=[],c=0;cb?1:0}; -Interpreter.prototype.arrayIndex=function(a){a=Number(a);return!isFinite(a)||a!=Math.floor(a)||0>a?NaN:a};Interpreter.prototype.createPrimitive=function(a){var b=typeof a;a={data:a,isPrimitive:!0,type:b,toBoolean:function(){return Boolean(this.data)},toNumber:function(){return Number(this.data)},toString:function(){return String(this.data)},valueOf:function(){return this.data}};"number"==b?a.parent=this.NUMBER:"string"==b?a.parent=this.STRING:"boolean"==b&&(a.parent=this.BOOLEAN);return a}; -Interpreter.prototype.createObject=function(a){a={isPrimitive:!1,type:"object",parent:a,fixed:Object.create(null),nonenumerable:Object.create(null),properties:Object.create(null),toBoolean:function(){return!0},toNumber:function(){return 0},toString:function(){return"["+this.type+"]"},valueOf:function(){return this}};this.isa(a,this.FUNCTION)&&(a.type="function",this.setProperty(a,"prototype",this.createObject(this.OBJECT||null)));this.isa(a,this.ARRAY)&&(a.length=0,a.toString=function(){for(var a= -[],c=0;cb?1:0};Interpreter.prototype.arrayIndex=function(a){a=Number(a);return!isFinite(a)||a!=Math.floor(a)||0>a?NaN:a}; +Interpreter.prototype.createPrimitive=function(a){if(void 0===a&&this.UNDEFINED)return this.UNDEFINED;if(a instanceof RegExp)return this.createRegExp(this.createObject(this.REGEXP),a);var b=typeof a;a={data:a,isPrimitive:!0,type:b,toBoolean:function(){return Boolean(this.data)},toNumber:function(){return Number(this.data)},toString:function(){return String(this.data)},valueOf:function(){return this.data}};"number"==b?a.parent=this.NUMBER:"string"==b?a.parent=this.STRING:"boolean"==b&&(a.parent=this.BOOLEAN); +return a}; +Interpreter.prototype.createObject=function(a){a={isPrimitive:!1,type:"object",parent:a,fixed:Object.create(null),nonenumerable:Object.create(null),properties:Object.create(null),toBoolean:function(){return!0},toNumber:function(){return 0},toString:function(){return"["+this.type+"]"},valueOf:function(){return this}};this.isa(a,this.FUNCTION)&&(a.type="function",this.setProperty(a,"prototype",this.createObject(this.OBJECT||null)));this.isa(a,this.ARRAY)&&(a.length=0,a.toString=function(){for(var a=[], +c=0;c>="==b.operator)b=e>>f;else if(">>>="==b.operator)b=e>>>f;else if("&="==b.operator)b=e&f;else if("^="==b.operator)b=e^f;else if("|="==b.operator)b=e|f;else throw"Unknown assignment expression: "+b.operator;b=this.createPrimitive(b)}this.setValue(c,b);this.stateStack[0].value=b}else a.doneRight=!0,a.leftSide=a.value,this.stateStack.unshift({node:b.right});else a.doneLeft=!0,this.stateStack.unshift({node:b.left,components:!0})}; -Interpreter.prototype.stepBinaryExpression=function(){var a=this.stateStack[0],b=a.node;if(a.doneLeft)if(a.doneRight){this.stateStack.shift();var c=a.leftValue,a=a.value,d=this.comp(c,a);if("=="==b.operator||"!="==b.operator)c=0===d,"!="==b.operator&&(c=!c);else if("==="==b.operator||"!=="==b.operator)c=c.isPrimitive&&a.isPrimitive?c.data===a.data:c===a,"!=="==b.operator&&(c=!c);else if(">"==b.operator)c=1==d;else if(">="==b.operator)c=1==d||0===d;else if("<"==b.operator)c=-1==d;else if("<="==b.operator)c= --1==d||0===d;else if("+"==b.operator)"string"==c.type||"string"==a.type?(c=c.toString(),a=a.toString()):(c=c.toNumber(),a=a.toNumber()),c+=a;else if("in"==b.operator)c=this.hasProperty(a,c);else if(c=c.toNumber(),a=a.toNumber(),"-"==b.operator)c-=a;else if("*"==b.operator)c*=a;else if("/"==b.operator)c/=a;else if("%"==b.operator)c%=a;else if("&"==b.operator)c&=a;else if("|"==b.operator)c|=a;else if("^"==b.operator)c^=a;else if("<<"==b.operator)c<<=a;else if(">>"==b.operator)c>>=a;else if(">>>"==b.operator)c>>>= -a;else throw"Unknown binary operator: "+b.operator;this.stateStack[0].value=this.createPrimitive(c)}else a.doneRight=!0,a.leftValue=a.value,this.stateStack.unshift({node:b.right});else a.doneLeft=!0,this.stateStack.unshift({node:b.left})}; -Interpreter.prototype.stepBreakStatement=function(){var a=this.stateStack.shift(),a=a.node,b=null;a.label&&(b=a.label.name);for(a=this.stateStack.shift();a&&"callExpression"!=a.node.type;){if(b?b==a.label:a.isLoop)return;a=this.stateStack.shift()}throw new SyntaxError("Illegal break statement");};Interpreter.prototype.stepBlockStatement=function(){var a=this.stateStack[0],b=a.node,c=a.n_||0;b.body[c]?(a.n_=c+1,this.stateStack.unshift({node:b.body[c]})):this.stateStack.shift()}; +Interpreter.prototype.stepAssignmentExpression=function(){var a=this.stateStack[0],b=a.node;if(a.doneLeft)if(a.doneRight){this.stateStack.shift();var c=a.leftSide,d=a.value;if("="==b.operator)b=d;else{var a=this.getValue(c),f=a.toNumber(),e=d.toNumber();if("+="==b.operator)"string"==a.type||"string"==d.type?(b=a.toString(),a=d.toString()):(b=f,a=e),b+=a;else if("-="==b.operator)b=f-e;else if("*="==b.operator)b=f*e;else if("/="==b.operator)b=f/e;else if("%="==b.operator)b=f%e;else if("<<="==b.operator)b= +f<>="==b.operator)b=f>>e;else if(">>>="==b.operator)b=f>>>e;else if("&="==b.operator)b=f&e;else if("^="==b.operator)b=f^e;else if("|="==b.operator)b=f|e;else throw"Unknown assignment expression: "+b.operator;b=this.createPrimitive(b)}this.setValue(c,b);this.stateStack[0].value=b}else a.doneRight=!0,a.leftSide=a.value,this.stateStack.unshift({node:b.right});else a.doneLeft=!0,this.stateStack.unshift({node:b.left,components:!0})}; +Interpreter.prototype.stepBinaryExpression=function(){var a=this.stateStack[0],b=a.node;if(a.doneLeft)if(a.doneRight){this.stateStack.shift();var c=a.leftValue,a=a.value,d=this.comp(c,a);if("=="==b.operator||"!="==b.operator)c=c.isPrimitive&&a.isPrimitive?c.data==a.data:0===d,"!="==b.operator&&(c=!c);else if("==="==b.operator||"!=="==b.operator)c=c.isPrimitive&&a.isPrimitive?c.data===a.data:c===a,"!=="==b.operator&&(c=!c);else if(">"==b.operator)c=1==d;else if(">="==b.operator)c=1==d||0===d;else if("<"== +b.operator)c=-1==d;else if("<="==b.operator)c=-1==d||0===d;else if("+"==b.operator)"string"==c.type||"string"==a.type?(c=c.toString(),a=a.toString()):(c=c.toNumber(),a=a.toNumber()),c+=a;else if("in"==b.operator)c=this.hasProperty(a,c);else if(c=c.toNumber(),a=a.toNumber(),"-"==b.operator)c-=a;else if("*"==b.operator)c*=a;else if("/"==b.operator)c/=a;else if("%"==b.operator)c%=a;else if("&"==b.operator)c&=a;else if("|"==b.operator)c|=a;else if("^"==b.operator)c^=a;else if("<<"==b.operator)c<<=a;else if(">>"== +b.operator)c>>=a;else if(">>>"==b.operator)c>>>=a;else throw"Unknown binary operator: "+b.operator;this.stateStack[0].value=this.createPrimitive(c)}else a.doneRight=!0,a.leftValue=a.value,this.stateStack.unshift({node:b.right});else a.doneLeft=!0,this.stateStack.unshift({node:b.left})}; +Interpreter.prototype.stepBreakStatement=function(){var a=this.stateStack.shift(),a=a.node,b=null;a.label&&(b=a.label.name);for(a=this.stateStack.shift();a&&"callExpression"!=a.node.type;){if(b?b==a.label:a.isLoop||a.isSwitch)return;a=this.stateStack.shift()}throw new SyntaxError("Illegal break statement");};Interpreter.prototype.stepBlockStatement=function(){var a=this.stateStack[0],b=a.node,c=a.n_||0;b.body[c]?(a.n_=c+1,this.stateStack.unshift({node:b.body[c]})):this.stateStack.shift()}; Interpreter.prototype.stepCallExpression=function(){var a=this.stateStack[0],b=a.node;if(a.doneCallee_){if(a.func_)c=a.n_,a.arguments.length!=b.arguments.length&&(a.arguments[c-1]=a.value);else{if("function"==a.value.type)a.func_=a.value;else if(a.member_=a.value[0],a.func_=this.getValue(a.value),!a.func_||"function"!=a.func_.type)throw new TypeError((a.func_&&a.func_.type)+" is not a function");"NewExpression"==a.node.type?(a.funcThis_=this.createObject(a.func_),a.isConstructor_=!0):a.funcThis_= a.value.length?a.value[0]:this.stateStack[this.stateStack.length-1].thisExpression;a.arguments=[];var c=0}if(b.arguments[c])a.n_=c+1,this.stateStack.unshift({node:b.arguments[c]});else if(a.doneExec)this.stateStack.shift(),this.stateStack[0].value=a.isConstructor_?a.funcThis_:a.value;else{a.doneExec=!0;if(a.func_.node&&("FunctionApply_"==a.func_.node.type||"FunctionCall_"==a.func_.node.type)){a.funcThis_=a.arguments.shift();if("FunctionApply_"==a.func_.node.type){var d=a.arguments.shift();if(d&&this.isa(d, -this.ARRAY))for(a.arguments=[],b=0;bb?a.arguments[b]:this.UNDEFINED;this.setProperty(c,d,e)}d=this.createObject(this.ARRAY);for(b=0;bb?a.arguments[b]:this.UNDEFINED;this.setProperty(c,d,f)}d=this.createObject(this.ARRAY);for(b=0;b Date: Mon, 17 Aug 2015 09:36:14 -0400 Subject: [PATCH 25/84] Improve Java global variables. Add types to procedure parameters Created default set of types for ScopeVariable as well as a way to populate the fixed type set Added renaming of the type for the procedures Added Blockly.Variables.getLocalContext to calculate the context for a variable instead of it being inline with multiple areas Added initialize_variable to define and initialize global and local variables Updated FieldScopeVariable to have a fixed set of types which can't be renamed Changed Java code Generator so that the global variables are identified by the java code generator along with any initializer --- blockly_compressed.js | 7 +- blocks/procedures.js | 32 +++++-- blocks/variables.js | 138 +++++++++++++++++++++++++----- blocks_compressed.js | 21 +++-- core/block.js | 8 +- core/blockly.js | 6 ++ core/field_scope_variable.js | 22 ++++- core/variables.js | 45 ++++++++-- generators/java.js | 64 +++++++++----- generators/java/text.js | 1 - generators/java/variables.js | 38 ++++++-- java_compressed.js | 52 +++++------ msg/js/ar.js | 3 + msg/js/az.js | 3 + msg/js/bcc.js | 3 + msg/js/be-tarask.js | 3 + msg/js/bg.js | 3 + msg/js/bn.js | 3 + msg/js/br.js | 3 + msg/js/ca.js | 3 + msg/js/cs.js | 3 + msg/js/da.js | 3 + msg/js/de.js | 3 + msg/js/el.js | 3 + msg/js/en.js | 3 + msg/js/es.js | 3 + msg/js/fa.js | 3 + msg/js/fi.js | 3 + msg/js/fr.js | 3 + msg/js/he.js | 3 + msg/js/hi.js | 3 + msg/js/hrx.js | 3 + msg/js/hu.js | 3 + msg/js/ia.js | 3 + msg/js/id.js | 3 + msg/js/is.js | 3 + msg/js/it.js | 3 + msg/js/ja.js | 3 + msg/js/ko.js | 3 + msg/js/lb.js | 3 + msg/js/lrc.js | 3 + msg/js/lt.js | 3 + msg/js/mk.js | 3 + msg/js/ms.js | 3 + msg/js/nb.js | 3 + msg/js/nl.js | 3 + msg/js/oc.js | 3 + msg/js/pl.js | 3 + msg/js/pms.js | 3 + msg/js/pt-br.js | 3 + msg/js/pt.js | 3 + msg/js/ro.js | 3 + msg/js/ru.js | 3 + msg/js/sc.js | 3 + msg/js/sk.js | 3 + msg/js/sq.js | 3 + msg/js/sr.js | 3 + msg/js/sv.js | 3 + msg/js/ta.js | 3 + msg/js/th.js | 3 + msg/js/tl.js | 3 + msg/js/tlh.js | 3 + msg/js/tr.js | 3 + msg/js/uk.js | 3 + msg/js/vi.js | 3 + msg/js/zh-hans.js | 3 + msg/js/zh-hant.js | 3 + msg/json/en.json | 5 +- msg/json/qqq.json | 3 + msg/messages.js | 6 ++ tests/generators/unittest.js | 1 + tests/generators/unittest_java.js | 9 +- 72 files changed, 521 insertions(+), 102 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index a3a403f91ec..45b7fd9f642 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1184,7 +1184,7 @@ this.rendered&&(this.render(),this.bumpNeighbours_())};Blockly.Block.prototype.s Blockly.Block.prototype.setOutput=function(a,b){this.outputConnection&&(goog.asserts.assert(!this.outputConnection.targetConnection,"Must disconnect output value before removing connection."),this.outputConnection.dispose(),this.outputConnection=null);a&&(goog.asserts.assert(!this.previousConnection,"Remove previous connection prior to adding output connection."),void 0===b&&(b=null),this.outputConnection=new Blockly.Connection(this,Blockly.OUTPUT_VALUE),this.outputConnection.setCheck(b));this.rendered&& (this.render(),this.bumpNeighbours_())};Blockly.Block.prototype.setInputsInline=function(a){this.inputsInline=a;this.rendered&&(this.render(),this.bumpNeighbours_(),this.workspace.fireChangeEvent())}; Blockly.Block.prototype.getInputsInline=function(){if(void 0!=this.inputsInline)return this.inputsInline;for(var a=1;aBlockly.DRAG_RADIUS&& diff --git a/blocks/procedures.js b/blocks/procedures.js index ad33788cd87..77edc31b6b2 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -339,7 +339,7 @@ Blockly.Blocks['procedures_defnoreturn'] = { for (var i = 0; i < this.arguments_.length; i++) { if (this.arguments_[i]['type']) { vartypes[funcName + this.arguments_[i]['name']] = - this.arguments_[i]['type']; + [this.arguments_[i]['type']]; } } var retItem = this.getInput('RETURN'); @@ -360,11 +360,6 @@ Blockly.Blocks['procedures_defnoreturn'] = { getScopeVars: function(varclass) { var result = []; if (varclass === 'Types') { - // Push out the default types that we want people to select - result.push('String'); - result.push('Number'); - result.push('Boolean'); - result.push('Array'); for (var i = 0; i < this.arguments_.length; i++) { if (this.arguments_[i]['type']) { result.push(this.arguments_[i]['type']); @@ -373,6 +368,28 @@ Blockly.Blocks['procedures_defnoreturn'] = { } return result; }, + /** + * Notification that a Scoped Variable is renaming. + * If the name matches one of this block's Scoped Variables, rename it. + * @param {string} oldName Previous name of Scoped Variable. + * @param {string} newName Renamed Scoped Variable. + * @param {string} varclass class of variable to rename + * @this Blockly.Block + */ + renameScopeVar: function(oldName, newName,varclass) { + var changed = false; + if (varclass === 'Types') { + for (var i = 0; i < this.arguments_.length; i++) { + if (Blockly.Names.equals(oldname,this.arguments_[i]['type'])) { + this.arguments_[i]['type'] = newName; + changed = true; + } + } + } + if (changed) { + this.updateParams_(); + } + }, /** * Notification that a variable is renaming. * If the name matches one of this block's variables, rename it. @@ -429,6 +446,7 @@ Blockly.Blocks['procedures_defnoreturn'] = { } } }, + isTopLevel: true, callType_: 'procedures_callnoreturn' }; @@ -464,6 +482,7 @@ Blockly.Blocks['procedures_defreturn'] = { this.statementConnection_ = null; this.hasReturnValue_ = true; }, + isTopLevel: true, doAddField: Blockly.Blocks['procedures_defnoreturn'].doAddField, doRemoveField: Blockly.Blocks['procedures_defnoreturn'].doRemoveField, updateParams_: Blockly.Blocks['procedures_defnoreturn'].updateParams_, @@ -793,6 +812,7 @@ Blockly.Blocks['procedures_callreturn'] = { this.quarkConnections_ = {}; this.quarkArguments_ = null; }, + isTopLevel: true, getProcedureCall: Blockly.Blocks['procedures_callnoreturn'].getProcedureCall, renameProcedure: Blockly.Blocks['procedures_callnoreturn'].renameProcedure, getVarsTypes: Blockly.Blocks['procedures_callnoreturn'].getVarsTypes, diff --git a/blocks/variables.js b/blocks/variables.js index 607adc0fadf..d62cafbe2df 100644 --- a/blocks/variables.js +++ b/blocks/variables.js @@ -92,29 +92,15 @@ Blockly.Blocks['variables_get'] = { * @this Blockly.Block */ onchange: function() { - var legal = false; - // Is the block nested in a procedure? - var block = this; - do { - if (block.getProcedureDef) { - break; - } - block = block.getSurroundParent(); - } while (block); + // Is this variable actually a local or a proceedure variable? + var prefix = Blockly.Variables.getLocalContext(this, + this.getFieldValue('VAR')); var colour = Blockly.Blocks.variables.HUE; - // See if our variable name is any of the parameters of this function - if (block && block.getProcedureDef) { - var varName = this.getFieldValue('VAR'); - var tuple = block.getProcedureDef.call(block); - var params = tuple[1]; - for(var i = 0; i < params.length; i++) { - if (params[i]['name'] === varName) { - colour = Blockly.Blocks.procedures.HUE; - this.procedurePrefix_ = tuple[0]+'.'; - break; - } - } + this.procedurePrefix_ = ''; + if (prefix != null) { + colour = Blockly.Blocks.procedures.HUE; + this.procedurePrefix_ = prefix; } if (colour != this.getColour()) { @@ -307,7 +293,6 @@ Blockly.Blocks['hash_parmvariables_get'] = { typeblock: Blockly.getMsgString('variables_hash_param_get_typeblock') }; - Blockly.Blocks['hash_variables_set'] = { /** * Block for variable setter. @@ -353,3 +338,112 @@ Blockly.Blocks['hash_variables_set'] = { typeblock: Blockly.getMsgString('variables_hash_param_set_typeblock') }; +Blockly.Blocks['initialize_variable'] = { + /** + * Block for variable setter. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "message0": Blockly.Msg.INITIALIZE_VARIABLE, + "args0": [ + { + "type": "field_variable", + "name": "VAR", + "variable": "Variable" + }, + { + "type": "field_scopevariable", + "scope": 'Types', + "name": "TYPE" + }, + { + "type": "input_value", + "name": "VALUE", + "align": "RIGHT" + } + ], + "inputsInline": true, + "previousStatement": null, + "nextStatement": null, + "colour": Blockly.Blocks.variables.HUE, + "tooltip": "", + "helpUrl": "http://www.example.com/" + }); + this.procedurePrefix_ = ''; + var typeField = this.getField('TYPE'); + typeField.setChangeHandler(this.changeType); + typeField.setMsgEmpty('Any'); + typeField.setValue(''); + this.contextMenuMsg_ = Blockly.Msg.VARIABLES_SET_CREATE_GET; + }, + isTopLevel: true, + onchange: function() { + // Is the block nested in a procedure? + var prefix = Blockly.Variables.getLocalContext(this, null); + + var title = Blockly.Msg.INITIALIZE_GLOBAL_VARIABLE + var colour = Blockly.Blocks.variables.HUE; + this.procedurePrefix_ = ''; + // See if we are a local variable + if (prefix != null) { + this.procedurePrefix_ = prefix; + colour = Blockly.Blocks.procedures.HUE; + title = Blockly.Msg.INITIALIZE_LOCAL_VARIABLE + } + // Update the block with the right color and text + this.getInput('VALUE').fieldRow[0].setText(title); + if (colour != this.getColour()) { + this.setColour(colour); + } + }, + + getVars: Blockly.Blocks['variables_get'].getVars, + renameVar: Blockly.Blocks['variables_get'].renameVar, + changeType: function(newType) { + var block = this.sourceBlock_; + block.getInput('VALUE').setCheck(newType); + }, + /** + * Return all Scoped Variables referenced by this block. + * @param {string} varclass class of variable to get. + * @return {!Array.} List of hashkey names. + * @this Blockly.Block + */ + getScopeVars: function(varclass) { + var result = []; + if (varclass === 'Types') { + result.push(this.getFieldValue('TYPE')); + } + return result; + }, + /** + * Return all types of variables referenced by this block. + * @return {!Array.} List of variable names with their types. + * @this Blockly.Block + */ + getVarsTypes: function() { + var vartypes = {}; + vartypes[this.procedurePrefix_+this.getFieldValue('VAR')] = + [this.getFieldValue('TYPE')]; + return vartypes; + }, + /** + * Notification that a Scoped Variable is renaming. + * If the name matches one of this block's Scoped Variables, rename it. + * @param {string} oldName Previous name of Scoped Variable. + * @param {string} newName Renamed Scoped Variable. + * @param {string} varclass class of variable to rename + * @this Blockly.Block + */ + renameScopeVar: function(oldName, newName,varclass) { + if (varclass === 'Types' && + Blockly.Names.equals(oldName, this.getFieldValue('TYPE'))) { + this.setFieldValue(newName, 'TYPE'); + } + }, + contextMenuType_: 'variables_get', + customContextMenu: Blockly.Blocks['variables_get'].customContextMenu, + typeblock: Blockly.getMsgString('variables_hash_param_set_typeblock') +}; + diff --git a/blocks_compressed.js b/blocks_compressed.js index f23e5266fa2..911e8605a0e 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -101,12 +101,12 @@ d.setSerializable(!1),d.argPos_=c,d.setChangeHandler(this.updateParam),b=this.ge this.workspace,this.arguments_);this.workspace.fireChangeEvent()},updateType:function(a){var b=this.argPos_,c=this.sourceBlock_;c.arguments_[b].type!==a&&(c.arguments_[b].type=a,c.updateParams_());return a},updateParam:function(a){if(""===a)return null;var b=this.argPos_,c=this.sourceBlock_;c.arguments_[b].name!==a&&(c.arguments_[b].name=a,c.updateParams_());return a},setStatements_:function(a){this.hasStatements_!==a&&(a?(this.appendStatementInput("STACK").appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_DO), this.getInput("RETURN")&&this.moveInputBefore("STACK","RETURN")):this.removeInput("STACK",!0),this.hasStatements_=a)},mutationToDom:function(){for(var a=document.createElement("mutation"),b=0;b} + */ +Blockly.scopeVariableList = { Types: ['String','Number','Boolean','Array']}; + /** * Size the SVG image to completely fill its container. * Record the height/width of the SVG image. diff --git a/core/field_scope_variable.js b/core/field_scope_variable.js index a5ecd83b5e3..d79f07eabeb 100644 --- a/core/field_scope_variable.js +++ b/core/field_scope_variable.js @@ -170,6 +170,7 @@ Blockly.FieldScopeVariable.prototype.setMsgEmpty = function( * @this {!Blockly.FieldScopeVariable} */ Blockly.FieldScopeVariable.dropdownCreate = function() { + // Figure out all the names for this type used in the code. if (this.sourceBlock_ && this.sourceBlock_.workspace) { var variableList = Blockly.ScopeVariables.allVariables(this.sourceBlock_.workspace, @@ -177,15 +178,34 @@ Blockly.FieldScopeVariable.dropdownCreate = function() { } else { var variableList = []; } + // Get any standing fixed names. Note that the list might actually be + // a function to call to return the list + var fixedList = Blockly.scopeVariableList[this.getVarClass()]; + if (typeof fixedList === 'function') { + fixedList = fixedList(); + } else if (typeof fixedList === 'undefined') { + fixedList = []; + } + // Ensure that the currently selected variable is an option. var name = this.getText(); if (name && name !== '' && variableList.indexOf(name) == -1) { variableList.push(name); } variableList.sort(goog.string.caseInsensitiveCompare); - if (name && this.msgRename_) { + + // Now add in the fixed elements if they aren't in the original list + for (var pos = 0; pos < fixedList.length; pos++) { + if (!goog.array.contains(variableList, fixedList[pos])) { + variableList.push(fixedList[pos]); + } + } + // Let them rename it as long as it isn't one of the fixed names + // + if (name && this.msgRename_ && !goog.array.contains(fixedList,name)) { variableList.push(this.msgRename_); } + // If they have a command to create a new one then add that in if (this.msgNew_) { variableList.push(this.msgNew_); } diff --git a/core/variables.js b/core/variables.js index 0238e37c1fe..638ffa1876e 100644 --- a/core/variables.js +++ b/core/variables.js @@ -228,13 +228,13 @@ Blockly.Variables.flyoutCategory = function(blocks, gaps, margin, workspace) { }; /** -* Return a new variable name that is not yet being used. This will try to -* generate single letter variable names in the range 'i' to 'z' to start with. -* If no unique name is located it will try 'i' to 'z', 'a' to 'h', -* then 'i2' to 'z2' etc. Skip 'l'. + * Return a new variable name that is not yet being used. This will try to + * generate single letter variable names in the range 'i' to 'z' to start with. + * If no unique name is located it will try 'i' to 'z', 'a' to 'h', + * then 'i2' to 'z2' etc. Skip 'l'. * @param {!Blockly.Workspace} workspace The workspace to be unique in. -* @return {string} New variable name. -*/ + * @return {string} New variable name. + */ Blockly.Variables.generateUniqueName = function(workspace) { var variableList = Blockly.Variables.allVariables(workspace); var newName = ''; @@ -275,3 +275,36 @@ Blockly.Variables.generateUniqueName = function(workspace) { } return newName; }; + +/** + * Find a context for a variable. If it is inside a procedure, we want to have + * The name of the containing procedure. If this is a global variable then + * we want to return a null + * @param {!Blockly.Block} block Block to get context for + * @param {string} name string of the name to look for. + * @return {string} Context of the procedure (string) or null) +*/ +Blockly.Variables.getLocalContext = function(block,name) { + do { + if (block.getProcedureDef) { + var tuple = block.getProcedureDef.call(block); + var params = tuple[1]; + if (name === null) { + return tuple[0]+'.'; + } + for(var i = 0; i < params.length; i++) { + if (params[i]['name'] === name) { + return tuple[0]+'.'; + } + } + break; + } else if (block.type === 'initialize_variable' && + block.getFieldValue('VAR') === name ) { + // We found an initialize_variable block, so now we want to go through + // and continue until we find the containing procedure (if any) + name = null; + } + block = block.getParent(); + } while (block); + return null; +}; diff --git a/generators/java.js b/generators/java.js index 3b4a4862f31..3ed174bc294 100644 --- a/generators/java.js +++ b/generators/java.js @@ -142,6 +142,11 @@ Blockly.Java.INLINEVARCLASS = true; * List of additional classes used globally by the generated java code. */ Blockly.Java.classes_ = []; +/** + * List of global variables to be generated. + */ +Blockly.Java.globals_ = {}; + /** * Set the application name for generated classes * @param {string} name Name for the application for any generated code @@ -196,6 +201,19 @@ Blockly.Java.getBaseclass = function() { return this.Baseclass_; } +/** + * Mark a variable as a global for the generated Java code + * @param {block} block Block that the variable is contained in + * @param {string} name Name of the global to initialize + * @param {string} val Initializer value for the gloabl + */ +Blockly.Java.setGlobalVar = function(block,name,val) { + if (Blockly.Variables.getLocalContext(block,name) == null && + (typeof this.globals_[name] === 'undefined' || + this.globals_[name] === null)) { + this.globals_[name] = val; + } +} /** * Get the Java type of a variable by name * @param {string} variable Name of the variable to get the type for @@ -206,7 +224,7 @@ Blockly.Java.GetVariableType = function(name) { if (!type) { type = 'String'; // type = 'Var'; - Blockly.Java.provideVarClass(); +// Blockly.Java.provideVarClass(); } return type; }; @@ -989,6 +1007,8 @@ Blockly.Java.init = function(workspace, imports) { this.imports_ = Object.create(null); // Dictionary of any extra classes to output this.classes_ = Object.create(null); + // Dictionary of all the globals + this.globals_ = Object.create(null); // Start with the defaults that all the code depends on for(var i = 0; i < this.needImports_.length; i++) { this.addImport(this.needImports_[i]); @@ -1002,7 +1022,6 @@ Blockly.Java.init = function(workspace, imports) { var defvars = []; var variables = Blockly.Variables.allVariables(workspace); - var varsToOutput = variables.length; this.blocklyTypes_ = Blockly.Variables.allVariablesTypes(workspace); // Make sure all the type variables are pushed. This is because we // Don't return the special function parameters in the allVariables list @@ -1012,7 +1031,6 @@ Blockly.Java.init = function(workspace, imports) { var needVarClass = false; for (var x = 0; x < variables.length; x++) { var key = variables[x]; - var initializer = ''; var type = this.blocklyTypes_[key]; if (type === 'Object') { type = 'Object'; @@ -1020,14 +1038,11 @@ Blockly.Java.init = function(workspace, imports) { type = 'LinkedList'; } else if (type === 'Var') { type = 'Var'; - initializer = ' = new Var(0)'; needVarClass = true; } else if (type === 'Boolean') { type = 'Boolean'; - initializer = ' = false'; } else if (type === 'String') { type = 'String'; - initializer = ' = ""'; } else if (type === 'Colour') { type = 'String'; } else if (type === 'Number') { @@ -1038,7 +1053,6 @@ Blockly.Java.init = function(workspace, imports) { } else { console.log('Unknown type for '+key+' using Var for '+type); type = 'Var'; - initializer = ' = new Var(0)'; needVarClass = true; } } else { @@ -1046,19 +1060,8 @@ Blockly.Java.init = function(workspace, imports) { console.log('Unknown type for '+key+' using Object'); type = 'Object'; } - this.variableTypes_[key] = type; - - if (x < varsToOutput) { - defvars.push('protected ' + - type + ' '+ - this.variableDB_.getName(variables[x], - Blockly.Variables.NAME_TYPE) + - initializer + - ';'); - } } - this.definitions_['variables'] = defvars.join('\n'); if (needVarClass) { Blockly.Java.provideVarClass(); } @@ -1093,10 +1096,27 @@ Blockly.Java.finish = function(code) { funcs[slot].push(name); } - // We have all the functions broken into two slots. So go through in order // and get the statics and then the non-statics to output. - var allDefs = this.definitions_['variables'] + '\n\n'; + var allDefs = ''; + + for(var def in this.globals_) { + var initializer = ''; + var type = this.GetVariableType(def); + if (this.globals_[def] != null && this.globals_[def] !== '') { + initializer = ' = ' + this.globals_[def]; + } else if (type === 'Var') { + initializer = ' = new Var(0)'; + } else if (type === 'Boolean') { + initializer = ' = false'; + } else if (type === 'String') { + initializer = ' = ""'; + } + var varname = Blockly.Java.variableDB_.getName(def, + Blockly.Variables.NAME_TYPE); + allDefs += 'protected ' + type + ' ' + varname + initializer + ';\n'; + } + for(var slot = 0; slot < 2; slot++) { var names = funcs[slot].sort(); for (var pos = 0; pos < names.length; pos++) { @@ -1137,6 +1157,10 @@ Blockly.Java.finish = function(code) { allDefs += header + def + '\n\n'; } } + // Clean up temporary data. + delete Blockly.Java.definitions_; + delete Blockly.Java.functionNames_; + Blockly.Java.variableDB_.reset(); return allDefs.replace(/\n\n+/g, '\n\n').replace(/\n*$/, '\n\n\n') + code; }; diff --git a/generators/java/text.js b/generators/java/text.js index 0894520407d..c2fa296b0ed 100644 --- a/generators/java/text.js +++ b/generators/java/text.js @@ -208,7 +208,6 @@ Blockly.Java['text_getSubstring'] = function(block) { } else { // If the index is dynamic, increment it in code. // Add special case for -0. -// Blockly.Java.definitions_['import_sys'] = 'import sys'; at2 = text + '.length() - ((int)' + at2 + '-1)'; } } diff --git a/generators/java/variables.js b/generators/java/variables.js index 6d7e9604de8..ddb33cae5da 100644 --- a/generators/java/variables.js +++ b/generators/java/variables.js @@ -30,17 +30,21 @@ goog.require('Blockly.Java'); Blockly.Java['variables_get'] = function(block) { + // Remember if this is a global variable to be initialized + Blockly.Java.setGlobalVar(block,block.getFieldValue('VAR'), null); // Variable getter. var code = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE); - if(Blockly.Java.GetVariableType(this.procedurePrefix_+block.getFieldValue('VAR')) === 'Var') { + if(Blockly.Java.GetVariableType(this.procedurePrefix_+ + block.getFieldValue('VAR')) === 'Var') { code += '.cloneObject()'; } - return [code, Blockly.Java.ORDER_ATOMIC]; }; Blockly.Java['variables_set'] = function(block) { + // Remember if this is a global variable to be initialized + Blockly.Java.setGlobalVar(block,block.getFieldValue('VAR'), null); // Variable setter. var argument0 = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_NONE) || '0'; @@ -59,7 +63,8 @@ Blockly.Java['variables_set'] = function(block) { argument0 = Blockly.Java.toStringCode(argument0); } var code = varName; - if(Blockly.Java.GetVariableType(this.procedurePrefix_+block.getFieldValue('VAR')) === 'Var') { + if(Blockly.Java.GetVariableType(this.procedurePrefix_+ + block.getFieldValue('VAR')) === 'Var') { code += '.setObject(' + argument0 + ');\n'; } else { code += ' = ' + argument0 + ';\n'; @@ -68,6 +73,8 @@ Blockly.Java['variables_set'] = function(block) { }; Blockly.Java['hash_variables_get'] = function(block) { + // Remember if this is a global variable to be initialized + Blockly.Java.setGlobalVar(block,block.getFieldValue('VAR'), null); // Variable getter. var getter = 'getString'; var parent = block.getParent(); @@ -80,8 +87,8 @@ Blockly.Java['hash_variables_get'] = function(block) { var varName = blockVariables[y]; // Variable name may be null if the block is only half-built. if (varName) { - var vartype = Blockly.Java.GetVariableType(this.procedurePrefix_+varName); - + var vartype = Blockly.Java.GetVariableType(this.procedurePrefix_+ + varName); if (vartype === 'Array') { getter = 'get'; } else if (vartype === 'Object') { @@ -98,6 +105,8 @@ Blockly.Java['hash_variables_get'] = function(block) { }; Blockly.Java['hash_parmvariables_get'] = function(block) { + // Remember if this is a global variable to be initialized + Blockly.Java.setGlobalVar(block,block.getFieldValue('VAR'), null); // Variable getter. var getter = 'getString'; var parent = block.getParent(); @@ -131,6 +140,8 @@ Blockly.Java['hash_parmvariables_get'] = function(block) { Blockly.Java['hash_variables_set'] = function(block) { + // Remember if this is a global variable to be initialized + Blockly.Java.setGlobalVar(block,block.getFieldValue('VAR'), null); // Variable setter. var argument0 = Blockly.Java.valueToCode(block, 'VALUE', Blockly.Java.ORDER_NONE) || '0'; @@ -139,3 +150,20 @@ Blockly.Java['hash_variables_set'] = function(block) { return varName + '{' + block.getFieldValue('HASHKEY') + '}' + ' = ' + argument0 + ';\n'; }; + +Blockly.Java['initialize_variable'] = function (block) { + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '0'; + if(block.procedurePrefix_ != '') { + // Variable setter. + var vartype = Blockly.Java.GetVariableType(block.procedurePrefix_+ + block.getFieldValue('VAR')); + var varName = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), + Blockly.Variables.NAME_TYPE); + return vartype + ' ' + varName + ' = ' + argument0 + ';\n'; + } else { + // Remember if this is a global variable to be initialized + Blockly.Java.setGlobalVar(block,block.getFieldValue('VAR'), argument0); + return ''; + } +} diff --git a/java_compressed.js b/java_compressed.js index 925e2f96b8d..b4b3295b3fe 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -6,23 +6,25 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern,equal"); Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.INDENT=" ";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_=""; -Blockly.Java.needImports_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.INLINEVARCLASS=!0;Blockly.Java.classes_=[];Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; -Blockly.Java.GetVariableType=function(a){a=this.variableTypes_[a];a||(a="String",Blockly.Java.provideVarClass());return a};Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): Blockly.Java.addImport("extreme.sdn.client.Var")}; -Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.imports_=Object.create(null);this.classes_=Object.create(null);for(var c=0;ce;e++)for(var f=b[e].sort(),g=0;ge;e++)for(g=b[e].sort(),f=0;fd&&(h=">=",e=-e);"Var"===a?g="for ("+b+".setObject("+c+"); "+b+".getObjectAsDouble() "+h+d+"; "+b+".incrementObject("+e+")) ":(0>e?l=" -= "+Math.abs(e):1!=e&&(l=" += "+e),g+="for ("+b+" = "+c+"; "+b+h+d+"; "+b+l+")")}else h=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(h=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE), -g+="double "+h+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),g+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),g+="double "+d+" = ",g=Blockly.isNumber(e)?g+(Math.abs(e)+";\n"):g+("Math.abs("+e+");\n"),g=g+("if ("+h+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),g+="}\n",g="Var"===a?g+("for ("+b+".setObject("+h+");\n "+d+" >= 0 ? "+ -b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+c+";\n"+b+".incrementObject("+d+")) "):g+("for ("+b+" = "+h+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")");return g+=" {\n"+f+"} // end for\n"}; +Blockly.Java.controls_for=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);Blockly.Java.GetVariableType(a.getFieldValue("VAR"));var c=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0",d=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0",e=Blockly.Java.valueToCode(a,"BY",Blockly.Java.ORDER_NONE)||"1",g=Blockly.Java.statementToCode(a,"DO"),g=Blockly.Java.addLoopTrap(g,a.id)||Blockly.Java.PASS;a=Blockly.Java.GetVariableType(a.getFieldValue("VAR")); +var f="";if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),h="<=",l="++";c>d&&(h=">=",e=-e);"Var"===a?f="for ("+b+".setObject("+c+"); "+b+".getObjectAsDouble() "+h+d+"; "+b+".incrementObject("+e+")) ":(0>e?l=" -= "+Math.abs(e):1!=e&&(l=" += "+e),f+="for ("+b+" = "+c+"; "+b+h+d+"; "+b+l+")")}else h=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(h=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE), +f+="double "+h+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),f+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),f+="double "+d+" = ",f=Blockly.isNumber(e)?f+(Math.abs(e)+";\n"):f+("Math.abs("+e+");\n"),f=f+("if ("+h+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),f+="}\n",f="Var"===a?f+("for ("+b+".setObject("+h+");\n "+d+" >= 0 ? "+ +b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+c+";\n"+b+".incrementObject("+d+")) "):f+("for ("+b+" = "+h+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")");return f+=" {\n"+g+"} // end for\n"}; Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("it",Blockly.Variables.NAME_TYPE);b="Var"===c?b+".setObject("+a+".next())":b+" = "+a+".next()";Blockly.Java.addImport("java.util.Iterator"); return"for (Iterator "+a+" = "+d+".iterator(); "+a+".hasNext();) {\n "+b+";\n"+e+"} // end for\n"};Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Java.math={};Blockly.Java.addReservedWords("math,random");Blockly.Java.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; Blockly.Java.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Java.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Java.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Java.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Java.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Java.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Java.valueToCode(a,"A",b)||"0";a=Blockly.Java.valueToCode(a,"B",b)||"0";var e="";" ** "===c?(Blockly.Java.addImport("java.lang.Math"),e="Math.pow("+d+", "+a+")"):e=d+c+a;return[e, @@ -75,8 +77,8 @@ Blockly.Java.math_format_as_decimal=function(a){var b=Blockly.Java.valueToCode(a Blockly.Java.math_constrain=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"VALUE",Blockly.Java.ORDER_NONE)||"0",c=Blockly.Java.valueToCode(a,"LOW",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"HIGH",Blockly.Java.ORDER_NONE)||"float('inf')";return["Math.min(Math.max("+b+", "+c+"), "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]}; Blockly.Java.math_random_int=function(a){Blockly.Java.addImport("java.lang.Math");var b=Blockly.Java.valueToCode(a,"FROM",Blockly.Java.ORDER_NONE)||"0";a=Blockly.Java.valueToCode(a,"TO",Blockly.Java.ORDER_NONE)||"0";return[Blockly.Java.provideFunction_("math_random_int",["public static int "+Blockly.Java.FUNCTION_NAME_PLACEHOLDER_+"(int a, int b) {"," if (a > b) {"," // Swap a and b to ensure a is smaller."," int c = a;"," a = b;"," b = c;"," }"," return (int)Math.floor(Math.random() * (b - a + 1) + a);", "}"])+"("+b+", "+a+")",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.math_random_float=function(a){Blockly.Java.addImport("java.lang.Math");return["Math.random()",Blockly.Java.ORDER_FUNCTION_CALL]};Blockly.Java.procedures={}; -Blockly.Java.procedures_defreturn=function(a){var b=a.getFieldValue("NAME"),c=Blockly.Java.variableDB_.getName(b,Blockly.Procedures.NAME_TYPE),d=Blockly.Java.statementToCode(a,"STACK");Blockly.Java.STATEMENT_PREFIX&&(d=Blockly.Java.prefixLines(Blockly.Java.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.Java.INDENT)+d);Blockly.Java.INFINITE_LOOP_TRAP&&(d=Blockly.Java.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+d);var e="void";this.hasReturnValue_&&(e=Blockly.Java.GetVariableType(b+"."));var f= -Blockly.Java.valueToCode(a,"RETURN",Blockly.Java.ORDER_NONE)||"";f?f="Var"===e?" return Var.valueOf("+f+");\n":" return "+f+";\n":d||(d=Blockly.Java.PASS);for(var g=[],h=0;h", - "lastupdated": "2015-08-13 10:05:18.876513", + "lastupdated": "2015-08-16 14:10:36.300053", "locale": "en", "messagedocumentation" : "qqq" }, @@ -487,6 +487,9 @@ "VARIABLES_SET_TOOLTIP": "Sets this variable to be equal to the input.", "VARIABLES_SET_CREATE_GET": "Create 'get %1'", "SCOPE_VARIABLES_SET": "set %1 : %2 to %3", + "INITIALIZE_VARIABLE": "Initialize %1 as %2 with %3", + "INITIALIZE_GLOBAL_VARIABLE": "Initialize global", + "INITIALIZE_LOCAL_VARIABLE": "Initialize local", "PROCEDURES_DEFNORETURN_HELPURL": "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29", "PROCEDURES_DEFNORETURN_TITLE": "to", "PROCEDURES_DEFNORETURN_PROCEDURE": "do something", diff --git a/msg/json/qqq.json b/msg/json/qqq.json index 0256c46bc01..a43d4b65ff6 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -481,6 +481,9 @@ "VARIABLES_SET_TOOLTIP": "tooltip - This initializes or changes the value of the named variable.", "VARIABLES_SET_CREATE_GET": "context menu - Selecting this creates a block to get (change) the value of this variable.\n\nParameters:\n* %1 - the name of the variable.", "SCOPE_VARIABLES_SET": "block text - Change the value of a mathematical variable: '''set [the value of] x to 7'''.\n\nParameters:\n* %1 - the name of the variable.\n* %2 - the value to be assigned.", + "INITIALIZE_VARIABLE": "Block text - Initialize a global/local variable. The first part gets replaced with the next two values depending on whether it is global or local..\n\nParameters:\n* %1 - the name of the variable.\n* %2 - the type of the variable.\n* %3 - the initializer value", + "INITIALIZE_GLOBAL_VARIABLE": "Block text - Initialize a global variable", + "INITIALIZE_LOCAL_VARIABLE": "Block text - Initialize a local variable", "PROCEDURES_DEFNORETURN_HELPURL": "url - Information about defining [https://en.wikipedia.org/wiki/Procedure_(computer_science) functions] that do not have return values.", "PROCEDURES_DEFNORETURN_TITLE": "block text - This precedes the name of the function when defining it. See [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#c84aoc this sample function definition].", "PROCEDURES_DEFNORETURN_PROCEDURE": "default name - This acts as a placeholder for the name of a function on a function definition block, as shown on [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#w7cfju this block]. The user will replace it with the function's name.", diff --git a/msg/messages.js b/msg/messages.js index e6532b1be86..c53f832e63b 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -1341,6 +1341,12 @@ Blockly.Msg.VARIABLES_SET_TOOLTIP = 'Sets this variable to be equal to the input Blockly.Msg.VARIABLES_SET_CREATE_GET = 'Create "get %1"'; /// block text - Change the value of a mathematical variable: '''set [the value of] x to 7'''.\n\nParameters:\n* %1 - the name of the variable.\n* %2 - the value to be assigned. Blockly.Msg.SCOPE_VARIABLES_SET = 'set %1 : %2 to %3'; +/// Block text - Initialize a global/local variable. The first part gets replaced with the next two values depending on whether it is global or local..\n\nParameters:\n* %1 - the name of the variable.\n* %2 - the type of the variable.\n* %3 - the initializer value +Blockly.Msg.INITIALIZE_VARIABLE = 'Initialize %1 as %2 with %3'; +/// Block text - Initialize a global variable +Blockly.Msg.INITIALIZE_GLOBAL_VARIABLE = 'Initialize global'; +/// Block text - Initialize a local variable +Blockly.Msg.INITIALIZE_LOCAL_VARIABLE = 'Initialize local'; // Procedures Blocks. /// url - Information about defining [https://en.wikipedia.org/wiki/Procedure_(computer_science) functions] that do not have return values. diff --git a/tests/generators/unittest.js b/tests/generators/unittest.js index 9574325191c..a67eaa19bf8 100644 --- a/tests/generators/unittest.js +++ b/tests/generators/unittest.js @@ -34,6 +34,7 @@ Blockly.Blocks['unittest_main'] = { this.setTooltip('Executes the enclosed unit tests,\n' + 'then prints a summary.'); }, + isTopLevel: true, getVars: function() { return ['unittestResults']; }, diff --git a/tests/generators/unittest_java.js b/tests/generators/unittest_java.js index 35a6fc7bb1e..950a69e3c57 100644 --- a/tests/generators/unittest_java.js +++ b/tests/generators/unittest_java.js @@ -26,6 +26,7 @@ Blockly.Java['unittest_main'] = function(block) { // Container for unit tests. + Blockly.Java.setGlobalVar(block,'unittestResults', null); var resultsVar = Blockly.Java.variableDB_.getName('unittestResults', Blockly.Variables.NAME_TYPE); @@ -96,7 +97,8 @@ Blockly.Java['unittest_main'] = function(block) { return code; }; -Blockly.Java['unittest_main'].defineAssert_ = function() { +Blockly.Java['unittest_main'].defineAssert_ = function(block) { + Blockly.Java.setGlobalVar(block,'unittestResults', null); var resultsVar = Blockly.Java.variableDB_.getName('unittestResults', Blockly.Variables.NAME_TYPE); Blockly.Java.provideVarClass(); @@ -127,7 +129,7 @@ Blockly.Java['unittest_assertequals'] = function(block) { Blockly.Java.ORDER_NONE) || 'null'; var expected = Blockly.Java.valueToCode(block, 'EXPECTED', Blockly.Java.ORDER_NONE) || 'null'; - return Blockly.Java['unittest_main'].defineAssert_() + + return Blockly.Java['unittest_main'].defineAssert_(block) + '(' + actual + ', ' + expected + ', ' + message + ');\n'; }; @@ -144,11 +146,12 @@ Blockly.Java['unittest_assertvalue'] = function(block) { } else if (expected == 'NULL') { expected = 'null'; } - return Blockly.Java['unittest_main'].defineAssert_() + + return Blockly.Java['unittest_main'].defineAssert_(block) + '(' + actual + ', ' + expected + ', ' + message + ');\n'; }; Blockly.Java['unittest_fail'] = function(block) { + Blockly.Java.setGlobalVar(block,'unittestResults', null); // Always assert an error. var resultsVar = Blockly.Java.variableDB_.getName('unittestResults', Blockly.Variables.NAME_TYPE); From f3fceca9bb5b782e0a8f86554ed42118d3c1c7fb Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 17 Aug 2015 10:15:57 -0400 Subject: [PATCH 26/84] Fix renaming of FieldScopeVariable Fix wrapping of FieldScopeVariable handler to allow for renaming to work. --- core/field_scope_variable.js | 50 ++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/core/field_scope_variable.js b/core/field_scope_variable.js index d79f07eabeb..09f4bf8f71f 100644 --- a/core/field_scope_variable.js +++ b/core/field_scope_variable.js @@ -44,26 +44,6 @@ goog.require('goog.string'); * @constructor */ Blockly.FieldScopeVariable = function(varclass, opt_changeHandler) { - var changeHandler; - if (opt_changeHandler) { - // Wrap the user's change handler together with the variable rename handler. - var thisObj = this; - changeHandler = function(value) { - var retVal = Blockly.FieldScopeVariable.dropdownChange.call(thisObj, value); - var newVal; - if (retVal === undefined) { - newVal = value; // Existing variable selected. - } else if (retVal === null) { - newVal = thisObj.getValue(); // Abort, no change. - } else { - newVal = retVal; // Variable name entered. - } - opt_changeHandler.call(thisObj, newVal); - return retVal; - }; - } else { - changeHandler = Blockly.FieldScopeVariable.dropdownChange; - } this.msgRename_ = Blockly.Msg.RENAME_SCOPE_VARIABLE; this.msgRenameTitle_ = Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE; this.msgNew_ = Blockly.Msg.NEW_SCOPE_VARIABLE; @@ -74,12 +54,38 @@ Blockly.FieldScopeVariable = function(varclass, opt_changeHandler) { this.setValue(this.getVarClass()[0]); Blockly.FieldScopeVariable.superClass_.constructor.call(this, - Blockly.FieldScopeVariable.dropdownCreate, changeHandler); + Blockly.FieldScopeVariable.dropdownCreate, opt_changeHandler); }; goog.inherits(Blockly.FieldScopeVariable, Blockly.FieldDropdown); -Blockly.FieldScopeVariable.prototype.init +/** + * Sets a new change handler for angle field. + * @param {Function} handler New change handler, or null. + */ +Blockly.FieldScopeVariable.prototype.setChangeHandler = function(handler) { + var wrappedHandler; + if (handler) { + // Wrap the user's change handler together with the variable rename handler. + wrappedHandler = function(value) { + var retVal = Blockly.FieldScopeVariable.dropdownChange.call(this, value); + var newVal; + if (retVal === undefined) { + newVal = value; // Existing variable selected. + } else if (retVal === null) { + newVal = this.getValue(); // Abort, no change. + } else { + newVal = retVal; // Variable name entered. + } + handler.call(this, newVal); + return retVal; + }; + } else { + wrappedHandler = Blockly.FieldScopeVariable.dropdownChange; + } + Blockly.FieldScopeVariable.superClass_.setChangeHandler(wrappedHandler); +}; + /** * Install this dropdown on a block. * @param {!Blockly.Block} block The block containing this text. From 8ef3612ffc575932d847e703896c447cdfb8543a Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 17 Aug 2015 13:06:39 -0400 Subject: [PATCH 27/84] Fix setChangeHandler calls to pass proper this value Fix setChangeHandler superclass to have a .call( --- blockly_compressed.js | 4 ++-- core/field_angle.js | 2 +- core/field_scope_variable.js | 2 +- core/field_variable.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 45b7fd9f642..4861ee7e9ca 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1294,7 +1294,7 @@ Blockly.FieldTextInput.prototype.validate_=function(){var a=!0;goog.asserts.asse Blockly.FieldTextInput.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.fieldGroup_.getBBox();a.style.width=b.width+"px";b=this.getAbsoluteXY_();if(this.sourceBlock_.RTL){var c=this.borderRect_.getBBox();b.x+=c.width;b.x-=a.offsetWidth}b.y+=1;goog.userAgent.WEBKIT&&(b.y-=3);a.style.left=b.x+"px";a.style.top=b.y+"px"}; Blockly.FieldTextInput.prototype.widgetDispose_=function(){var a=this;return function(){var b=Blockly.FieldTextInput.htmlInput_,c=b.value;if(a.sourceBlock_&&a.changeHandler_){var d=a.changeHandler_(c);null===d?c=b.defaultValue:void 0!==d&&(c=d)}a.setText(c);a.sourceBlock_.rendered&&a.sourceBlock_.render();Blockly.unbindEvent_(b.onKeyDownWrapper_);Blockly.unbindEvent_(b.onKeyUpWrapper_);Blockly.unbindEvent_(b.onKeyPressWrapper_);Blockly.unbindEvent_(b.onWorkspaceChangeWrapper_);Blockly.FieldTextInput.htmlInput_= null;Blockly.WidgetDiv.DIV.style.width="auto"}};Blockly.FieldTextInput.numberValidator=function(a){if(null===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=parseFloat(a||0);return isNaN(a)?null:String(a)};Blockly.FieldTextInput.nonnegativeIntegerValidator=function(a){(a=Blockly.FieldTextInput.numberValidator(a))&&(a=String(Math.max(0,Math.floor(a))));return a};Blockly.FieldAngle=function(a,b){this.symbol_=Blockly.createSvgElement("tspan",{},null);this.symbol_.appendChild(document.createTextNode("\u00b0"));Blockly.FieldAngle.superClass_.constructor.call(this,a,null);this.setChangeHandler(b)};goog.inherits(Blockly.FieldAngle,Blockly.FieldTextInput); -Blockly.FieldAngle.prototype.setChangeHandler=function(a){Blockly.FieldAngle.superClass_.setChangeHandler(a?function(b){var c=a.call(this,b);if(null===c)var d=c;else void 0===c&&(c=b),d=Blockly.FieldAngle.angleValidator.call(this,c),void 0!==d&&(d=c);return d===b?void 0:d}:Blockly.FieldAngle.angleValidator)};Blockly.FieldAngle.ROUND=15;Blockly.FieldAngle.HALF=50;Blockly.FieldAngle.RADIUS=Blockly.FieldAngle.HALF-1; +Blockly.FieldAngle.prototype.setChangeHandler=function(a){Blockly.FieldAngle.superClass_.setChangeHandler.call(this,a?function(b){var c=a.call(this,b);if(null===c)var d=c;else void 0===c&&(c=b),d=Blockly.FieldAngle.angleValidator.call(this,c),void 0!==d&&(d=c);return d===b?void 0:d}:Blockly.FieldAngle.angleValidator)};Blockly.FieldAngle.ROUND=15;Blockly.FieldAngle.HALF=50;Blockly.FieldAngle.RADIUS=Blockly.FieldAngle.HALF-1; Blockly.FieldAngle.prototype.dispose_=function(){var a=this;return function(){Blockly.FieldAngle.superClass_.dispose_.call(a)();a.gauge_=null;a.clickWrapper_&&Blockly.unbindEvent_(a.clickWrapper_);a.moveWrapper1_&&Blockly.unbindEvent_(a.moveWrapper1_);a.moveWrapper2_&&Blockly.unbindEvent_(a.moveWrapper2_)}}; Blockly.FieldAngle.prototype.showEditor_=function(){Blockly.FieldAngle.superClass_.showEditor_.call(this,goog.userAgent.MOBILE||goog.userAgent.ANDROID||goog.userAgent.IPAD);var a=Blockly.WidgetDiv.DIV;if(a.firstChild){var a=Blockly.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:html":"http://www.w3.org/1999/xhtml","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1",height:2*Blockly.FieldAngle.HALF+"px",width:2*Blockly.FieldAngle.HALF+"px"},a),b=Blockly.createSvgElement("circle", {cx:Blockly.FieldAngle.HALF,cy:Blockly.FieldAngle.HALF,r:Blockly.FieldAngle.RADIUS,"class":"blocklyAngleCircle"},a);this.gauge_=Blockly.createSvgElement("path",{"class":"blocklyAngleGauge"},a);this.line_=Blockly.createSvgElement("line",{x1:Blockly.FieldAngle.HALF,y1:Blockly.FieldAngle.HALF,"class":"blocklyAngleLine"},a);for(var c=0;360>c;c+=15)Blockly.createSvgElement("line",{x1:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS,y1:Blockly.FieldAngle.HALF,x2:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS- @@ -1331,7 +1331,7 @@ Blockly.Variables.allVariablesTypes=function(a){var b;if(a.getDescendants)b=a.ge Blockly.Variables.flyoutCategory=function(a,b,c,d){var e=Blockly.Variables.allVariables(d.targetWorkspace);e.sort(goog.string.caseInsensitiveCompare);e.unshift(null);for(var f=void 0,g=0;g Date: Thu, 20 Aug 2015 08:22:09 -0400 Subject: [PATCH 28/84] Merge Zoom changes from Blockly main --- blockly_compressed.js | 290 +++++++++++++++++++++------------------- blockly_uncompressed.js | 8 +- core/block_svg.js | 115 +++++++++------- core/blockly.js | 36 +++-- core/bubble.js | 51 +++---- core/comment.js | 4 + core/css.js | 23 +++- core/field.js | 14 +- core/field_colour.js | 2 +- core/field_date.js | 2 +- core/field_dropdown.js | 4 +- core/field_image.js | 3 +- core/field_textinput.js | 21 ++- core/flyout.js | 77 +++++++---- core/icon.js | 4 + core/inject.js | 124 +++++++++++------ core/scrollbar.js | 2 +- core/tooltip.js | 3 +- core/trashcan.js | 2 +- core/utils.js | 38 ++++-- core/warning.js | 4 +- core/workspace.js | 9 +- core/workspace_svg.js | 212 +++++++++++++++++++++++++++-- core/zoom_controls.js | 213 +++++++++++++++++++++++++++++ demos/code/code.js | 4 +- media/sprites.png | Bin 819 -> 4146 bytes media/sprites.svg | 36 ++++- tests/playground.html | 18 ++- 28 files changed, 963 insertions(+), 356 deletions(-) create mode 100644 core/zoom_controls.js diff --git a/blockly_compressed.js b/blockly_compressed.js index 4861ee7e9ca..a41e4f3fc35 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -59,7 +59,7 @@ goog.string.escapeChar=function(a){if(a in goog.string.jsEscapeCache_)return goo goog.string.caseInsensitiveContains=function(a,b){return goog.string.contains(a.toLowerCase(),b.toLowerCase())};goog.string.countOf=function(a,b){return a&&b?a.split(b).length-1:0};goog.string.removeAt=function(a,b,c){var d=a;0<=b&&bb?1:0};goog.string.HASHCODE_MAX_=4294967296;goog.string.hashCode=function(a){for(var b=0,c=0;cn?(n=p-n-1,n>m-5&&(n=m-5),k+=n,n=p):(k+=m,m+=5);k<6*g.length&&d.push({str:f,score:k,index:e})}d.sort(function(a,b){var c=a.score-b.score;return 0!=c?c:a.index-b.index});a=[];for(q=0;qp?(p=n-p-1,p>m-5&&(p=m-5),k+=p,p=n):(k+=m,m+=5);k<6*g.length&&d.push({str:f,score:k,index:e})}d.sort(function(a,b){var c=a.score-b.score;return 0!=c?c:a.index-b.index});a=[];for(q=0;qc.viewWidth&&(a=this.anchorX_-c.viewLeft-c.viewWidth):this.anchorX_+ac.viewWidth&&(a=this.anchorX_-c.viewLeft-c.viewWidth):this.anchorX_+ae&&(g=2*Math.PI-g);var h=g+Math.PI/2;h>2*Math.PI&&(h-=2*Math.PI);var k=Math.sin(h),l=Math.cos(h),n=this.getBubbleSize(),h=(n.width+n.height)/Blockly.Bubble.ARROW_THICKNESS,h=Math.min(h,n.width,n.height)/2,n=1-Blockly.Bubble.ANCHOR_RADIUS/f,d=b+ -n*d,e=c+n*e,n=b+h*l,m=c+h*k,b=b-h*l,c=c-h*k,k=g+this.arrow_radians_;k>2*Math.PI&&(k-=2*Math.PI);g=Math.sin(k)*f/Blockly.Bubble.ARROW_BEND;f=Math.cos(k)*f/Blockly.Bubble.ARROW_BEND;a.push("M"+n+","+m);a.push("C"+(n+f)+","+(m+g)+" "+d+","+e+" "+d+","+e);a.push("C"+d+","+e+" "+(b+f)+","+(c+g)+" "+b+","+c)}a.push("z");this.bubbleArrow_.setAttribute("d",a.join(" "))};Blockly.Bubble.prototype.setColour=function(a){this.bubbleBack_.setAttribute("fill",a);this.bubbleArrow_.setAttribute("fill",a)}; +Blockly.Bubble.prototype.renderArrow_=function(){var a=[],b=this.width_/2,c=this.height_/2,d=-this.relativeLeft_,e=-this.relativeTop_;if(b==d&&c==e)a.push("M "+b+","+c);else{e-=c;d-=b;this.workspace_.RTL&&(d*=-1);var f=Math.sqrt(e*e+d*d),g=Math.acos(d/f);0>e&&(g=2*Math.PI-g);var h=g+Math.PI/2;h>2*Math.PI&&(h-=2*Math.PI);var k=Math.sin(h),l=Math.cos(h),p=this.getBubbleSize(),h=(p.width+p.height)/Blockly.Bubble.ARROW_THICKNESS,h=Math.min(h,p.width,p.height)/2,p=1-Blockly.Bubble.ANCHOR_RADIUS/f,d=b+ +p*d,e=c+p*e,p=b+h*l,m=c+h*k,b=b-h*l,c=c-h*k,k=g+this.arrow_radians_;k>2*Math.PI&&(k-=2*Math.PI);g=Math.sin(k)*f/Blockly.Bubble.ARROW_BEND;f=Math.cos(k)*f/Blockly.Bubble.ARROW_BEND;a.push("M"+p+","+m);a.push("C"+(p+f)+","+(m+g)+" "+d+","+e+" "+d+","+e);a.push("C"+d+","+e+" "+(b+f)+","+(c+g)+" "+b+","+c)}a.push("z");this.bubbleArrow_.setAttribute("d",a.join(" "))};Blockly.Bubble.prototype.setColour=function(a){this.bubbleBack_.setAttribute("fill",a);this.bubbleArrow_.setAttribute("fill",a)}; Blockly.Bubble.prototype.dispose=function(){Blockly.Bubble.unbindDragEvents_();goog.dom.removeNode(this.bubbleGroup_);this.shape_=this.content_=this.workspace_=this.bubbleGroup_=null};Blockly.Icon=function(a){this.block_=a};Blockly.Icon.prototype.collapseHidden=!0;Blockly.Icon.prototype.SIZE=17;Blockly.Icon.prototype.png_="";Blockly.Icon.prototype.bubble_=null;Blockly.Icon.prototype.iconX_=0;Blockly.Icon.prototype.iconY_=0; Blockly.Icon.prototype.createIcon=function(){this.iconGroup_||(this.iconGroup_=Blockly.createSvgElement("g",{"class":"blocklyIconGroup"},null),Blockly.createSvgElement("image",{width:this.SIZE,height:this.SIZE},this.iconGroup_).setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.png_),this.block_.getSvgRoot().appendChild(this.iconGroup_),Blockly.bindEvent_(this.iconGroup_,"mouseup",this,this.iconClick_),this.updateEditable())}; Blockly.Icon.prototype.dispose=function(){goog.dom.removeNode(this.iconGroup_);this.iconGroup_=null;this.setVisible(!1);this.block_=null};Blockly.Icon.prototype.updateEditable=function(){this.block_.isInFlyout||!this.block_.isEditable()?Blockly.addClass_(this.iconGroup_,"blocklyIconGroupReadonly"):Blockly.removeClass_(this.iconGroup_,"blocklyIconGroupReadonly")};Blockly.Icon.prototype.isVisible=function(){return!!this.bubble_}; -Blockly.Icon.prototype.iconClick_=function(a){this.block_.isInFlyout||Blockly.isRightButton(a)||this.setVisible(!this.isVisible())};Blockly.Icon.prototype.updateColour=function(){if(this.isVisible()){var a=Blockly.makeColour(this.block_.getColour());this.bubble_.setColour(a)}}; -Blockly.Icon.prototype.renderIcon=function(a){if(this.collapseHidden&&this.block_.isCollapsed())return this.iconGroup_.setAttribute("display","none"),a;this.iconGroup_.setAttribute("display","block");var b=this.SIZE;this.block_.RTL&&(a-=b);this.iconGroup_.setAttribute("transform","translate("+a+", 5)");this.computeIconLocation();return a=this.block_.RTL?a-Blockly.BlockSvg.SEP_SPACE_X:a+(b+Blockly.BlockSvg.SEP_SPACE_X)}; +Blockly.Icon.prototype.iconClick_=function(a){2!=Blockly.dragMode_&&(this.block_.isInFlyout||Blockly.isRightButton(a)||this.setVisible(!this.isVisible()))};Blockly.Icon.prototype.updateColour=function(){if(this.isVisible()){var a=Blockly.makeColour(this.block_.getColour());this.bubble_.setColour(a)}}; +Blockly.Icon.prototype.renderIcon=function(a){if(this.collapseHidden&&this.block_.isCollapsed())return this.iconGroup_.setAttribute("display","none"),a;this.iconGroup_.setAttribute("display","block");var b=this.SIZE;this.block_.RTL&&(a-=b);this.iconGroup_.setAttribute("transform","translate("+a+",5)");this.computeIconLocation();return a=this.block_.RTL?a-Blockly.BlockSvg.SEP_SPACE_X:a+(b+Blockly.BlockSvg.SEP_SPACE_X)}; Blockly.Icon.prototype.setIconLocation=function(a,b){this.iconX_=a;this.iconY_=b;this.isVisible()&&this.bubble_.setAnchorLocation(a,b)};Blockly.Icon.prototype.computeIconLocation=function(){var a=this.block_.getRelativeToSurfaceXY(),b=Blockly.getRelativeXY_(this.iconGroup_),c=a.x+b.x+this.SIZE/2,a=a.y+b.y+this.SIZE/2;c===this.iconX_&&a===this.iconY_||this.setIconLocation(c,a)};Blockly.Icon.prototype.getIconLocation=function(){return{x:this.iconX_,y:this.iconY_}}; // Copyright 2011 Google Inc. Apache License 2.0 Blockly.Comment=function(a){Blockly.Comment.superClass_.constructor.call(this,a);this.createIcon()};goog.inherits(Blockly.Comment,Blockly.Icon);Blockly.Comment.prototype.png_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAANyAAADcgBffIlqAAAAAd0SU1FB98DGgAnBf0Xj5sAAAIBSURBVDjLjZO9SxxRFMXPrFkWl2UFYSOIRtF210YtAiH/gGATRNZFgo19IBaB9Ipgk3SiEoKQgI19JIVgGaOIgpWJEAV1kZk3b1ad0V+KRYIzk5ALh1ecc88978tRSgHPg0Bjvq/BbFalMNR5oaBv+bzWHMfZjOudWPOg6+pDva6elRXlt7fVcnYmPX4sDQ3pdmpKQXu7frS16aXjON8T06OIMWOwtRp3jgNSEpkMTE5y5/v4UcSLePxnroutVNKb4xgYANfFAk/vDbLG8Gtk5P8M7jE6CsZwDDwSMLm5iYmLlpbg4ABOTmBjA4aHk0ZbWxigposLvlarScH5OSwvw9oaABwdJTW1GtTrfJHnUe/uTgqKxeZaKEAUgTEQP/CeHvA8LhRFhLlc+r6zWVhfbyaZn0/yuRxEEaGCAK9USjdZWGgarK5CS0uS7+gAa3EzjYaOy2WlludJi4vSzIx0e5vky2Xp6ko/M4WCPleruk4zsVa6vJSur9OHTEzoqljUJwEdQYDf25uMe3jY3E5fX5Lr7wdr8YGSJCkIeL23h9/a+lA4Pg7T039u6h75POzv4wcBrx5Ec11Wd3bwOzv//VK7umB3F991+Zj2/R1reWstdnaWm3L5YXOlAnNz3FiLbTR4Azj6WwFPjOG953EahoT1On4YEnoep8bwDuiO9/wG1sM4kG8A4fUAAAAASUVORK5CYII="; Blockly.Comment.prototype.text_="";Blockly.Comment.prototype.width_=160;Blockly.Comment.prototype.height_=80; Blockly.Comment.prototype.createEditor_=function(){this.foreignObject_=Blockly.createSvgElement("foreignObject",{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null);var a=document.createElementNS(Blockly.HTML_NS,"body");a.setAttribute("xmlns",Blockly.HTML_NS);a.className="blocklyMinimalBody";this.textarea_=document.createElementNS(Blockly.HTML_NS,"textarea");this.textarea_.className="blocklyCommentTextarea";this.textarea_.setAttribute("dir",this.block_.RTL?"RTL":"LTR");a.appendChild(this.textarea_); -this.foreignObject_.appendChild(a);Blockly.bindEvent_(this.textarea_,"mouseup",this,this.textareaFocus_);return this.foreignObject_};Blockly.Comment.prototype.updateEditable=function(){this.isVisible()&&(this.setVisible(!1),this.setVisible(!0));Blockly.Icon.prototype.updateEditable.call(this)}; +this.foreignObject_.appendChild(a);Blockly.bindEvent_(this.textarea_,"mouseup",this,this.textareaFocus_);Blockly.bindEvent_(this.textarea_,"wheel",this,function(a){a.stopPropagation()});return this.foreignObject_};Blockly.Comment.prototype.updateEditable=function(){this.isVisible()&&(this.setVisible(!1),this.setVisible(!0));Blockly.Icon.prototype.updateEditable.call(this)}; Blockly.Comment.prototype.resizeBubble_=function(){var a=this.bubble_.getBubbleSize(),b=2*Blockly.Bubble.BORDER_WIDTH;this.foreignObject_.setAttribute("width",a.width-b);this.foreignObject_.setAttribute("height",a.height-b);this.textarea_.style.width=a.width-b-4+"px";this.textarea_.style.height=a.height-b-4+"px"}; Blockly.Comment.prototype.setVisible=function(a){if(a!=this.isVisible())if(!this.block_.isEditable()&&!this.textarea_||goog.userAgent.IE)Blockly.Warning.prototype.setVisible.call(this,a);else{var b=this.getText(),c=this.getBubbleSize();a?(this.bubble_=new Blockly.Bubble(this.block_.workspace,this.createEditor_(),this.block_.svgPath_,this.iconX_,this.iconY_,this.width_,this.height_),this.bubble_.registerResizeEvent(this,this.resizeBubble_),this.updateColour(),this.text_=null):(this.bubble_.dispose(), this.foreignObject_=this.textarea_=this.bubble_=null);this.setText(b);this.setBubbleSize(c.width,c.height)}};Blockly.Comment.prototype.textareaFocus_=function(a){this.bubble_.promote_();this.textarea_.focus()};Blockly.Comment.prototype.getBubbleSize=function(){return this.isVisible()?this.bubble_.getBubbleSize():{width:this.width_,height:this.height_}};Blockly.Comment.prototype.setBubbleSize=function(a,b){this.textarea_?this.bubble_.setBubbleSize(a,b):(this.width_=a,this.height_=b)}; @@ -1041,10 +1041,10 @@ Blockly.Connection.prototype.targetBlock=function(){return this.targetConnection Blockly.Connection.prototype.bumpAwayFrom_=function(a){if(0==Blockly.dragMode_){var b=this.sourceBlock_.getRootBlock();if(!b.isInFlyout){var c=!1;if(!b.isMovable()){b=a.sourceBlock_.getRootBlock();if(!b.isMovable())return;a=this;c=!0}b.getSvgRoot().parentNode.appendChild(b.getSvgRoot());var d=a.x_+Blockly.SNAP_RADIUS-this.x_;a=a.y_+Blockly.SNAP_RADIUS-this.y_;c&&(a=-a);b.RTL&&(d=-d);b.moveBy(d,a)}}}; Blockly.Connection.prototype.moveTo=function(a,b){this.inDB_&&this.dbList_[this.type].removeConnection_(this);this.x_=a;this.y_=b;this.hidden_||this.dbList_[this.type].addConnection_(this)};Blockly.Connection.prototype.moveBy=function(a,b){this.moveTo(this.x_+a,this.y_+b)}; Blockly.Connection.prototype.highlight=function(){var a;this.type==Blockly.INPUT_VALUE||this.type==Blockly.OUTPUT_VALUE?(a=this.sourceBlock_.RTL?-Blockly.BlockSvg.TAB_WIDTH:Blockly.BlockSvg.TAB_WIDTH,a="m 0,0 v 5 c 0,10 "+-a+",-8 "+-a+",7.5 s "+a+",-2.5 "+a+",7.5 v 5"):a=this.sourceBlock_.RTL?"m 20,0 h -5 "+Blockly.BlockSvg.NOTCH_PATH_RIGHT+" h -5":"m -20,0 h 5 "+Blockly.BlockSvg.NOTCH_PATH_LEFT+" h 5";var b=this.sourceBlock_.getRelativeToSurfaceXY();Blockly.Connection.highlightedPath_=Blockly.createSvgElement("path", -{"class":"blocklyHighlightedConnectionPath",d:a,transform:"translate("+(this.x_-b.x)+", "+(this.y_-b.y)+")"},this.sourceBlock_.getSvgRoot())};Blockly.Connection.prototype.unhighlight=function(){goog.dom.removeNode(Blockly.Connection.highlightedPath_);delete Blockly.Connection.highlightedPath_}; -Blockly.Connection.prototype.tighten_=function(){var a=Math.round(this.targetConnection.x_-this.x_),b=Math.round(this.targetConnection.y_-this.y_);if(0!=a||0!=b){var c=this.targetBlock(),d=c.getSvgRoot();if(!d)throw"block is not rendered.";d=Blockly.getRelativeXY_(d);c.getSvgRoot().setAttribute("transform","translate("+(d.x-a)+", "+(d.y-b)+")");c.moveConnections_(-a,-b)}}; -Blockly.Connection.prototype.closest=function(a,b,c){function d(b){var c=e[b];if((c.type==Blockly.OUTPUT_VALUE||c.type==Blockly.PREVIOUS_STATEMENT)&&c.targetConnection||c.type==Blockly.INPUT_VALUE&&c.targetConnection&&!c.targetBlock().isMovable()||!n.checkType_(c))return!0;c=c.sourceBlock_;do{if(l==c)return!0;c=c.getParent()}while(c);var d=f-e[b].x_,c=g-e[b].y_,d=Math.sqrt(d*d+c*c);d<=a&&(k=e[b],a=d);return ca.y_)c=d;else{b=d;break}}this.splice(b,0,a);a.inDB_=!0}}; Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw"Connection not in database.";a.inDB_=!1;for(var b=0,c=this.length-2,d=c;bthis.maxDisplayLength&&(a=a.substring(0,this.maxDisplayLength-2)+"\u2026");goog.dom.removeChildren(this.textElement_);a=a.replace(/\s/g,Blockly.Field.NBSP);this.sourceBlock_.RTL&&a&&(a+="\u200f");a||(a=Blockly.Field.NBSP);a=document.createTextNode(a);this.textElement_.appendChild(a);this.size_.width=0}};Blockly.Field.prototype.getValue=function(){return this.getText()}; Blockly.Field.prototype.setValue=function(a){this.setText(a)};Blockly.Field.prototype.getPrivate=function(){return this.privateData_};Blockly.Field.prototype.setPrivate=function(a){this.privateData_=a};Blockly.Field.prototype.onMouseUp_=function(a){if(!goog.userAgent.IPHONE&&!goog.userAgent.IPAD||goog.userAgent.isVersionOrHigher("537.51.2")||0===a.layerX||0===a.layerY)Blockly.isRightButton(a)||2!=Blockly.dragMode_&&this.sourceBlock_.isEditable()&&this.showEditor_()}; Blockly.Field.prototype.setTooltip=function(a){};Blockly.Field.prototype.getAbsoluteXY_=function(){return goog.style.getPageOffset(this.borderRect_)};Blockly.Tooltip={};Blockly.Tooltip.visible=!1;Blockly.Tooltip.LIMIT=50;Blockly.Tooltip.mouseOutPid_=0;Blockly.Tooltip.showPid_=0;Blockly.Tooltip.lastX_=0;Blockly.Tooltip.lastY_=0;Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.OFFSET_X=0;Blockly.Tooltip.OFFSET_Y=10;Blockly.Tooltip.RADIUS_OK=10;Blockly.Tooltip.HOVER_MS=1E3;Blockly.Tooltip.MARGINS=5;Blockly.Tooltip.DIV=null; Blockly.Tooltip.createDom=function(){Blockly.Tooltip.DIV||(Blockly.Tooltip.DIV=goog.dom.createDom("div","blocklyTooltipDiv"),document.body.appendChild(Blockly.Tooltip.DIV))};Blockly.Tooltip.bindMouseEvents=function(a){Blockly.bindEvent_(a,"mouseover",null,Blockly.Tooltip.onMouseOver_);Blockly.bindEvent_(a,"mouseout",null,Blockly.Tooltip.onMouseOut_);Blockly.bindEvent_(a,"mousemove",null,Blockly.Tooltip.onMouseMove_)}; Blockly.Tooltip.onMouseOver_=function(a){for(a=a.target;!goog.isString(a.tooltip)&&!goog.isFunction(a.tooltip);)a=a.tooltip;Blockly.Tooltip.element_!=a&&(Blockly.Tooltip.hide(),Blockly.Tooltip.poisonedElement_=null,Blockly.Tooltip.element_=a);clearTimeout(Blockly.Tooltip.mouseOutPid_)};Blockly.Tooltip.onMouseOut_=function(a){Blockly.Tooltip.mouseOutPid_=setTimeout(function(){Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.hide()},1);clearTimeout(Blockly.Tooltip.showPid_)}; -Blockly.Tooltip.onMouseMove_=function(a){if(Blockly.Tooltip.element_&&Blockly.Tooltip.element_.tooltip&&0==Blockly.dragMode_&&!Blockly.WidgetDiv.isVisible())if(Blockly.Tooltip.visible){var b=Blockly.Tooltip.lastY_-a.pageY;Math.sqrt(Math.pow(Blockly.Tooltip.lastX_-a.pageX,2)+Math.pow(b,2))>Blockly.Tooltip.RADIUS_OK&&Blockly.Tooltip.hide()}else Blockly.Tooltip.poisonedElement_!=Blockly.Tooltip.element_&&(clearTimeout(Blockly.Tooltip.showPid_),Blockly.Tooltip.lastX_=a.pageX,Blockly.Tooltip.lastY_=a.pageY, -Blockly.Tooltip.showPid_=setTimeout(Blockly.Tooltip.show_,Blockly.Tooltip.HOVER_MS))};Blockly.Tooltip.hide=function(){Blockly.Tooltip.visible&&(Blockly.Tooltip.visible=!1,Blockly.Tooltip.DIV&&(Blockly.Tooltip.DIV.style.display="none"));clearTimeout(Blockly.Tooltip.showPid_)}; +Blockly.Tooltip.onMouseMove_=function(a){if(Blockly.Tooltip.element_&&Blockly.Tooltip.element_.tooltip&&0==Blockly.dragMode_&&!Blockly.WidgetDiv.isVisible())if(Blockly.Tooltip.visible){var b=Blockly.Tooltip.lastX_-a.pageX;a=Blockly.Tooltip.lastY_-a.pageY;Math.sqrt(b*b+a*a)>Blockly.Tooltip.RADIUS_OK&&Blockly.Tooltip.hide()}else Blockly.Tooltip.poisonedElement_!=Blockly.Tooltip.element_&&(clearTimeout(Blockly.Tooltip.showPid_),Blockly.Tooltip.lastX_=a.pageX,Blockly.Tooltip.lastY_=a.pageY,Blockly.Tooltip.showPid_= +setTimeout(Blockly.Tooltip.show_,Blockly.Tooltip.HOVER_MS))};Blockly.Tooltip.hide=function(){Blockly.Tooltip.visible&&(Blockly.Tooltip.visible=!1,Blockly.Tooltip.DIV&&(Blockly.Tooltip.DIV.style.display="none"));clearTimeout(Blockly.Tooltip.showPid_)}; Blockly.Tooltip.show_=function(){Blockly.Tooltip.poisonedElement_=Blockly.Tooltip.element_;if(Blockly.Tooltip.DIV){goog.dom.removeChildren(Blockly.Tooltip.DIV);var a=Blockly.Tooltip.element_.tooltip;goog.isFunction(a)&&(a=a());for(var a=Blockly.Tooltip.wrap_(a,Blockly.Tooltip.LIMIT),a=a.split("\n"),b=0;bb.height+window.scrollY&&(d-=Blockly.Tooltip.DIV.offsetHeight+2*Blockly.Tooltip.OFFSET_Y);a?c=Math.max(Blockly.Tooltip.MARGINS-window.scrollX,c):c+Blockly.Tooltip.DIV.offsetWidth>b.width+window.scrollX-2*Blockly.Tooltip.MARGINS&& (c=b.width-Blockly.Tooltip.DIV.offsetWidth-2*Blockly.Tooltip.MARGINS);Blockly.Tooltip.DIV.style.top=d+"px";Blockly.Tooltip.DIV.style.left=c+"px"}}; @@ -1086,26 +1086,33 @@ Blockly.Scrollbar=function(a,b,c){this.workspace_=a;this.pair_=c||!1;this.horizo Blockly.bindEvent_(this.svgBackground_,"mousedown",this,this.onMouseDownBar_);this.onMouseDownKnobWrapper_=Blockly.bindEvent_(this.svgKnob_,"mousedown",this,this.onMouseDownKnob_)};Blockly.Scrollbar.scrollbarThickness=15;goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.Scrollbar.scrollbarThickness=25); Blockly.Scrollbar.prototype.dispose=function(){this.onMouseUpKnob_();this.onResizeWrapper_&&(Blockly.unbindEvent_(this.onResizeWrapper_),this.onResizeWrapper_=null);Blockly.unbindEvent_(this.onMouseDownBarWrapper_);this.onMouseDownBarWrapper_=null;Blockly.unbindEvent_(this.onMouseDownKnobWrapper_);this.onMouseDownKnobWrapper_=null;goog.dom.removeNode(this.svgGroup_);this.workspace_=this.svgKnob_=this.svgBackground_=this.svgGroup_=null}; Blockly.Scrollbar.prototype.resize=function(a){if(!a&&(a=this.workspace_.getMetrics(),!a))return;if(this.horizontal_){var b=a.viewWidth-1;this.pair_?b-=Blockly.Scrollbar.scrollbarThickness:this.setVisible(b=c+d&&(e+=f);this.svgKnob_.setAttribute(this.horizontal_?"x":"y",this.constrainKnob_(e)); +Blockly.Scrollbar.prototype.onMouseDownBar_=function(a){this.onMouseUpKnob_();if(!Blockly.isRightButton(a)){var b=Blockly.mouseToSvg(a,this.workspace_.options.svg),b=this.horizontal_?b.x:b.y,c=Blockly.getSvgXY_(this.svgKnob_,this.workspace_),c=this.horizontal_?c.x:c.y,d=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"width":"height")),e=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),f=.95*d;b<=c?e-=f:b>=c+d&&(e+=f);this.svgKnob_.setAttribute(this.horizontal_?"x":"y",this.constrainKnob_(e)); this.onScroll_()}a.stopPropagation()};Blockly.Scrollbar.prototype.onMouseDownKnob_=function(a){this.onMouseUpKnob_();Blockly.isRightButton(a)||(this.startDragKnob=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),this.startDragMouse=this.horizontal_?a.clientX:a.clientY,Blockly.Scrollbar.onMouseUpWrapper_=Blockly.bindEvent_(document,"mouseup",this,this.onMouseUpKnob_),Blockly.Scrollbar.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMoveKnob_));a.stopPropagation()}; Blockly.Scrollbar.prototype.onMouseMoveKnob_=function(a){this.svgKnob_.setAttribute(this.horizontal_?"x":"y",this.constrainKnob_(this.startDragKnob+((this.horizontal_?a.clientX:a.clientY)-this.startDragMouse)));this.onScroll_()}; Blockly.Scrollbar.prototype.onMouseUpKnob_=function(){Blockly.removeAllRanges();Blockly.hideChaff(!0);Blockly.Scrollbar.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_),Blockly.Scrollbar.onMouseUpWrapper_=null);Blockly.Scrollbar.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_),Blockly.Scrollbar.onMouseMoveWrapper_=null)}; Blockly.Scrollbar.prototype.constrainKnob_=function(a){if(0>=a||isNaN(a))a=0;else{var b=this.horizontal_?"width":"height",c=parseFloat(this.svgBackground_.getAttribute(b)),b=parseFloat(this.svgKnob_.getAttribute(b));a=Math.min(a,c-b)}return a}; Blockly.Scrollbar.prototype.onScroll_=function(){var a=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),b=parseFloat(this.svgBackground_.getAttribute(this.horizontal_?"width":"height")),a=a/b;isNaN(a)&&(a=0);b={};this.horizontal_?b.x=a:b.y=a;this.workspace_.setMetrics(b)};Blockly.Scrollbar.prototype.set=function(a){this.svgKnob_.setAttribute(this.horizontal_?"x":"y",a*this.ratio_);this.onScroll_()}; -Blockly.Scrollbar.insertAfter_=function(a,b){var c=b.nextSibling,d=b.parentNode;if(!d)throw"Reference node has no parent.";c?d.insertBefore(a,c):d.appendChild(a)};Blockly.Trashcan=function(a){this.workspace_=a};Blockly.Trashcan.prototype.SPRITE_URL_="media/sprites.png";Blockly.Trashcan.prototype.LID_URL_="media/trashlid.png";Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=45;Blockly.Trashcan.prototype.LID_HEIGHT_=15;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=35;Blockly.Trashcan.prototype.MARGIN_SIDE_=35;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=25;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.svgGroup_=null; -Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0;Blockly.Trashcan.prototype.left_=0;Blockly.Trashcan.prototype.top_=0; +Blockly.Scrollbar.insertAfter_=function(a,b){var c=b.nextSibling,d=b.parentNode;if(!d)throw"Reference node has no parent.";c?d.insertBefore(a,c):d.appendChild(a)};Blockly.Trashcan=function(a){this.workspace_=a};Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=45;Blockly.Trashcan.prototype.LID_HEIGHT_=15;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=35;Blockly.Trashcan.prototype.MARGIN_SIDE_=35;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=25;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.svgGroup_=null;Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0; +Blockly.Trashcan.prototype.left_=0;Blockly.Trashcan.prototype.top_=0; Blockly.Trashcan.prototype.createDom=function(){this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyTrash"},null);var a=String(Math.random()).substring(2),b=Blockly.createSvgElement("clipPath",{id:"blocklyTrashBodyClipPath"+a},this.svgGroup_);Blockly.createSvgElement("rect",{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},b);Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-32,"clip-path":"url(#blocklyTrashBodyClipPath"+a+")"},this.svgGroup_).setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);b=Blockly.createSvgElement("clipPath",{id:"blocklyTrashLidClipPath"+a},this.svgGroup_);Blockly.createSvgElement("rect",{width:this.WIDTH_,height:this.LID_HEIGHT_},b);this.svgLid_=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-32,"clip-path":"url(#blocklyTrashLidClipPath"+a+")"},this.svgGroup_);this.svgLid_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.workspace_.options.pathToMedia+ Blockly.SPRITE.url);this.animateLid_();return this.svgGroup_};Blockly.Trashcan.prototype.init=function(){this.setOpen_(!1)};Blockly.Trashcan.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=this.svgLid_=null;goog.Timer.clear(this.lidTask_)}; Blockly.Trashcan.prototype.position=function(){var a=this.workspace_.getMetrics();a&&(this.left_=this.workspace_.RTL?this.MARGIN_SIDE_:a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_,this.top_=a.viewHeight+a.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-this.MARGIN_BOTTOM_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}; -Blockly.Trashcan.prototype.getRect=function(){var a=Blockly.getSvgXY_(this.svgGroup_);return new goog.math.Rect(a.x-this.MARGIN_HOTSPOT_,a.y-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.BODY_HEIGHT_+this.LID_HEIGHT_+2*this.MARGIN_HOTSPOT_)};Blockly.Trashcan.prototype.setOpen_=function(a){this.isOpen!=a&&(goog.Timer.clear(this.lidTask_),this.isOpen=a,this.animateLid_())}; -Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2;this.lidOpen_=goog.math.clamp(this.lidOpen_,0,1);var a=45*this.lidOpen_;this.svgLid_.setAttribute("transform","rotate("+(this.workspace_.RTL?-a:a)+", "+(this.workspace_.RTL?4:this.WIDTH_-4)+", "+(this.LID_HEIGHT_-2)+")");a=goog.math.lerp(.4,.8,this.lidOpen_);this.svgGroup_.style.opacity=a;0this.lidOpen_&&(this.lidTask_=goog.Timer.callOnce(this.animateLid_,20,this))}; -Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)};Blockly.Xml={};Blockly.Xml.workspaceToDom=function(a){var b;a.RTL&&(b=a.getWidth());for(var c=goog.dom.createDom("xml"),d=a.getTopBlocks(!0),e=0,f;f=d[e];e++){var g=Blockly.Xml.blockToDom_(f);f=f.getRelativeToSurfaceXY();g.setAttribute("x",Math.round(a.RTL?b-f.x:f.x));g.setAttribute("y",Math.round(f.y));c.appendChild(g)}return c}; +Blockly.Trashcan.prototype.getRect=function(){var a=Blockly.getSvgXY_(this.svgGroup_,this.workspace_);return new goog.math.Rect(a.x-this.MARGIN_HOTSPOT_,a.y-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.BODY_HEIGHT_+this.LID_HEIGHT_+2*this.MARGIN_HOTSPOT_)};Blockly.Trashcan.prototype.setOpen_=function(a){this.isOpen!=a&&(goog.Timer.clear(this.lidTask_),this.isOpen=a,this.animateLid_())}; +Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2;this.lidOpen_=goog.math.clamp(this.lidOpen_,0,1);var a=45*this.lidOpen_;this.svgLid_.setAttribute("transform","rotate("+(this.workspace_.RTL?-a:a)+","+(this.workspace_.RTL?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")");a=goog.math.lerp(.4,.8,this.lidOpen_);this.svgGroup_.style.opacity=a;0this.lidOpen_&&(this.lidTask_=goog.Timer.callOnce(this.animateLid_,20,this))}; +Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)}; +// Copyright 2015 Google Inc. Apache License 2.0 +Blockly.ZoomControls=function(a){this.workspace_=a};Blockly.ZoomControls.prototype.WIDTH_=32;Blockly.ZoomControls.prototype.HEIGHT_=110;Blockly.ZoomControls.prototype.MARGIN_BOTTOM_=100;Blockly.ZoomControls.prototype.MARGIN_SIDE_=35;Blockly.ZoomControls.prototype.svgGroup_=null;Blockly.ZoomControls.prototype.left_=0;Blockly.ZoomControls.prototype.top_=0; +Blockly.ZoomControls.prototype.createDom=function(){var a=this.workspace_;this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyZoom"},null);var b=String(Math.random()).substring(2),c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomresetClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32},c);var d=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+b+")"},this.svgGroup_); +d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoominClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:43},c);var e=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-32,y:-49,"clip-path":"url(#blocklyZoominClipPath"+b+")"},this.svgGroup_);e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+ +Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomoutClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:77},c);b=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-64,y:-15,"clip-path":"url(#blocklyZoomoutClipPath"+b+")"},this.svgGroup_);b.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEvent_(d,"mousedown",a,a.zoomReset);Blockly.bindEvent_(e, +"mousedown",null,function(){a.zoomCenter(1)});Blockly.bindEvent_(b,"mousedown",null,function(){a.zoomCenter(-1)});return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(){};Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=null}; +Blockly.ZoomControls.prototype.position=function(){var a=this.workspace_.getMetrics();a&&(this.left_=this.workspace_.RTL?this.MARGIN_SIDE_:a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_,this.top_=a.viewHeight+a.absoluteTop-this.HEIGHT_-this.MARGIN_BOTTOM_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))};Blockly.Xml={};Blockly.Xml.workspaceToDom=function(a){var b;a.RTL&&(b=a.getWidth());for(var c=goog.dom.createDom("xml"),d=a.getTopBlocks(!0),e=0,f;f=d[e];e++){var g=Blockly.Xml.blockToDom_(f);f=f.getRelativeToSurfaceXY();g.setAttribute("x",Math.round(a.RTL?b-f.x:f.x));g.setAttribute("y",Math.round(f.y));c.appendChild(g)}return c}; Blockly.Xml.blockToDom_=function(a){var b=goog.dom.createDom("block");b.setAttribute("type",a.type);b.setAttribute("id",a.id);if(a.mutationToDom){var c=a.mutationToDom();c&&(c.hasChildNodes()||c.hasAttributes())&&b.appendChild(c)}for(var c=0,d;d=a.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)if(f.name&&f.SERIALIZABLE){var g=goog.dom.createDom("field",null,f.getValue());g.setAttribute("name",f.name);b.appendChild(g)}if(c=a.getCommentText())c=goog.dom.createDom("comment",null,c),"object"==typeof a.comment&& (c.setAttribute("pinned",a.comment.isVisible()),d=a.comment.getBubbleSize(),c.setAttribute("h",d.height),c.setAttribute("w",d.width)),b.appendChild(c);a.data&&(c=goog.dom.createDom("data",null,a.data),b.appendChild(c));for(c=0;d=a.inputList[c];c++){var h,e=!0;d.type!=Blockly.DUMMY_INPUT&&(f=d.connection.targetBlock(),d.type==Blockly.INPUT_VALUE?h=goog.dom.createDom("value"):d.type==Blockly.NEXT_STATEMENT&&(h=goog.dom.createDom("statement")),f&&(h.appendChild(Blockly.Xml.blockToDom_(f)),e=!1),h.setAttribute("name", d.name),e||b.appendChild(h))}a.inputsInlineDefault!=a.inputsInline&&b.setAttribute("inline",a.inputsInline);a.isCollapsed()&&b.setAttribute("collapsed",!0);a.disabled&&b.setAttribute("disabled",!0);a.isDeletable()||b.setAttribute("deletable",!1);a.isMovable()||b.setAttribute("movable",!1);a.isEditable()||b.setAttribute("editable",!1);if(a=a.getNextBlock())h=goog.dom.createDom("next",null,Blockly.Xml.blockToDom_(a)),b.appendChild(h);return b};Blockly.Xml.domToText=function(a){return(new XMLSerializer).serializeToString(a)}; @@ -1114,36 +1121,42 @@ Blockly.Xml.textToDom=function(a){a=(new DOMParser).parseFromString(a,"text/xml" Blockly.Xml.domToWorkspace=function(a,b){var c;a.RTL&&(c=a.getWidth());for(var d=b.childNodes.length,e=0;e=this.remainingCapacity())){Blockly.terminateDrag_();var b=Blockly.Xml.domToBlock(this,a),c=parseInt(a.getAttribute("x"),10);a=parseInt(a.getAttribute("y"),10);if(!isNaN(c)&&!isNaN(a)){this.RTL&&(c=-c);do{for(var d=!1,e=this.getAllBlocks(),f=0,g;g=e[f];f++)if(g=g.getRelativeToSurfaceXY(),1>=Math.abs(c-g.x)&&1>=Math.abs(a-g.y)){d=!0;break}if(!d)for(e=b.getConnections_(!1),f=0;g=e[f];f++)if(g.closest(Blockly.SNAP_RADIUS, c,a).connection){d=!0;break}d&&(c=this.RTL?c-Blockly.SNAP_RADIUS:c+Blockly.SNAP_RADIUS,a+=2*Blockly.SNAP_RADIUS)}while(d);b.moveBy(c,a)}b.select()}};Blockly.WorkspaceSvg.prototype.recordDeleteAreas=function(){this.deleteAreaTrash_=this.trashcan?this.trashcan.getRect():null;this.deleteAreaToolbox_=this.flyout_?this.flyout_.getRect():this.toolbox_?this.toolbox_.getRect():null}; -Blockly.WorkspaceSvg.prototype.isDeleteArea=function(a){a=Blockly.mouseToSvg(a,this.options.svg);a=new goog.math.Coordinate(a.x,a.y);if(this.deleteAreaTrash_){if(this.deleteAreaTrash_.contains(a))return this.trashcan.setOpen_(!0),Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0;this.trashcan.setOpen_(!1)}if(this.deleteAreaToolbox_&&this.deleteAreaToolbox_.contains(a))return Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0;Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED);return!1}; +Blockly.WorkspaceSvg.prototype.isDeleteArea=function(a){a=Blockly.mouseToSvg(a,Blockly.mainWorkspace.options.svg);a=new goog.math.Coordinate(a.x,a.y);if(this.deleteAreaTrash_){if(this.deleteAreaTrash_.contains(a))return this.trashcan.setOpen_(!0),Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0;this.trashcan.setOpen_(!1)}if(this.deleteAreaToolbox_&&this.deleteAreaToolbox_.contains(a))return Blockly.Css.setCursor(Blockly.Css.Cursor.DELETE),!0;Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED);return!1}; Blockly.WorkspaceSvg.prototype.onMouseDown_=function(a){Blockly.latestClick={x:a.clientX,y:a.clientY};this.markFocused();Blockly.isTargetInput_(a)||(Blockly.svgResize(this),Blockly.terminateDrag_(),Blockly.hideChaff(),a.target&&a.target.nodeName&&("svg"==a.target.nodeName.toLowerCase()||a.target==this.svgBackground_)&&Blockly.selected&&!this.options.readOnly&&Blockly.selected.unselect(),Blockly.isRightButton(a)?this.showContextMenu_(a):this.scrollbar&&(Blockly.removeAllRanges(),this.isScrolling=!0, this.startDragMouseX=a.clientX,this.startDragMouseY=a.clientY,this.startDragMetrics=this.getMetrics(),this.startScrollX=this.scrollX,this.startScrollY=this.scrollY,"mouseup"in Blockly.bindEvent_.TOUCH_MAP&&(Blockly.onTouchUpWrapper_=Blockly.bindEvent_(document,"mouseup",null,Blockly.onMouseUp_)),Blockly.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",null,Blockly.onMouseMove_)),a.stopPropagation())}; -Blockly.WorkspaceSvg.prototype.showContextMenu_=function(a){if(!this.options.readOnly){var b=[];if(this.options.collapse){for(var c=!1,d=!1,e=this.getTopBlocks(!1),f=0;fthis.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale:dd.y+e.height&&c.moveBy(0,20-e.height-d.y)}this.rootBlock_.workspace==this.workspace_&&(a=this.block_.rendered,this.block_.rendered=!1,this.block_.compose(this.rootBlock_),this.block_.rendered=a,this.block_.initSvg(),this.block_.rendered&&this.block_.render(),this.resizeBubble_(),this.block_.workspace.fireChangeEvent(), goog.Timer.callOnce(this.block_.bumpNeighbours_,Blockly.BUMP_DELAY,this.block_))};Blockly.Mutator.prototype.getFlyoutMetrics_=function(){return{viewHeight:this.workspaceHeight_,viewWidth:this.workspaceWidth_,absoluteTop:0,absoluteLeft:0}};Blockly.Mutator.prototype.dispose=function(){this.block_.mutator=null;Blockly.Icon.prototype.dispose.call(this)};Blockly.Warning=function(a){Blockly.Warning.superClass_.constructor.call(this,a);this.createIcon();this.text_={}};goog.inherits(Blockly.Warning,Blockly.Icon);Blockly.Warning.prototype.collapseHidden=!1;Blockly.Warning.prototype.png_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAANyAAADcgBffIlqAAAAAd0SU1FB98DGgApDBpIGrEAAAGfSURBVDjLnZM9S2NREIbfc2P8AF27BXshpIzK5g9ssUj8C2tnYyUoiBGSyk4sbCLs1vkRgoW1jYWFICwsMV2Se3JPboLe+FhcNCZcjXFgOMzHeec9M2ekDwTIAEUgo68IsOQczdNTIudoAksTg/g+5+UyDxKUyzz4PueTsvhZr+NmZkCC6Wmo1QiAX58FmLKWf4VCDPCiGxtgLf+B9FiQXo+9y0ucBIUCnJ3B+noMdHGBC0P2xrH4HoYEmUx8qVQCgMPD2F5ehjDEjTbZe2s4p5NKRenb2+Qid3dSpaK0tTp+j8VKq0VncXHQh2IxZrK/P/AtLECjQQf4McQEMNbq786O5qwdANfr8Xl/P/AFgbS7qzlr9Qcwr4EoYvPmBud5wxPJ5+HqCtbWhv3GwPU1Lor4/fKMeedo5vPDiRKsrsLWFuRyybFOhxbwTd0upWqVcDQpaTqjWq0SdruU5PvUkiol/ZNRzeXA96mp3aaRzSYnjdNsFtptGiYI2PY8HaVSmu33xWf3K5WS6ffVe3rSgXnzT+YlpSfY00djjJOkZ/wpr41bQMIsAAAAAElFTkSuQmCC"; Blockly.Warning.textToDom_=function(a){var b=Blockly.createSvgElement("text",{"class":"blocklyText blocklyBubbleText",y:Blockly.Bubble.BORDER_WIDTH},null);a=a.split("\n");for(var c=0;c=b.height&&(k-=g.height);c?g.width>=a.clientX&&(e+=g.width):a.clientX+g.width>=b.width&&(e-=g.width);Blockly.WidgetDiv.position(e,k,b,f,c);d.setAllowAutoFocus(!0);setTimeout(function(){h.focus()},1);Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()}; -Blockly.ContextMenu.hide=function(){Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu);Blockly.ContextMenu.currentBlock=null};Blockly.ContextMenu.callbackFactory=function(a,b){return function(){var c=Blockly.Xml.domToBlock(a.workspace,b),d=a.getRelativeToSurfaceXY();d.x=a.RTL?d.x-Blockly.SNAP_RADIUS:d.x+Blockly.SNAP_RADIUS;d.y+=2*Blockly.SNAP_RADIUS;c.moveBy(d.x,d.y);c.select()}};Blockly.BlockSvg=function(){this.svgGroup_=Blockly.createSvgElement("g",{},null);this.svgPathDark_=Blockly.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1, 1)"},this.svgGroup_);this.svgPath_=Blockly.createSvgElement("path",{"class":"blocklyPath"},this.svgGroup_);this.svgPathLight_=Blockly.createSvgElement("path",{"class":"blocklyPathLight"},this.svgGroup_);this.svgPath_.tooltip=this;Blockly.Tooltip.bindMouseEvents(this.svgPath_)};goog.inherits(Blockly.BlockSvg,Blockly.Block); -Blockly.BlockSvg.prototype.height=0;Blockly.BlockSvg.prototype.width=0;Blockly.BlockSvg.INLINE=-1; +Blockly.ContextMenu.hide=function(){Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu);Blockly.ContextMenu.currentBlock=null};Blockly.ContextMenu.callbackFactory=function(a,b){return function(){var c=Blockly.Xml.domToBlock(a.workspace,b),d=a.getRelativeToSurfaceXY();d.x=a.RTL?d.x-Blockly.SNAP_RADIUS:d.x+Blockly.SNAP_RADIUS;d.y+=2*Blockly.SNAP_RADIUS;c.moveBy(d.x,d.y);c.select()}};Blockly.BlockSvg=function(){this.svgGroup_=Blockly.createSvgElement("g",{},null);this.svgPathDark_=Blockly.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1,1)"},this.svgGroup_);this.svgPath_=Blockly.createSvgElement("path",{"class":"blocklyPath"},this.svgGroup_);this.svgPathLight_=Blockly.createSvgElement("path",{"class":"blocklyPathLight"},this.svgGroup_);this.svgPath_.tooltip=this;Blockly.Tooltip.bindMouseEvents(this.svgPath_)};goog.inherits(Blockly.BlockSvg,Blockly.Block); +Blockly.BlockSvg.prototype.height=0;Blockly.BlockSvg.prototype.width=0;Blockly.BlockSvg.prototype.dragStartXY_=null;Blockly.BlockSvg.INLINE=-1; Blockly.BlockSvg.prototype.initSvg=function(){goog.asserts.assert(this.workspace.rendered,"Workspace is headless.");for(var a=0,b;b=this.inputList[a];a++)b.init();this.mutator&&this.mutator.createIcon();this.updateColour();this.updateMovable();if(!this.workspace.options.readOnly&&!this.eventsInit_){Blockly.bindEvent_(this.getSvgRoot(),"mousedown",this,this.onMouseDown_);var c=this;Blockly.bindEvent_(this.getSvgRoot(),"touchstart",null,function(a){Blockly.longStart_(a,c)})}goog.isFunction(this.onchange)&& !this.eventsInit_&&(this.onchangeWrapper_=Blockly.bindEvent_(this.workspace.getCanvas(),"blocklyWorkspaceChange",this,this.onchange));this.eventsInit_=!0;this.getSvgRoot().parentNode||this.workspace.getCanvas().appendChild(this.getSvgRoot())};Blockly.BlockSvg.prototype.select=function(){Blockly.selected&&Blockly.selected.unselect();Blockly.selected=this;this.addSelect();Blockly.fireUiEvent(this.workspace.getCanvas(),"blocklySelectChange")}; Blockly.BlockSvg.prototype.unselect=function(){Blockly.selected=null;this.removeSelect();Blockly.fireUiEvent(this.workspace.getCanvas(),"blocklySelectChange")};Blockly.BlockSvg.prototype.mutator=null;Blockly.BlockSvg.prototype.comment=null;Blockly.BlockSvg.prototype.warning=null;Blockly.BlockSvg.prototype.getIcons=function(a){a=[];this.mutator&&a.push(this.mutator);this.comment&&a.push(this.comment);this.warning&&a.push(this.warning);return a};Blockly.BlockSvg.onMouseUpWrapper_=null; Blockly.BlockSvg.onMouseMoveWrapper_=null; -Blockly.BlockSvg.terminateDrag_=function(){Blockly.BlockSvg.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseUpWrapper_),Blockly.BlockSvg.onMouseUpWrapper_=null);Blockly.BlockSvg.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseMoveWrapper_),Blockly.BlockSvg.onMouseMoveWrapper_=null);var a=Blockly.selected;if(2==Blockly.dragMode_&&a){var b=a.getRelativeToSurfaceXY();a.moveConnections_(b.x-a.startDragX,b.y-a.startDragY);delete a.draggedBubbles_;a.setDragging_(!1); -a.render();a.workspace&&a.workspace.options.gridOptions&&a.workspace.options.gridOptions.snap&&goog.Timer.callOnce(a.snapToGrid_,Blockly.BUMP_DELAY/2,a);goog.Timer.callOnce(a.bumpNeighbours_,Blockly.BUMP_DELAY,a);Blockly.fireUiEvent(window,"resize");a.workspace.fireChangeEvent()}Blockly.dragMode_=0;Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)}; -Blockly.BlockSvg.prototype.setParent=function(a){var b=this.getSvgRoot();if(this.parentBlock_&&b){var c=this.getRelativeToSurfaceXY();this.workspace.getCanvas().appendChild(b);b.setAttribute("transform","translate("+c.x+", "+c.y+")")}Blockly.BlockSvg.superClass_.setParent.call(this,a);a&&(c=this.getRelativeToSurfaceXY(),a.getSvgRoot().appendChild(b),a=this.getRelativeToSurfaceXY(),this.moveConnections_(a.x-c.x,a.y-c.y))}; -Blockly.BlockSvg.prototype.getRelativeToSurfaceXY=function(){var a=0,b=0,c=this.getSvgRoot();if(c){do var d=Blockly.getRelativeXY_(c),a=a+d.x,b=b+d.y,c=c.parentNode;while(c&&c!=this.workspace.getCanvas())}return new goog.math.Coordinate(a,b)};Blockly.BlockSvg.prototype.moveBy=function(a,b){var c=this.getRelativeToSurfaceXY();this.getSvgRoot().setAttribute("transform","translate("+(c.x+a)+", "+(c.y+b)+")");this.moveConnections_(a,b);Blockly.Realtime.blockChanged(this)}; +Blockly.BlockSvg.terminateDrag_=function(){Blockly.BlockSvg.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseUpWrapper_),Blockly.BlockSvg.onMouseUpWrapper_=null);Blockly.BlockSvg.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.BlockSvg.onMouseMoveWrapper_),Blockly.BlockSvg.onMouseMoveWrapper_=null);var a=Blockly.selected;if(2==Blockly.dragMode_&&a){var b=a.getRelativeToSurfaceXY(),b=goog.math.Coordinate.difference(b,a.dragStartXY_);a.moveConnections_(b.x,b.y);delete a.draggedBubbles_; +a.setDragging_(!1);a.render();a.workspace&&a.workspace.options.gridOptions&&a.workspace.options.gridOptions.snap&&goog.Timer.callOnce(a.snapToGrid_,Blockly.BUMP_DELAY/2,a);goog.Timer.callOnce(a.bumpNeighbours_,Blockly.BUMP_DELAY,a);Blockly.fireUiEvent(window,"resize");a.workspace.fireChangeEvent()}Blockly.dragMode_=0;Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)}; +Blockly.BlockSvg.prototype.setParent=function(a){var b=this.getSvgRoot();if(this.parentBlock_&&b){var c=this.getRelativeToSurfaceXY();this.workspace.getCanvas().appendChild(b);b.setAttribute("transform","translate("+c.x+","+c.y+")")}Blockly.BlockSvg.superClass_.setParent.call(this,a);a&&(c=this.getRelativeToSurfaceXY(),a.getSvgRoot().appendChild(b),a=this.getRelativeToSurfaceXY(),this.moveConnections_(a.x-c.x,a.y-c.y))}; +Blockly.BlockSvg.prototype.getRelativeToSurfaceXY=function(){var a=0,b=0,c=this.getSvgRoot();if(c){do var d=Blockly.getRelativeXY_(c),a=a+d.x,b=b+d.y,c=c.parentNode;while(c&&c!=this.workspace.getCanvas())}return new goog.math.Coordinate(a,b)};Blockly.BlockSvg.prototype.moveBy=function(a,b){var c=this.getRelativeToSurfaceXY();this.getSvgRoot().setAttribute("transform","translate("+(c.x+a)+","+(c.y+b)+")");this.moveConnections_(a,b);Blockly.Realtime.blockChanged(this)}; Blockly.BlockSvg.prototype.snapToGrid_=function(){if(this.workspace&&0==Blockly.dragMode_&&!this.getParent()&&!this.isInFlyout){var a=this.workspace.options.gridOptions.spacing,b=a/2,c=this.getRelativeToSurfaceXY(),d=Math.round((c.x-b)/a)*a+b-c.x,a=Math.round((c.y-b)/a)*a+b-c.y,d=Math.round(d),a=Math.round(a);0==d&&0==a||this.moveBy(d,a)}}; Blockly.BlockSvg.prototype.getHeightWidth=function(){var a=this.height,b=this.width,c=this.getNextBlock();c?(c=c.getHeightWidth(),a+=c.height-4,b=Math.max(b,c.width)):this.nextConnection||this.outputConnection||(a+=2);return{height:a,width:b}}; Blockly.BlockSvg.prototype.setCollapsed=function(a){if(this.collapsed_!=a){for(var b=[],c=0,d;d=this.inputList[c];c++)b.push.apply(b,d.setVisible(!a));if(a){d=this.getIcons(!0);for(c=0;cthis.workspace.remainingCapacity()&&(d.enabled=!1);c.push(d);this.isEditable()&&!this.collapsed_&&this.workspace.options.comments&&(d={enabled:!0},this.comment?(d.text=Blockly.Msg.REMOVE_COMMENT,d.callback= @@ -1237,9 +1250,9 @@ function(){b.setCommentText(null)}):(d.text=Blockly.Msg.ADD_COMMENT,d.callback=f {enabled:!0},d.text=Blockly.Msg.EXPAND_BLOCK,d.callback=function(){b.setCollapsed(!1)}):(d={enabled:!0},d.text=Blockly.Msg.COLLAPSE_BLOCK,d.callback=function(){b.setCollapsed(!0)}),c.push(d));this.workspace.options.disable&&(d={text:this.disabled?Blockly.Msg.ENABLE_BLOCK:Blockly.Msg.DISABLE_BLOCK,enabled:!this.getInheritedDisabled(),callback:function(){b.setDisabled(!b.disabled)}},c.push(d));var d=this.getDescendants().length,f=this.getNextBlock();f&&(d-=f.getDescendants().length);d={text:1==d?Blockly.Msg.DELETE_BLOCK: Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(d)),enabled:!0,callback:function(){b.dispose(!0,!0)}};c.push(d)}d={enabled:!(goog.isFunction(this.helpUrl)?!this.helpUrl():!this.helpUrl)};d.text=Blockly.Msg.HELP;d.callback=function(){b.showHelp_()};c.push(d);this.customContextMenu&&!b.isInFlyout&&this.customContextMenu(c);Blockly.ContextMenu.show(a,c,this.RTL);Blockly.ContextMenu.currentBlock=this}}; Blockly.BlockSvg.prototype.moveConnections_=function(a,b){if(this.rendered){for(var c=this.getConnections_(!1),d=0;d=a.clientX&&0==a.clientY&&0==a.button)){Blockly.removeAllRanges();var c=a.clientX-b.startDragMouseX,d=a.clientY-b.startDragMouseY;1==Blockly.dragMode_&&Math.sqrt(Math.pow(c,2)+Math.pow(d,2))>Blockly.DRAG_RADIUS&&(Blockly.dragMode_=2,Blockly.longStop_(),b.setParent(null),b.setDragging_(!0),b.workspace.recordDeleteAreas());if(2==Blockly.dragMode_){var e=b.startDragX+c,f=b.startDragY+ -d;b.getSvgRoot().setAttribute("transform","translate("+e+", "+f+")");for(e=0;e=a.clientX&&0==a.clientY&&0==a.button)){Blockly.removeAllRanges();var d=b.getRelativeToSurfaceXY(),e=c.moveDrag(a);1==Blockly.dragMode_&&goog.math.Coordinate.distance(d,e)*c.scale>Blockly.DRAG_RADIUS&&(Blockly.dragMode_=2,Blockly.longStop_(),b.setParent(null),b.setDragging_(!0),c.recordDeleteAreas());if(2==Blockly.dragMode_){var f=d.x-b.dragStartXY_.x,d=d.y-b.dragStartXY_.y; +b.getSvgRoot().setAttribute("transform","translate("+e.x+","+e.y+")");for(e=0;ec;c+=15)Blockly.createSvgElement("line",{x1:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS,y1:Blockly.FieldAngle.HALF,x2:Blockly.FieldAngle.HALF+Blockly.FieldAngle.RADIUS- -(0==c%45?10:5),y2:Blockly.FieldAngle.HALF,"class":"blocklyAngleMarks",transform:"rotate("+c+", "+Blockly.FieldAngle.HALF+", "+Blockly.FieldAngle.HALF+")"},a);a.style.marginLeft=15-Blockly.FieldAngle.RADIUS+"px";this.clickWrapper_=Blockly.bindEvent_(a,"click",this,Blockly.WidgetDiv.hide);this.moveWrapper1_=Blockly.bindEvent_(b,"mousemove",this,this.onMouseMove);this.moveWrapper2_=Blockly.bindEvent_(this.gauge_,"mousemove",this,this.onMouseMove);this.updateGraph_()}}; +(0==c%45?10:5),y2:Blockly.FieldAngle.HALF,"class":"blocklyAngleMarks",transform:"rotate("+c+","+Blockly.FieldAngle.HALF+","+Blockly.FieldAngle.HALF+")"},a);a.style.marginLeft=15-Blockly.FieldAngle.RADIUS+"px";this.clickWrapper_=Blockly.bindEvent_(a,"click",this,Blockly.WidgetDiv.hide);this.moveWrapper1_=Blockly.bindEvent_(b,"mousemove",this,this.onMouseMove);this.moveWrapper2_=Blockly.bindEvent_(this.gauge_,"mousemove",this,this.onMouseMove);this.updateGraph_()}}; Blockly.FieldAngle.prototype.onMouseMove=function(a){var b=this.gauge_.ownerSVGElement.getBoundingClientRect(),c=a.clientX-b.left-Blockly.FieldAngle.HALF;a=a.clientY-b.top-Blockly.FieldAngle.HALF;b=Math.atan(-a/c);isNaN(b)||(b=goog.math.toDegrees(b),0>c?b+=180:0Math.PI?1:0)+" 0 "+b+","+c+" z");this.line_.setAttribute("x2",b);this.line_.setAttribute("y2",c)}}};Blockly.FieldAngle.angleValidator=function(a){a=Blockly.FieldTextInput.numberValidator(a);null!==a&&(a%=360,0>a&&(a+=360),a=String(a));return a};Blockly.FieldCheckbox=function(a,b){Blockly.FieldCheckbox.superClass_.constructor.call(this,"");this.setChangeHandler(b);this.setValue(a)};goog.inherits(Blockly.FieldCheckbox,Blockly.Field);Blockly.FieldCheckbox.prototype.CURSOR="default"; +Blockly.FieldAngle.prototype.updateGraph_=function(){if(this.gauge_){var a=goog.math.toRadians(Number(this.getText()));if(isNaN(a))this.gauge_.setAttribute("d","M "+Blockly.FieldAngle.HALF+","+Blockly.FieldAngle.HALF),this.line_.setAttribute("x2",Blockly.FieldAngle.HALF),this.line_.setAttribute("y2",Blockly.FieldAngle.HALF);else{var b=Blockly.FieldAngle.HALF+Math.cos(a)*Blockly.FieldAngle.RADIUS,c=Blockly.FieldAngle.HALF+Math.sin(a)*-Blockly.FieldAngle.RADIUS;this.gauge_.setAttribute("d","M "+Blockly.FieldAngle.HALF+ +","+Blockly.FieldAngle.HALF+" h "+Blockly.FieldAngle.RADIUS+" A "+Blockly.FieldAngle.RADIUS+","+Blockly.FieldAngle.RADIUS+" 0 "+(a>Math.PI?1:0)+" 0 "+b+","+c+" z");this.line_.setAttribute("x2",b);this.line_.setAttribute("y2",c)}}};Blockly.FieldAngle.angleValidator=function(a){a=Blockly.FieldTextInput.numberValidator(a);null!==a&&(a%=360,0>a&&(a+=360),a=String(a));return a};Blockly.FieldCheckbox=function(a,b){Blockly.FieldCheckbox.superClass_.constructor.call(this,"");this.setChangeHandler(b);this.setValue(a)};goog.inherits(Blockly.FieldCheckbox,Blockly.Field);Blockly.FieldCheckbox.prototype.CURSOR="default"; Blockly.FieldCheckbox.prototype.init=function(a){this.sourceBlock_||(Blockly.FieldCheckbox.superClass_.init.call(this,a),this.checkElement_=Blockly.createSvgElement("text",{"class":"blocklyText",x:-3},this.fieldGroup_),a=document.createTextNode("\u2713"),this.checkElement_.appendChild(a),this.checkElement_.style.display=this.state_?"block":"none")};Blockly.FieldCheckbox.prototype.getValue=function(){return String(this.state_).toUpperCase()}; Blockly.FieldCheckbox.prototype.setValue=function(a){a="TRUE"==a;this.state_!==a&&(this.state_=a,this.checkElement_&&(this.checkElement_.style.display=a?"block":"none"),this.sourceBlock_&&this.sourceBlock_.rendered&&this.sourceBlock_.workspace.fireChangeEvent())};Blockly.FieldCheckbox.prototype.showEditor_=function(){var a=!this.state_;if(this.sourceBlock_&&this.changeHandler_){var b=this.changeHandler_(a);void 0!==b&&(a=b)}null!==a&&this.setValue(String(a).toUpperCase())};Blockly.FieldColour=function(a,b){Blockly.FieldColour.superClass_.constructor.call(this,"\u00a0\u00a0\u00a0");this.setChangeHandler(b);this.setValue(a);this.colours_=null;this.columns_=0};goog.inherits(Blockly.FieldColour,Blockly.Field);Blockly.FieldColour.prototype.init=function(a){Blockly.FieldColour.superClass_.init.call(this,a);this.borderRect_.style.fillOpacity=1;this.setValue(this.getValue())};Blockly.FieldColour.prototype.CURSOR="default"; Blockly.FieldColour.prototype.dispose=function(){Blockly.WidgetDiv.hideIfOwner(this);Blockly.FieldColour.superClass_.dispose.call(this)};Blockly.FieldColour.prototype.getValue=function(){return this.colour_};Blockly.FieldColour.prototype.setValue=function(a){this.colour_=a;this.borderRect_&&(this.borderRect_.style.fill=a);this.sourceBlock_&&this.sourceBlock_.rendered&&(Blockly.Realtime.blockChanged(this.sourceBlock_),this.sourceBlock_.workspace.fireChangeEvent())}; Blockly.FieldColour.prototype.getText=function(){var a=this.colour_,b=a.match(/^#(.)\1(.)\2(.)\3$/);b&&(a="#"+b[1]+b[2]+b[3]);return a};Blockly.FieldColour.COLOURS=goog.ui.ColorPicker.SIMPLE_GRID_COLORS;Blockly.FieldColour.COLUMNS=7;Blockly.FieldColour.prototype.setColours=function(a){this.colours_=a;return this};Blockly.FieldColour.prototype.setColumns=function(a){this.columns_=a;return this}; -Blockly.FieldColour.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,Blockly.FieldColour.widgetDispose_);var a=new goog.ui.ColorPicker;a.setSize(this.columns_||Blockly.FieldColour.COLUMNS);a.setColors(this.colours_||Blockly.FieldColour.COLOURS);var b=goog.dom.getViewportSize(),c=goog.style.getViewportPageOffset(document),d=this.getAbsoluteXY_(),e=this.borderRect_.getBBox();a.render(Blockly.WidgetDiv.DIV);a.setSelectedColor(this.getValue());var f=goog.style.getSize(a.getElement()); +Blockly.FieldColour.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,Blockly.FieldColour.widgetDispose_);var a=new goog.ui.ColorPicker;a.setSize(this.columns_||Blockly.FieldColour.COLUMNS);a.setColors(this.colours_||Blockly.FieldColour.COLOURS);var b=goog.dom.getViewportSize(),c=goog.style.getViewportPageOffset(document),d=this.getAbsoluteXY_(),e=this.getScaledBBox_();a.render(Blockly.WidgetDiv.DIV);a.setSelectedColor(this.getValue());var f=goog.style.getSize(a.getElement()); d.y=d.y+f.height+e.height>=b.height+c.y?d.y-(f.height-1):d.y+(e.height-1);this.sourceBlock_.RTL?(d.x+=e.width,d.x-=f.width,d.xb.width+c.x-f.width&&(d.x=b.width+c.x-f.width);Blockly.WidgetDiv.position(d.x,d.y,b,c,this.sourceBlock_.RTL);var g=this;Blockly.FieldColour.changeEventKey_=goog.events.listen(a,goog.ui.ColorPicker.EventType.CHANGE,function(a){a=a.target.getSelectedColor()||"#000000";Blockly.WidgetDiv.hide();if(g.sourceBlock_&&g.changeHandler_){var b=g.changeHandler_(a); void 0!==b&&(a=b)}null!==a&&g.setValue(a)})};Blockly.FieldColour.widgetDispose_=function(){Blockly.FieldColour.changeEventKey_&&goog.events.unlistenByKey(Blockly.FieldColour.changeEventKey_)};Blockly.FieldDropdown=function(a,b){this.menuGenerator_=a;this.setChangeHandler(b);this.trimOptions_();var c=this.getOptions_()[0];this.value_=c[1];Blockly.FieldDropdown.superClass_.constructor.call(this,c[0])};goog.inherits(Blockly.FieldDropdown,Blockly.Field);Blockly.FieldDropdown.CHECKMARK_OVERHANG=25;Blockly.FieldDropdown.ARROW_CHAR=goog.userAgent.ANDROID?"\u25bc":"\u25be";Blockly.FieldDropdown.prototype.CURSOR="default"; Blockly.FieldDropdown.prototype.init=function(a){this.sourceBlock_||(this.arrow_=Blockly.createSvgElement("tspan",{},null),this.arrow_.appendChild(document.createTextNode(a.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR)),Blockly.FieldDropdown.superClass_.init.call(this,a),a=this.text_,this.text_=null,this.setText(a))}; -Blockly.FieldDropdown.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,null);for(var a=this,b=new goog.ui.Menu,c=this.getOptions_(),d=0;d=c.height+d.y?e.y-h.height:e.y+f.height;this.sourceBlock_.RTL?(e.x+=f.width,e.x+=Blockly.FieldDropdown.CHECKMARK_OVERHANG,e.xc.width+d.x-h.width&&(e.x=c.width+d.x-h.width));Blockly.WidgetDiv.position(e.x,e.y,c,d,this.sourceBlock_.RTL);b.setAllowAutoFocus(!0);g.focus()}; -Blockly.FieldDropdown.prototype.trimOptions_=function(){this.suffixField=this.prefixField=null;var a=this.menuGenerator_;if(goog.isArray(a)&&!(2>a.length)){var b=a.map(function(a){return a[0]}),c=Blockly.shortestStringLength(b),d=Blockly.commonWordPrefix(b,c),e=Blockly.commonWordSuffix(b,c);if((d||e)&&!(c<=d+e)){d&&(this.prefixField=b[0].substring(0,d-1));e&&(this.suffixField=b[0].substr(1-e));b=[];for(c=0;c=c.height+d.y?e.y-h.height:e.y+f.height;this.sourceBlock_.RTL?(e.x+=f.width,e.x+=Blockly.FieldDropdown.CHECKMARK_OVERHANG,e.xc.width+d.x-h.width&&(e.x=c.width+d.x-h.width));Blockly.WidgetDiv.position(e.x,e.y,c,d,this.sourceBlock_.RTL);b.setAllowAutoFocus(!0); +g.focus()}; +Blockly.FieldDropdown.prototype.trimOptions_=function(){this.suffixField=this.prefixField=null;var a=this.menuGenerator_;if(goog.isArray(a)&&!(2>a.length)){var b=a.map(function(a){return a[0]}),c=Blockly.shortestStringLength(b),d=Blockly.commonWordPrefix(b,c),e=Blockly.commonWordSuffix(b,c);if((d||e)&&!(c<=d+e)){d&&(this.prefixField=b[0].substring(0,d-1));e&&(this.suffixField=b[0].substr(1-e));b=[];for(c=0;cd?1:c=a.clientX&&0==a.clientY&&0==a.button)a.stopPropagation();else{Blockly.removeAllRanges();var b=a.clientY-Blockly.Flyout.startDownEvent_.clientY;Math.sqrt(Math.pow(a.clientX-Blockly.Flyout.startDownEvent_.clientX,2)+Math.pow(b,2))>Blockly.DRAG_RADIUS&&Blockly.Flyout.startFlyout_.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_)}}; -Blockly.Flyout.prototype.createBlockFunc_=function(a){var b=this;return function(c){if(!Blockly.isRightButton(c)&&!a.disabled){var d=Blockly.Xml.blockToDom_(a),d=Blockly.Xml.domToBlock(b.targetWorkspace_,d),e=a.getSvgRoot();if(!e)throw"originBlock is not rendered.";var e=Blockly.getSvgXY_(e),f=d.getSvgRoot();if(!f)throw"block is not rendered.";f=Blockly.getSvgXY_(f);d.moveBy(e.x-f.x,e.y-f.y);b.autoClose?b.hide():b.filterForCapacity_();d.onMouseDown_(c)}}}; -Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.targetWorkspace_.remainingCapacity(),b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++){var e=d.getDescendants().length>a;d.setDisabled(e)}};Blockly.Flyout.prototype.getRect=function(){var a=Blockly.getSvgXY_(this.svgGroup_).x;this.RTL||(a-=1E7);return new goog.math.Rect(a,-1E7,1E7+this.width_,this.height_+2E7)}; +Blockly.Flyout.prototype.onMouseMoveBlock_=function(a){if("mousemove"==a.type&&1>=a.clientX&&0==a.clientY&&0==a.button)a.stopPropagation();else{Blockly.removeAllRanges();var b=a.clientX-Blockly.Flyout.startDownEvent_.clientX;a=a.clientY-Blockly.Flyout.startDownEvent_.clientY;Math.sqrt(b*b+a*a)>Blockly.DRAG_RADIUS&&Blockly.Flyout.startFlyout_.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_)}}; +Blockly.Flyout.prototype.createBlockFunc_=function(a){var b=this,c=this.targetWorkspace_;return function(d){if(!Blockly.isRightButton(d)&&!a.disabled){var e=Blockly.Xml.blockToDom_(a),e=Blockly.Xml.domToBlock(c,e),f=a.getSvgRoot();if(!f)throw"originBlock is not rendered.";var f=Blockly.getSvgXY_(f,c),g=e.getSvgRoot();if(!g)throw"block is not rendered.";if(1==c.scale){var h=Blockly.getSvgXY_(g,c);e.moveBy(f.x-h.x,f.y-h.y)}else{var k=Blockly.mouseToSvg(d,c.options.svg),h=k.x-f.x,k=k.y-f.y;f.x/=c.scale; +f.y/=c.scale;var l=Blockly.getRelativeXY_(c.getCanvas()),g=Blockly.getRelativeXY_(g);e.moveBy(f.x-(l.x/c.scale+g.x)-(h-h/c.scale),f.y-(l.y/c.scale+g.y)-(k-k/c.scale))}b.autoClose?b.hide():b.filterForCapacity_();e.onMouseDown_(d)}}};Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.targetWorkspace_.remainingCapacity(),b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++){var e=d.getDescendants().length>a;d.setDisabled(e)}}; +Blockly.Flyout.prototype.getRect=function(){var a=Blockly.mainWorkspace,b=Blockly.getSvgXY_(this.svgGroup_,a).x;this.RTL||(b-=1E9);return new goog.math.Rect(b,-1E9,1E9+this.width_*(this.targetWorkspace_==a?1:a.scale),2E9)}; Blockly.Flyout.terminateDrag_=function(){Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_),Blockly.Flyout.onMouseUpWrapper_=null);Blockly.Flyout.onMouseMoveBlockWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveBlockWrapper_),Blockly.Flyout.onMouseMoveBlockWrapper_=null);Blockly.Flyout.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveWrapper_),Blockly.Flyout.onMouseMoveWrapper_=null);Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_), Blockly.Flyout.onMouseUpWrapper_=null);Blockly.Flyout.startDownEvent_=null;Blockly.Flyout.startBlock_=null;Blockly.Flyout.startFlyout_=null};Blockly.Toolbox=function(a){this.workspace_=a};Blockly.Toolbox.prototype.width=0;Blockly.Toolbox.prototype.selectedOption_=null;Blockly.Toolbox.prototype.lastCategory_=null;Blockly.Toolbox.prototype.CONFIG_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"}; Blockly.Toolbox.prototype.init=function(){var a=this.workspace_;this.HtmlDiv=goog.dom.createDom("div","blocklyToolboxDiv");this.HtmlDiv.setAttribute("dir",this.workspace_.RTL?"RTL":"LTR");document.body.appendChild(this.HtmlDiv);Blockly.bindEvent_(this.HtmlDiv,"mousedown",this,function(a){Blockly.isRightButton(a)||a.target==this.HtmlDiv?Blockly.hideChaff(!1):Blockly.hideChaff(!0)});this.flyout_=new Blockly.Flyout({parentWorkspace:a,RTL:a.RTL,svg:a.options.svg});goog.dom.insertSiblingAfter(this.flyout_.createDom(), @@ -1439,38 +1454,40 @@ Blockly.TypeBlock.connectIfPossible=function(a,b){for(var c=0,d=a.inputList,e=d. null==b.outputConnection&&a.parentBlock_.nextConnection.connect(b.previousConnection):Blockly.TypeBlock.connectIfPossible(a.parentBlock_,b)))};Blockly.TypeBlock.ac={};Blockly.TypeBlock.ac.AIArrayMatcher=function(a,b){goog.ui.ac.ArrayMatcher.call(a,b);this.rows_=a;this.useSimilar_=!b};goog.inherits(Blockly.TypeBlock.ac.AIArrayMatcher,goog.ui.ac.ArrayMatcher); Blockly.TypeBlock.ac.AIArrayMatcher.prototype.requestMatchingRows=function(a,b,c,d){d=this.getPrefixMatches(a,b);if("text"===a||"Text"===a)goog.array.remove(d,"Text"),goog.array.insertAt(d,"Text",0);var e=RegExp("^-?[0-9]\\d*(.\\d+)?$","g").exec(a);e&&0>>/g,Blockly.Css.mediaPath_);Blockly.Css.styleSheet_=goog.cssom.addCssText(c).sheet;Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)}}; -Blockly.Css.setCursor=function(a){if(Blockly.Css.currentCursor_!=a){Blockly.Css.currentCursor_=a;var b="url("+Blockly.Css.mediaPath_+"/"+a+".cur) "+(a==Blockly.Css.Cursor.OPEN?"8 5":"7 3")+", auto";goog.cssom.replaceCssRule("",".blocklyDraggable {\n cursor: "+b+";\n}\n",Blockly.Css.styleSheet_,0);for(var c=document.getElementsByClassName("blocklyToolboxDiv"),d=0,e;e=c[d];d++)e.style.cursor=a==Blockly.Css.Cursor.OPEN?"":b;document.body.parentNode.style.cursor=a==Blockly.Css.Cursor.OPEN?"":b}}; +Blockly.Css.setCursor=function(a){if(Blockly.Css.currentCursor_!=a){Blockly.Css.currentCursor_=a;var b="url("+Blockly.Css.mediaPath_+"/"+a+".cur) "+(a==Blockly.Css.Cursor.OPEN?"8 5":"7 3")+", auto";goog.cssom.replaceCssRule("",".blocklyDraggable {\n cursor: "+b+";\n}\n",Blockly.Css.styleSheet_,0);for(var c=document.getElementsByClassName("blocklyToolboxDiv"),d=0,e;e=c[d];d++)e.style.cursor=a==Blockly.Css.Cursor.DELETE?b:"";document.body.parentNode.style.cursor=a==Blockly.Css.Cursor.OPEN?"":b}}; Blockly.Css.CONTENT=[".blocklySvg {"," background-color: #fff;"," outline: none;"," overflow: hidden;","}",".blocklyWidgetDiv {"," display: none;"," position: absolute;"," z-index: 999;","}",".blocklyTooltipDiv {"," background-color: #ffffc7;"," border: 1px solid #ddc;"," box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);"," color: #000;"," display: none;"," font-family: sans-serif;"," font-size: 9pt;"," opacity: 0.9;"," padding: 2px;"," position: absolute;"," z-index: 1000;","}",".blocklyResizeSE {", " cursor: se-resize;"," fill: #aaa;","}",".blocklyResizeSW {"," cursor: sw-resize;"," fill: #aaa;","}",".blocklyResizeLine {"," stroke: #888;"," stroke-width: 1;","}",".blocklyHighlightedConnectionPath {"," fill: none;"," stroke: #fc3;"," stroke-width: 4px;","}",".blocklyPathLight {"," fill: none;"," stroke-linecap: round;"," stroke-width: 1;","}",".blocklySelected>.blocklyPath {"," stroke: #fc3;"," stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {"," display: none;","}", ".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {"," fill-opacity: .8;"," stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {"," display: none;","}",".blocklyDisabled>.blocklyPath {"," fill-opacity: .5;"," stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {"," display: none;","}",".blocklyText {"," cursor: default;"," fill: #fff;"," font-family: sans-serif;"," font-size: 11pt;","}",".blocklyNonEditableText>text {", " pointer-events: none;","}",".blocklyNonEditableText>rect,",".blocklyEditableText>rect {"," fill: #fff;"," fill-opacity: .6;","}",".blocklyNonEditableText>text,",".blocklyEditableText>text {"," fill: #000;","}",".blocklyEditableText:hover>rect {"," stroke: #fff;"," stroke-width: 2;","}",".blocklyBubbleText {"," fill: #000;","}",".blocklySvg text {"," user-select: none;"," -moz-user-select: none;"," -webkit-user-select: none;"," cursor: inherit;","}",".blocklyHidden {"," display: none;", "}",".blocklyFieldDropdown:not(.blocklyHidden) {"," display: block;","}",".blocklyIconGroup {"," cursor: default;","}",".blocklyIconGroup:not(:hover),",".blocklyIconGroupReadonly {"," opacity: .6;","}",".blocklyDraggable:not(:hover) .blocklyIconFading {"," opacity: 0;","}",".blocklyFlyout .blocklyDraggable:not(:hover) .blocklyIconFading {"," opacity: 1;","}",".blocklyMinimalBody {"," margin: 0;"," padding: 0;","}",".blocklyCommentTextarea {"," background-color: #ffc;"," border: 0;"," margin: 0;", -" padding: 2px;"," resize: none;","}",".blocklyHtmlInput {"," border: none;"," font-family: sans-serif;"," font-size: 11pt;"," outline: none;"," width: 100%","}",".blocklyMainBackground {"," stroke-width: 1;"," stroke: #c6c6c6;","}",".blocklyMutatorBackground {"," fill: #fff;"," stroke: #ddd;"," stroke-width: 1;","}",".blocklyFlyoutBackground {"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyScrollbarBackground {"," opacity: 0;","}",".blocklyScrollbarKnob {"," fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,", -".blocklyScrollbarKnob:hover {"," fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarKnob {"," fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyFlyout .blocklyScrollbarKnob:hover {"," fill: #aaa;","}",".blocklyInvalidInput {"," background: #faa;","}",".blocklyAngleCircle {"," stroke: #444;"," stroke-width: 1;"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyAngleMarks {"," stroke: #444;"," stroke-width: 1;","}",".blocklyAngleGauge {"," fill: #f88;", -" fill-opacity: .8; ","}",".blocklyAngleLine {"," stroke: #f00;"," stroke-width: 2;"," stroke-linecap: round;","}",".blocklyContextMenu {"," border-radius: 4px;","}",".blocklyDropdownMenu {"," padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(<<>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {"," background-color: #ddd;"," overflow-x: visible;", -" overflow-y: auto;"," position: absolute;","}",".blocklyTreeRoot {"," padding: 4px 0;","}",".blocklyTreeRoot:focus {"," outline: none;","}",".blocklyTreeRow {"," line-height: 22px;"," height: 22px;"," padding-right: 1em;"," white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {'," padding-right: 0;"," padding-left: 1em !important;","}",".blocklyTreeRow:hover {"," background-color: #e4e4e4;","}",".blocklyTreeSeparator {"," border-bottom: solid #e5e5e5 1px;"," height: 0px;", -" margin: 5px 0;","}",".blocklyTreeIcon {"," background-image: url(<<>>/sprites.png);"," height: 16px;"," vertical-align: middle;"," width: 16px;","}",".blocklyTreeIconClosedLtr {"," background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {"," background-position: 0px -1px;","}",".blocklyTreeIconOpen {"," background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {"," background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {", -" background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {"," background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {"," background-position: -48px -1px;","}",".blocklyTreeLabel {"," cursor: default;"," font-family: sans-serif;"," font-size: 16px;"," padding: 0 3px;"," vertical-align: middle;","}",".blocklyTreeSelected {"," background-color: #57e !important;","}",".blocklyTreeSelected .blocklyTreeLabel {"," color: #fff;", -"}",".blocklyWidgetDiv .goog-palette {"," outline: none;"," cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {"," border: 1px solid #666;"," border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {"," height: 13px;"," width: 15px;"," margin: 0;"," border: 0;"," text-align: center;"," vertical-align: middle;"," border-right: 1px solid #666;"," font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {"," position: relative;"," height: 13px;"," width: 15px;", -" border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {"," border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {"," border: 1px solid #000;"," color: #fff;","}",".blocklyWidgetDiv .goog-menu {"," background: #fff;"," border-color: #ccc #666 #666 #ccc;"," border-style: solid;"," border-width: 1px;"," cursor: default;"," font: normal 13px Arial, sans-serif;"," margin: 0;"," outline: none;"," padding: 4px 0;", -" position: absolute;"," overflow-y: auto;"," overflow-x: hidden;"," max-height: 100%;"," z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {"," color: #000;"," font: normal 13px Arial, sans-serif;"," list-style: none;"," margin: 0;"," padding: 4px 7em 4px 28px;"," white-space: nowrap;","}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {"," padding-left: 7em;"," padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {", -" padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {"," padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {"," color: #000;"," font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {"," color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {"," opacity: 0.3;"," -moz-opacity: 0.3;"," filter: alpha(opacity=30);", -"}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {"," background-color: #d6e9f8;"," border-color: #d6e9f8;"," border-style: dotted;"," border-width: 1px 0;"," padding-bottom: 3px;"," padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-icon {"," background-repeat: no-repeat;"," height: 16px;"," left: 6px;"," position: absolute;"," right: auto;"," vertical-align: middle;"," width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,", -".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {"," left: auto;"," right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;","}",".blocklyWidgetDiv .goog-menuitem-accel {"," color: #999;"," direction: ltr;"," left: auto;"," padding: 0 6px;"," position: absolute;"," right: 0;"," text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {", -" left: 0;"," right: auto;"," text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {"," text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {"," color: #999;"," font-size: 12px;"," padding-left: 4px;","}",".blocklyWidgetDiv .goog-menuseparator {"," border-top: 1px solid #ccc;"," margin: 4px 0;"," padding: 0;","}",""];Blockly.WidgetDiv={};Blockly.WidgetDiv.DIV=null;Blockly.WidgetDiv.owner_=null;Blockly.WidgetDiv.dispose_=null;Blockly.WidgetDiv.createDom=function(){Blockly.WidgetDiv.DIV||(Blockly.WidgetDiv.DIV=goog.dom.createDom("div","blocklyWidgetDiv"),document.body.appendChild(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.show=function(a,b,c){Blockly.WidgetDiv.hide();Blockly.WidgetDiv.owner_=a;Blockly.WidgetDiv.dispose_=c;Blockly.WidgetDiv.DIV.style.direction=b?"rtl":"ltr";Blockly.WidgetDiv.DIV.style.display="block"}; +" padding: 2px;"," resize: none;","}",".blocklyHtmlInput {"," border: none;"," border-radius: 4px;"," font-family: sans-serif;"," height: 100%;"," margin: 0;"," outline: none;"," padding: 0 1px;"," width: 100%","}",".blocklyMainBackground {"," stroke-width: 1;"," stroke: #c6c6c6;","}",".blocklyMutatorBackground {"," fill: #fff;"," stroke: #ddd;"," stroke-width: 1;","}",".blocklyFlyoutBackground {"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyScrollbarBackground {"," opacity: 0;", +"}",".blocklyScrollbarKnob {"," fill: #ccc;","}",".blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyScrollbarKnob:hover {"," fill: #bbb;","}",".blocklyZoom>image {"," opacity: .4;","}",".blocklyZoom>image:hover {"," opacity: .6;","}",".blocklyZoom>image:active {"," opacity: .8;","}",".blocklyFlyout .blocklyScrollbarKnob {"," fill: #bbb;","}",".blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarKnob,",".blocklyFlyout .blocklyScrollbarKnob:hover {"," fill: #aaa;", +"}",".blocklyInvalidInput {"," background: #faa;","}",".blocklyAngleCircle {"," stroke: #444;"," stroke-width: 1;"," fill: #ddd;"," fill-opacity: .8;","}",".blocklyAngleMarks {"," stroke: #444;"," stroke-width: 1;","}",".blocklyAngleGauge {"," fill: #f88;"," fill-opacity: .8; ","}",".blocklyAngleLine {"," stroke: #f00;"," stroke-width: 2;"," stroke-linecap: round;","}",".blocklyContextMenu {"," border-radius: 4px;","}",".blocklyDropdownMenu {"," padding: 0 !important;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,", +".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(<<>>/sprites.png) no-repeat -48px -16px !important;","}",".blocklyToolboxDiv {"," background-color: #ddd;"," overflow-x: visible;"," overflow-y: auto;"," position: absolute;","}",".blocklyTreeRoot {"," padding: 4px 0;","}",".blocklyTreeRoot:focus {"," outline: none;","}",".blocklyTreeRow {"," line-height: 22px;"," height: 22px;"," padding-right: 1em;"," white-space: nowrap;","}",'.blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {', +" padding-right: 0;"," padding-left: 1em !important;","}",".blocklyTreeRow:hover {"," background-color: #e4e4e4;","}",".blocklyTreeSeparator {"," border-bottom: solid #e5e5e5 1px;"," height: 0px;"," margin: 5px 0;","}",".blocklyTreeIcon {"," background-image: url(<<>>/sprites.png);"," height: 16px;"," vertical-align: middle;"," width: 16px;","}",".blocklyTreeIconClosedLtr {"," background-position: -32px -1px;","}",".blocklyTreeIconClosedRtl {"," background-position: 0px -1px;","}", +".blocklyTreeIconOpen {"," background-position: -16px -1px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedLtr {"," background-position: -32px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconClosedRtl {"," background-position: 0px -17px;","}",".blocklyTreeSelected>.blocklyTreeIconOpen {"," background-position: -16px -17px;","}",".blocklyTreeIconNone,",".blocklyTreeSelected>.blocklyTreeIconNone {"," background-position: -48px -1px;","}",".blocklyTreeLabel {"," cursor: default;"," font-family: sans-serif;", +" font-size: 16px;"," padding: 0 3px;"," vertical-align: middle;","}",".blocklyTreeSelected {"," background-color: #57e !important;","}",".blocklyTreeSelected .blocklyTreeLabel {"," color: #fff;","}",".blocklyWidgetDiv .goog-palette {"," outline: none;"," cursor: default;","}",".blocklyWidgetDiv .goog-palette-table {"," border: 1px solid #666;"," border-collapse: collapse;","}",".blocklyWidgetDiv .goog-palette-cell {"," height: 13px;"," width: 15px;"," margin: 0;"," border: 0;"," text-align: center;", +" vertical-align: middle;"," border-right: 1px solid #666;"," font-size: 1px;","}",".blocklyWidgetDiv .goog-palette-colorswatch {"," position: relative;"," height: 13px;"," width: 15px;"," border: 1px solid #666;","}",".blocklyWidgetDiv .goog-palette-cell-hover .goog-palette-colorswatch {"," border: 1px solid #FFF;","}",".blocklyWidgetDiv .goog-palette-cell-selected .goog-palette-colorswatch {"," border: 1px solid #000;"," color: #fff;","}",".blocklyWidgetDiv .goog-menu {"," background: #fff;", +" border-color: #ccc #666 #666 #ccc;"," border-style: solid;"," border-width: 1px;"," cursor: default;"," font: normal 13px Arial, sans-serif;"," margin: 0;"," outline: none;"," padding: 4px 0;"," position: absolute;"," overflow-y: auto;"," overflow-x: hidden;"," max-height: 100%;"," z-index: 20000;","}",".blocklyWidgetDiv .goog-menuitem {"," color: #000;"," font: normal 13px Arial, sans-serif;"," list-style: none;"," margin: 0;"," padding: 4px 7em 4px 28px;"," white-space: nowrap;", +"}",".blocklyWidgetDiv .goog-menuitem.goog-menuitem-rtl {"," padding-left: 7em;"," padding-right: 28px;","}",".blocklyWidgetDiv .goog-menu-nocheckbox .goog-menuitem,",".blocklyWidgetDiv .goog-menu-noicon .goog-menuitem {"," padding-left: 12px;","}",".blocklyWidgetDiv .goog-menu-noaccel .goog-menuitem {"," padding-right: 20px;","}",".blocklyWidgetDiv .goog-menuitem-content {"," color: #000;"," font: normal 13px Arial, sans-serif;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-accel,", +".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-content {"," color: #ccc !important;","}",".blocklyWidgetDiv .goog-menuitem-disabled .goog-menuitem-icon {"," opacity: 0.3;"," -moz-opacity: 0.3;"," filter: alpha(opacity=30);","}",".blocklyWidgetDiv .goog-menuitem-highlight,",".blocklyWidgetDiv .goog-menuitem-hover {"," background-color: #d6e9f8;"," border-color: #d6e9f8;"," border-style: dotted;"," border-width: 1px 0;"," padding-bottom: 3px;"," padding-top: 3px;","}",".blocklyWidgetDiv .goog-menuitem-checkbox,", +".blocklyWidgetDiv .goog-menuitem-icon {"," background-repeat: no-repeat;"," height: 16px;"," left: 6px;"," position: absolute;"," right: auto;"," vertical-align: middle;"," width: 16px;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-icon {"," left: auto;"," right: 6px;","}",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-checkbox,",".blocklyWidgetDiv .goog-option-selected .goog-menuitem-icon {"," background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -512px 0;", +"}",".blocklyWidgetDiv .goog-menuitem-accel {"," color: #999;"," direction: ltr;"," left: auto;"," padding: 0 6px;"," position: absolute;"," right: 0;"," text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {"," left: 0;"," right: auto;"," text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {"," text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {"," color: #999;"," font-size: 12px;"," padding-left: 4px;", +"}",".blocklyWidgetDiv .goog-menuseparator {"," border-top: 1px solid #ccc;"," margin: 4px 0;"," padding: 0;","}",""];Blockly.WidgetDiv={};Blockly.WidgetDiv.DIV=null;Blockly.WidgetDiv.owner_=null;Blockly.WidgetDiv.dispose_=null;Blockly.WidgetDiv.createDom=function(){Blockly.WidgetDiv.DIV||(Blockly.WidgetDiv.DIV=goog.dom.createDom("div","blocklyWidgetDiv"),document.body.appendChild(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.show=function(a,b,c){Blockly.WidgetDiv.hide();Blockly.WidgetDiv.owner_=a;Blockly.WidgetDiv.dispose_=c;Blockly.WidgetDiv.DIV.style.direction=b?"rtl":"ltr";Blockly.WidgetDiv.DIV.style.display="block"}; Blockly.WidgetDiv.hide=function(){Blockly.WidgetDiv.owner_&&(Blockly.WidgetDiv.DIV.style.display="none",Blockly.WidgetDiv.dispose_&&Blockly.WidgetDiv.dispose_(),Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.dispose_=null,goog.dom.removeChildren(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.isVisible=function(){return!!Blockly.WidgetDiv.owner_};Blockly.WidgetDiv.hideIfOwner=function(a){Blockly.WidgetDiv.owner_==a&&Blockly.WidgetDiv.hide()}; Blockly.WidgetDiv.position=function(a,b,c,d,e){bc.width+d.x&&(a=c.width+d.x):aa.viewHeight+f||a.contentLeft<(b.RTL? -a.viewLeft:e)||a.contentLeft+a.contentWidth>(b.RTL?a.viewWidth:a.viewWidth+e))for(var g=c.getTopBlocks(!1),h=0,k;k=g[h];h++){var l=k.getRelativeToSurfaceXY(),n=k.getHeightWidth(),m=f+25-n.height-l.y;0m&&k.moveBy(0,m);m=25+e-l.x-(b.RTL?0:n.width);0m&&k.moveBy(m,0)}}});Blockly.svgResize(c);Blockly.WidgetDiv.createDom();Blockly.Tooltip.createDom();return c}; +a.viewLeft:e)||a.contentLeft+a.contentWidth>(b.RTL?a.viewWidth:a.viewWidth+e))for(var g=c.getTopBlocks(!1),h=0,k;k=g[h];h++){var l=k.getRelativeToSurfaceXY(),p=k.getHeightWidth(),m=f+25-p.height-l.y;0m&&k.moveBy(0,m);m=25+e-l.x-(b.RTL?0:p.width);0m&&k.moveBy(m,0)}}});Blockly.svgResize(c);Blockly.WidgetDiv.createDom();Blockly.Tooltip.createDom();return c}; Blockly.init_=function(a){var b=a.options;Blockly.bindEvent_(a.options.svg,"contextmenu",null,function(a){Blockly.isTargetInput_(a)||a.preventDefault()});Blockly.bindEvent_(window,"resize",null,function(){Blockly.svgResize(a)});Blockly.documentEventsBound_||(Blockly.bindEvent_(document,"keydown",null,Blockly.onKeyDown_),Blockly.bindEvent_(document,"touchend",null,Blockly.longStop_),Blockly.bindEvent_(document,"touchcancel",null,Blockly.longStop_),document.addEventListener("mouseup",Blockly.onMouseUp_, -!1),goog.userAgent.IPAD&&Blockly.bindEvent_(window,"orientationchange",document,function(){Blockly.fireUiEvent(window,"resize")}),Blockly.documentEventsBound_=!0);if(b.languageTree)if(a.toolbox_)a.toolbox_.init(a);else if(a.flyout_){a.flyout_.init(a);a.flyout_.show(b.languageTree.childNodes);a.scrollX=a.flyout_.width_;b.RTL&&(a.scrollX*=-1);var c="translate("+a.scrollX+", 0)";a.getCanvas().setAttribute("transform",c);a.getBubbleCanvas().setAttribute("transform",c)}b.hasScrollbars&&(a.scrollbar=new Blockly.ScrollbarPair(a), +!1),goog.userAgent.IPAD&&Blockly.bindEvent_(window,"orientationchange",document,function(){Blockly.fireUiEvent(window,"resize")}),Blockly.documentEventsBound_=!0);if(b.languageTree)if(a.toolbox_)a.toolbox_.init(a);else if(a.flyout_){a.flyout_.init(a);a.flyout_.show(b.languageTree.childNodes);a.scrollX=a.flyout_.width_;b.RTL&&(a.scrollX*=-1);var c="translate("+a.scrollX+",0)";a.getCanvas().setAttribute("transform",c);a.getBubbleCanvas().setAttribute("transform",c)}b.hasScrollbars&&(a.scrollbar=new Blockly.ScrollbarPair(a), a.scrollbar.resize());if(b.hasSounds){a.loadAudio_([b.pathToMedia+"click.mp3",b.pathToMedia+"click.wav",b.pathToMedia+"click.ogg"],"click");a.loadAudio_([b.pathToMedia+"delete.mp3",b.pathToMedia+"delete.ogg",b.pathToMedia+"delete.wav"],"delete");var d=[],b=function(){for(;d.length;)Blockly.unbindEvent_(d.pop());a.preloadAudio_()};d.push(Blockly.bindEvent_(document,"mousemove",null,b));d.push(Blockly.bindEvent_(document,"touchstart",null,b))}}; Blockly.updateToolbox=function(a){console.warn("Deprecated call to Blockly.updateToolbox, use workspace.updateToolbox instead.");Blockly.getMainWorkspace().updateToolbox(a)};Blockly.utils={};Blockly.addClass_=function(a,b){var c=a.getAttribute("class")||"";-1==(" "+c+" ").indexOf(" "+b+" ")&&(c&&(c+=" "),a.setAttribute("class",c+b))};Blockly.removeClass_=function(a,b){var c=a.getAttribute("class");if(-1!=(" "+c+" ").indexOf(" "+b+" ")){for(var c=c.split(/\s+/),d=0;d=g?(c=2,e=g,(g=d.join(""))&&b.push(g),d.length=0):(d.push("%",g),c=0):2==c&&("0"<=g&&"9">=g?e+=g:(b.push(parseInt(e,10)),f--,c=0))}(g=d.join(""))&&b.push(g);return b}; Blockly.getMsgString=function(a){var b=null;"object"===typeof MSG&&(b=MSG[a]);b||(b=Blockly.Msg[a]);b||(console.log("Missing message for "+a),b="\u226a"+a+"\u226b");return b};Blockly.getToolTipString=function(a){var b=null;"object"===typeof ToolTips&&(b=ToolTips[a]);b||(console.log("Missing tool tip for "+a),b="\u226a"+a+"\u226b");return b};Blockly.getUrlString=function(a){var b=null;"object"===typeof Urls&&(b=Urls[a]);b||(console.log("Missing URL for "+a),b="\u226a"+a+"\u226b");return b}; -Blockly.getBlockHue=function(a){var b=null;"object"===typeof HUES&&(b=HUES[a]);b||(console.log("Missing hue for "+a),b=260);return b};Blockly.SVG_NS="http://www.w3.org/2000/svg";Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:64,height:92,url:"sprites.png"};Blockly.makeColour=function(a){return goog.color.hsvToHex(a,Blockly.HSV_SATURATION,255*Blockly.HSV_VALUE)};Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1; +Blockly.getBlockHue=function(a){var b=null;"object"===typeof HUES&&(b=HUES[a]);b||(console.log("Missing hue for "+a),b=260);return b};Blockly.SVG_NS="http://www.w3.org/2000/svg";Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.makeColour=function(a){return goog.color.hsvToHex(a,Blockly.HSV_SATURATION,255*Blockly.HSV_VALUE)};Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1; Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.selected=null;Blockly.highlightedConnection_=null;Blockly.localConnection_=null;Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750; Blockly.mainWorkspace=null;Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.dragMode_=0;Blockly.onTouchUpWrapper_=null;Blockly.latestClick={x:0,y:0};Blockly.svgSize=function(a){return{width:a.cachedWidth_,height:a.cachedHeight_}};Blockly.scopeVariableList={Types:["String","Number","Boolean","Array"]}; Blockly.svgResize=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.options.svg,c=b.parentNode;if(c){var d=c.offsetWidth,c=c.offsetHeight;b.cachedWidth_!=d&&(b.setAttribute("width",d+"px"),b.cachedWidth_=d);b.cachedHeight_!=c&&(b.setAttribute("height",c+"px"),b.cachedHeight_=c);a.resize()}}; Blockly.onMouseUp_=function(a){a=Blockly.getMainWorkspace();Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);a.isScrolling=!1;Blockly.onTouchUpWrapper_&&(Blockly.unbindEvent_(Blockly.onTouchUpWrapper_),Blockly.onTouchUpWrapper_=null);Blockly.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_),Blockly.onMouseMoveWrapper_=null)}; -Blockly.onMouseMove_=function(a){var b=Blockly.getMainWorkspace();if(b.isScrolling){Blockly.removeAllRanges();var c=a.clientX-b.startDragMouseX,d=a.clientY-b.startDragMouseY,e=b.startDragMetrics,f=b.startScrollX+c,g=b.startScrollY+d,f=Math.min(f,-e.contentLeft),g=Math.min(g,-e.contentTop),f=Math.max(f,e.viewWidth-e.contentLeft-e.contentWidth),g=Math.max(g,e.viewHeight-e.contentTop-e.contentHeight);b.scrollbar.set(-f-e.contentLeft,-g-e.contentTop);Math.sqrt(Math.pow(c,2)+Math.pow(d,2))>Blockly.DRAG_RADIUS&& -Blockly.longStop_();a.stopPropagation()}}; +Blockly.onMouseMove_=function(a){var b=Blockly.getMainWorkspace();if(b.isScrolling){Blockly.removeAllRanges();var c=a.clientX-b.startDragMouseX,d=a.clientY-b.startDragMouseY,e=b.startDragMetrics,f=b.startScrollX+c,g=b.startScrollY+d,f=Math.min(f,-e.contentLeft),g=Math.min(g,-e.contentTop),f=Math.max(f,e.viewWidth-e.contentLeft-e.contentWidth),g=Math.max(g,e.viewHeight-e.contentTop-e.contentHeight);b.scrollbar.set(-f-e.contentLeft,-g-e.contentTop);Math.sqrt(c*c+d*d)>Blockly.DRAG_RADIUS&&Blockly.longStop_(); +a.stopPropagation()}}; Blockly.onKeyDown_=function(a){if(!Blockly.isTargetInput_(a))if(a.keyCode==goog.events.KeyCodes.ESC)Blockly.hideChaff();else if(a.keyCode==goog.events.KeyCodes.BACKSPACE||a.keyCode==goog.events.KeyCodes.DELETE)try{Blockly.selected&&Blockly.selected.isDeletable()&&(Blockly.hideChaff(),Blockly.selected.dispose(!0,!0))}finally{a.preventDefault()}else if(a.altKey||a.ctrlKey||a.metaKey)Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(Blockly.hideChaff(),a.keyCode==goog.events.KeyCodes.C? Blockly.copy_(Blockly.selected):a.keyCode==goog.events.KeyCodes.X&&(Blockly.copy_(Blockly.selected),Blockly.selected.dispose(!0,!0))),a.keyCode==goog.events.KeyCodes.V&&Blockly.clipboardXml_&&Blockly.clipboardSource_.paste(Blockly.clipboardXml_);else Blockly.TypeBlock.onKeyDown_(a)};Blockly.terminateDrag_=function(){Blockly.BlockSvg.terminateDrag_();Blockly.Flyout.terminateDrag_()};Blockly.longPid_=0; Blockly.longStart_=function(a,b){Blockly.longStop_();Blockly.longPid_=setTimeout(function(){a.button=2;b.onMouseDown_(a)},Blockly.LONGPRESS)};Blockly.longStop_=function(){Blockly.longPid_&&(clearTimeout(Blockly.longPid_),Blockly.longPid_=0)};Blockly.copy_=function(a){var b=Blockly.Xml.blockToDom_(a);Blockly.Xml.deleteNext(b);var c=a.getRelativeToSurfaceXY();b.setAttribute("x",a.RTL?-c.x:c.x);b.setAttribute("y",c.y);Blockly.clipboardXml_=b;Blockly.clipboardSource_=a.workspace}; Blockly.onContextMenu_=function(a){Blockly.isTargetInput_(a)||a.preventDefault()};Blockly.hideChaff=function(a){Blockly.Tooltip.hide();Blockly.WidgetDiv.hide();Blockly.TypeBlock.hide();a||(a=Blockly.getMainWorkspace(),a.toolbox_&&a.toolbox_.flyout_&&a.toolbox_.flyout_.autoClose&&a.toolbox_.clearSelection())}; -Blockly.getMainWorkspaceMetrics_=function(){var a=Blockly.svgSize(this.options.svg);this.toolbox_&&(a.width-=this.toolbox_.width);var b=a.width-Blockly.Scrollbar.scrollbarThickness,c=a.height-Blockly.Scrollbar.scrollbarThickness;try{var d=this.getCanvas().getBBox()}catch(e){return null}if(this.scrollbar)var f=this.RTL?0:Blockly.Scrollbar.scrollbarThickness,g=Math.min(d.x-b/2,d.x+d.width-b-(this.RTL?Blockly.Scrollbar.scrollbarThickness:0)+5),b=Math.max(d.x+d.width+b/2,d.x+b+f-5),f=Math.min(d.y-c/2, -d.y+d.height-c+5),c=Math.max(d.y+d.height+c/2,d.y+c+Blockly.Scrollbar.scrollbarThickness-5);else g=d.x,b=g+d.width,f=d.y,c=f+d.height;d=0;!this.RTL&&this.toolbox_&&(d=this.toolbox_.width);return{viewHeight:a.height,viewWidth:a.width,contentHeight:c-f,contentWidth:b-g,viewTop:-this.scrollY,viewLeft:-this.scrollX,contentTop:f,contentLeft:g,absoluteTop:0,absoluteLeft:d}}; +Blockly.getMainWorkspaceMetrics_=function(){var a=Blockly.svgSize(this.options.svg);this.toolbox_&&(a.width-=this.toolbox_.width);var b=a.width-Blockly.Scrollbar.scrollbarThickness,c=a.height-Blockly.Scrollbar.scrollbarThickness;try{var d=this.getCanvas().getBBox()}catch(e){return null}var f=d.width,g=d.height,h=d.x*this.scale,k=d.y*this.scale;if(this.scrollbar)var l=Math.min(h-b/2,h+f-b),b=Math.max(h+f+b/2,h+b),f=Math.min(k-c/2,k+g-c),c=Math.max(k+g+c/2,k+c);else l=d.x,b=l+d.width,f=d.y,c=f+d.height; +d=0;!this.RTL&&this.toolbox_&&(d=this.toolbox_.width);return{viewHeight:a.height,viewWidth:a.width,contentHeight:c-f,contentWidth:b-l,viewTop:-this.scrollY,viewLeft:-this.scrollX,contentTop:f,contentLeft:l,absoluteTop:0,absoluteLeft:d}}; Blockly.setMainWorkspaceMetrics_=function(a){if(!this.scrollbar)throw"Attempt to set main workspace scroll without scrollbars.";var b=this.getMetrics();goog.isNumber(a.x)&&(this.scrollX=-b.contentWidth*a.x-b.contentLeft);goog.isNumber(a.y)&&(this.scrollY=-b.contentHeight*a.y-b.contentTop);a=this.scrollX+b.absoluteLeft;b=this.scrollY+b.absoluteTop;this.translate(a,b);this.options.gridPattern&&(this.options.gridPattern.setAttribute("x",a),this.options.gridPattern.setAttribute("y",b))}; Blockly.doCommand=function(a){Blockly.Realtime.isEnabled?Blockly.Realtime.doCommand(a):a()};Blockly.addChangeListener=function(a){console.warn("Deprecated call to Blockly.addChangeListener, use workspace.addChangeListener instead.");return Blockly.getMainWorkspace().addChangeListener(a)};Blockly.getMainWorkspace=function(){return Blockly.mainWorkspace};goog.global.Blockly||(goog.global.Blockly={});goog.global.Blockly.getMainWorkspace=Blockly.getMainWorkspace; -goog.global.Blockly.addChangeListener=Blockly.addChangeListener;goog.global.Blockly.removeChangeListener=Blockly.removeChangeListener; \ No newline at end of file +goog.global.Blockly.addChangeListener=Blockly.addChangeListener; \ No newline at end of file diff --git a/blockly_uncompressed.js b/blockly_uncompressed.js index 3e07e6d21e9..8d4c6489f24 100644 --- a/blockly_uncompressed.js +++ b/blockly_uncompressed.js @@ -41,7 +41,7 @@ goog.addDependency("../../../" + dir + "/core/field_clickimage.js", ['Blockly.Fi goog.addDependency("../../../" + dir + "/core/field_colour.js", ['Blockly.FieldColour'], ['Blockly.Field', 'goog.dom', 'goog.events', 'goog.style', 'goog.ui.ColorPicker']); goog.addDependency("../../../" + dir + "/core/field_date.js", ['Blockly.FieldDate'], ['Blockly.Field', 'goog.date', 'goog.dom', 'goog.events', 'goog.i18n.DateTimeSymbols', 'goog.i18n.DateTimeSymbols_he', 'goog.style', 'goog.ui.DatePicker']); goog.addDependency("../../../" + dir + "/core/field_dropdown.js", ['Blockly.FieldDropdown'], ['Blockly.Field', 'goog.dom', 'goog.events', 'goog.style', 'goog.ui.Menu', 'goog.ui.MenuItem', 'goog.userAgent']); -goog.addDependency("../../../" + dir + "/core/field_image.js", ['Blockly.FieldImage'], ['Blockly.Field', 'goog.dom', 'goog.userAgent']); +goog.addDependency("../../../" + dir + "/core/field_image.js", ['Blockly.FieldImage'], ['Blockly.Field', 'goog.dom', 'goog.math.Size', 'goog.userAgent']); goog.addDependency("../../../" + dir + "/core/field_label.js", ['Blockly.FieldLabel'], ['Blockly.Field', 'Blockly.Tooltip', 'goog.dom', 'goog.math.Size']); goog.addDependency("../../../" + dir + "/core/field_scope_variable.js", ['Blockly.FieldScopeVariable'], ['Blockly.FieldDropdown', 'Blockly.Msg', 'Blockly.ScopeVariables', 'goog.string']); goog.addDependency("../../../" + dir + "/core/field_textarea.js", ['Blockly.FieldTextArea'], ['Blockly.FieldTextInput', 'Blockly.Msg', 'goog.asserts', 'goog.dom', 'goog.userAgent', 'goog.events.KeyCodes']); @@ -64,13 +64,14 @@ goog.addDependency("../../../" + dir + "/core/toolbox.js", ['Blockly.Toolbox'], goog.addDependency("../../../" + dir + "/core/tooltip.js", ['Blockly.Tooltip'], ['goog.dom']); goog.addDependency("../../../" + dir + "/core/trashcan.js", ['Blockly.Trashcan'], ['goog.Timer', 'goog.dom', 'goog.math', 'goog.math.Rect']); goog.addDependency("../../../" + dir + "/core/typeblock.js", ['Blockly.TypeBlock', 'Blockly.TypeBlock.ac.AIArrayMatcher'], ['Blockly.Xml', 'goog.events', 'goog.events.KeyCodes', 'goog.events.KeyHandler', 'goog.ui.ac', 'goog.style', 'goog.ui.ac.ArrayMatcher', 'goog.ui.ac.AutoComplete', 'goog.ui.ac.InputHandler', 'goog.ui.ac.Renderer', 'goog.iter', 'goog.string']); -goog.addDependency("../../../" + dir + "/core/utils.js", ['Blockly.utils'], ['goog.events.BrowserFeature', 'goog.userAgent']); +goog.addDependency("../../../" + dir + "/core/utils.js", ['Blockly.utils'], ['goog.events.BrowserFeature', 'goog.userAgent', 'goog.dom']); goog.addDependency("../../../" + dir + "/core/variables.js", ['Blockly.Variables'], ['Blockly.Workspace', 'goog.string']); goog.addDependency("../../../" + dir + "/core/warning.js", ['Blockly.Warning'], ['Blockly.Bubble', 'Blockly.Icon']); goog.addDependency("../../../" + dir + "/core/widgetdiv.js", ['Blockly.WidgetDiv'], ['Blockly.Css', 'goog.dom']); goog.addDependency("../../../" + dir + "/core/workspace.js", ['Blockly.Workspace'], ['goog.math']); -goog.addDependency("../../../" + dir + "/core/workspace_svg.js", ['Blockly.WorkspaceSvg'], ['Blockly.ScrollbarPair', 'Blockly.Trashcan', 'Blockly.Workspace', 'Blockly.Xml', 'goog.dom', 'goog.math.Coordinate', 'goog.userAgent']); +goog.addDependency("../../../" + dir + "/core/workspace_svg.js", ['Blockly.WorkspaceSvg'], ['Blockly.ScrollbarPair', 'Blockly.Trashcan', 'Blockly.ZoomControls', 'Blockly.Workspace', 'Blockly.Xml', 'goog.dom', 'goog.math.Coordinate', 'goog.userAgent']); goog.addDependency("../../../" + dir + "/core/xml.js", ['Blockly.Xml'], ['goog.dom']); +goog.addDependency("../../../" + dir + "/core/zoom_controls.js", ['Blockly.ZoomControls'], ['goog.dom']); goog.addDependency("../../alltests.js", [], []); goog.addDependency("base.js", [], []); goog.addDependency("base_module_test.js", [], []); @@ -1588,6 +1589,7 @@ goog.require('Blockly.WidgetDiv'); goog.require('Blockly.Workspace'); goog.require('Blockly.WorkspaceSvg'); goog.require('Blockly.Xml'); +goog.require('Blockly.ZoomControls'); goog.require('Blockly.inject'); goog.require('Blockly.utils'); goog.require('rtclient'); diff --git a/core/block_svg.js b/core/block_svg.js index 21ba0fe2b78..59e7e690025 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -43,7 +43,7 @@ Blockly.BlockSvg = function() { // Create core elements for the block. this.svgGroup_ = Blockly.createSvgElement('g', {}, null); this.svgPathDark_ = Blockly.createSvgElement('path', - {'class': 'blocklyPathDark', 'transform': 'translate(1, 1)'}, + {'class': 'blocklyPathDark', 'transform': 'translate(1,1)'}, this.svgGroup_); this.svgPath_ = Blockly.createSvgElement('path', {'class': 'blocklyPath'}, this.svgGroup_); @@ -63,6 +63,13 @@ Blockly.BlockSvg.prototype.height = 0; */ Blockly.BlockSvg.prototype.width = 0; +/** + * Original location of block being dragged. + * @type {goog.math.Coordinate} + * @private + */ +Blockly.BlockSvg.prototype.dragStartXY_ = null; + /** * Constant for identifying rows that are to be rendered inline. * Don't collide with Blockly.INPUT_VALUE and friends. @@ -194,9 +201,8 @@ Blockly.BlockSvg.terminateDrag_ = function() { if (selected) { // Update the connection locations. var xy = selected.getRelativeToSurfaceXY(); - var dx = xy.x - selected.startDragX; - var dy = xy.y - selected.startDragY; - selected.moveConnections_(dx, dy); + var dxy = goog.math.Coordinate.difference(xy, selected.dragStartXY_); + selected.moveConnections_(dxy.x, dxy.y); delete selected.draggedBubbles_; selected.setDragging_(false); selected.render(); @@ -227,8 +233,7 @@ Blockly.BlockSvg.prototype.setParent = function(newParent) { // Move this block up the DOM. Keep track of x/y translations. var xy = this.getRelativeToSurfaceXY(); this.workspace.getCanvas().appendChild(svgRoot); - svgRoot.setAttribute('transform', - 'translate(' + xy.x + ', ' + xy.y + ')'); + svgRoot.setAttribute('transform', 'translate(' + xy.x + ',' + xy.y + ')'); } Blockly.BlockSvg.superClass_.setParent.call(this, newParent); @@ -271,7 +276,7 @@ Blockly.BlockSvg.prototype.getRelativeToSurfaceXY = function() { Blockly.BlockSvg.prototype.moveBy = function(dx, dy) { var xy = this.getRelativeToSurfaceXY(); this.getSvgRoot().setAttribute('transform', - 'translate(' + (xy.x + dx) + ', ' + (xy.y + dy) + ')'); + 'translate(' + (xy.x + dx) + ',' + (xy.y + dy) + ')'); this.moveConnections_(dx, dy); Blockly.Realtime.blockChanged(this); }; @@ -397,13 +402,10 @@ Blockly.BlockSvg.prototype.onMouseDown_ = function(e) { // Left-click (or middle click) Blockly.removeAllRanges(); Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED); - // Look up the current translation and record it. - var xy = this.getRelativeToSurfaceXY(); - this.startDragX = xy.x; - this.startDragY = xy.y; - // Record the current mouse position. - this.startDragMouseX = e.clientX; - this.startDragMouseY = e.clientY; + + this.dragStartXY_ = this.getRelativeToSurfaceXY(); + this.workspace.startDrag(e, this.dragStartXY_.x, this.dragStartXY_.y); + Blockly.dragMode_ = 1; Blockly.BlockSvg.onMouseUpWrapper_ = Blockly.bindEvent_(document, 'mouseup', this, this.onMouseUp_); @@ -671,6 +673,7 @@ Blockly.BlockSvg.prototype.setDragging_ = function(adding) { */ Blockly.BlockSvg.prototype.onMouseMove_ = function(e) { var this_ = this; + var workspace_ = this.workspace; Blockly.doCommand(function() { if (e.type == 'mousemove' && e.clientX <= 1 && e.clientY == 0 && e.button == 0) { @@ -683,11 +686,13 @@ Blockly.BlockSvg.prototype.onMouseMove_ = function(e) { return; } Blockly.removeAllRanges(); - var dx = e.clientX - this_.startDragMouseX; - var dy = e.clientY - this_.startDragMouseY; + + var oldXY = this_.getRelativeToSurfaceXY(); + var newXY = workspace_.moveDrag(e); + if (Blockly.dragMode_ == 1) { // Still dragging within the sticky DRAG_RADIUS. - var dr = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + var dr = goog.math.Coordinate.distance(oldXY, newXY) * workspace_.scale; if (dr > Blockly.DRAG_RADIUS) { // Switch to unrestricted dragging. Blockly.dragMode_ = 2; @@ -695,15 +700,15 @@ Blockly.BlockSvg.prototype.onMouseMove_ = function(e) { // Push this block to the very top of the stack. this_.setParent(null); this_.setDragging_(true); - this_.workspace.recordDeleteAreas(); + workspace_.recordDeleteAreas(); } } if (Blockly.dragMode_ == 2) { // Unrestricted dragging. - var x = this_.startDragX + dx; - var y = this_.startDragY + dy; + var dx = oldXY.x - this_.dragStartXY_.x; + var dy = oldXY.y - this_.dragStartXY_.y; this_.getSvgRoot().setAttribute('transform', - 'translate(' + x + ', ' + y + ')'); + 'translate(' + newXY.x + ',' + newXY.y + ')'); // Drag all the nested bubbles. for (var i = 0; i < this_.draggedBubbles_.length; i++) { var commentData = this_.draggedBubbles_[i]; @@ -744,7 +749,7 @@ Blockly.BlockSvg.prototype.onMouseMove_ = function(e) { // Provide visual indication of whether the block will be deleted if // dropped here. if (this_.isDeletable()) { - this_.workspace.isDeleteArea(e); + workspace_.isDeleteArea(e); } } // This event has been handled. No need to bubble up to the document. @@ -1035,7 +1040,8 @@ Blockly.BlockSvg.prototype.dispose = function(healStack, animate, Blockly.BlockSvg.prototype.disposeUiEffect = function() { this.workspace.playAudio('delete'); - var xy = Blockly.getSvgXY_(/** @type {!Element} */ (this.svgGroup_)); + var xy = Blockly.getSvgXY_(/** @type {!Element} */ (this.svgGroup_), + this.workspace); // Deeply clone the current block. var clone = this.svgGroup_.cloneNode(true); clone.translateX_ = xy.x; @@ -1045,31 +1051,34 @@ Blockly.BlockSvg.prototype.disposeUiEffect = function() { this.workspace.options.svg.appendChild(clone); clone.bBox_ = clone.getBBox(); // Start the animation. - clone.startDate_ = new Date(); - Blockly.BlockSvg.disposeUiStep_(clone, this.RTL); + Blockly.BlockSvg.disposeUiStep_(clone, this.RTL, new Date(), + this.workspace.scale); }; /** * Animate a cloned block and eventually dispose of it. + * This is a class method, not an instace method since the original block has + * been destroyed and is no longer accessible. * @param {!Element} clone SVG element to animate and dispose of. * @param {boolean} rtl True if RTL, false if LTR. + * @param {!Date} start Date of animation's start. + * @param {number} workspaceScale Scale of workspace. * @private */ -Blockly.BlockSvg.disposeUiStep_ = function(clone, rtl) { - var ms = (new Date()) - clone.startDate_; +Blockly.BlockSvg.disposeUiStep_ = function(clone, rtl, start, workspaceScale) { + var ms = (new Date()) - start; var percent = ms / 150; if (percent > 1) { goog.dom.removeNode(clone); } else { var x = clone.translateX_ + - (rtl ? -1 : 1) * clone.bBox_.width / 2 * percent; - var y = clone.translateY_ + clone.bBox_.height * percent; - var translate = x + ', ' + y; - var scale = 1 - percent; - clone.setAttribute('transform', 'translate(' + translate + ')' + + (rtl ? -1 : 1) * clone.bBox_.width * workspaceScale / 2 * percent; + var y = clone.translateY_ + clone.bBox_.height * workspaceScale * percent; + var scale = (1 - percent) * workspaceScale; + clone.setAttribute('transform', 'translate(' + x + ',' + y + ')' + ' scale(' + scale + ')'); var closure = function() { - Blockly.BlockSvg.disposeUiStep_(clone, rtl); + Blockly.BlockSvg.disposeUiStep_(clone, rtl, start, workspaceScale); }; setTimeout(closure, 10); } @@ -1082,39 +1091,41 @@ Blockly.BlockSvg.prototype.connectionUiEffect = function() { this.workspace.playAudio('click'); // Determine the absolute coordinates of the inferior block. - var xy = Blockly.getSvgXY_(/** @type {!Element} */ (this.svgGroup_)); - // Offset the coordinates based on the two connection types. + var xy = Blockly.getSvgXY_(/** @type {!Element} */ (this.svgGroup_), + this.workspace); + // Offset the coordinates based on the two connection types, fix scale. if (this.outputConnection) { - xy.x += this.RTL ? 3 : -3; - xy.y += 13; + xy.x += (this.RTL ? 3 : -3) * this.workspace.scale; + xy.y += 13 * this.workspace.scale; } else if (this.previousConnection) { - xy.x += this.RTL ? -23 : 23; - xy.y += 3; + xy.x += (this.RTL ? -23 : 23) * this.workspace.scale; + xy.y += 3 * this.workspace.scale; } var ripple = Blockly.createSvgElement('circle', {'cx': xy.x, 'cy': xy.y, 'r': 0, 'fill': 'none', 'stroke': '#888', 'stroke-width': 10}, this.workspace.options.svg); // Start the animation. - ripple.startDate_ = new Date(); - Blockly.BlockSvg.connectionUiStep_(ripple); + Blockly.BlockSvg.connectionUiStep_(ripple, new Date(), this.workspace.scale); }; /** * Expand a ripple around a connection. * @param {!Element} ripple Element to animate. + * @param {!Date} start Date of animation's start. + * @param {number} workspaceScale Scale of workspace. * @private */ -Blockly.BlockSvg.connectionUiStep_ = function(ripple) { - var ms = (new Date()) - ripple.startDate_; +Blockly.BlockSvg.connectionUiStep_ = function(ripple, start, workspaceScale) { + var ms = (new Date()) - start; var percent = ms / 150; if (percent > 1) { goog.dom.removeNode(ripple); } else { - ripple.setAttribute('r', percent * 25); + ripple.setAttribute('r', percent * 25 * workspaceScale); ripple.style.opacity = 1 - percent; var closure = function() { - Blockly.BlockSvg.connectionUiStep_(ripple); + Blockly.BlockSvg.connectionUiStep_(ripple, start, workspaceScale); }; setTimeout(closure, 10); } @@ -1241,8 +1252,10 @@ Blockly.BlockSvg.prototype.setWarningText = function(text, opt_id) { // Wait until the drag finishes. var thisBlock = this; this.setWarningText.pid_[id] = setTimeout(function() { - delete thisBlock.setWarningText.pid_[id]; - thisBlock.setWarningText(text, id); + if (thisBlock.workspace) { // Check block wasn't deleted. + delete thisBlock.setWarningText.pid_[id]; + thisBlock.setWarningText(text, id); + } }, 100); return; } @@ -1276,9 +1289,9 @@ Blockly.BlockSvg.prototype.setWarningText = function(text, opt_id) { this.warning.dispose(); changedState = true; } else if (this.warning) { - var oldText = this.warning.getAllText(); + var oldText = this.warning.getText(); this.warning.setText('', id); - var newText = this.warning.getAllText(); + var newText = this.warning.getText(); if (!newText) { this.warning.dispose(); } @@ -1419,13 +1432,13 @@ Blockly.BlockSvg.prototype.renderFields_ = if (this.RTL) { cursorX -= field.renderSep + field.renderWidth; root.setAttribute('transform', - 'translate(' + cursorX + ', ' + cursorY + ')'); + 'translate(' + cursorX + ',' + cursorY + ')'); if (field.renderWidth) { cursorX -= Blockly.BlockSvg.SEP_SPACE_X; } } else { root.setAttribute('transform', - 'translate(' + (cursorX + field.renderSep) + ', ' + cursorY + ')'); + 'translate(' + (cursorX + field.renderSep) + ',' + cursorY + ')'); if (field.renderWidth) { cursorX += field.renderSep + field.renderWidth + Blockly.BlockSvg.SEP_SPACE_X; diff --git a/core/blockly.js b/core/blockly.js index f989542f29e..3d895d299be 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -82,8 +82,8 @@ Blockly.HSV_VALUE = 0.65; * Sprited icons and images. */ Blockly.SPRITE = { - width: 64, - height: 92, + width: 96, + height: 124, url: 'sprites.png' }; @@ -327,10 +327,9 @@ Blockly.onMouseMove_ = function(e) { // Move the scrollbars and the page will scroll automatically. workspace.scrollbar.set(-x - metrics.contentLeft, - -y - metrics.contentTop); + -y - metrics.contentTop); // Cancel the long-press if the drag has moved too far. - var dr = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - if (dr > Blockly.DRAG_RADIUS) { + if (Math.sqrt(dx * dx + dy * dy) > Blockly.DRAG_RADIUS) { Blockly.longStop_(); } e.stopPropagation(); @@ -510,23 +509,22 @@ Blockly.getMainWorkspaceMetrics_ = function() { // Firefox has trouble with hidden elements (Bug 528969). return null; } + // Fix scale. + var contentWidth = blockBox.width; + var contentHeight = blockBox.height; + var contentX = blockBox.x * this.scale; + var contentY = blockBox.y * this.scale; if (this.scrollbar) { // Add a border around the content that is at least half a screenful wide. // Ensure border is wide enough that blocks can scroll over entire screen. - var MARGIN = 5; - var leftScroll = this.RTL ? - Blockly.Scrollbar.scrollbarThickness : 0; - var rightScroll = this.RTL ? - 0 : Blockly.Scrollbar.scrollbarThickness; - var leftEdge = Math.min(blockBox.x - viewWidth / 2, - blockBox.x + blockBox.width - viewWidth - leftScroll + MARGIN); - var rightEdge = Math.max(blockBox.x + blockBox.width + viewWidth / 2, - blockBox.x + viewWidth + rightScroll - MARGIN); - var topEdge = Math.min(blockBox.y - viewHeight / 2, - blockBox.y + blockBox.height - viewHeight + MARGIN); - var bottomEdge = Math.max(blockBox.y + blockBox.height + viewHeight / 2, - blockBox.y + viewHeight + Blockly.Scrollbar.scrollbarThickness - - MARGIN); + var leftEdge = Math.min(contentX - viewWidth / 2, + contentX + contentWidth - viewWidth); + var rightEdge = Math.max(contentX + contentWidth + viewWidth / 2, + contentX + viewWidth); + var topEdge = Math.min(contentY - viewHeight / 2, + contentY + contentHeight - viewHeight); + var bottomEdge = Math.max(contentY + contentHeight + viewHeight / 2, + contentY + viewHeight); } else { var leftEdge = blockBox.x; var rightEdge = leftEdge + blockBox.width; diff --git a/core/bubble.js b/core/bubble.js index d80c8b274e4..7ce540f549b 100644 --- a/core/bubble.js +++ b/core/bubble.js @@ -267,13 +267,10 @@ Blockly.Bubble.prototype.bubbleMouseDown_ = function(e) { } // Left-click (or middle click) Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED); - // Record the starting offset between the current location and the mouse. - if (this.workspace_.RTL) { - this.dragDeltaX = this.relativeLeft_ + e.clientX; - } else { - this.dragDeltaX = this.relativeLeft_ - e.clientX; - } - this.dragDeltaY = this.relativeTop_ - e.clientY; + + this.workspace_.startDrag(e, + this.workspace_.RTL ? -this.relativeLeft_ : this.relativeLeft_, + this.relativeTop_); Blockly.Bubble.onMouseUpWrapper_ = Blockly.bindEvent_(document, 'mouseup', this, Blockly.Bubble.unbindDragEvents_); @@ -291,12 +288,9 @@ Blockly.Bubble.prototype.bubbleMouseDown_ = function(e) { */ Blockly.Bubble.prototype.bubbleMouseMove_ = function(e) { this.autoLayout_ = false; - if (this.workspace_.RTL) { - this.relativeLeft_ = this.dragDeltaX - e.clientX; - } else { - this.relativeLeft_ = this.dragDeltaX + e.clientX; - } - this.relativeTop_ = this.dragDeltaY + e.clientY; + var newXY = this.workspace_.moveDrag(e); + this.relativeLeft_ = this.workspace_.RTL ? -newXY.x : newXY.x; + this.relativeTop_ = newXY.y; this.positionBubble_(); this.renderArrow_(); }; @@ -316,13 +310,9 @@ Blockly.Bubble.prototype.resizeMouseDown_ = function(e) { } // Left-click (or middle click) Blockly.Css.setCursor(Blockly.Css.Cursor.CLOSED); - // Record the starting offset between the current location and the mouse. - if (this.workspace_.RTL) { - this.resizeDeltaWidth = this.width_ + e.clientX; - } else { - this.resizeDeltaWidth = this.width_ - e.clientX; - } - this.resizeDeltaHeight = this.height_ - e.clientY; + + this.workspace_.startDrag(e, + this.workspace_.RTL ? -this.width_ : this.width_, this.height_); Blockly.Bubble.onMouseUpWrapper_ = Blockly.bindEvent_(document, 'mouseup', this, Blockly.Bubble.unbindDragEvents_); @@ -340,16 +330,8 @@ Blockly.Bubble.prototype.resizeMouseDown_ = function(e) { */ Blockly.Bubble.prototype.resizeMouseMove_ = function(e) { this.autoLayout_ = false; - var w = this.resizeDeltaWidth; - var h = this.resizeDeltaHeight + e.clientY; - if (this.workspace_.RTL) { - // RTL drags the bottom-left corner. - w -= e.clientX; - } else { - // LTR drags the bottom-right corner. - w += e.clientX; - } - this.setBubbleSize(w, h); + var newXY = this.workspace_.moveDrag(e); + this.setBubbleSize(this.workspace_.RTL ? -newXY.x : newXY.x, newXY.y); if (this.workspace_.RTL) { // RTL requires the bubble to move its left edge. this.positionBubble_(); @@ -398,6 +380,8 @@ Blockly.Bubble.prototype.layoutBubble_ = function() { var relativeTop = -this.height_ - Blockly.BlockSvg.MIN_BLOCK_Y; // Prevent the bubble from being off-screen. var metrics = this.workspace_.getMetrics(); + metrics.viewWidth /= this.workspace_.scale; + metrics.viewLeft /= this.workspace_.scale; if (this.workspace_.RTL) { if (this.anchorX_ - metrics.viewLeft - relativeLeft - this.width_ < Blockly.Scrollbar.scrollbarThickness) { @@ -444,7 +428,7 @@ Blockly.Bubble.prototype.positionBubble_ = function() { } var top = this.relativeTop_ + this.anchorY_; this.bubbleGroup_.setAttribute('transform', - 'translate(' + left + ', ' + top + ')'); + 'translate(' + left + ',' + top + ')'); }; /** @@ -474,11 +458,10 @@ Blockly.Bubble.prototype.setBubbleSize = function(width, height) { // Mirror the resize group. var resizeSize = 2 * Blockly.Bubble.BORDER_WIDTH; this.resizeGroup_.setAttribute('transform', 'translate(' + - resizeSize + ', ' + - (height - doubleBorderWidth) + ') scale(-1 1)'); + resizeSize + ',' + (height - doubleBorderWidth) + ') scale(-1 1)'); } else { this.resizeGroup_.setAttribute('transform', 'translate(' + - (width - doubleBorderWidth) + ', ' + + (width - doubleBorderWidth) + ',' + (height - doubleBorderWidth) + ')'); } } diff --git a/core/comment.js b/core/comment.js index 4fc860e418f..3f2c1f7d964 100644 --- a/core/comment.js +++ b/core/comment.js @@ -94,6 +94,10 @@ Blockly.Comment.prototype.createEditor_ = function() { body.appendChild(this.textarea_); this.foreignObject_.appendChild(body); Blockly.bindEvent_(this.textarea_, 'mouseup', this, this.textareaFocus_); + // Don't zoom with mousewheel. + Blockly.bindEvent_(this.textarea_, 'wheel', this, function(e) { + e.stopPropagation(); + }); return this.foreignObject_; }; diff --git a/core/css.js b/core/css.js index e87125eac97..b5dff3dd4dd 100644 --- a/core/css.js +++ b/core/css.js @@ -118,10 +118,10 @@ Blockly.Css.setCursor = function(cursor) { // There is probably only one toolbox, so just change its style property. var toolboxen = document.getElementsByClassName('blocklyToolboxDiv'); for (var i = 0, toolbox; toolbox = toolboxen[i]; i++) { - if (cursor == Blockly.Css.Cursor.OPEN) { - toolbox.style.cursor = ''; - } else { + if (cursor == Blockly.Css.Cursor.DELETE) { toolbox.style.cursor = url; + } else { + toolbox.style.cursor = ''; } } // Set cursor on the whole document, so that rapid movements @@ -302,9 +302,12 @@ Blockly.Css.CONTENT = [ '.blocklyHtmlInput {', ' border: none;', + ' border-radius: 4px;', ' font-family: sans-serif;', - ' font-size: 11pt;', + ' height: 100%;', + ' margin: 0;', ' outline: none;', + ' padding: 0 1px;', ' width: 100%', '}', @@ -337,6 +340,18 @@ Blockly.Css.CONTENT = [ ' fill: #bbb;', '}', + '.blocklyZoom>image {', + ' opacity: .4;', + '}', + + '.blocklyZoom>image:hover {', + ' opacity: .6;', + '}', + + '.blocklyZoom>image:active {', + ' opacity: .8;', + '}', + /* Darken flyout scrollbars due to being on a grey background. */ /* By contrast, workspace scrollbars are on a white background. */ '.blocklyFlyout .blocklyScrollbarKnob {', diff --git a/core/field.js b/core/field.js index 4086ec6403e..486ab172b5f 100644 --- a/core/field.js +++ b/core/field.js @@ -109,7 +109,7 @@ Blockly.Field.prototype.init = function(block) { 'ry': 4, 'x': -Blockly.BlockSvg.SEP_SPACE_X / 2, 'y': -12, - 'height': 16}, this.fieldGroup_); + 'height': 16}, this.fieldGroup_, this.sourceBlock_.workspace); this.textElement_ = Blockly.createSvgElement('text', {'class': 'blocklyText'}, this.fieldGroup_); @@ -243,6 +243,18 @@ Blockly.Field.prototype.getSize = function() { return this.size_; }; +/** + * Returns the height and width of the field, + * accounting for the workspace scaling. + * @return {!Object} Height and width. + */ +Blockly.Field.prototype.getScaledBBox_ = function() { + var bBox = this.borderRect_.getBBox(); + bBox.width *= this.sourceBlock_.workspace.scale; + bBox.height *= this.sourceBlock_.workspace.scale; + return bBox; +}; + /** * Get the text from this field. * @return {string} Current text. diff --git a/core/field_colour.js b/core/field_colour.js index 18068f50ee5..ed738a3fa7d 100644 --- a/core/field_colour.js +++ b/core/field_colour.js @@ -170,7 +170,7 @@ Blockly.FieldColour.prototype.showEditor_ = function() { var windowSize = goog.dom.getViewportSize(); var scrollOffset = goog.style.getViewportPageOffset(document); var xy = this.getAbsoluteXY_(); - var borderBBox = this.borderRect_.getBBox(); + var borderBBox = this.getScaledBBox_(); var div = Blockly.WidgetDiv.DIV; picker.render(div); picker.setSelectedColor(this.getValue()); diff --git a/core/field_date.js b/core/field_date.js index cabd1262f22..11f47d97647 100644 --- a/core/field_date.js +++ b/core/field_date.js @@ -113,7 +113,7 @@ Blockly.FieldDate.prototype.showEditor_ = function() { var windowSize = goog.dom.getViewportSize(); var scrollOffset = goog.style.getViewportPageOffset(document); var xy = this.getAbsoluteXY_(); - var borderBBox = this.borderRect_.getBBox(); + var borderBBox = this.getScaledBBox_(); var div = Blockly.WidgetDiv.DIV; picker.render(div); picker.setDate(goog.date.fromIsoString(this.getValue())); diff --git a/core/field_dropdown.js b/core/field_dropdown.js index 2e2a845a532..55cf5377086 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -126,11 +126,13 @@ Blockly.FieldDropdown.prototype.showEditor_ = function() { } var menu = new goog.ui.Menu(); + menu.setRightToLeft(this.sourceBlock_.RTL); var options = this.getOptions_(); for (var x = 0; x < options.length; x++) { var text = options[x][0]; // Human-readable text. var value = options[x][1]; // Language-neutral value. var menuItem = new goog.ui.MenuItem(text); + menuItem.setRightToLeft(this.sourceBlock_.RTL); menuItem.setValue(value); menuItem.setCheckable(true); menu.addChild(menuItem, true); @@ -158,7 +160,7 @@ Blockly.FieldDropdown.prototype.showEditor_ = function() { var windowSize = goog.dom.getViewportSize(); var scrollOffset = goog.style.getViewportPageOffset(document); var xy = this.getAbsoluteXY_(); - var borderBBox = this.borderRect_.getBBox(); + var borderBBox = this.getScaledBBox_(); var div = Blockly.WidgetDiv.DIV; menu.render(div); var menuDom = menu.getElement(); diff --git a/core/field_image.js b/core/field_image.js index ca38acab8bd..aef22912161 100644 --- a/core/field_image.js +++ b/core/field_image.js @@ -28,6 +28,7 @@ goog.provide('Blockly.FieldImage'); goog.require('Blockly.Field'); goog.require('goog.dom'); +goog.require('goog.math.Size'); goog.require('goog.userAgent'); @@ -45,7 +46,7 @@ Blockly.FieldImage = function(src, width, height, opt_alt) { // Ensure height and width are numbers. Strings are bad at math. this.height_ = Number(height); this.width_ = Number(width); - this.size_ = {height: this.height_ + 10, width: this.width_}; + this.size_ = new goog.math.Size(this.height_ + 10, this.width_); this.text_ = opt_alt || ''; this.setSrc(src); }; diff --git a/core/field_textinput.js b/core/field_textinput.js index 69a1b73ffa0..745b227e7f2 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -50,6 +50,11 @@ Blockly.FieldTextInput = function(text, opt_changeHandler) { }; goog.inherits(Blockly.FieldTextInput, Blockly.Field); +/** + * Point size of text. Should match blocklyText's font-size in CSS. + */ +Blockly.FieldTextInput.FONTSIZE = 11; + /** * Mouse cursor style when over the hotspot that initiates the editor. */ @@ -127,6 +132,10 @@ Blockly.FieldTextInput.prototype.showEditor_ = function(opt_quietInput) { // Create the input. var htmlInput = goog.dom.createDom('input', 'blocklyHtmlInput'); htmlInput.setAttribute('spellcheck', this.spellcheck_); + var fontSize = (Blockly.FieldTextInput.FONTSIZE * + this.sourceBlock_.workspace.scale) + 'pt'; + div.style.fontSize = fontSize; + htmlInput.style.fontSize = fontSize; /** @type {!HTMLInputElement} */ Blockly.FieldTextInput.htmlInput_ = htmlInput; div.appendChild(htmlInput); @@ -218,12 +227,15 @@ Blockly.FieldTextInput.prototype.validate_ = function() { Blockly.FieldTextInput.prototype.resizeEditor_ = function() { var div = Blockly.WidgetDiv.DIV; var bBox = this.fieldGroup_.getBBox(); + bBox.width *= this.sourceBlock_.workspace.scale; + bBox.height *= this.sourceBlock_.workspace.scale; div.style.width = bBox.width + 'px'; + div.style.height = bBox.height + 'px'; var xy = this.getAbsoluteXY_(); // In RTL mode block fields and LTR input fields the left edge moves, // whereas the right edge is fixed. Reposition the editor. if (this.sourceBlock_.RTL) { - var borderBBox = this.borderRect_.getBBox(); + var borderBBox = this.getScaledBBox_(); xy.x += borderBBox.width; xy.x -= div.offsetWidth; } @@ -265,8 +277,11 @@ Blockly.FieldTextInput.prototype.widgetDispose_ = function() { Blockly.unbindEvent_(htmlInput.onKeyPressWrapper_); Blockly.unbindEvent_(htmlInput.onWorkspaceChangeWrapper_); Blockly.FieldTextInput.htmlInput_ = null; - // Delete the width property. - Blockly.WidgetDiv.DIV.style.width = 'auto'; + // Delete style properties. + var style = Blockly.WidgetDiv.DIV.style; + style.width = 'auto'; + style.height = 'auto'; + style.fontSize = ''; }; }; diff --git a/core/flyout.js b/core/flyout.js index 257d6c41a0f..72de95590b5 100644 --- a/core/flyout.js +++ b/core/flyout.js @@ -106,6 +106,12 @@ Blockly.Flyout.prototype.autoClose = true; */ Blockly.Flyout.prototype.CORNER_RADIUS = 8; +/** + * Top/bottom padding between scrollbar and edge of flyout background. + * @type {number} + * @const + */ +Blockly.Flyout.prototype.SCROLLBAR_PADDING = 2; /** * Creates the flyout's DOM. Only needs to be called once. @@ -127,12 +133,12 @@ Blockly.Flyout.prototype.createDom = function() { /** * Initializes the flyout. - * @param {!Blockly.Workspace} workspace The workspace in which to create new - * blocks. + * @param {!Blockly.Workspace} targetWorkspace The workspace in which to create + * new blocks. */ -Blockly.Flyout.prototype.init = function(workspace) { - this.targetWorkspace_ = workspace; - this.workspace_.targetWorkspace = workspace; +Blockly.Flyout.prototype.init = function(targetWorkspace) { + this.targetWorkspace_ = targetWorkspace; + this.workspace_.targetWorkspace = targetWorkspace; // Add scrollbar. this.scrollbar_ = new Blockly.Scrollbar(this.workspace_, false, false); @@ -140,9 +146,6 @@ Blockly.Flyout.prototype.init = function(workspace) { this.eventWrappers_.concat(Blockly.bindEvent_(this.svgGroup_, 'wheel', this, this.wheel_)); - // Safari needs mousewheel. - this.eventWrappers_.concat(Blockly.bindEvent_(this.svgGroup_, - 'mousewheel', this, this.wheel_)); this.eventWrappers_.concat( Blockly.bindEvent_(this.targetWorkspace_.getCanvas(), 'blocklyWorkspaceChange', this, this.filterForCapacity_)); @@ -190,7 +193,7 @@ Blockly.Flyout.prototype.getMetrics_ = function() { // Flyout is hidden. return null; } - var viewHeight = this.height_ - 2 * this.CORNER_RADIUS; + var viewHeight = this.height_ - 2 * this.SCROLLBAR_PADDING; var viewWidth = this.width_; try { var optionBox = this.workspace_.getCanvas().getBBox(); @@ -204,7 +207,7 @@ Blockly.Flyout.prototype.getMetrics_ = function() { contentHeight: optionBox.height + optionBox.y, viewTop: -this.workspace_.scrollY, contentTop: 0, - absoluteTop: this.CORNER_RADIUS, + absoluteTop: this.SCROLLBAR_PADDING, absoluteLeft: 0 }; }; @@ -289,8 +292,7 @@ Blockly.Flyout.prototype.scrollToTop = function() { * @private */ Blockly.Flyout.prototype.wheel_ = function(e) { - // Safari uses wheelDeltaY, everyone else uses deltaY. - var delta = e.deltaY || -e.wheelDeltaY; + var delta = e.deltaY; if (delta) { if (goog.userAgent.GECKO) { // Firefox's deltas are a tenth that of Chrome/Safari. @@ -303,6 +305,8 @@ Blockly.Flyout.prototype.wheel_ = function(e) { this.scrollbar_.set(y); // Don't scroll the page. e.preventDefault(); + // Don't propagate mousewheel event (zooming). + e.stopPropagation(); } }; @@ -581,8 +585,7 @@ Blockly.Flyout.prototype.onMouseMoveBlock_ = function(e) { var dx = e.clientX - Blockly.Flyout.startDownEvent_.clientX; var dy = e.clientY - Blockly.Flyout.startDownEvent_.clientY; // Still dragging within the sticky DRAG_RADIUS. - var dr = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - if (dr > Blockly.DRAG_RADIUS) { + if (Math.sqrt(dx * dx + dy * dy) > Blockly.DRAG_RADIUS) { // Create the block. Blockly.Flyout.startFlyout_.createBlockFunc_(Blockly.Flyout.startBlock_)( Blockly.Flyout.startDownEvent_); @@ -597,6 +600,7 @@ Blockly.Flyout.prototype.onMouseMoveBlock_ = function(e) { */ Blockly.Flyout.prototype.createBlockFunc_ = function(originBlock) { var flyout = this; + var workspace = this.targetWorkspace_; return function(e) { if (Blockly.isRightButton(e)) { // Right-click. Don't create a block, let the context menu show. @@ -608,19 +612,41 @@ Blockly.Flyout.prototype.createBlockFunc_ = function(originBlock) { } // Create the new block by cloning the block in the flyout (via XML). var xml = Blockly.Xml.blockToDom_(originBlock); - var block = Blockly.Xml.domToBlock(flyout.targetWorkspace_, xml); + var block = Blockly.Xml.domToBlock(workspace, xml); // Place it in the same spot as the flyout copy. var svgRootOld = originBlock.getSvgRoot(); if (!svgRootOld) { throw 'originBlock is not rendered.'; } - var xyOld = Blockly.getSvgXY_(svgRootOld); + var xyOld = Blockly.getSvgXY_(svgRootOld, workspace); var svgRootNew = block.getSvgRoot(); if (!svgRootNew) { throw 'block is not rendered.'; } - var xyNew = Blockly.getSvgXY_(svgRootNew); - block.moveBy(xyOld.x - xyNew.x, xyOld.y - xyNew.y); + if (workspace.scale == 1) { + // No scaling issues. + var xyNew = Blockly.getSvgXY_(svgRootNew, workspace); + block.moveBy(xyOld.x - xyNew.x, xyOld.y - xyNew.y); + } else { + // Scale the block while keeping the mouse location constant. + var mouseXY = Blockly.mouseToSvg(e, workspace.options.svg); + // Relative mouse position to the block. + var rMouseX = mouseXY.x - xyOld.x; + var rMouseY = mouseXY.y - xyOld.y; + // Fix scale. + xyOld.x /= workspace.scale; + xyOld.y /= workspace.scale; + // Calculate the position to create the block, fixing scale. + var xyCanvastoSvg = Blockly.getRelativeXY_(workspace.getCanvas()); + var xyNewtoCanvas = Blockly.getRelativeXY_(svgRootNew); + var newX = xyCanvastoSvg.x / workspace.scale + xyNewtoCanvas.x; + var newY = xyCanvastoSvg.y / workspace.scale + xyNewtoCanvas.y; + var placePositionX = xyOld.x - newX; + var placePositionY = xyOld.y - newY; + var dx = rMouseX - rMouseX / workspace.scale; + var dy = rMouseY - rMouseY / workspace.scale; + block.moveBy(placePositionX - dx, placePositionY - dy); + } if (flyout.autoClose) { flyout.hide(); } else { @@ -652,15 +678,18 @@ Blockly.Flyout.prototype.filterForCapacity_ = function() { */ Blockly.Flyout.prototype.getRect = function() { // BIG_NUM is offscreen padding so that blocks dragged beyond the shown flyout - // area are still deleted. Must be smaller than Infinity, but larger than - // the largest screen size. - var BIG_NUM = 10000000; - var x = Blockly.getSvgXY_(this.svgGroup_).x; + // area are still deleted. Must be larger than the largest screen size, + // but be smaller than half Number.MAX_SAFE_INTEGER (not available on IE). + var BIG_NUM = 1000000000; + var mainWorkspace = Blockly.mainWorkspace; + var x = Blockly.getSvgXY_(this.svgGroup_, mainWorkspace).x; if (!this.RTL) { x -= BIG_NUM; } - return new goog.math.Rect(x, -BIG_NUM, - BIG_NUM + this.width_, this.height_ + 2 * BIG_NUM); + // Fix scale if nested in zoomed workspace. + var scale = this.targetWorkspace_ == mainWorkspace ? 1 : mainWorkspace.scale; + return new goog.math.Rect(x, -BIG_NUM, + BIG_NUM + this.width_ * scale, BIG_NUM * 2); }; /** diff --git a/core/icon.js b/core/icon.js index 41d9f19629c..6b3042d63bd 100644 --- a/core/icon.js +++ b/core/icon.js @@ -138,6 +138,10 @@ Blockly.Icon.prototype.isVisible = function() { * @private */ Blockly.Icon.prototype.iconClick_ = function(e) { + if (Blockly.dragMode_ == 2) { + // Drag operation is concluding. Don't open the editor. + return; + } if (!this.block_.isInFlyout && !Blockly.isRightButton(e)) { this.setVisible(!this.isVisible()); } diff --git a/core/inject.js b/core/inject.js index dea3d613452..026e308f338 100644 --- a/core/inject.js +++ b/core/inject.js @@ -142,21 +142,14 @@ Blockly.parseOptions_ = function(options) { if (hasCss === undefined) { hasCss = true; } + // See grid documentation at: + // https://developers.google.com/blockly/installation/grid var grid = options['grid'] || {}; - if (!grid['spacing']) { - grid['spacing'] = 0; - } else { - grid['spacing'] = parseFloat(grid['spacing']); - } - if (!grid['colour']) { - grid['colour'] = '#888'; - } - if (!grid['length']) { - grid['length'] = 1; - } else { - grid['length'] = parseFloat(grid['length']); - } - grid['snap'] = grid['spacing'] > 0 && !!grid['snap']; + var gridOptions = {}; + gridOptions.spacing = parseFloat(grid['spacing']) || 0; + gridOptions.colour = grid['colour'] || '#888'; + gridOptions.length = parseFloat(grid['length']) || 1; + gridOptions.snap = gridOptions.spacing > 0 && !!grid['snap']; var pathToMedia = 'https://blockly-demo.appspot.com/static/media/'; if (options['media']) { pathToMedia = options['media']; @@ -164,6 +157,75 @@ Blockly.parseOptions_ = function(options) { // 'path' is a deprecated option which has been replaced by 'media'. pathToMedia = options['path'] + 'media/'; } + +/* TODO (fraser): Add documentation page: + * https://developers.google.com/blockly/installation/zoom + * + * enabled + * + * Set to `true` to allow zooming of the main workspace. Zooming is only + * possible if the workspace has scrollbars. If `false`, then the options + * below have no effect. Defaults to `false`. + * + * controls + * + * Set to `true` to show zoom-in and zoom-out buttons. Defaults to `true`. + * + * wheel + * + * Set to `true` to allow the mouse wheel to zoom. Defaults to `true`. + * + * maxScale + * + * Maximum multiplication factor for how far one can zoom in. Defaults to `3`. + * + * minScale + * + * Minimum multiplication factor for how far one can zoom out. Defaults to `0.3`. + * + * scaleSpeed + * + * For each zooming in-out step the scale is multiplied + * or divided respectively by the scale speed, this means that: + * `scale = scaleSpeed ^ steps`, note that in this formula + * steps of zoom-out are subtracted and zoom-in steps are added. + */ + // See zoom documentation at: + // https://developers.google.com/blockly/installation/zoom + var zoom = options['zoom'] || {}; + var zoomOptions = {}; + zoomOptions.enabled = hasScrollbars && !!zoom['enabled']; + if (zoomOptions.enabled) { + if (zoom['controls'] === undefined) { + zoomOptions.controls = true; + } else { + zoomOptions.controls = !!zoom['controls']; + } + if (zoom['wheel'] === undefined) { + zoomOptions.wheel = true; + } else { + zoomOptions.wheel = !!zoom['wheel']; + } + if (zoom['maxScale'] === undefined) { + zoomOptions.maxScale = 3; + } else { + zoomOptions.maxScale = parseFloat(zoom['maxScale']); + } + if (zoom['minScale'] === undefined) { + zoomOptions.minScale = 0.3; + } else { + zoomOptions.minScale = parseFloat(zoom['minScale']); + } + if (zoom['scaleSpeed'] === undefined) { + zoomOptions.scaleSpeed = 1.2; + } else { + zoomOptions.scaleSpeed = parseFloat(zoom['scaleSpeed']); + } + } else { + zoomOptions.controls = false; + zoomOptions.wheel = false; + } + var enableRealtime = !!options['realtime']; var realtimeOptions = enableRealtime ? options['realtimeOptions'] : undefined; @@ -181,7 +243,8 @@ Blockly.parseOptions_ = function(options) { hasSounds: hasSounds, hasCss: hasCss, languageTree: languageTree, - gridOptions: grid, + gridOptions: gridOptions, + zoomOptions: zoomOptions, enableRealtime: enableRealtime, realtimeOptions: realtimeOptions }; @@ -282,39 +345,24 @@ Blockly.createDom_ = function(container, options) { Blockly.createSvgElement('path', {'d': 'M 0 0 L 10 10 M 10 0 L 0 10', 'stroke': '#cc0'}, disabledPattern); /* - - - + + + */ - // MSIE freaks if it sees a 0x0 pattern, so set empty patterns to 100x100. - var safeSpacing = options.gridOptions['spacing'] || 100; var gridPattern = Blockly.createSvgElement('pattern', {'id': 'blocklyGridPattern' + String(Math.random()).substring(2), - 'patternUnits': 'userSpaceOnUse', - 'width': safeSpacing, - 'height': safeSpacing}, defs); + 'patternUnits': 'userSpaceOnUse'}, defs); if (options.gridOptions['length'] > 0 && options.gridOptions['spacing'] > 0) { - var half = Math.floor(options.gridOptions['spacing'] / 2) + .5; - var start = half - options.gridOptions['length'] / 2; - var end = half + options.gridOptions['length'] / 2; Blockly.createSvgElement('line', - {'x1': start, - 'y1': half, - 'x2': end, - 'y2': half, - 'stroke': options.gridOptions['colour']}, + {'stroke': options.gridOptions['colour']}, gridPattern); if (options.gridOptions['length'] > 1) { Blockly.createSvgElement('line', - {'x1': half, - 'y1': start, - 'x2': half, - 'y2': end, - 'stroke': options.gridOptions['colour']}, + {'stroke': options.gridOptions['colour']}, gridPattern); } + // x1, y1, x1, x2 properties will be set later in updateGridPattern_. } options.gridPattern = gridPattern; options.svg = svg; @@ -446,7 +494,7 @@ Blockly.init_ = function(mainWorkspace) { if (options.RTL) { mainWorkspace.scrollX *= -1; } - var translation = 'translate(' + mainWorkspace.scrollX + ', 0)'; + var translation = 'translate(' + mainWorkspace.scrollX + ',0)'; mainWorkspace.getCanvas().setAttribute('transform', translation); mainWorkspace.getBubbleCanvas().setAttribute('transform', translation); } diff --git a/core/scrollbar.js b/core/scrollbar.js index 864c125e8a4..80adc623e7c 100644 --- a/core/scrollbar.js +++ b/core/scrollbar.js @@ -372,7 +372,7 @@ Blockly.Scrollbar.prototype.onMouseDownBar_ = function(e) { var mouseXY = Blockly.mouseToSvg(e, this.workspace_.options.svg); var mouseLocation = this.horizontal_ ? mouseXY.x : mouseXY.y; - var knobXY = Blockly.getSvgXY_(this.svgKnob_); + var knobXY = Blockly.getSvgXY_(this.svgKnob_, this.workspace_); var knobStart = this.horizontal_ ? knobXY.x : knobXY.y; var knobLength = parseFloat( this.svgKnob_.getAttribute(this.horizontal_ ? 'width' : 'height')); diff --git a/core/tooltip.js b/core/tooltip.js index d71a4cd7664..4ac8049b94d 100644 --- a/core/tooltip.js +++ b/core/tooltip.js @@ -196,8 +196,7 @@ Blockly.Tooltip.onMouseMove_ = function(e) { // shown and the current mouse position. Pythagorean theorem. var dx = Blockly.Tooltip.lastX_ - e.pageX; var dy = Blockly.Tooltip.lastY_ - e.pageY; - var dr = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - if (dr > Blockly.Tooltip.RADIUS_OK) { + if (Math.sqrt(dx * dx + dy * dy) > Blockly.Tooltip.RADIUS_OK) { Blockly.Tooltip.hide(); } } else if (Blockly.Tooltip.poisonedElement_ != Blockly.Tooltip.element_) { diff --git a/core/trashcan.js b/core/trashcan.js index 3980c110aa0..35249e16b3d 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -230,7 +230,7 @@ Blockly.Trashcan.prototype.position = function() { * @return {goog.math.Rect} Rectangle in which to delete. */ Blockly.Trashcan.prototype.getRect = function() { - var trashXY = Blockly.getSvgXY_(this.svgGroup_); + var trashXY = Blockly.getSvgXY_(this.svgGroup_, this.workspace_); return new goog.math.Rect( trashXY.x - this.MARGIN_HOTSPOT_, trashXY.y - this.MARGIN_HOTSPOT_, diff --git a/core/utils.js b/core/utils.js index 839b74c1ddd..d9d6ef8688a 100644 --- a/core/utils.js +++ b/core/utils.js @@ -30,6 +30,7 @@ goog.provide('Blockly.utils'); goog.require('goog.events.BrowserFeature'); goog.require('goog.userAgent'); +goog.require('goog.dom'); /** @@ -281,22 +282,37 @@ Blockly.getRelativeXY_ = function(element) { }; /** - * Return the absolute coordinates of the top-left corner of this element. - * The origin (0,0) is the top-left corner of the nearest SVG. + * Return the absolute coordinates of the top-left corner of this element, + * scales that after canvas SVG element, if it's a descendant. + * The origin (0,0) is the top-left corner of the Blockly SVG. * @param {!Element} element Element to find the coordinates of. + * @param {!Blockly.Workspace} workspace Element must be in this workspace. * @return {!Object} Object with .x and .y properties. * @private */ -Blockly.getSvgXY_ = function(element) { +Blockly.getSvgXY_ = function(element, workspace) { var x = 0; var y = 0; + // Evaluate if element isn't child of a canvas. + var canvasFlag = !goog.dom.contains(workspace.getCanvas(), element) && + !goog.dom.contains(workspace.getBubbleCanvas(), element); do { // Loop through this block and every parent. var xy = Blockly.getRelativeXY_(element); - x += xy.x; - y += xy.y; + if (element == workspace.getCanvas() || + element == workspace.getBubbleCanvas()) { + canvasFlag = true; + } + // Before the SVG canvas scale the coordinates. + if (canvasFlag) { + x += xy.x; + y += xy.y; + } else { + x += xy.x * workspace.scale; + y += xy.y * workspace.scale; + } element = element.parentNode; - } while (element && element.nodeName.toLowerCase() != 'svg'); + } while (element && element != workspace.options.svg); return {x: x, y: y}; }; @@ -304,10 +320,12 @@ Blockly.getSvgXY_ = function(element) { * Helper method for creating SVG elements. * @param {string} name Element's tag name. * @param {!Object} attrs Dictionary of attribute names and values. - * @param {Element=} opt_parent Optional parent on which to append the element. + * @param {Element} parent Optional parent on which to append the element. + * @param {Blockly.Workspace=} opt_workspace Optional workspace for access to + * context (scale...). * @return {!SVGElement} Newly created SVG element. */ -Blockly.createSvgElement = function(name, attrs, opt_parent) { +Blockly.createSvgElement = function(name, attrs, parent, opt_workspace) { var e = /** @type {!SVGElement} */ ( document.createElementNS(Blockly.SVG_NS, name)); for (var key in attrs) { @@ -319,8 +337,8 @@ Blockly.createSvgElement = function(name, attrs, opt_parent) { if (document.body.runtimeStyle) { // Indicates presence of IE-only attr. e.runtimeStyle = e.currentStyle = e.style; } - if (opt_parent) { - opt_parent.appendChild(e); + if (parent) { + parent.appendChild(e); } return e; }; diff --git a/core/warning.js b/core/warning.js index 06a0711dc72..19bad6669f1 100644 --- a/core/warning.js +++ b/core/warning.js @@ -88,7 +88,7 @@ Blockly.Warning.prototype.setVisible = function(visible) { } if (visible) { // Create the bubble to display all warnings. - var paragraph = Blockly.Warning.textToDom_(this.getAllText()); + var paragraph = Blockly.Warning.textToDom_(this.getText()); this.bubble_ = new Blockly.Bubble( /** @type {!Blockly.Workspace} */ (this.block_.workspace), paragraph, this.block_.svgPath_, @@ -148,7 +148,7 @@ Blockly.Warning.prototype.setText = function(text, id) { * Get this warning's texts. * @return {string} All texts concatenated into one string. */ -Blockly.Warning.prototype.getAllText = function() { +Blockly.Warning.prototype.getText = function() { var allWarnings = []; for (var id in this.text_) { allWarnings.push(this.text_[id]); diff --git a/core/workspace.js b/core/workspace.js index b7fe0560e13..bd62251c782 100644 --- a/core/workspace.js +++ b/core/workspace.js @@ -36,13 +36,12 @@ goog.require('goog.math'); * @constructor */ Blockly.Workspace = function(opt_options) { - /** - * @type {!Array.} - * @private - */ - this.topBlocks_ = []; + /** @type {!Object} */ this.options = opt_options || {}; + /** @type {boolean} */ this.RTL = !!this.options.RTL; + /** @type {!Array.} */ + this.topBlocks_ = []; }; /** diff --git a/core/workspace_svg.js b/core/workspace_svg.js index eb2432286fc..381ea8d00d8 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -30,6 +30,7 @@ goog.provide('Blockly.WorkspaceSvg'); // goog.require('Blockly.Block'); goog.require('Blockly.ScrollbarPair'); goog.require('Blockly.Trashcan'); +goog.require('Blockly.ZoomControls'); goog.require('Blockly.Workspace'); goog.require('Blockly.Xml'); @@ -90,6 +91,26 @@ Blockly.WorkspaceSvg.prototype.scrollX = 0; */ Blockly.WorkspaceSvg.prototype.scrollY = 0; +/** + * Horizontal distance from mouse to object being dragged. + * @type {number} + * @private + */ +Blockly.WorkspaceSvg.prototype.dragDeltaX_ = 0; + +/** + * Vertical distance from mouse to object being dragged. + * @type {number} + * @private + */ +Blockly.WorkspaceSvg.prototype.dragDeltaY_ = 0; + +/** + * Current scale. + * @type {number} + */ +Blockly.WorkspaceSvg.prototype.scale = 1; + /** * The workspace's trashcan (if any). * @type {Blockly.Trashcan} @@ -130,17 +151,23 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) { } } this.svgBlockCanvas_ = Blockly.createSvgElement('g', - {'class': 'blocklyBlockCanvas'}, this.svgGroup_); + {'class': 'blocklyBlockCanvas'}, this.svgGroup_, this); this.svgBubbleCanvas_ = Blockly.createSvgElement('g', - {'class': 'blocklyBubbleCanvas'}, this.svgGroup_); + {'class': 'blocklyBubbleCanvas'}, this.svgGroup_, this); if (this.options.hasTrashcan) { this.addTrashcan_(); } - + if (this.options.zoomOptions && this.options.zoomOptions.controls) { + this.addZoomControls_(); + } Blockly.bindEvent_(this.svgGroup_, 'mousedown', this, this.onMouseDown_); var thisWorkspace = this; Blockly.bindEvent_(this.svgGroup_, 'touchstart', null, - function(e) {Blockly.longStart_(e, thisWorkspace);}); + function(e) {Blockly.longStart_(e, thisWorkspace);}); + if (this.options.zoomOptions && this.options.zoomOptions.wheel) { + // Mouse-wheel. + Blockly.bindEvent_(this.svgGroup_, 'wheel', this, this.onMouseWheel_); + } // Determine if there needs to be a category tree, or a simple list of // blocks. This cannot be changed later, since the UI is very different. @@ -149,6 +176,7 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) { } else if (this.options.languageTree) { this.addFlyout_(); } + this.updateGridPattern_(); return this.svgGroup_; }; @@ -174,6 +202,10 @@ Blockly.WorkspaceSvg.prototype.dispose = function() { this.trashcan.dispose(); this.trashcan = null; } + if (this.zoomControls) { + this.zoomControls.dispose(); + this.zoomControls = null; + } if (!this.options.parentWorkspace) { // Top-most workspace. Dispose of the SVG too. goog.dom.removeNode(this.options.svg); @@ -191,6 +223,17 @@ Blockly.WorkspaceSvg.prototype.addTrashcan_ = function() { this.trashcan.init(); }; +/** + * Add zoom controls. + * @private + */ +Blockly.WorkspaceSvg.prototype.addZoomControls_ = function() { + this.zoomControls = new Blockly.ZoomControls(this); + var svgZoomControls = this.zoomControls.createDom(); + this.svgGroup_.appendChild(svgZoomControls); + this.zoomControls.init(); +}; + /** * Add a flyout. * @private @@ -219,6 +262,9 @@ Blockly.WorkspaceSvg.prototype.resize = function() { if (this.trashcan) { this.trashcan.position(); } + if (this.zoomControls) { + this.zoomControls.position(); + } if (this.scrollbar) { this.scrollbar.resize(); } @@ -246,7 +292,8 @@ Blockly.WorkspaceSvg.prototype.getBubbleCanvas = function() { * @param {number} y Vertical translation. */ Blockly.WorkspaceSvg.prototype.translate = function(x, y) { - var translation = 'translate(' + x + ',' + y + ')'; + var translation = 'translate(' + x + ',' + y + ')' + + 'scale(' + this.scale + ')'; this.svgBlockCanvas_.setAttribute('transform', translation); this.svgBubbleCanvas_.setAttribute('transform', translation); }; @@ -461,7 +508,7 @@ Blockly.WorkspaceSvg.prototype.recordDeleteAreas = function() { */ Blockly.WorkspaceSvg.prototype.isDeleteArea = function(e) { var isDelete = false; - var mouseXY = Blockly.mouseToSvg(e, this.options.svg); + var mouseXY = Blockly.mouseToSvg(e, Blockly.mainWorkspace.options.svg); var xy = new goog.math.Coordinate(mouseXY.x, mouseXY.y); if (this.deleteAreaTrash_) { if (this.deleteAreaTrash_.contains(xy)) { @@ -532,6 +579,52 @@ Blockly.WorkspaceSvg.prototype.onMouseDown_ = function(e) { e.stopPropagation(); }; +/** + * Start tracking a drag of an object on this workspace. + * @param {!Event} e Mouse down event. + * @param {number} x Starting horizontal location of object. + * @param {number} y Starting vertical location of object. + */ +Blockly.WorkspaceSvg.prototype.startDrag = function(e, x, y) { + // Record the starting offset between the bubble's location and the mouse. + var point = Blockly.mouseToSvg(e, this.options.svg); + // Fix scale of mouse event. + point.x /= this.scale; + point.y /= this.scale; + this.dragDeltaX_ = x - point.x; + this.dragDeltaY_ = y - point.y; +}; + +/** + * Track a drag of an object on this workspace. + * @param {!Event} e Mouse move event. + * @return {!goog.math.Coordinate} New location of object. + */ +Blockly.WorkspaceSvg.prototype.moveDrag = function(e) { + var point = Blockly.mouseToSvg(e, this.options.svg); + // Fix scale of mouse event. + point.x /= this.scale; + point.y /= this.scale; + var x = this.dragDeltaX_ + point.x; + var y = this.dragDeltaY_ + point.y; + return new goog.math.Coordinate(x, y); +}; + +/** + * Handle a mouse-wheel on SVG drawing surface. + * @param {!Event} e Mouse wheel event. + * @private + */ +Blockly.WorkspaceSvg.prototype.onMouseWheel_ = function(e) { + Blockly.hideChaff(true); + // TODO: Remove terminateDrag and compensate for coordinate skew during zoom. + Blockly.terminateDrag_(); + var delta = e.deltaY > 0 ? -1 : 1; + var position = Blockly.mouseToSvg(e, this.options.svg); + this.zoom(position.x, position.y, delta); + e.preventDefault(); +}; + /** * Show the context menu for the workspace. * @param {!Event} e Mouse event. @@ -548,7 +641,7 @@ Blockly.WorkspaceSvg.prototype.showContextMenu_ = function(e) { if (this.options.collapse) { var hasCollapsedBlocks = false; var hasExpandedBlocks = false; - var topBlocks = this.getTopBlocks(false); + var topBlocks = this.getTopBlocks(true); for (var i = 0; i < topBlocks.length; i++) { var block = topBlocks[i]; while (block) { @@ -606,12 +699,17 @@ Blockly.WorkspaceSvg.prototype.showContextMenu_ = function(e) { * @private */ Blockly.WorkspaceSvg.prototype.loadAudio_ = function(filenames, name) { - if (!window['Audio'] || !filenames.length) { + if (!filenames.length) { + return; + } + try { + var audioTest = new window['Audio'](); + } catch(e) { // No browser support for Audio. + // IE can throw an error even if the Audio object exists. return; } var sound; - var audioTest = new window['Audio'](); for (var i = 0; i < filenames.length; i++) { var filename = filenames[i]; var ext = filename.match(/\.(\w+)$/); @@ -729,6 +827,102 @@ Blockly.WorkspaceSvg.prototype.markFocused = function() { Blockly.mainWorkspace = this; }; +/** + * Zooming the blocks centered in (x, y) coordinate with zooming in or out. + * @param {number} x X coordinate of center. + * @param {number} y Y coordinate of center. + * @param {number} type Type of zooming (-1 zooming out and 1 zooming in). + */ +Blockly.WorkspaceSvg.prototype.zoom = function(x, y, type) { + var speed = this.options.zoomOptions.scaleSpeed; + var metrics = this.getMetrics(); + var center = this.options.svg.createSVGPoint(); + center.x = x; + center.y = y; + center = center.matrixTransform(this.getCanvas().getCTM().inverse()); + x = center.x; + y = center.y; + var canvas = this.getCanvas(); + // Scale factor. + var scaleChange = (type == 1) ? speed : 1 / speed; + // Clamp scale within valid range. + var newScale = this.scale * scaleChange; + if (newScale > this.options.zoomOptions.maxScale) { + scaleChange = this.options.zoomOptions.maxScale / this.scale; + } else if (newScale < this.options.zoomOptions.minScale) { + scaleChange = this.options.zoomOptions.minScale / this.scale; + } + var matrix = canvas.getCTM() + .translate(x * (1 - scaleChange), y * (1 - scaleChange)) + .scale(scaleChange); + // newScale and matrix.a should be identical (within a rounding error). + if (this.scale != matrix.a) { + this.scale = matrix.a; + this.scrollX = matrix.e - metrics.absoluteLeft; + this.scrollY = matrix.f - metrics.absoluteTop; + this.updateGridPattern_(); + this.scrollbar.resize(); + } +}; + +/** + * Zooming the blocks centered in the center of view with zooming in or out. + * @param {number} type Type of zooming (-1 zooming out and 1 zooming in). + */ +Blockly.WorkspaceSvg.prototype.zoomCenter = function(type) { + var metrics = this.getMetrics(); + var x = metrics.viewWidth / 2; + var y = metrics.viewHeight / 2; + this.zoom(x, y, type); +}; + +/** + * Reset zooming and dragging. + */ +Blockly.WorkspaceSvg.prototype.zoomReset = function() { + this.scale = 1; + this.updateGridPattern_(); + var metrics = this.getMetrics(); + this.scrollbar.set((metrics.contentWidth - metrics.viewWidth) / 2, + (metrics.contentHeight - metrics.viewHeight) / 2); +}; + +/** + * Updates the grid pattern. + * @private + */ +Blockly.WorkspaceSvg.prototype.updateGridPattern_ = function() { + if (!this.options.gridPattern) { + return; // No grid. + } + // MSIE freaks if it sees a 0x0 pattern, so set empty patterns to 100x100. + var safeSpacing = (this.options.gridOptions['spacing'] * this.scale) || 100; + this.options.gridPattern.setAttribute('width', safeSpacing); + this.options.gridPattern.setAttribute('height', safeSpacing); + var half = Math.floor(this.options.gridOptions['spacing'] / 2) + 0.5; + var start = half - this.options.gridOptions['length'] / 2; + var end = half + this.options.gridOptions['length'] / 2; + var line1 = this.options.gridPattern.firstChild; + var line2 = line1 && line1.nextSibling; + half *= this.scale; + start *= this.scale; + end *= this.scale; + if (line1) { + line1.setAttribute('stroke-width', this.scale); + line1.setAttribute('x1', start); + line1.setAttribute('y1', half); + line1.setAttribute('x2', end); + line1.setAttribute('y2', half); + } + if (line2) { + line2.setAttribute('stroke-width', this.scale); + line2.setAttribute('x1', half); + line2.setAttribute('y1', start); + line2.setAttribute('x2', half); + line2.setAttribute('y2', end); + } +}; + // Export symbols that would otherwise be renamed by Closure compiler. Blockly.WorkspaceSvg.prototype['setVisible'] = Blockly.WorkspaceSvg.prototype.setVisible; diff --git a/core/zoom_controls.js b/core/zoom_controls.js new file mode 100644 index 00000000000..a788d55bb16 --- /dev/null +++ b/core/zoom_controls.js @@ -0,0 +1,213 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2015 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Object representing a zoom icons. + * @author carloslfu@gmail.com (Carlos Galarza) + */ +'use strict'; + +goog.provide('Blockly.ZoomControls'); + +goog.require('goog.dom'); + + +/** + * Class for a zoom controls. + * @param {!Blockly.Workspace} workspace The workspace to sit in. + * @constructor + */ +Blockly.ZoomControls = function(workspace) { + this.workspace_ = workspace; +}; + +/** + * Width of the zoom controls. + * @type {number} + * @private + */ +Blockly.ZoomControls.prototype.WIDTH_ = 32; + +/** + * Height of the zoom controls. + * @type {number} + * @private + */ +Blockly.ZoomControls.prototype.HEIGHT_ = 110; + +/** + * Distance between zoom controls and bottom edge of workspace. + * @type {number} + * @private + */ +Blockly.ZoomControls.prototype.MARGIN_BOTTOM_ = 100; + +/** + * Distance between zoom controls and right edge of workspace. + * @type {number} + * @private + */ +Blockly.ZoomControls.prototype.MARGIN_SIDE_ = 35; + +/** + * The SVG group containing the zoom controls. + * @type {Element} + * @private + */ +Blockly.ZoomControls.prototype.svgGroup_ = null; + +/** + * Left coordinate of the zoom controls. + * @type {number} + * @private + */ +Blockly.ZoomControls.prototype.left_ = 0; + +/** + * Top coordinate of the zoom controls. + * @type {number} + * @private + */ +Blockly.ZoomControls.prototype.top_ = 0; + +/** + * Create the zoom controls. + * @return {!Element} The zoom controls SVG group. + */ +Blockly.ZoomControls.prototype.createDom = function() { + var workspace = this.workspace_; + /* Here's the markup that will be generated: + + + + + + clip-path="url(#blocklyZoomresetClipPath837493)"> + + + + + clip-path="url(#blocklyZoominClipPath837493)"> + + + + + clip-path="url(#blocklyZoomoutClipPath837493)"> + + */ + this.svgGroup_ = Blockly.createSvgElement('g', + {'class': 'blocklyZoom'}, null); + var rnd = String(Math.random()).substring(2); + var clip = Blockly.createSvgElement('clipPath', + {'id': 'blocklyZoomresetClipPath' + rnd}, + this.svgGroup_); + Blockly.createSvgElement('rect', + {'width': 32, 'height': 32}, + clip); + var zoomresetSvg = Blockly.createSvgElement('image', + {'width': Blockly.SPRITE.width, + 'height': Blockly.SPRITE.height, 'y': -92, + 'clip-path': 'url(#blocklyZoomresetClipPath' + rnd + ')'}, + this.svgGroup_); + zoomresetSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', + workspace.options.pathToMedia + Blockly.SPRITE.url); + + var clip = Blockly.createSvgElement('clipPath', + {'id': 'blocklyZoominClipPath' + rnd}, + this.svgGroup_); + Blockly.createSvgElement('rect', + {'width': 32, 'height': 32, 'y': 43}, + clip); + var zoominSvg = Blockly.createSvgElement('image', + {'width': Blockly.SPRITE.width, + 'height': Blockly.SPRITE.height, + 'x': -32, + 'y': -49, + 'clip-path': 'url(#blocklyZoominClipPath' + rnd + ')'}, + this.svgGroup_); + zoominSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', + workspace.options.pathToMedia + Blockly.SPRITE.url); + + var clip = Blockly.createSvgElement('clipPath', + {'id': 'blocklyZoomoutClipPath' + rnd}, + this.svgGroup_); + Blockly.createSvgElement('rect', + {'width': 32, 'height': 32, 'y': 77}, + clip); + var zoomoutSvg = Blockly.createSvgElement('image', + {'width': Blockly.SPRITE.width, + 'height': Blockly.SPRITE.height, 'x': -64, + 'y': -15, + 'clip-path': 'url(#blocklyZoomoutClipPath' + rnd + ')'}, + this.svgGroup_); + zoomoutSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', + workspace.options.pathToMedia + Blockly.SPRITE.url); + + // Attach event listeners. + Blockly.bindEvent_(zoomresetSvg, 'mousedown', workspace, workspace.zoomReset); + Blockly.bindEvent_(zoominSvg, 'mousedown', null, function() { + workspace.zoomCenter(1); + }); + Blockly.bindEvent_(zoomoutSvg, 'mousedown', null, function() { + workspace.zoomCenter(-1); + }); + + return this.svgGroup_; +}; + +/** + * Initialize the zoom controls. + */ +Blockly.ZoomControls.prototype.init = function() { + // Initialize some stuff... (animations?) +}; + +/** + * Dispose of this zoom controls. + * Unlink from all DOM elements to prevent memory leaks. + */ +Blockly.ZoomControls.prototype.dispose = function() { + if (this.svgGroup_) { + goog.dom.removeNode(this.svgGroup_); + this.svgGroup_ = null; + } + this.workspace_ = null; +}; + +/** + * Move the zoom controls to the bottom-right corner. + */ +Blockly.ZoomControls.prototype.position = function() { + var metrics = this.workspace_.getMetrics(); + if (!metrics) { + // There are no metrics available (workspace is probably not visible). + return; + } + if (this.workspace_.RTL) { + this.left_ = this.MARGIN_SIDE_; + } else { + this.left_ = metrics.viewWidth + metrics.absoluteLeft - + this.WIDTH_ - this.MARGIN_SIDE_; + } + this.top_ = metrics.viewHeight + metrics.absoluteTop - + this.HEIGHT_ - this.MARGIN_BOTTOM_; + this.svgGroup_.setAttribute('transform', + 'translate(' + this.left_ + ',' + this.top_ + ')'); +}; diff --git a/demos/code/code.js b/demos/code/code.js index a47ee619789..b971e2e6912 100644 --- a/demos/code/code.js +++ b/demos/code/code.js @@ -374,7 +374,9 @@ Code.init = function() { snap: true}, media: '../../media/', rtl: rtl, - toolbox: toolbox}); + toolbox: toolbox, + zoom: {enabled: true} + }); // Add to reserved word list: Local variables in execution evironment (runJS) // and the infinite loop detection function. diff --git a/media/sprites.png b/media/sprites.png index 5da3f46db09adf1d552acf9d233619d45f3368ca..7f704a5f1ff6b99c6877e40d4d87729bd58bf42f 100644 GIT binary patch literal 4146 zcma)9c{J4D-~Y^vW(qU*U1&@wLNX;=%8Zaf_AN%%iI^BWnZAgSnn8tRsYbS;?E45w zLYXW@+9VnwgUn?4&G-4^InQ&>^T%_~xu1JJ_j5n*_dT!kdcR)x-mtYk3+I>R2LJ$W zVUDrmjd)&<-wWkE?_@Si@&>-}GZqeec`bggZyN7?AJN=3oVR}B-wryXRuIjblp$eV zNcN%rq$uw&KOib9N|O*06z=0q^wSIt3n*AJlm!5x8Vk&6hv@si3KNL(-xK<~x;mI0 z_${QWw7kydkzPC=e7uqQ;!yW+ec^$2bZ=kI?X{vn{X&y(E+5*mpH4JHG)0ApztLt! z>t~mI=BqV@F;{ggd`uVZR@~2t-k0pc7x00tgEMQFP#>3?5*HuD>;HPNu|(2$T@08r ztNfVoVA*&i>QBtaHrPtbXBV)^Pw_va`h5lm?(M@101%U6YuOlJ3V2;%za@pj0SW+7 z68L3P4ifN|F}c9y3@fc;OS#;2FT}*t{uAa_dbM}l0l!cUlS#>f~?2(Fi3z9MB0R7MXH2cR8CeV zH~6g$O87v@{dgIpFMGk8l4Sc8r{rcCVepE79#IwK;V`G){!Tdncmg~hLy_7`a<)cf zzp-F%oaQz!0UhW|R)Lp}{KMZqFYGU5Mz=cEh_yZB42o75ldAPgXK5za%ZRry{!Js}MH2 znA+W}R7ERy-s;v-PjmBdbk-`0E0hfyslk4`_+WP?y_R1;-Q{R6WR@U{U4 z6rJ!4AI;duDxJ7hV`>Ab7YQK1(NL$#;4RbD!&I%D0TWe-=0VQ2)YqrZj$Sclbd$j~ z)T+iCT$@_6Kvid%tBXn}3uk*!FteAKetq(zpWWmQ9q#w^qe-(qD0P|4wteG!f8CVu z@0&cMW4`K+vWa=g2!ke@ce<)fTTtn2kg~LGaq1(putyxSFxj-$EUN#=Lw!Xhr1CH< z&AgfoiUC~pyjW$R_|cgiT1Q8xS;x~P-(x{)|D=D7d3)fsLY8e_)(W3^da;aO>81qv z6!@OdXX#fqiCJFe!>XKkI8;OFy%#lx7cS>0Udlp?4N63?_ML5<@tYVGCtspGCrZzoRa_)Kn1krmE7K@d{>CPF zoclQISH}wm+f*b*3p(lDi5q3d10zD%=8hAyreQ~oHmnHfP@@spZ4bNcT+Zfyx9CSd z^HeTO)Bv>tjOmJG?2II(VCut%ET=fQ*tH75CulaTFG1|^34Fay;tJS!PDN0*n8gJ& z$rdaRO{q7!L&0kinUWDP-LLu$IzjLkCyKi_p}Nwa03K7IUq6Vj^?&I}^1$;_Qf$)m ze@16PU!338eyi`*msw!7)BM$+(R}EtihdR}vuri7^jjeLW%Ja-a{}qW0 z{U-MY9}khu3^hsm4G+}*pK1Qr#}*|)ms)&xa-mq{F@`j=Qu>-{Dk5P~a79M>|MUC* z9eY}ElW0{_YG@?3E=MJ|flethE7g+H+9&6Oo~VX+jb`+4;X7vGvbjf~vE5$+O$-%I zoe3H%y<9s^R16wUdl^YR=jgb78M4-&ncs;hXK_P-5*H1pKaRF&Tm}Y7kpMzqwZh}n zrlMM*A}CRQJl5MFtYvxxjT;SN2x%U-b0I~Nmxk$be3!AfItDsQ7^O{%3AA&tTBM@e(9^ByC0QfD6m;vyVcntXwN z#LvnjM~*;pU$|Q87w(7;1OOV>b63jDjiqn(--_N>Wck=w87T+aLRaZ7iBSw3923f9 z6GUR{FbZp2W=^+JH5%`$y1f1AQ2J`F-L?qaTqXOiTKcLmxy`#N-+V`u!AdXPn(-tB(9%3$pJNTAv9lJ~ z^E)LC4eJRtQuhaZHIL!K70EW))40{j8dyH1c+>r1o5yx_*hhOJTP#+S)20XKU;04Lz^6luK;q>2EC!f%^J-!Q?X~xj+`+5*!3C>FP>6QuX?jD1S<)6KuN% zq{ol9K#9t{i;4#?Ui^Uu!ZE&ay0Y8c?LVJBIp26fBa{T{a@7VLQ8s)@-3LSZDBJUj zP$DHQ-qUfc!&8?!Flz@`A}O0%T0hE|3kOkNDeJmku1~~&S^m)`s|`H<9UWiPD{}vo0i8E0bLxc==kLiC(JuFkadDRo1IfFJkIYY zTL6u5L-Bw06D!nSjkND{QYtFqu)cCtU$0#7?&?UOqy<+x&q=L;f??VN*6bDJOHIus z&}{)|Qk3I|tD3aOkNr%}=frteUyY4Y$#!*#&7u(wv}I$Nx{6h{UoQgL$Ac$7x1a;0 zU+BBwrW`+h{P<;QX-T`vS`z!nZae)c)13MzFke#E9~f9>=*&^jLF4y{8RpFTLkpx> z?BQH4PY3Nk4%<7fHz7yiCPxK*CK+ye@}3AhKRJmg@SY*ok!vN|a+Xuq#X{0!2GdtT%*U zuMzT30e}c6okn=9&iZ(1H=*%5$uT)?v37UH>5UZSC^L2J8INnnd&x~Ru|Y?xu(yR; zKHgj)x$SuaQgW*|;K%!@WLxN^-01(-?_IrafEK+W=t{T6NP@_vYHbykmJ+w8{dOPrHz*lYz<(p3uFVKKSK~7d~=e=Om!5t^JvB&s$ep z@S*Ly*N5iS({=p00CYX6+~KDba-lu0k1Jj6RoW*fjc{v1N@#K5miG43D|VYrpaDU zlTU7N*z}cp8(w=oxKOQ^bK3_;x{WH%D-Ed^}RvN!?F6rO1W8R(3PI z#iOnxW_%~k!p3HVq-V(4Fe!F_>L$U{ag)dV<9CR9uAR-bYYQo3xd7LNY@(qh>0`quV za5!fkwDOj_&NAA)gQ2`|!ZEpM91B(}0hl{gcpXhIB~7}yySuqTr#)Z0K`QHrrh4*M zOJ&7cTU$#h=CfykJ77Ioo({4iL$sx*_o^RTwo=LVTB#^edv#YF+cLo7my4W^0?+g6 z+J`4M+ahFxhzq;+HQd}%7FWk5d&4L)|6@QePXZm&OWVQ4G7Jzk%31r6@kA$E3bM)2 z9n#8lsGo1`L@=&X<`5MJ^Q=6P$iIsgrRzLCDQ4W_3FbNq4fNxf9(F7T-$R9kg~xaT z?(OuCuA^shT4!m$DBu)YrKZEbBmocJBpJ=?*@ z3pC~BuE-nZTB6m{sRuYs0C;1m2k=zoWNmMHAu0>K0?)|-3h3bIahFc1|`Y{;C043#3Poej(bV_bc41vh1pou#3kQDel2b z^D?IMRQR4IQ1iR*_4c*bbGt&F=OlPFhej2NQCxZM0=`z$)X?yYu0pp`VPku=6`GdY zv#)zkkMeS`EZ4BJGcFp9Wo`*f-6nAJ^DNe#(fIPsJ`Ef*Cs4Olm=R310oj_*z&}s6 z$FLDuFXY1hMN_aRT9%;`H-YHU9?!~&*|SI^!G`}F+4whGY_+q#fkD7M8m9&&0RJZd zs9KM;k06me6Ozq6w!5{1Z zRa|~=XJ;qjnhD;R{Cxv87!j$f2%dlaJxr#p#g%eZSJu&@@$1$k?`*y(OeuswAffsT z>gizy13>~@Bz3^Qt}ulAZJZ2_WcgL6O=qw}m2dSDsO}aa6%Ai8MI$o& z$nWUW%zC_@{LZnz2roWXMA!2|&Vj0^5JcL`F2B0>ch997n%R3{LQp41EQ)695)u-+ cRw{OP%UxAKLzlw8@b3431=bovKZF10KTQq7o&W#< literal 819 zcmeAS@N?(olHy`uVBq!ia0vp^4nQ2k!2%>pN~*U4DW)WEcNd2L?fqx=19_YU9+AaB z)h9rhvG$Yd3ZNi+iKnkC`+Zg}QF%*-;2vk7rX!v%jv*QM-p(-0zZ@Xa+RvS5WYF4i ziK8^Zq06e_MS$Ck8NbApHkKrKs!kB<5Rl!iaIy7LZ`v8B?bEy_%ssIz>e_@! zZc`hMS@Nj%#sA4s?-TAS>0kcCZvW?--}nAr#}pHx+gDh!Am~Pm=@ntwDF))bKTS4e zG%cu2XB1np)2i>gT1W62CA(FBh4^xs=WW}<@LooF*LS{&je^%~dSj0+SUz+A{UeoI zCtP9>aFN{JZtkBT`__(oIhS6;bFY}*NR3Cg9z0W;9Vbi zO%;nfOXjas6s}b)Qd`x>Hc5_QqR67+vsKd`iKZNn?fTmkNMS^u}HT*>qDJ9jTJS^Q%B zeNWN&%X{`mKYDUwuFYJ&^Yxtjf-^1ut93>BWHNYc^4TBsN9^~GM`r#7b91jcc8bR^ zc-dbN-yE^zpTVyF`#Wyu=M~L#f2Y5ur*q>XmepC?OgXL6`V7No{%^Xz@E7CZtNap& zzcQN_h#pW@`53hS2NN)@+}Z5Bu1>*#RrE?BcYNT7+YOoTelVT++@o@{On=h>*B=66 zQW=VZA*@?&U+Bx5pkn&BAvbPuxcvvFBdY^iJv>9^@~YV~{NbM1_*q9k{(_V{Cu^nOEwpcNUGnAhirs?1B+lUJ>gTe~DWM4fHY{Dg diff --git a/media/sprites.svg b/media/sprites.svg index e8d1ccf85e9..3f09ef3a4d6 100644 --- a/media/sprites.svg +++ b/media/sprites.svg @@ -1,5 +1,5 @@ - + - + @@ -41,4 +51,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/playground.html b/tests/playground.html index 5011a0852c9..1444036a9b6 100644 --- a/tests/playground.html +++ b/tests/playground.html @@ -65,10 +65,7 @@ function start() { var toolbox = document.getElementById('toolbox'); workspace = Blockly.inject('blocklyDiv', - {rtl: rtl, - media: '../media/', - toolbox: toolbox, - comments: true, + {comments: true, disable: true, collapse: true, grid: @@ -76,13 +73,24 @@ length: 3, colour: '#ccc', snap: true}, + media: '../media/', readOnly: false, realtime: false, realtimeOptions: {clientId: 'YOUR CLIENT ID GOES HERE', chatbox: {elementId: 'chatbox'}, collabElementId: 'collaborators'}, - scrollbars: true + rtl: rtl, + scrollbars: true, + toolbox: toolbox, + zoom: + {enabled: true, + controls: true, + wheel: true, + maxScale: 2, + minScale: .1, + scaleSpeed: 1.1 + }, }); if (Blockly.Realtime.isEnabled()) { enableRealtimeSpecificUi(); From 8db71f17972a096b0d1d00a2c939c24fbfbc7b1e Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 21 Aug 2015 08:40:02 -0400 Subject: [PATCH 29/84] Add option to use old style mutators, minor Java code generator fix Added global Blockly.useMutators option (default to false) that allows switching back to the old style mutators (to ease code patch integration). Also minor tweak to default types of variables to use Var instead of String when the type is unknown. --- blockly_compressed.js | 2 +- blocks/lists.js | 83 ++++++++++++++++- blocks/logic.js | 203 ++++++++++++++++++++++++++++++++++++++---- blocks/text.js | 92 ++++++++++++++++++- blocks_compressed.js | 40 ++++++--- core/blockly.js | 5 ++ generators/java.js | 6 +- java_compressed.js | 2 +- 8 files changed, 394 insertions(+), 39 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 1423fc9e922..ec04f27ca13 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1505,7 +1505,7 @@ Blockly.tokenizeInterpolation=function(a){var b=[];a=a.split("");a.push("");for( Blockly.getMsgString=function(a){var b=null;"object"===typeof MSG&&(b=MSG[a]);b||(b=Blockly.Msg[a]);b||(console.log("Missing message for "+a),b="\u226a"+a+"\u226b");return b};Blockly.getToolTipString=function(a){var b=null;"object"===typeof ToolTips&&(b=ToolTips[a]);b||(console.log("Missing tool tip for "+a),b="\u226a"+a+"\u226b");return b};Blockly.getUrlString=function(a){var b=null;"object"===typeof Urls&&(b=Urls[a]);b||(console.log("Missing URL for "+a),b="\u226a"+a+"\u226b");return b}; Blockly.getBlockHue=function(a){var b=null;"object"===typeof HUES&&(b=HUES[a]);b||(console.log("Missing hue for "+a),b=260);return b};Blockly.SVG_NS="http://www.w3.org/2000/svg";Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.makeColour=function(a){return goog.color.hsvToHex(a,Blockly.HSV_SATURATION,255*Blockly.HSV_VALUE)};Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1; Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.selected=null;Blockly.highlightedConnection_=null;Blockly.localConnection_=null;Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750; -Blockly.mainWorkspace=null;Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.dragMode_=0;Blockly.onTouchUpWrapper_=null;Blockly.latestClick={x:0,y:0};Blockly.svgSize=function(a){return{width:a.cachedWidth_,height:a.cachedHeight_}};Blockly.scopeVariableList={Types:["String","Number","Boolean","Array"]}; +Blockly.mainWorkspace=null;Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.dragMode_=0;Blockly.onTouchUpWrapper_=null;Blockly.latestClick={x:0,y:0};Blockly.svgSize=function(a){return{width:a.cachedWidth_,height:a.cachedHeight_}};Blockly.scopeVariableList={Types:["String","Number","Boolean","Array"]};Blockly.useMutators=!1; Blockly.svgResize=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.options.svg,c=b.parentNode;if(c){var d=c.offsetWidth,c=c.offsetHeight;b.cachedWidth_!=d&&(b.setAttribute("width",d+"px"),b.cachedWidth_=d);b.cachedHeight_!=c&&(b.setAttribute("height",c+"px"),b.cachedHeight_=c);a.resize()}}; Blockly.onMouseUp_=function(a){a=Blockly.getMainWorkspace();Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);a.isScrolling=!1;Blockly.onTouchUpWrapper_&&(Blockly.unbindEvent_(Blockly.onTouchUpWrapper_),Blockly.onTouchUpWrapper_=null);Blockly.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_),Blockly.onMouseMoveWrapper_=null)}; Blockly.onMouseMove_=function(a){var b=Blockly.getMainWorkspace();if(b.isScrolling){Blockly.removeAllRanges();var c=a.clientX-b.startDragMouseX,d=a.clientY-b.startDragMouseY,e=b.startDragMetrics,f=b.startScrollX+c,g=b.startScrollY+d,f=Math.min(f,-e.contentLeft),g=Math.min(g,-e.contentTop),f=Math.max(f,e.viewWidth-e.contentLeft-e.contentWidth),g=Math.max(g,e.viewHeight-e.contentTop-e.contentHeight);b.scrollbar.set(-f-e.contentLeft,-g-e.contentTop);Math.sqrt(c*c+d*d)>Blockly.DRAG_RADIUS&&Blockly.longStop_(); diff --git a/blocks/lists.js b/blocks/lists.js index 93f327469a7..18ba2cc2083 100644 --- a/blocks/lists.js +++ b/blocks/lists.js @@ -58,9 +58,13 @@ Blockly.Blocks['lists_create_with'] = { init: function() { this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL); this.setColour(Blockly.Blocks.lists.HUE); - this.appendAddSubGroup(Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH, 'items', + if (Blockly.useMutators) { + this.setMutator(new Blockly.Mutator(['lists_create_with_item'])); + } else { + this.appendAddSubGroup(Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH, 'items', null, Blockly.Msg.LISTS_CREATE_EMPTY_TITLE); + } this.itemCount_ = 1; this.updateShape_(); this.setOutput(true, 'Array'); @@ -130,6 +134,51 @@ Blockly.Blocks['lists_create_with'] = { } } }, + /** + * Store pointers to any connected child blocks. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + saveConnections: function(containerBlock) { + var itemBlock = containerBlock.getInputTargetBlock('STACK'); + var i = 0; + while (itemBlock) { + var input = this.getInput('ADD' + i); + itemBlock.valueConnection_ = input && input.connection.targetConnection; + i++; + itemBlock = itemBlock.nextConnection && + itemBlock.nextConnection.targetBlock(); + } + }, + /** + * Modify this block to have the correct number of inputs. + * @private + * @this Blockly.Block + */ + updateShape_: function() { + // Delete everything. + if (this.getInput('EMPTY')) { + this.removeInput('EMPTY'); + } else { + var i = 0; + while (this.getInput('ADD' + i)) { + this.removeInput('ADD' + i); + i++; + } + } + // Rebuild block. + if (this.itemCount_ == 0) { + this.appendDummyInput('EMPTY') + .appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE); + } else { + for (var i = 0; i < this.itemCount_; i++) { + var input = this.appendValueInput('ADD' + i); + if (i == 0) { + input.appendField(Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH); + } + } + } + }, typeblock: [ { entry: Blockly.Msg.LISTS_CREATE_WITH_TYPEBLOCK, mutatorAttributes: { items: 2 } } @@ -138,6 +187,38 @@ Blockly.Blocks['lists_create_with'] = { ] }; +Blockly.Blocks['lists_create_with_container'] = { + /** + * Mutator block for list container. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.lists.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD); + this.appendStatementInput('STACK'); + this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP); + this.contextMenu = false; + }, + isTopLevel: true +}; + +Blockly.Blocks['lists_create_with_item'] = { + /** + * Mutator bolck for adding items. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.lists.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP); + this.contextMenu = false; + } +}; + Blockly.Blocks['lists_repeat'] = { /** * Block for creating a list with one element repeated. diff --git a/blocks/logic.js b/blocks/logic.js index ca0abd8d4a9..3fcde187bbe 100644 --- a/blocks/logic.js +++ b/blocks/logic.js @@ -40,21 +40,27 @@ Blockly.Blocks['controls_if'] = { * @this Blockly.Block */ init: function() { - var addField = new Blockly.FieldClickImage(this.addPng, 17, 17, + if (!Blockly.useMutators) { + var addField = new Blockly.FieldClickImage(this.addPng, 17, 17, Blockly.Msg.CONTROLS_IF_ADD_TOOLTIP); - addField.setChangeHandler(this.doAddField); - + addField.setChangeHandler(this.doAddField); + } this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL); this.setColour(Blockly.Blocks.logic.HUE); - this.appendValueInput('IF0') + var valInput = this.appendValueInput('IF0') .setCheck('Boolean') - .appendField(Blockly.Msg.CONTROLS_IF_MSG_IF) - .appendField(addField,'IF_ADD'); + .appendField(Blockly.Msg.CONTROLS_IF_MSG_IF); + if (!Blockly.useMutators) { + valInput.appendField(addField,'IF_ADD'); + } this.appendStatementInput('DO0') .appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN); this.setPreviousStatement(true); this.setNextStatement(true); - + if (Blockly.useMutators) { + this.setMutator(new Blockly.Mutator(['controls_if_elseif', + 'controls_if_else'])); + } // Assign 'this' to a variable for use in the tooltip closure below. var thisBlock = this; this.setTooltip(function() { @@ -197,16 +203,21 @@ Blockly.Blocks['controls_if'] = { for(pos = 1; pos < this.elseifCount_+1;pos++,inputIndex+=2) { var inputItem = this.getInput('IF'+pos); if (inputItem == null) { - var subField = new Blockly.FieldClickImage(this.subPng, 17, 17, + var subField = null; + if (!Blockly.useMutators) { + subField = new Blockly.FieldClickImage(this.subPng, 17, 17, Blockly.Msg.CONTROLS_IF_ELSEIF_REMOVE_TOOLTIP); - subField.setPrivate({name: 'IF', pos: pos}); - subField.setChangeHandler(this.doRemoveElseifField); + subField.setPrivate({name: 'IF', pos: pos}); + subField.setChangeHandler(this.doRemoveElseifField); + } // We have to add an elseif clause var ifInput = this.appendValueInput('IF' + pos) .setCheck('Boolean') - .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSEIF) - .appendField(subField); + .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSEIF); + if (subField) { + ifInput.appendField(subField); + } var doInput = this.appendStatementInput('DO' + pos) .appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN); // Now see if we need to move them in front of the else @@ -223,13 +234,18 @@ Blockly.Blocks['controls_if'] = { if (this.elseCount_) { var inputItem = this.getInput('ELSE'); if (inputItem == null) { - var subField = new Blockly.FieldClickImage(this.subPng, 17, 17, + var subField = null; + if (!Blockly.useMutators) { + subField = new Blockly.FieldClickImage(this.subPng, 17, 17, Blockly.Msg.CONTROLS_IF_ELSE_REMOVE_TOOLTIP); - subField.setChangeHandler(this.doRemoveElseField); + subField.setChangeHandler(this.doRemoveElseField); + } - this.appendStatementInput('ELSE') - .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSE) - .appendField(subField); + var doElse = this.appendStatementInput('ELSE') + .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSE); + if (subField) { + doElse.appendField(subField); + } } } } @@ -243,6 +259,112 @@ Blockly.Blocks['controls_if'] = { this.workspace.fireChangeEvent(); } }, + /** + * Populate the mutator's dialog with this block's components. + * @param {!Blockly.Workspace} workspace Mutator's workspace. + * @return {!Blockly.Block} Root block in mutator. + * @this Blockly.Block + */ + decompose: function(workspace) { + var containerBlock = Blockly.Block.obtain(workspace, 'controls_if_if'); + containerBlock.initSvg(); + var connection = containerBlock.getInput('STACK').connection; + for (var i = 1; i <= this.elseifCount_; i++) { + var elseifBlock = Blockly.Block.obtain(workspace, 'controls_if_elseif'); + elseifBlock.initSvg(); + connection.connect(elseifBlock.previousConnection); + connection = elseifBlock.nextConnection; + } + if (this.elseCount_) { + var elseBlock = Blockly.Block.obtain(workspace, 'controls_if_else'); + elseBlock.initSvg(); + connection.connect(elseBlock.previousConnection); + } + return containerBlock; + }, + /** + * Reconfigure this block based on the mutator dialog's components. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + compose: function(containerBlock) { + // Disconnect the else input blocks and remove the inputs. + if (this.elseCount_) { + this.removeInput('ELSE'); + } + this.elseCount_ = 0; + // Disconnect all the elseif input blocks and remove the inputs. + for (var i = this.elseifCount_; i > 0; i--) { + this.removeInput('IF' + i); + this.removeInput('DO' + i); + } + this.elseifCount_ = 0; + // Rebuild the block's optional inputs. + var clauseBlock = containerBlock.getInputTargetBlock('STACK'); + while (clauseBlock) { + switch (clauseBlock.type) { + case 'controls_if_elseif': + this.elseifCount_++; + var ifInput = this.appendValueInput('IF' + this.elseifCount_) + .setCheck('Boolean') + .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSEIF); + var doInput = this.appendStatementInput('DO' + this.elseifCount_); + doInput.appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN); + // Reconnect any child blocks. + if (clauseBlock.valueConnection_) { + ifInput.connection.connect(clauseBlock.valueConnection_); + } + if (clauseBlock.statementConnection_) { + doInput.connection.connect(clauseBlock.statementConnection_); + } + break; + case 'controls_if_else': + this.elseCount_++; + var elseInput = this.appendStatementInput('ELSE'); + elseInput.appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSE); + // Reconnect any child blocks. + if (clauseBlock.statementConnection_) { + elseInput.connection.connect(clauseBlock.statementConnection_); + } + break; + default: + throw 'Unknown block type.'; + } + clauseBlock = clauseBlock.nextConnection && + clauseBlock.nextConnection.targetBlock(); + } + }, + /** + * Store pointers to any connected child blocks. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + saveConnections: function(containerBlock) { + var clauseBlock = containerBlock.getInputTargetBlock('STACK'); + var i = 1; + while (clauseBlock) { + switch (clauseBlock.type) { + case 'controls_if_elseif': + var inputIf = this.getInput('IF' + i); + var inputDo = this.getInput('DO' + i); + clauseBlock.valueConnection_ = + inputIf && inputIf.connection.targetConnection; + clauseBlock.statementConnection_ = + inputDo && inputDo.connection.targetConnection; + i++; + break; + case 'controls_if_else': + var inputDo = this.getInput('ELSE'); + clauseBlock.statementConnection_ = + inputDo && inputDo.connection.targetConnection; + break; + default: + throw 'Unknown block type.'; + } + clauseBlock = clauseBlock.nextConnection && + clauseBlock.nextConnection.targetBlock(); + } + }, typeblock: [ { entry: Blockly.Msg.CONTROLS_IF_TYPEBLOCK }, { entry: Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK, @@ -253,6 +375,53 @@ Blockly.Blocks['controls_if'] = { mutatorAttributes: { 'else': 1 } } ] }; +Blockly.Blocks['controls_if_if'] = { + /** + * Mutator block for if container. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.logic.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.CONTROLS_IF_IF_TITLE_IF); + this.appendStatementInput('STACK'); + this.setTooltip(Blockly.Msg.CONTROLS_IF_IF_TOOLTIP); + this.contextMenu = false; + }, + isTopLevel: true +}; + +Blockly.Blocks['controls_if_elseif'] = { + /** + * Mutator bolck for else-if condition. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.logic.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP); + this.contextMenu = false; + } +}; + +Blockly.Blocks['controls_if_else'] = { + /** + * Mutator block for else condition. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.logic.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE); + this.setPreviousStatement(true); + this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP); + this.contextMenu = false; + } +}; + Blockly.Blocks['logic_compare'] = { /** * Block for comparison operator. diff --git a/blocks/text.js b/blocks/text.js index ffd6450647d..e4f4b1695be 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -75,10 +75,14 @@ Blockly.Blocks['text_join'] = { this.setHelpUrl(Blockly.Msg.TEXT_JOIN_HELPURL); this.setColour(Blockly.Blocks.texts.HUE); this.setOutput(true, 'String'); - this.appendAddSubGroup(Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH, 'items',null, + if (Blockly.useMutators) { + this.setMutator(new Blockly.Mutator(['text_create_join_item'])); + } else { + this.appendAddSubGroup(Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH, 'items',null, '-IGNORED-'); + } this.itemCount_ = 2; -// this.setMutator(new Blockly.Mutator(['text_create_join_item'])); + this.updateShape_(); this.setTooltip(Blockly.Msg.TEXT_JOIN_TOOLTIP); }, /** @@ -135,6 +139,58 @@ Blockly.Blocks['text_join'] = { } this.itemCount_ = connections.length; this.updateShape_(); + // Reconnect any child blocks. + for (var i = 0; i < this.itemCount_; i++) { + if (connections[i]) { + this.getInput('ADD' + i).connection.connect(connections[i]); + } + } + }, + /** + * Store pointers to any connected child blocks. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + saveConnections: function(containerBlock) { + var itemBlock = containerBlock.getInputTargetBlock('STACK'); + var i = 0; + while (itemBlock) { + var input = this.getInput('ADD' + i); + itemBlock.valueConnection_ = input && input.connection.targetConnection; + i++; + itemBlock = itemBlock.nextConnection && + itemBlock.nextConnection.targetBlock(); + } + }, + /** + * Modify this block to have the correct number of inputs. + * @private + * @this Blockly.Block + */ + updateShape_: function() { + // Delete everything. + if (this.getInput('EMPTY')) { + this.removeInput('EMPTY'); + } else { + var i = 0; + while (this.getInput('ADD' + i)) { + this.removeInput('ADD' + i); + i++; + } + } + // Rebuild block. + if (this.itemCount_ == 0) { + this.appendDummyInput('EMPTY') + .appendField(this.newQuote_(true)) + .appendField(this.newQuote_(false)); + } else { + for (var i = 0; i < this.itemCount_; i++) { + var input = this.appendValueInput('ADD' + i); + if (i == 0) { + input.appendField(Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH); + } + } + } }, getAddSubName: function(name,pos) { return 'ADD'+pos; @@ -155,6 +211,38 @@ Blockly.Blocks['text_join'] = { }; +Blockly.Blocks['text_create_join_container'] = { + /** + * Mutator block for container. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.texts.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN); + this.appendStatementInput('STACK'); + this.setTooltip(Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP); + this.contextMenu = false; + }, + isTopLevel: true +}; + +Blockly.Blocks['text_create_join_item'] = { + /** + * Mutator block for add items. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.texts.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP); + this.contextMenu = false; + } +}; + Blockly.Blocks['text_append'] = { /** * Block for appending to a variable in place. diff --git a/blocks_compressed.js b/blocks_compressed.js index 911e8605a0e..9630759d787 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -9,9 +9,12 @@ Blockly.Blocks.colour_rgb={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_RG this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_RGB_TOOLTIP)},typeblock:Blockly.Msg.COLOUR_RGB_TYPEBLOCK}; Blockly.Blocks.colour_blend={init:function(){this.setHelpUrl(Blockly.Msg.COLOUR_BLEND_HELPURL);this.setColour(Blockly.Blocks.colour.HUE);this.appendValueInput("COLOUR1").setCheck("Colour").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_BLEND_TITLE).appendField(Blockly.Msg.COLOUR_BLEND_COLOUR1);this.appendValueInput("COLOUR2").setCheck("Colour").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_BLEND_COLOUR2);this.appendValueInput("RATIO").setCheck("Number").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.COLOUR_BLEND_RATIO); this.setOutput(!0,"Colour");this.setTooltip(Blockly.Msg.COLOUR_BLEND_TOOLTIP)},typeblock:Blockly.Msg.COLOUR_BLEND_TYPEBLOCK};Blockly.Blocks.lists={};Blockly.Blocks.lists.HUE=260;Blockly.Blocks.lists_create_empty={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.setOutput(!0,"Array");this.appendDummyInput().appendField(Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);this.setTooltip(Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP)},typeblock:Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK}; -Blockly.Blocks.lists_create_with={init:function(){this.setHelpUrl(Blockly.Msg.LISTS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendAddSubGroup(Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH,"items",null,Blockly.Msg.LISTS_CREATE_EMPTY_TITLE);this.itemCount_=1;this.updateShape_();this.setOutput(!0,"Array");this.setTooltip(Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP)},getAddSubName:function(a,b){return"ADD"+b},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items", -this.itemCount_);return a},domToMutation:function(a){this.itemCount_=parseInt(a.getAttribute("items"),10);this.updateShape_()},decompose:function(a){var b=Blockly.Block.obtain(a,"lists_create_with_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;dlist Blockly.Blocks.lists_split={init:function(){var a=this,b=new Blockly.FieldDropdown([[Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]],function(b){a.updateType_(b)});this.setHelpUrl(Blockly.Msg.LISTS_SPLIT_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("INPUT").setCheck("String").appendField(b,"MODE");this.appendValueInput("DELIM").setCheck("String").appendField(Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER);this.setInputsInline(!0); this.setOutput(!0,"Array");this.setTooltip(function(){var b=a.getFieldValue("MODE");if("SPLIT"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if("JOIN"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw"Unknown mode: "+b;})},updateType_:function(a){"SPLIT"==a?(this.outputConnection.setCheck("Array"),this.getInput("INPUT").setCheck("String")):(this.outputConnection.setCheck("String"),this.getInput("INPUT").setCheck("Array"))},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("mode", this.getFieldValue("MODE"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("mode"))},typeblock:[{entry:Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}},{entry:Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}}]};Blockly.Blocks.logic={};Blockly.Blocks.logic.HUE=210; -Blockly.Blocks.controls_if={init:function(){var a=new Blockly.FieldClickImage(this.addPng,17,17,Blockly.Msg.CONTROLS_IF_ADD_TOOLTIP);a.setChangeHandler(this.doAddField);this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.appendValueInput("IF0").setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_IF).appendField(a,"IF_ADD");this.appendStatementInput("DO0").appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN);this.setPreviousStatement(!0);this.setNextStatement(!0); -var b=this;this.setTooltip(function(){if(b.elseifCount_||b.elseCount_){if(!b.elseifCount_&&b.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_2;if(b.elseifCount_&&!b.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_3;if(b.elseifCount_&&b.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_4}else return Blockly.Msg.CONTROLS_IF_TOOLTIP_1;return""});this.elseCount_=this.elseifCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=document.createElement("mutation"); -this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_);this.elseCount_&&a.setAttribute("else",1);return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elseif"),10);this.elseCount_=parseInt(a.getAttribute("else"),10);this.updateAddSubShape()},doAddField:function(a){this.elseCount_?this.elseifCount_++:this.elseCount_=1;this.updateAddSubShape()},doRemoveElseifField:function(a){var b=a.getPrivate().pos;a=this.elseifCount_+1;0","LT"],["\u2265","LTE"],["<","GT"],["\u2264","GTE"]]:[["=","EQ"],["\u2260","NEQ"],["<","LT"],["\u2264","LTE"],[">","GT"],["\u2265","GTE"]];this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.setOutput(!0,"Boolean");this.appendValueInput("A");this.appendValueInput("B").appendField(new Blockly.FieldDropdown(a),"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a= b.getFieldValue("OP");return{EQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[a]});this.prevBlocks_=[null,null]},onchange:function(){var a=this.getInputTargetBlock("A"),b=this.getInputTargetBlock("B");if(a&&b&&!a.outputConnection.checkType_(b.outputConnection))for(var c=0;c Date: Sun, 23 Aug 2015 14:45:41 -0400 Subject: [PATCH 30/84] Merge branch 'google/master' Conflicts: blockly_compressed.js --- blockly_compressed.js | 18 ++++++++--------- core/blockly.js | 3 +++ core/field.js | 8 ++++---- core/field_textinput.js | 6 ++++++ core/widgetdiv.js | 2 ++ core/zoom_controls.js | 43 +++++++++++++++++++++-------------------- 6 files changed, 46 insertions(+), 34 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index ec04f27ca13..54169ab00b0 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1058,7 +1058,7 @@ this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onM Blockly.Field.prototype.updateEditable=function(){this.EDITABLE&&this.sourceBlock_&&(this.sourceBlock_.isEditable()?(Blockly.addClass_(this.fieldGroup_,"blocklyEditableText"),Blockly.removeClass_(this.fieldGroup_,"blocklyNoNEditableText"),this.fieldGroup_.style.cursor=this.CURSOR):(Blockly.addClass_(this.fieldGroup_,"blocklyNonEditableText"),Blockly.removeClass_(this.fieldGroup_,"blocklyEditableText"),this.fieldGroup_.style.cursor=""))};Blockly.Field.prototype.isVisible=function(){return this.visible_}; Blockly.Field.prototype.setVisible=function(a){if(this.visible_!=a){this.visible_=a;var b=this.getSvgRoot();b&&(b.style.display=a?"block":"none",this.render_())}};Blockly.Field.prototype.setChangeHandler=function(a){this.changeHandler_=a};Blockly.Field.prototype.setSerializable=function(a){this.SERIALIZABLE=a};Blockly.Field.prototype.getSvgRoot=function(){return this.fieldGroup_}; Blockly.Field.prototype.render_=function(){if(this.visible_&&this.textElement_){try{var a=this.textElement_.getComputedTextLength()}catch(b){a=8*this.textElement_.textContent.length}this.borderRect_&&this.borderRect_.setAttribute("width",a+Blockly.BlockSvg.SEP_SPACE_X)}else a=0;this.size_.width=a};Blockly.Field.prototype.getSize=function(){this.size_.width||this.render_();return this.size_}; -Blockly.Field.prototype.getScaledBBox_=function(){var a=this.borderRect_.getBBox();a.width*=this.sourceBlock_.workspace.scale;a.height*=this.sourceBlock_.workspace.scale;return a};Blockly.Field.prototype.getText=function(){return this.text_};Blockly.Field.prototype.setText=function(a){null!==a&&(a=String(a),a!==this.text_&&(this.text_=a,this.updateTextNode_(),this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_(),this.sourceBlock_.workspace.fireChangeEvent())))}; +Blockly.Field.prototype.getScaledBBox_=function(){var a=this.borderRect_.getBBox();return new goog.math.Size(a.width*this.sourceBlock_.workspace.scale,a.height*this.sourceBlock_.workspace.scale)};Blockly.Field.prototype.getText=function(){return this.text_};Blockly.Field.prototype.setText=function(a){null!==a&&(a=String(a),a!==this.text_&&(this.text_=a,this.updateTextNode_(),this.sourceBlock_&&this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_(),this.sourceBlock_.workspace.fireChangeEvent())))}; Blockly.Field.prototype.updateTextNode_=function(){if(this.textElement_){var a=this.text_;a.length>this.maxDisplayLength&&(a=a.substring(0,this.maxDisplayLength-2)+"\u2026");goog.dom.removeChildren(this.textElement_);a=a.replace(/\s/g,Blockly.Field.NBSP);this.sourceBlock_.RTL&&a&&(a+="\u200f");a||(a=Blockly.Field.NBSP);a=document.createTextNode(a);this.textElement_.appendChild(a);this.size_.width=0}};Blockly.Field.prototype.getValue=function(){return this.getText()}; Blockly.Field.prototype.setValue=function(a){this.setText(a)};Blockly.Field.prototype.getPrivate=function(){return this.privateData_};Blockly.Field.prototype.setPrivate=function(a){this.privateData_=a};Blockly.Field.prototype.onMouseUp_=function(a){if(!goog.userAgent.IPHONE&&!goog.userAgent.IPAD||goog.userAgent.isVersionOrHigher("537.51.2")||0===a.layerX||0===a.layerY)Blockly.isRightButton(a)||2!=Blockly.dragMode_&&this.sourceBlock_.isEditable()&&this.showEditor_()}; Blockly.Field.prototype.setTooltip=function(a){};Blockly.Field.prototype.getAbsoluteXY_=function(){return goog.style.getPageOffset(this.borderRect_)};Blockly.Tooltip={};Blockly.Tooltip.visible=!1;Blockly.Tooltip.LIMIT=50;Blockly.Tooltip.mouseOutPid_=0;Blockly.Tooltip.showPid_=0;Blockly.Tooltip.lastX_=0;Blockly.Tooltip.lastY_=0;Blockly.Tooltip.element_=null;Blockly.Tooltip.poisonedElement_=null;Blockly.Tooltip.OFFSET_X=0;Blockly.Tooltip.OFFSET_Y=10;Blockly.Tooltip.RADIUS_OK=10;Blockly.Tooltip.HOVER_MS=1E3;Blockly.Tooltip.MARGINS=5;Blockly.Tooltip.DIV=null; @@ -1108,10 +1108,10 @@ Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2: Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)}; // Copyright 2015 Google Inc. Apache License 2.0 Blockly.ZoomControls=function(a){this.workspace_=a};Blockly.ZoomControls.prototype.WIDTH_=32;Blockly.ZoomControls.prototype.HEIGHT_=110;Blockly.ZoomControls.prototype.MARGIN_BOTTOM_=100;Blockly.ZoomControls.prototype.MARGIN_SIDE_=35;Blockly.ZoomControls.prototype.svgGroup_=null;Blockly.ZoomControls.prototype.left_=0;Blockly.ZoomControls.prototype.top_=0; -Blockly.ZoomControls.prototype.createDom=function(){var a=this.workspace_;this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyZoom"},null);var b=String(Math.random()).substring(2),c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomresetClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32},c);var d=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+b+")"},this.svgGroup_); +Blockly.ZoomControls.prototype.createDom=function(){var a=this.workspace_;this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyZoom"},null);var b=String(Math.random()).substring(2),c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomoutClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:77},c);var d=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-64,y:-15,"clip-path":"url(#blocklyZoomoutClipPath"+b+")"},this.svgGroup_); d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoominClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:43},c);var e=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-32,y:-49,"clip-path":"url(#blocklyZoominClipPath"+b+")"},this.svgGroup_);e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+ -Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomoutClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:77},c);b=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-64,y:-15,"clip-path":"url(#blocklyZoomoutClipPath"+b+")"},this.svgGroup_);b.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEvent_(d,"mousedown",a,a.zoomReset);Blockly.bindEvent_(e, -"mousedown",null,function(){a.zoomCenter(1)});Blockly.bindEvent_(b,"mousedown",null,function(){a.zoomCenter(-1)});return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(){};Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=null}; +Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomresetClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32},c);b=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+b+")"},this.svgGroup_);b.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEvent_(b,"mousedown",a,a.zoomReset);Blockly.bindEvent_(e, +"mousedown",null,function(){a.zoomCenter(1)});Blockly.bindEvent_(d,"mousedown",null,function(){a.zoomCenter(-1)});return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(){};Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=null}; Blockly.ZoomControls.prototype.position=function(){var a=this.workspace_.getMetrics();a&&(this.left_=this.workspace_.RTL?this.MARGIN_SIDE_:a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_,this.top_=a.viewHeight+a.absoluteTop-this.HEIGHT_-this.MARGIN_BOTTOM_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))};Blockly.Xml={};Blockly.Xml.workspaceToDom=function(a){var b;a.RTL&&(b=a.getWidth());for(var c=goog.dom.createDom("xml"),d=a.getTopBlocks(!0),e=0,f;f=d[e];e++){var g=Blockly.Xml.blockToDom_(f);f=f.getRelativeToSurfaceXY();g.setAttribute("x",Math.round(a.RTL?b-f.x:f.x));g.setAttribute("y",Math.round(f.y));c.appendChild(g)}return c}; Blockly.Xml.blockToDom_=function(a){var b=goog.dom.createDom("block");b.setAttribute("type",a.type);b.setAttribute("id",a.id);if(a.mutationToDom){var c=a.mutationToDom();c&&(c.hasChildNodes()||c.hasAttributes())&&b.appendChild(c)}for(var c=0,d;d=a.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)if(f.name&&f.SERIALIZABLE){var g=goog.dom.createDom("field",null,f.getValue());g.setAttribute("name",f.name);b.appendChild(g)}if(c=a.getCommentText())c=goog.dom.createDom("comment",null,c),"object"==typeof a.comment&& (c.setAttribute("pinned",a.comment.isVisible()),d=a.comment.getBubbleSize(),c.setAttribute("h",d.height),c.setAttribute("w",d.width)),b.appendChild(c);a.data&&(c=goog.dom.createDom("data",null,a.data),b.appendChild(c));for(c=0;d=a.inputList[c];c++){var h,e=!0;d.type!=Blockly.DUMMY_INPUT&&(f=d.connection.targetBlock(),d.type==Blockly.INPUT_VALUE?h=goog.dom.createDom("value"):d.type==Blockly.NEXT_STATEMENT&&(h=goog.dom.createDom("statement")),f&&(h.appendChild(Blockly.Xml.blockToDom_(f)),e=!1),h.setAttribute("name", @@ -1169,7 +1169,7 @@ Blockly.Mutator.prototype.workspaceChanged_=function(){if(0==Blockly.dragMode_)f goog.Timer.callOnce(this.block_.bumpNeighbours_,Blockly.BUMP_DELAY,this.block_))};Blockly.Mutator.prototype.getFlyoutMetrics_=function(){return{viewHeight:this.workspaceHeight_,viewWidth:this.workspaceWidth_,absoluteTop:0,absoluteLeft:0}};Blockly.Mutator.prototype.dispose=function(){this.block_.mutator=null;Blockly.Icon.prototype.dispose.call(this)};Blockly.Warning=function(a){Blockly.Warning.superClass_.constructor.call(this,a);this.createIcon();this.text_={}};goog.inherits(Blockly.Warning,Blockly.Icon);Blockly.Warning.prototype.collapseHidden=!1;Blockly.Warning.prototype.png_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAANyAAADcgBffIlqAAAAAd0SU1FB98DGgApDBpIGrEAAAGfSURBVDjLnZM9S2NREIbfc2P8AF27BXshpIzK5g9ssUj8C2tnYyUoiBGSyk4sbCLs1vkRgoW1jYWFICwsMV2Se3JPboLe+FhcNCZcjXFgOMzHeec9M2ekDwTIAEUgo68IsOQczdNTIudoAksTg/g+5+UyDxKUyzz4PueTsvhZr+NmZkCC6Wmo1QiAX58FmLKWf4VCDPCiGxtgLf+B9FiQXo+9y0ucBIUCnJ3B+noMdHGBC0P2xrH4HoYEmUx8qVQCgMPD2F5ehjDEjTbZe2s4p5NKRenb2+Qid3dSpaK0tTp+j8VKq0VncXHQh2IxZrK/P/AtLECjQQf4McQEMNbq786O5qwdANfr8Xl/P/AFgbS7qzlr9Qcwr4EoYvPmBud5wxPJ5+HqCtbWhv3GwPU1Lor4/fKMeedo5vPDiRKsrsLWFuRyybFOhxbwTd0upWqVcDQpaTqjWq0SdruU5PvUkiol/ZNRzeXA96mp3aaRzSYnjdNsFtptGiYI2PY8HaVSmu33xWf3K5WS6ffVe3rSgXnzT+YlpSfY00djjJOkZ/wpr41bQMIsAAAAAElFTkSuQmCC"; Blockly.Warning.textToDom_=function(a){var b=Blockly.createSvgElement("text",{"class":"blocklyText blocklyBubbleText",y:Blockly.Bubble.BORDER_WIDTH},null);a=a.split("\n");for(var c=0;cc.width+d.x&&(a=c.width+d.x):aBlockly.DRAG_RADIUS&&Blockly.longStop_(); -a.stopPropagation()}}; +Blockly.onMouseMove_=function(a){if(!(a.touches&&2<=a.touches.length)){var b=Blockly.getMainWorkspace();if(b.isScrolling){Blockly.removeAllRanges();var c=a.clientX-b.startDragMouseX,d=a.clientY-b.startDragMouseY,e=b.startDragMetrics,f=b.startScrollX+c,g=b.startScrollY+d,f=Math.min(f,-e.contentLeft),g=Math.min(g,-e.contentTop),f=Math.max(f,e.viewWidth-e.contentLeft-e.contentWidth),g=Math.max(g,e.viewHeight-e.contentTop-e.contentHeight);b.scrollbar.set(-f-e.contentLeft,-g-e.contentTop);Math.sqrt(c* +c+d*d)>Blockly.DRAG_RADIUS&&Blockly.longStop_();a.stopPropagation()}}}; Blockly.onKeyDown_=function(a){if(!Blockly.isTargetInput_(a))if(a.keyCode==goog.events.KeyCodes.ESC)Blockly.hideChaff();else if(a.keyCode==goog.events.KeyCodes.BACKSPACE||a.keyCode==goog.events.KeyCodes.DELETE)try{Blockly.selected&&Blockly.selected.isDeletable()&&(Blockly.hideChaff(),Blockly.selected.dispose(!0,!0))}finally{a.preventDefault()}else if(a.altKey||a.ctrlKey||a.metaKey)Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(Blockly.hideChaff(),a.keyCode==goog.events.KeyCodes.C? Blockly.copy_(Blockly.selected):a.keyCode==goog.events.KeyCodes.X&&(Blockly.copy_(Blockly.selected),Blockly.selected.dispose(!0,!0))),a.keyCode==goog.events.KeyCodes.V&&Blockly.clipboardXml_&&Blockly.clipboardSource_.paste(Blockly.clipboardXml_);else Blockly.TypeBlock.onKeyDown_(a)};Blockly.terminateDrag_=function(){Blockly.BlockSvg.terminateDrag_();Blockly.Flyout.terminateDrag_()};Blockly.longPid_=0; Blockly.longStart_=function(a,b){Blockly.longStop_();Blockly.longPid_=setTimeout(function(){a.button=2;b.onMouseDown_(a)},Blockly.LONGPRESS)};Blockly.longStop_=function(){Blockly.longPid_&&(clearTimeout(Blockly.longPid_),Blockly.longPid_=0)};Blockly.copy_=function(a){var b=Blockly.Xml.blockToDom_(a);Blockly.Xml.deleteNext(b);var c=a.getRelativeToSurfaceXY();b.setAttribute("x",a.RTL?-c.x:c.x);b.setAttribute("y",c.y);Blockly.clipboardXml_=b;Blockly.clipboardSource_=a.workspace}; diff --git a/core/blockly.js b/core/blockly.js index 54f347ffaa5..17b36939225 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -315,6 +315,9 @@ Blockly.onMouseUp_ = function(e) { * @private */ Blockly.onMouseMove_ = function(e) { + if (e.touches && e.touches.length >= 2) { + return; // Multi-touch gestures won't have e.clientX. + } var workspace = Blockly.getMainWorkspace(); if (workspace.isScrolling) { Blockly.removeAllRanges(); diff --git a/core/field.js b/core/field.js index 521d2dcc6ef..07da647c44b 100644 --- a/core/field.js +++ b/core/field.js @@ -246,13 +246,13 @@ Blockly.Field.prototype.getSize = function() { /** * Returns the height and width of the field, * accounting for the workspace scaling. - * @return {!Object} Height and width. + * @return {!goog.math.Size} Height and width. */ Blockly.Field.prototype.getScaledBBox_ = function() { var bBox = this.borderRect_.getBBox(); - // Create new object, as getBBox can return an uneditable SVGRect. - return {width: bBox.width * this.sourceBlock_.workspace.scale, - height: bBox.height * this.sourceBlock_.workspace.scale}; + // Create new object, as getBBox can return an uneditable SVGRect in IE. + return new goog.math.Size(bBox.width * this.sourceBlock_.workspace.scale, + bBox.height * this.sourceBlock_.workspace.scale); }; /** diff --git a/core/field_textinput.js b/core/field_textinput.js index cb7cf12ba73..f7249a02611 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -239,6 +239,12 @@ Blockly.FieldTextInput.prototype.resizeEditor_ = function() { } // Shift by a few pixels to line up exactly. xy.y += 1; + if (goog.userAgent.GECKO && Blockly.WidgetDiv.DIV.style.top) { + // Firefox mis-reports the location of the border by a pixel + // once the WidgetDiv is moved into position. + xy.x -= 1; + xy.y -= 1; + } if (goog.userAgent.WEBKIT) { xy.y -= 3; } diff --git a/core/widgetdiv.js b/core/widgetdiv.js index e1ed474c985..12ac56fba5a 100644 --- a/core/widgetdiv.js +++ b/core/widgetdiv.js @@ -85,6 +85,8 @@ Blockly.WidgetDiv.show = function(newOwner, rtl, dispose) { Blockly.WidgetDiv.hide = function() { if (Blockly.WidgetDiv.owner_) { Blockly.WidgetDiv.DIV.style.display = 'none'; + Blockly.WidgetDiv.DIV.style.left = ''; + Blockly.WidgetDiv.DIV.style.top = ''; Blockly.WidgetDiv.dispose_ && Blockly.WidgetDiv.dispose_(); Blockly.WidgetDiv.owner_ = null; Blockly.WidgetDiv.dispose_ = null; diff --git a/core/zoom_controls.js b/core/zoom_controls.js index a788d55bb16..5e507737936 100644 --- a/core/zoom_controls.js +++ b/core/zoom_controls.js @@ -95,38 +95,40 @@ Blockly.ZoomControls.prototype.createDom = function() { var workspace = this.workspace_; /* Here's the markup that will be generated: - - + + - - clip-path="url(#blocklyZoomresetClipPath837493)"> + + clip-path="url(#blocklyZoomoutClipPath837493)"> clip-path="url(#blocklyZoominClipPath837493)"> - - + + - - clip-path="url(#blocklyZoomoutClipPath837493)"> + + clip-path="url(#blocklyZoomresetClipPath837493)"> */ this.svgGroup_ = Blockly.createSvgElement('g', {'class': 'blocklyZoom'}, null); var rnd = String(Math.random()).substring(2); + var clip = Blockly.createSvgElement('clipPath', - {'id': 'blocklyZoomresetClipPath' + rnd}, + {'id': 'blocklyZoomoutClipPath' + rnd}, this.svgGroup_); Blockly.createSvgElement('rect', - {'width': 32, 'height': 32}, + {'width': 32, 'height': 32, 'y': 77}, clip); - var zoomresetSvg = Blockly.createSvgElement('image', + var zoomoutSvg = Blockly.createSvgElement('image', {'width': Blockly.SPRITE.width, - 'height': Blockly.SPRITE.height, 'y': -92, - 'clip-path': 'url(#blocklyZoomresetClipPath' + rnd + ')'}, + 'height': Blockly.SPRITE.height, 'x': -64, + 'y': -15, + 'clip-path': 'url(#blocklyZoomoutClipPath' + rnd + ')'}, this.svgGroup_); - zoomresetSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', + zoomoutSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', workspace.options.pathToMedia + Blockly.SPRITE.url); var clip = Blockly.createSvgElement('clipPath', @@ -146,18 +148,17 @@ Blockly.ZoomControls.prototype.createDom = function() { workspace.options.pathToMedia + Blockly.SPRITE.url); var clip = Blockly.createSvgElement('clipPath', - {'id': 'blocklyZoomoutClipPath' + rnd}, + {'id': 'blocklyZoomresetClipPath' + rnd}, this.svgGroup_); Blockly.createSvgElement('rect', - {'width': 32, 'height': 32, 'y': 77}, + {'width': 32, 'height': 32}, clip); - var zoomoutSvg = Blockly.createSvgElement('image', + var zoomresetSvg = Blockly.createSvgElement('image', {'width': Blockly.SPRITE.width, - 'height': Blockly.SPRITE.height, 'x': -64, - 'y': -15, - 'clip-path': 'url(#blocklyZoomoutClipPath' + rnd + ')'}, + 'height': Blockly.SPRITE.height, 'y': -92, + 'clip-path': 'url(#blocklyZoomresetClipPath' + rnd + ')'}, this.svgGroup_); - zoomoutSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', + zoomresetSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', workspace.options.pathToMedia + Blockly.SPRITE.url); // Attach event listeners. From 25ffcba4a872ba26d45f5a2810b160e889530901 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 24 Aug 2015 07:02:06 -0400 Subject: [PATCH 31/84] Add dependency for FieldScopeVariable --- blockly_compressed.js | 34 ++++++++++++++++++++++------------ blockly_uncompressed.js | 2 +- core/block.js | 1 + 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 54169ab00b0..35d411ee799 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1175,7 +1175,26 @@ a=this.rectElement_||this.imageElement_;a.tooltip=this.sourceBlock_;Blockly.Tool Blockly.FieldImage.prototype.setSrc=function(a){null!==a&&(this.src_=a,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(a)?a:""))};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a)};Blockly.FieldImage.prototype.render_=function(){};Blockly.FieldClickImage=function(a,b,c,d,e){Blockly.FieldClickImage.superClass_.constructor.call(this,a,b,c,"");this.setChangeHandler(e)};goog.inherits(Blockly.FieldClickImage,Blockly.FieldImage);Blockly.FieldClickImage.prototype.EDITABLE=!0;Blockly.FieldLabel.prototype.SERIALIZABLE=!1;Blockly.FieldClickImage.prototype.CURSOR="default"; Blockly.FieldClickImage.prototype.updateEditable=function(){this.sourceBlock_.isInFlyout||!this.EDITABLE?Blockly.addClass_(this.fieldGroup_,"blocklyIconGroupReadonly"):Blockly.removeClass_(this.fieldGroup_,"blocklyIconGroupReadonly")}; Blockly.FieldClickImage.prototype.init=function(a){this.sourceBlock_||(Blockly.FieldClickImage.superClass_.init.call(this,a),Blockly.addClass_(this.fieldGroup_,"blocklyIconGroup"),Blockly.addClass_(this.fieldGroup_,"blocklyIconFading"),this.updateEditable(),this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_())}; -Blockly.FieldClickImage.prototype.showEditor_=function(){if(this.changeHandler_){var a=Blockly.dragMode_;Blockly.dragMode_=0;this.changeHandler_.call(this.sourceBlock_,this);Blockly.dragMode_=a}};Blockly.Block=function(){goog.asserts.assert(0==arguments.length,"Please use Blockly.Block.obtain.")};Blockly.Block.obtain=function(a,b){if(Blockly.Realtime.isEnabled())return Blockly.Realtime.obtainBlock(a,b);var c=a.rendered?new Blockly.BlockSvg:new Blockly.Block;c.initialize(a,b);return c};Blockly.Block.prototype.initialize=function(a,b){this.id=Blockly.Blocks.genUid();a.addTopBlock(this);this.fill(a,b)}; +Blockly.FieldClickImage.prototype.showEditor_=function(){if(this.changeHandler_){var a=Blockly.dragMode_;Blockly.dragMode_=0;this.changeHandler_.call(this.sourceBlock_,this);Blockly.dragMode_=a}};Blockly.FieldDropdown=function(a,b){this.menuGenerator_=a;this.setChangeHandler(b);this.trimOptions_();var c=this.getOptions_()[0];this.value_=c[1];Blockly.FieldDropdown.superClass_.constructor.call(this,c[0])};goog.inherits(Blockly.FieldDropdown,Blockly.Field);Blockly.FieldDropdown.CHECKMARK_OVERHANG=25;Blockly.FieldDropdown.ARROW_CHAR=goog.userAgent.ANDROID?"\u25bc":"\u25be";Blockly.FieldDropdown.prototype.CURSOR="default"; +Blockly.FieldDropdown.prototype.init=function(a){this.sourceBlock_||(this.arrow_=Blockly.createSvgElement("tspan",{},null),this.arrow_.appendChild(document.createTextNode(a.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR)),Blockly.FieldDropdown.superClass_.init.call(this,a),a=this.text_,this.text_=null,this.setText(a))}; +Blockly.FieldDropdown.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,null);var a=this,b=new goog.ui.Menu;b.setRightToLeft(this.sourceBlock_.RTL);for(var c=this.getOptions_(),d=0;d=c.height+d.y?e.y-h.height:e.y+f.height;this.sourceBlock_.RTL?(e.x+=f.width,e.x+=Blockly.FieldDropdown.CHECKMARK_OVERHANG,e.xc.width+d.x-h.width&&(e.x=c.width+d.x-h.width));Blockly.WidgetDiv.position(e.x,e.y,c,d,this.sourceBlock_.RTL);b.setAllowAutoFocus(!0); +g.focus()}; +Blockly.FieldDropdown.prototype.trimOptions_=function(){this.suffixField=this.prefixField=null;var a=this.menuGenerator_;if(goog.isArray(a)&&!(2>a.length)){var b=a.map(function(a){return a[0]}),c=Blockly.shortestStringLength(b),d=Blockly.commonWordPrefix(b,c),e=Blockly.commonWordSuffix(b,c);if((d||e)&&!(c<=d+e)){d&&(this.prefixField=b[0].substring(0,d-1));e&&(this.suffixField=b[0].substr(1-e));b=[];for(c=0;c=b.height+c.y?d.y-(f.height-1):d.y+(e.height-1);this.sourceBlock_.RTL?(d.x+=e.width,d.x-=f.width,d.xb.width+c.x-f.width&&(d.x=b.width+c.x-f.width);Blockly.WidgetDiv.position(d.x,d.y,b,c,this.sourceBlock_.RTL);var g=this;Blockly.FieldColour.changeEventKey_=goog.events.listen(a,goog.ui.ColorPicker.EventType.CHANGE,function(a){a=a.target.getSelectedColor()||"#000000";Blockly.WidgetDiv.hide();if(g.sourceBlock_&&g.changeHandler_){var b=g.changeHandler_(a); -void 0!==b&&(a=b)}null!==a&&g.setValue(a)})};Blockly.FieldColour.widgetDispose_=function(){Blockly.FieldColour.changeEventKey_&&goog.events.unlistenByKey(Blockly.FieldColour.changeEventKey_)};Blockly.FieldDropdown=function(a,b){this.menuGenerator_=a;this.setChangeHandler(b);this.trimOptions_();var c=this.getOptions_()[0];this.value_=c[1];Blockly.FieldDropdown.superClass_.constructor.call(this,c[0])};goog.inherits(Blockly.FieldDropdown,Blockly.Field);Blockly.FieldDropdown.CHECKMARK_OVERHANG=25;Blockly.FieldDropdown.ARROW_CHAR=goog.userAgent.ANDROID?"\u25bc":"\u25be";Blockly.FieldDropdown.prototype.CURSOR="default"; -Blockly.FieldDropdown.prototype.init=function(a){this.sourceBlock_||(this.arrow_=Blockly.createSvgElement("tspan",{},null),this.arrow_.appendChild(document.createTextNode(a.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR)),Blockly.FieldDropdown.superClass_.init.call(this,a),a=this.text_,this.text_=null,this.setText(a))}; -Blockly.FieldDropdown.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,null);var a=this,b=new goog.ui.Menu;b.setRightToLeft(this.sourceBlock_.RTL);for(var c=this.getOptions_(),d=0;d=c.height+d.y?e.y-h.height:e.y+f.height;this.sourceBlock_.RTL?(e.x+=f.width,e.x+=Blockly.FieldDropdown.CHECKMARK_OVERHANG,e.xc.width+d.x-h.width&&(e.x=c.width+d.x-h.width));Blockly.WidgetDiv.position(e.x,e.y,c,d,this.sourceBlock_.RTL);b.setAllowAutoFocus(!0); -g.focus()}; -Blockly.FieldDropdown.prototype.trimOptions_=function(){this.suffixField=this.prefixField=null;var a=this.menuGenerator_;if(goog.isArray(a)&&!(2>a.length)){var b=a.map(function(a){return a[0]}),c=Blockly.shortestStringLength(b),d=Blockly.commonWordPrefix(b,c),e=Blockly.commonWordSuffix(b,c);if((d||e)&&!(c<=d+e)){d&&(this.prefixField=b[0].substring(0,d-1));e&&(this.suffixField=b[0].substr(1-e));b=[];for(c=0;c Date: Mon, 24 Aug 2015 07:34:08 -0400 Subject: [PATCH 32/84] Fix problem with deleting parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When deleting a parameter to a function, it didn’t remove the parameter on the called functions properly --- blocks/procedures.js | 12 ++++++------ blocks_compressed.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/blocks/procedures.js b/blocks/procedures.js index 77edc31b6b2..71f86f83472 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -583,7 +583,7 @@ Blockly.Blocks['procedures_callnoreturn'] = { var input = this.getInput('ARG' + i); if (input) { var connection = input.connection.targetConnection; - if (i > parameters.length) { // If it is no longer used + if (i >= parameters.length) { // If it is no longer used // Disconnect all argument blocks and remove all inputs. this.removeInput('ARG' + i); } else if (parameters[i]['name'] != this.arguments_[i]['name']) { @@ -603,11 +603,11 @@ Blockly.Blocks['procedures_callnoreturn'] = { if (input.connection.targetConnection) { connection = null; } - if (connection) { - // If we disconnected the block for any reason, we need to remember - // it so that we can reconnect it later on if things get better - this.quarkConnections_[this.arguments_[i]['name']] = connection; - } + } + if (connection) { + // If we disconnected the block for any reason, we need to remember + // it so that we can reconnect it later on if things get better + this.quarkConnections_[this.arguments_[i]['name']] = connection; } } } diff --git a/blocks_compressed.js b/blocks_compressed.js index 9630759d787..b536841b009 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -119,8 +119,8 @@ Blockly.Blocks.procedures_defreturn={init:function(){this.setHelpUrl(Blockly.Msg updateParam:Blockly.Blocks.procedures_defnoreturn.updateParam,setStatements_:Blockly.Blocks.procedures_defnoreturn.setStatements_,mutationToDom:Blockly.Blocks.procedures_defnoreturn.mutationToDom,domToMutation:Blockly.Blocks.procedures_defnoreturn.domToMutation,dispose:Blockly.Blocks.procedures_defnoreturn.dispose,getProcedureDef:Blockly.Blocks.procedures_defnoreturn.getProcedureDef,getVars:Blockly.Blocks.procedures_defnoreturn.getVars,getVarsTypes:Blockly.Blocks.procedures_defnoreturn.getVarsTypes, renameVar:Blockly.Blocks.procedures_defnoreturn.renameVar,customContextMenu:Blockly.Blocks.procedures_defnoreturn.customContextMenu,callType_:"procedures_callreturn"}; Blockly.Blocks.procedures_callnoreturn={init:function(){this.setHelpUrl(Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL);this.setColour(Blockly.Blocks.procedures.HUE);this.appendDummyInput("TOPROW").appendField(Blockly.Msg.PROCEDURES_CALLNORETURN_CALL).appendField("","NAME");this.setPreviousStatement(!0);this.setNextStatement(!0);this.arguments_=[];this.quarkConnections_={}},getProcedureCall:function(){return this.getFieldValue("NAME")},renameProcedure:function(a,b){Blockly.Names.equals(a,this.getProcedureCall())&& -(this.setFieldValue(b,"NAME"),this.setTooltip((this.outputConnection?Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP:Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP).replace("%1",b)))},setProcedureParameters:function(a){if(!goog.array.equals(this.arguments_,a,goog.object.equals)){this.setCollapsed(!1);var b=this.rendered;this.rendered=!1;for(var c=0;ca.length?this.removeInput("ARG"+c):a[c].name!=this.arguments_[c].name? -(this.setFieldValue(a[c].name,"ARGn"+c),e&&e.sourceBlock_.unplug(!0,!0),d.setCheck(a[c].type)):a[c].type!=this.arguments_[c].type&&(d.setCheck(a[c].type),d.connection.targetConnection&&(e=null),e&&(this.quarkConnections_[this.arguments_[c].name]=e))}}var f=this.arguments_;this.arguments_=[];for(c=0;c=a.length?this.removeInput("ARG"+c):a[c].name!=this.arguments_[c].name? +(this.setFieldValue(a[c].name,"ARGn"+c),e&&e.sourceBlock_.unplug(!0,!0),d.setCheck(a[c].type)):a[c].type!=this.arguments_[c].type&&(d.setCheck(a[c].type),d.connection.targetConnection&&(e=null));e&&(this.quarkConnections_[this.arguments_[c].name]=e)}}var f=this.arguments_;this.arguments_=[];for(c=0;c Date: Mon, 24 Aug 2015 13:27:39 -0400 Subject: [PATCH 33/84] Make procedures support mutators and add/sub Complete implementation of support for Blockly.useMutators option to allow for a workspace to either have mutators or the add/sub options --- blockly_compressed.js | 4 +- blockly_uncompressed.js | 2 +- blocks/procedures.js | 225 ++++++++++++++++++++++++++++++++++------ blocks_compressed.js | 39 ++++--- core/typeblock.js | 13 +-- 5 files changed, 227 insertions(+), 56 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 35d411ee799..9bed92bb16f 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1451,8 +1451,8 @@ Blockly.TypeBlock.show=function(){if(!Blockly.TypeBlock.visible){Blockly.TypeBlo Blockly.TypeBlock.visible=!0}};Blockly.TypeBlock.needsReload={components:!0};Blockly.TypeBlock.lazyLoadOfOptions_=function(){this.needsReload.components&&(Blockly.TypeBlock.generateOptions(),this.needsReload.components=null);Blockly.TypeBlock.loadGlobalVariables_();Blockly.TypeBlock.loadProcedures_();this.reloadOptionsAfterChanges_()}; Blockly.TypeBlock.generateOptions=function(){Blockly.TypeBlock.TBOptions_=function(){function a(a,c){a&&goog.array.forEach(a,function(a){var d={},e={},f={};a.fields&&(d=a.fields);a.values&&(f=a.values);a.mutatorAttributes&&(e=a.mutatorAttributes);b[a.entry]={canonicName:c,mutatorAttributes:e,fields:d,values:f}})}var b={},c,d;for(d in Blockly.Blocks){var e=Blockly.Blocks[d];e.typeblock&&(c=e.typeblock,"function"==typeof e.typeblock?c=e.typeblock():"string"===typeof e.typeblock&&(c=[{entry:e.typeblock}]), a(c,d))}return b}()};Blockly.TypeBlock.reloadOptionsAfterChanges_=function(){Blockly.TypeBlock.TBOptionsNames_=goog.object.getKeys(Blockly.TypeBlock.TBOptions_);goog.array.sort(Blockly.TypeBlock.TBOptionsNames_);Blockly.TypeBlock.ac_.matcher_.setRows(Blockly.TypeBlock.TBOptionsNames_)}; -Blockly.TypeBlock.loadProcedures_=function(){Blockly.TypeBlock.TBOptions_=goog.object.filter(Blockly.TypeBlock.TBOptions_,function(a){return!a.isProcedure});var a=Blockly.Procedures.allProcedures(Blockly.mainWorkspace);goog.array.forEach(a[0],function(a){Blockly.TypeBlock.TBOptions_[Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL+" "+a[0]]={canonicName:"procedures_callnoreturn",fields:{PROCNAME:a[0]},isProcedure:!0}});goog.array.forEach(a[1],function(a){entry=Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL+ -" "+a[0];Blockly.TypeBlock.TBOptions_[entry]={canonicName:"procedures_callreturn",fields:{PROCNAME:a[0]},isProcedure:!0}})}; +Blockly.TypeBlock.loadProcedures_=function(){Blockly.TypeBlock.TBOptions_=goog.object.filter(Blockly.TypeBlock.TBOptions_,function(a){return!a.isProcedure});var a=Blockly.Procedures.allProcedures(Blockly.mainWorkspace);goog.array.forEach(a[0],function(a){var c=goog.string.trim(Blockly.Msg.PROCEDURES_CALLNORETURN_CALL+" ")+a[0];Blockly.TypeBlock.TBOptions_[c]={canonicName:"procedures_callnoreturn",fields:{NAME:a[0]},isProcedure:!0}});goog.array.forEach(a[1],function(a){var c=goog.string.trim(Blockly.Msg.PROCEDURES_CALLRETURN_CALL+ +" ")+a[0];Blockly.TypeBlock.TBOptions_[c]={canonicName:"procedures_callreturn",fields:{NAME:a[0]},isProcedure:!0}})}; Blockly.TypeBlock.loadGlobalVariables_=function(){Blockly.TypeBlock.TBOptions_=goog.object.filter(Blockly.TypeBlock.TBOptions_,function(a){return!a.isGlobalvar});var a=Blockly.Variables.allVariables(Blockly.mainWorkspace);goog.array.forEach(a,function(a){Blockly.TypeBlock.TBOptions_["get "+a]={canonicName:"variables_get",fields:{VAR:a},isGlobalvar:!0};Blockly.TypeBlock.TBOptions_["set "+a]={canonicName:"variables_set",fields:{VAR:a},isGlobalvar:!0}})}; Blockly.TypeBlock.mutatorToXMLString=function(a){var b="";if("object"===typeof a&&!goog.object.isEmpty(a)){var c="'+e+"");c+="<"+a+' name="'+d+'">'+e+""}return c}; Blockly.TypeBlock.autoCompleteSelected=function(){var a=Blockly.TypeBlock.inputText_.value,b=goog.object.get(Blockly.TypeBlock.TBOptions_,a);if(!b){var b=RegExp("^-?[0-9]\\d*(.\\d+)?$","g").exec(a),c=RegExp("^[\"|']+","g").exec(a);if(b&&0'+Blockly.TypeBlock.mutatorToXMLString(b.mutatorAttributes)+Blockly.TypeBlock.sectionToXMLString("field", diff --git a/blockly_uncompressed.js b/blockly_uncompressed.js index fb5a2e2839a..2eccee2bf81 100644 --- a/blockly_uncompressed.js +++ b/blockly_uncompressed.js @@ -63,7 +63,7 @@ goog.addDependency("../../../" + dir + "/core/scrollbar.js", ['Blockly.Scrollbar goog.addDependency("../../../" + dir + "/core/toolbox.js", ['Blockly.Toolbox'], ['Blockly.Flyout', 'goog.dom', 'goog.events', 'goog.events.BrowserFeature', 'goog.html.SafeHtml', 'goog.math.Rect', 'goog.style', 'goog.ui.tree.TreeControl', 'goog.ui.tree.TreeNode']); goog.addDependency("../../../" + dir + "/core/tooltip.js", ['Blockly.Tooltip'], ['goog.dom']); goog.addDependency("../../../" + dir + "/core/trashcan.js", ['Blockly.Trashcan'], ['goog.Timer', 'goog.dom', 'goog.math', 'goog.math.Rect']); -goog.addDependency("../../../" + dir + "/core/typeblock.js", ['Blockly.TypeBlock', 'Blockly.TypeBlock.ac.AIArrayMatcher'], ['Blockly.Xml', 'goog.events', 'goog.events.KeyCodes', 'goog.events.KeyHandler', 'goog.ui.ac', 'goog.style', 'goog.ui.ac.ArrayMatcher', 'goog.ui.ac.AutoComplete', 'goog.ui.ac.InputHandler', 'goog.ui.ac.Renderer', 'goog.iter', 'goog.string']); +goog.addDependency("../../../" + dir + "/core/typeblock.js", ['Blockly.TypeBlock', 'Blockly.TypeBlock.ac.AIArrayMatcher'], ['Blockly.Xml', 'goog.events', 'goog.events.KeyCodes', 'goog.events.KeyHandler', 'goog.ui.ac', 'goog.style', 'goog.string', 'goog.ui.ac.ArrayMatcher', 'goog.ui.ac.AutoComplete', 'goog.ui.ac.InputHandler', 'goog.ui.ac.Renderer', 'goog.iter', 'goog.string']); goog.addDependency("../../../" + dir + "/core/utils.js", ['Blockly.utils'], ['goog.events.BrowserFeature', 'goog.userAgent', 'goog.dom']); goog.addDependency("../../../" + dir + "/core/variables.js", ['Blockly.Variables'], ['Blockly.Workspace', 'goog.string']); goog.addDependency("../../../" + dir + "/core/warning.js", ['Blockly.Warning'], ['Blockly.Bubble', 'Blockly.Icon']); diff --git a/blocks/procedures.js b/blocks/procedures.js index 71f86f83472..feab0ce118b 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -40,9 +40,16 @@ Blockly.Blocks['procedures_defnoreturn'] = { * @this Blockly.Block */ init: function() { - var addField = new Blockly.FieldClickImage(this.addPng, 17, 17); - addField.setPrivate({name: name, pos: 0}); - addField.setChangeHandler(this.doAddField); + var addField = ''; + var addName = 'PARAMS'; + if (!Blockly.useMutators) { + addField = new Blockly.FieldClickImage(this.addPng, 17, 17); + addField.setPrivate({name: name, pos: 0}); + addField.setChangeHandler(this.doAddField); + addName = null; + } else { + this.setMutator(new Blockly.Mutator(['procedures_mutatorarg'])); + } this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL); this.setColour(Blockly.Blocks.procedures.HUE); @@ -54,14 +61,14 @@ Blockly.Blocks['procedures_defnoreturn'] = { this.appendDummyInput() .appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE) .appendField(nameField, 'NAME') - .appendField(addField); + .appendField(addField, addName); this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP); this.setInputsInline(false); this.arguments_ = []; - this.argid = 0; this.setStatements_(true); this.statementConnection_ = null; this.hasReturnValue_ = false; + this.argid = 0; }, /** * Add a parameter to the function @@ -128,14 +135,13 @@ Blockly.Blocks['procedures_defnoreturn'] = { var nameFieldText = 'PARAM'+i+'_NAME'; var typeFieldText = 'PARAM'+i+'_TYPE'; var subFieldText = 'PARAM'+i+'_SUB'; - if (!this.getInput('PARAM'+i)) { - this.jsonInit({ -// "message0": Blockly.Msg.PROCEDURES_PARAM_NOTYPE, + var jsonData = { "message0": Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE, "args0": [ { "type": "field_input", "text": this.arguments_[i]['name'], + "spellcheck" : false, "name" : nameFieldText }, { @@ -158,32 +164,47 @@ Blockly.Blocks['procedures_defnoreturn'] = { } ], "colour": Blockly.Blocks.procedures.HUE - }); + }; + + if (Blockly.useMutators) { + // If we are using mutators, then we need to eliminate the click image + // for removing the field. + var msg = jsonData["message0"]; + msg = msg.replace('%3',''); + msg = msg.replace('%4','%3'); + jsonData["message0"] = msg; + jsonData["args0"].splice(2,1); // Delete the field_clickimage + } + if (!this.getInput('PARAM'+i)) { + this.jsonInit(jsonData); var nameField = this.getField(nameFieldText); - nameField.setSpellcheck(false); nameField.setSerializable(false); nameField.argPos_ = i; nameField.setChangeHandler(this.updateParam); var subField = this.getField(subFieldText); - subField.setPrivate({name: 'param', pos: i}); - subField.setSerializable(false); - subField.setChangeHandler(this.doRemoveField); + if (subField != null) { + subField.setSerializable(false); + subField.setPrivate({name: 'param', pos: i}); + subField.setChangeHandler(this.doRemoveField); + } var typeField = this.getField(typeFieldText); - typeField.setSerializable(false); - typeField.setChangeHandler(this.updateType); - typeField.setMsgStrings(null,null, - Blockly.Msg.PROCEDURES_NEWTYPE, - Blockly.Msg.PROCEDURES_NEWTYPETITLE); - typeField.argPos_ = i; - typeField.setMsgEmpty('Any'); - var type = this.arguments_[i]['type']; - if (!type) { - type = ''; + if (typeField != null) { + typeField.setSerializable(false); + typeField.setChangeHandler(this.updateType); + typeField.setMsgStrings(null,null, + Blockly.Msg.PROCEDURES_NEWTYPE, + Blockly.Msg.PROCEDURES_NEWTYPETITLE); + typeField.argPos_ = i; + typeField.setMsgEmpty('Any'); + var type = this.arguments_[i]['type']; + if (!type) { + type = ''; + } + typeField.setValue(type); } - typeField.setValue(type); this.moveNumberedInputBefore(this.inputList.length-1, i+1); } else { @@ -295,6 +316,94 @@ Blockly.Blocks['procedures_defnoreturn'] = { this.setStatements_(xmlElement.getAttribute('statements') !== 'false'); }, + /** + * Populate the mutator's dialog with this block's components. + * @param {!Blockly.Workspace} workspace Mutator's workspace. + * @return {!Blockly.Block} Root block in mutator. + * @this Blockly.Block + */ + decompose: function(workspace) { + var containerBlock = Blockly.Block.obtain(workspace, + 'procedures_mutatorcontainer'); + containerBlock.initSvg(); + + // Check/uncheck the allow statement box. + if (this.getInput('RETURN')) { + containerBlock.setFieldValue(this.hasStatements_ ? 'TRUE' : 'FALSE', + 'STATEMENTS'); + } else { + containerBlock.getInput('STATEMENT_INPUT').setVisible(false); + } + + // Parameter list. + var connection = containerBlock.getInput('STACK').connection; + for (var i = 0; i < this.arguments_.length; i++) { + var paramBlock = Blockly.Block.obtain(workspace, 'procedures_mutatorarg'); + paramBlock.initSvg(); + paramBlock.setFieldValue(this.arguments_[i]['name'], 'NAME'); + // Store the old location. + paramBlock.oldLocation = i; + connection.connect(paramBlock.previousConnection); + connection = paramBlock.nextConnection; + } + // Initialize procedure's callers with blank IDs. + Blockly.Procedures.mutateCallers(this.getFieldValue('NAME'), + this.workspace, this.arguments_, null); + return containerBlock; + }, + /** + * Reconfigure this block based on the mutator dialog's components. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + compose: function(containerBlock) { + // Parameter list. + this.arguments_ = []; + this.paramIds_ = []; + var paramBlock = containerBlock.getInputTargetBlock('STACK'); + while (paramBlock) { + this.arguments_.push({name: paramBlock.getFieldValue('NAME'), type: ''}); + this.paramIds_.push(paramBlock.id); + paramBlock = paramBlock.nextConnection && + paramBlock.nextConnection.targetBlock(); + } + this.updateParams_(); + Blockly.Procedures.mutateCallers(this.getFieldValue('NAME'), + this.workspace, this.arguments_, this.paramIds_); + + // Show/hide the statement input. + var hasStatements = containerBlock.getFieldValue('STATEMENTS'); + if (hasStatements !== null) { + hasStatements = hasStatements == 'TRUE'; + if (this.hasStatements_ != hasStatements) { + if (hasStatements) { + this.setStatements_(true); + // Restore the stack, if one was saved. + var stackConnection = this.getInput('STACK').connection; + if (stackConnection.targetConnection || + !this.statementConnection_ || + this.statementConnection_.targetConnection || + this.statementConnection_.sourceBlock_.workspace != + this.workspace) { + // Block no longer exists or has been attached elsewhere. + this.statementConnection_ = null; + } else { + stackConnection.connect(this.statementConnection_); + } + } else { + // Save the stack, then disconnect it. + var stackConnection = this.getInput('STACK').connection; + this.statementConnection_ = stackConnection.targetConnection; + if (this.statementConnection_) { + var stackBlock = stackConnection.targetBlock(); + stackBlock.setParent(null); + stackBlock.bumpNeighbours_(); + } + this.setStatements_(false); + } + } + } + }, /** * Dispose of any callers. * @this Blockly.Block @@ -463,14 +572,20 @@ Blockly.Blocks['procedures_defreturn'] = { var nameField = new Blockly.FieldTextInput(name, Blockly.Procedures.rename); nameField.setSpellcheck(false); - var addField = new Blockly.FieldClickImage(this.addPng, 17, 17); - addField.setPrivate({name: name, pos: 0}); - addField.setChangeHandler(this.doAddField); - + var addField = ''; + var addName = 'PARAMS'; + if (!Blockly.useMutators) { + addField = new Blockly.FieldClickImage(this.addPng, 17, 17); + addField.setPrivate({name: name, pos: 0}); + addField.setChangeHandler(this.doAddField); + addName = null; + } else { + this.setMutator(new Blockly.Mutator(['procedures_mutatorarg'])); + } this.appendDummyInput() .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_TITLE) .appendField(nameField, 'NAME') - .appendField(addField); + .appendField(addField, addName); this.appendValueInput('RETURN') .setAlign(Blockly.ALIGN_RIGHT) .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN); @@ -490,6 +605,8 @@ Blockly.Blocks['procedures_defreturn'] = { setStatements_: Blockly.Blocks['procedures_defnoreturn'].setStatements_, mutationToDom: Blockly.Blocks['procedures_defnoreturn'].mutationToDom, domToMutation: Blockly.Blocks['procedures_defnoreturn'].domToMutation, + decompose: Blockly.Blocks['procedures_defnoreturn'].decompose, + compose: Blockly.Blocks['procedures_defnoreturn'].compose, dispose: Blockly.Blocks['procedures_defnoreturn'].dispose, getProcedureDef: Blockly.Blocks['procedures_defnoreturn'].getProcedureDef, getVars: Blockly.Blocks['procedures_defnoreturn'].getVars, @@ -795,6 +912,55 @@ Blockly.Blocks['procedures_callnoreturn'] = { } }; +Blockly.Blocks['procedures_mutatorcontainer'] = { + /** + * Mutator block for procedure container. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.procedures.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE); + this.appendStatementInput('STACK'); + this.appendDummyInput('STATEMENT_INPUT') + .appendField(Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS) + .appendField(new Blockly.FieldCheckbox('TRUE'), 'STATEMENTS'); + this.setTooltip(Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP); + this.contextMenu = false; + }, + isTopLevel: true +}; + +Blockly.Blocks['procedures_mutatorarg'] = { + /** + * Mutator block for procedure argument. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.procedures.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.PROCEDURES_MUTATORARG_TITLE) + .appendField(new Blockly.FieldTextInput('x', this.validator_), 'NAME'); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP); + this.contextMenu = false; + }, + /** + * Obtain a valid name for the procedure. + * Merge runs of whitespace. Strip leading and trailing whitespace. + * Beyond this, all names are legal. + * @param {string} newVar User-supplied name. + * @return {?string} Valid name, or null if a name was not specified. + * @private + * @this Blockly.Block + */ + validator_: function(newVar) { + newVar = newVar.replace(/[\s\xa0]+/g, ' ').replace(/^ | $/g, ''); + return newVar || null; + } +}; + Blockly.Blocks['procedures_callreturn'] = { /** * Block for calling a procedure with a return value. @@ -812,7 +978,6 @@ Blockly.Blocks['procedures_callreturn'] = { this.quarkConnections_ = {}; this.quarkArguments_ = null; }, - isTopLevel: true, getProcedureCall: Blockly.Blocks['procedures_callnoreturn'].getProcedureCall, renameProcedure: Blockly.Blocks['procedures_callnoreturn'].renameProcedure, getVarsTypes: Blockly.Blocks['procedures_callnoreturn'].getVarsTypes, diff --git a/blocks_compressed.js b/blocks_compressed.js index b536841b009..0bedbba659d 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -102,22 +102,25 @@ Blockly.Blocks.math_modulo={init:function(){this.jsonInit({message0:Blockly.Msg. Blockly.Blocks.math_constrain={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_CONSTRAIN_TITLE,args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_CONSTRAIN_TOOLTIP,helpUrl:Blockly.Msg.MATH_CONSTRAIN_HELPURL})},typeblock:[{entry:Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK,values:{LOW:1,HIGH:100}}]}; Blockly.Blocks.math_random_int={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:Blockly.Msg.MATH_RANDOM_INT_HELPURL})},typeblock:[{entry:Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK,values:{FROM:1,TO:100}}]}; Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM);this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)},typeblock:Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK};Blockly.Blocks.procedures={};Blockly.Blocks.procedures.HUE=290; -Blockly.Blocks.procedures_defnoreturn={init:function(){var a=new Blockly.FieldClickImage(this.addPng,17,17);a.setPrivate({name:b,pos:0});a.setChangeHandler(this.doAddField);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.setColour(Blockly.Blocks.procedures.HUE);var b=Blockly.Procedures.findLegalName(Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,this),b=new Blockly.FieldTextInput(b,Blockly.Procedures.rename);b.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(b, -"NAME").appendField(a);this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP);this.setInputsInline(!1);this.arguments_=[];this.argid=0;this.setStatements_(!0);this.statementConnection_=null;this.hasReturnValue_=!1},doAddField:function(a){a=this.arguments_.length;for(var b="param"+a,c=!0;c;)for(var c=!1,d=0;d=a.length?this.removeInput("ARG"+c):a[c].name!=this.arguments_[c].name? (this.setFieldValue(a[c].name,"ARGn"+c),e&&e.sourceBlock_.unplug(!0,!0),d.setCheck(a[c].type)):a[c].type!=this.arguments_[c].type&&(d.setCheck(a[c].type),d.connection.targetConnection&&(e=null));e&&(this.quarkConnections_[this.arguments_[c].name]=e)}}var f=this.arguments_;this.arguments_=[];for(c=0;c Date: Tue, 25 Aug 2015 08:47:10 -0400 Subject: [PATCH 34/84] Fix spurious bug with reference to undeclared variable The setPrivate data is not needed for the add click image, so eliminating it and getting rid of the reference to undeclared variable at the same time --- blocks/procedures.js | 2 -- blocks_compressed.js | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/blocks/procedures.js b/blocks/procedures.js index feab0ce118b..b03a46d5670 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -44,7 +44,6 @@ Blockly.Blocks['procedures_defnoreturn'] = { var addName = 'PARAMS'; if (!Blockly.useMutators) { addField = new Blockly.FieldClickImage(this.addPng, 17, 17); - addField.setPrivate({name: name, pos: 0}); addField.setChangeHandler(this.doAddField); addName = null; } else { @@ -576,7 +575,6 @@ Blockly.Blocks['procedures_defreturn'] = { var addName = 'PARAMS'; if (!Blockly.useMutators) { addField = new Blockly.FieldClickImage(this.addPng, 17, 17); - addField.setPrivate({name: name, pos: 0}); addField.setChangeHandler(this.doAddField); addName = null; } else { diff --git a/blocks_compressed.js b/blocks_compressed.js index 0bedbba659d..50f4eac6365 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -102,9 +102,9 @@ Blockly.Blocks.math_modulo={init:function(){this.jsonInit({message0:Blockly.Msg. Blockly.Blocks.math_constrain={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_CONSTRAIN_TITLE,args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_CONSTRAIN_TOOLTIP,helpUrl:Blockly.Msg.MATH_CONSTRAIN_HELPURL})},typeblock:[{entry:Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK,values:{LOW:1,HIGH:100}}]}; Blockly.Blocks.math_random_int={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:Blockly.Msg.MATH_RANDOM_INT_HELPURL})},typeblock:[{entry:Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK,values:{FROM:1,TO:100}}]}; Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM);this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)},typeblock:Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK};Blockly.Blocks.procedures={};Blockly.Blocks.procedures.HUE=290; -Blockly.Blocks.procedures_defnoreturn={init:function(){var a="",b="PARAMS";Blockly.useMutators?this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"])):(a=new Blockly.FieldClickImage(this.addPng,17,17),a.setPrivate({name:c,pos:0}),a.setChangeHandler(this.doAddField),b=null);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.setColour(Blockly.Blocks.procedures.HUE);var c=Blockly.Procedures.findLegalName(Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,this),c=new Blockly.FieldTextInput(c, -Blockly.Procedures.rename);c.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(c,"NAME").appendField(a,b);this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP);this.setInputsInline(!1);this.arguments_=[];this.setStatements_(!0);this.statementConnection_=null;this.hasReturnValue_=!1;this.argid=0},doAddField:function(a){a=this.arguments_.length;for(var b="param"+a,c=!0;c;)for(var c=!1,d=0;d Date: Tue, 25 Aug 2015 08:51:15 -0400 Subject: [PATCH 35/84] Fix problem with multiple procedures having the same name Implement new validation function for procedures to set the legal name properly after XML serialization. see https://groups.google.com/forum/#!topic/blockly/2q0pleoMIco for details --- blockly_compressed.js | 4 ++-- blocks/procedures.js | 11 +++++++++++ blocks_compressed.js | 35 ++++++++++++++++++----------------- core/xml.js | 4 ++++ 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 9bed92bb16f..d2aa5540315 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1124,8 +1124,8 @@ Blockly.Xml.domToBlockHeadless_=function(a,b,c){var d=null,e=b.getAttribute("typ (g=l);k=h.getAttribute("name");switch(h.nodeName.toLowerCase()){case "mutation":d.domToMutation&&(d.domToMutation(h),d.initSvg&&d.initSvg());break;case "comment":d.setCommentText(h.textContent);var p=h.getAttribute("pinned");p&&setTimeout(function(){d.comment&&d.comment.setVisible&&d.comment.setVisible("true"==p)},1);g=parseInt(h.getAttribute("w"),10);h=parseInt(h.getAttribute("h"),10);!isNaN(g)&&!isNaN(h)&&d.comment&&d.comment.setVisible&&d.comment.setBubbleSize(g,h);break;case "data":d.data=h.textContent; break;case "title":case "field":d.setFieldValue(h.textContent,k);break;case "value":case "statement":h=d.getInput(k);if(!h)throw"Input "+k+" does not exist in block "+e;if(g&&"block"==g.nodeName.toLowerCase())if(g=Blockly.Xml.domToBlockHeadless_(a,g,c),g.outputConnection)h.connection.connect(g.outputConnection);else if(g.previousConnection)h.connection.connect(g.previousConnection);else throw"Child block does not have output or previous statement.";break;case "next":if(g&&"block"==g.nodeName.toLowerCase()){if(!d.nextConnection)throw"Next statement does not exist."; if(d.nextConnection.targetConnection)throw"Next statement is already connected.";g=Blockly.Xml.domToBlockHeadless_(a,g,c);if(!g.previousConnection)throw"Next block does not have previous statement.";d.nextConnection.connect(g.previousConnection)}break;default:console.log("Ignoring unknown tag: "+h.nodeName)}}(a=b.getAttribute("inline"))&&d.setInputsInline("true"==a);(a=b.getAttribute("disabled"))&&d.setDisabled("true"==a);(a=b.getAttribute("deletable"))&&d.setDeletable("true"==a);(a=b.getAttribute("movable"))&& -d.setMovable("true"==a);(a=b.getAttribute("editable"))&&d.setEditable("true"==a);(b=b.getAttribute("collapsed"))&&d.setCollapsed("true"==b);return d};Blockly.Xml.deleteNext=function(a){for(var b=0,c;c=a.childNodes[b];b++)if("next"==c.nodeName.toLowerCase()){a.removeChild(c);break}};goog.global.Blockly||(goog.global.Blockly={});goog.global.Blockly.Xml||(goog.global.Blockly.Xml={});goog.global.Blockly.Xml.domToText=Blockly.Xml.domToText;goog.global.Blockly.Xml.domToWorkspace=Blockly.Xml.domToWorkspace; -goog.global.Blockly.Xml.textToDom=Blockly.Xml.textToDom;goog.global.Blockly.Xml.workspaceToDom=Blockly.Xml.workspaceToDom; +d.setMovable("true"==a);(a=b.getAttribute("editable"))&&d.setEditable("true"==a);(b=b.getAttribute("collapsed"))&&d.setCollapsed("true"==b);d.validate&&d.validate.call(d);return d};Blockly.Xml.deleteNext=function(a){for(var b=0,c;c=a.childNodes[b];b++)if("next"==c.nodeName.toLowerCase()){a.removeChild(c);break}};goog.global.Blockly||(goog.global.Blockly={});goog.global.Blockly.Xml||(goog.global.Blockly.Xml={});goog.global.Blockly.Xml.domToText=Blockly.Xml.domToText; +goog.global.Blockly.Xml.domToWorkspace=Blockly.Xml.domToWorkspace;goog.global.Blockly.Xml.textToDom=Blockly.Xml.textToDom;goog.global.Blockly.Xml.workspaceToDom=Blockly.Xml.workspaceToDom; // Copyright 2014 Google Inc. Apache License 2.0 Blockly.WorkspaceSvg=function(a){Blockly.WorkspaceSvg.superClass_.constructor.call(this,a);this.getMetrics=a.getMetrics;this.setMetrics=a.setMetrics;Blockly.ConnectionDB.init(this);this.SOUNDS_=Object.create(null);this.eventWrappers_=[]};goog.inherits(Blockly.WorkspaceSvg,Blockly.Workspace);Blockly.WorkspaceSvg.prototype.rendered=!0;Blockly.WorkspaceSvg.prototype.isFlyout=!1;Blockly.WorkspaceSvg.prototype.isScrolling=!1;Blockly.WorkspaceSvg.prototype.scrollX=0; Blockly.WorkspaceSvg.prototype.scrollY=0;Blockly.WorkspaceSvg.prototype.dragDeltaX_=0;Blockly.WorkspaceSvg.prototype.dragDeltaY_=0;Blockly.WorkspaceSvg.prototype.scale=1;Blockly.WorkspaceSvg.prototype.trashcan=null;Blockly.WorkspaceSvg.prototype.scrollbar=null; diff --git a/blocks/procedures.js b/blocks/procedures.js index b03a46d5670..53418b5fd4a 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -69,6 +69,16 @@ Blockly.Blocks['procedures_defnoreturn'] = { this.hasReturnValue_ = false; this.argid = 0; }, + /** + * Initialization of the block has completed, clean up anything that may be + * inconsistent as a result of the XML loading + * @this Blockly.Block + */ + validate: function () { + var name = Blockly.Procedures.findLegalName( + this.getFieldValue('NAME'), this); + this.setFieldValue(name, 'NAME'); + }, /** * Add a parameter to the function * @param {!Blockly.FieldClickImage} field Field clicked on for the action @@ -596,6 +606,7 @@ Blockly.Blocks['procedures_defreturn'] = { this.hasReturnValue_ = true; }, isTopLevel: true, + validate: Blockly.Blocks['procedures_defnoreturn'].validate, doAddField: Blockly.Blocks['procedures_defnoreturn'].doAddField, doRemoveField: Blockly.Blocks['procedures_defnoreturn'].doRemoveField, updateParams_: Blockly.Blocks['procedures_defnoreturn'].updateParams_, diff --git a/blocks_compressed.js b/blocks_compressed.js index 50f4eac6365..c063126af49 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -103,24 +103,25 @@ Blockly.Blocks.math_constrain={init:function(){this.jsonInit({message0:Blockly.M Blockly.Blocks.math_random_int={init:function(){this.jsonInit({message0:Blockly.Msg.MATH_RANDOM_INT_TITLE,args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",colour:Blockly.Blocks.math.HUE,tooltip:Blockly.Msg.MATH_RANDOM_INT_TOOLTIP,helpUrl:Blockly.Msg.MATH_RANDOM_INT_HELPURL})},typeblock:[{entry:Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK,values:{FROM:1,TO:100}}]}; Blockly.Blocks.math_random_float={init:function(){this.setHelpUrl(Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendDummyInput().appendField(Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM);this.setTooltip(Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP)},typeblock:Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK};Blockly.Blocks.procedures={};Blockly.Blocks.procedures.HUE=290; Blockly.Blocks.procedures_defnoreturn={init:function(){var a="",b="PARAMS";Blockly.useMutators?this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"])):(a=new Blockly.FieldClickImage(this.addPng,17,17),a.setChangeHandler(this.doAddField),b=null);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL);this.setColour(Blockly.Blocks.procedures.HUE);var c=Blockly.Procedures.findLegalName(Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE,this),c=new Blockly.FieldTextInput(c,Blockly.Procedures.rename); -c.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE).appendField(c,"NAME").appendField(a,b);this.setTooltip(Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP);this.setInputsInline(!1);this.arguments_=[];this.setStatements_(!0);this.statementConnection_=null;this.hasReturnValue_=!1;this.argid=0},doAddField:function(a){a=this.arguments_.length;for(var b="param"+a,c=!0;c;)for(var c=!1,d=0;d=a.length?this.removeInput("ARG"+c):a[c].name!=this.arguments_[c].name? (this.setFieldValue(a[c].name,"ARGn"+c),e&&e.sourceBlock_.unplug(!0,!0),d.setCheck(a[c].type)):a[c].type!=this.arguments_[c].type&&(d.setCheck(a[c].type),d.connection.targetConnection&&(e=null));e&&(this.quarkConnections_[this.arguments_[c].name]=e)}}var f=this.arguments_;this.arguments_=[];for(c=0;c Date: Wed, 26 Aug 2015 10:15:09 -0400 Subject: [PATCH 36/84] Recompile after latest merge --- blockly_compressed.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index b677c785b15..e2412bfee20 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1071,9 +1071,9 @@ a?"rtl":"ltr";Blockly.Tooltip.DIV.style.display="block";Blockly.Tooltip.visible= (c=b.width-Blockly.Tooltip.DIV.offsetWidth-2*Blockly.Tooltip.MARGINS);Blockly.Tooltip.DIV.style.top=d+"px";Blockly.Tooltip.DIV.style.left=c+"px"}}; Blockly.Tooltip.wrap_=function(a,b){if(a.length<=b)return a;for(var c=a.trim().split(/\s+/),d=0;db&&(b=c[d].length);var e,d=-Infinity,f,g=1;do{e=d;f=a;for(var h=[],k=c.length/g,l=1,d=0;de);return f}; Blockly.Tooltip.wrapScore_=function(a,b,c){for(var d=[0],e=[],f=0;fd&&(d=h,e=g)}return e?Blockly.Tooltip.wrapMutate_(a,e,c):b};Blockly.Tooltip.wrapToText_=function(a,b){for(var c=[],d=0;dd&&(d=h,e=g)}return e?Blockly.Tooltip.wrapMutate_(a,e,c):b};Blockly.Tooltip.wrapToText_=function(a,b){for(var c=[],d=0;d Date: Fri, 28 Aug 2015 08:52:51 -0400 Subject: [PATCH 37/84] Initial implementation of Maps Initial implementation of Maps with a Java code generator Changed procedures.js to use getProcedureDef instead of looking at the block.type Added Map type to standard scope variable list Checked for InheritedDisabled blocks to not generate code for them Added type for Map as a HashMap Added CONTROLS_FOREACH_KEY to iterate over a Map Added mapVariable so that the toolbox can have Map variables --- blockly_compressed.js | 11 +- blocks/loops.js | 13 +- blocks/maps.js | 530 ++++++++++++++++++++++++++++++++++++++ blocks/procedures.js | 3 +- blocks_compressed.js | 33 ++- core/block_svg.js | 18 +- core/blockly.js | 4 +- core/generator.js | 2 +- generators/java.js | 2 + generators/java/maps.js | 147 +++++++++++ generators/python/maps.js | 147 +++++++++++ java_compressed.js | 12 +- msg/js/ar.js | 82 +++++- msg/js/az.js | 82 +++++- msg/js/bcc.js | 82 +++++- msg/js/be-tarask.js | 82 +++++- msg/js/bg.js | 82 +++++- msg/js/bn.js | 82 +++++- msg/js/br.js | 82 +++++- msg/js/ca.js | 82 +++++- msg/js/cs.js | 82 +++++- msg/js/da.js | 82 +++++- msg/js/de.js | 82 +++++- msg/js/el.js | 82 +++++- msg/js/en.js | 82 +++++- msg/js/es.js | 82 +++++- msg/js/fa.js | 82 +++++- msg/js/fi.js | 82 +++++- msg/js/fr.js | 82 +++++- msg/js/he.js | 82 +++++- msg/js/hi.js | 82 +++++- msg/js/hrx.js | 82 +++++- msg/js/hu.js | 82 +++++- msg/js/ia.js | 82 +++++- msg/js/id.js | 82 +++++- msg/js/is.js | 82 +++++- msg/js/it.js | 82 +++++- msg/js/ja.js | 82 +++++- msg/js/ko.js | 82 +++++- msg/js/lb.js | 82 +++++- msg/js/lrc.js | 82 +++++- msg/js/lt.js | 82 +++++- msg/js/mk.js | 82 +++++- msg/js/ms.js | 82 +++++- msg/js/nb.js | 82 +++++- msg/js/nl.js | 82 +++++- msg/js/oc.js | 82 +++++- msg/js/pl.js | 82 +++++- msg/js/pms.js | 82 +++++- msg/js/pt-br.js | 82 +++++- msg/js/pt.js | 82 +++++- msg/js/ro.js | 82 +++++- msg/js/ru.js | 82 +++++- msg/js/sc.js | 82 +++++- msg/js/sk.js | 82 +++++- msg/js/sq.js | 82 +++++- msg/js/sr.js | 82 +++++- msg/js/sv.js | 82 +++++- msg/js/ta.js | 82 +++++- msg/js/th.js | 82 +++++- msg/js/tl.js | 82 +++++- msg/js/tlh.js | 82 +++++- msg/js/tr.js | 82 +++++- msg/js/uk.js | 82 +++++- msg/js/vi.js | 82 +++++- msg/js/zh-hans.js | 82 +++++- msg/js/zh-hant.js | 82 +++++- msg/json/en.json | 57 +++- msg/json/qqq.json | 55 ++++ msg/json/synonyms.json | 2 +- msg/messages.js | 171 ++++++++++++ python_compressed.js | 8 +- 72 files changed, 5083 insertions(+), 642 deletions(-) create mode 100644 blocks/maps.js create mode 100644 generators/java/maps.js create mode 100644 generators/python/maps.js diff --git a/blockly_compressed.js b/blockly_compressed.js index e2412bfee20..0f4cbe7b5a4 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1285,8 +1285,9 @@ Blockly.BlockSvg.disposeUiStep_=function(a,b,c,d){var e=(new Date-c)/150;1} List of variable names. @@ -264,6 +268,7 @@ Blockly.Blocks['controls_forEach'] = { thisBlock.getFieldValue('VAR')); }); }, + isLoop: true, /** * Return all variables referenced by this block. * @return {!Array.} List of variable names. @@ -333,11 +338,7 @@ Blockly.Blocks['controls_flow_statements'] = { // Is the block nested in a loop? var block = this; do { - if (block.type == 'controls_repeat' || - block.type == 'controls_repeat_ext' || - block.type == 'controls_forEach' || - block.type == 'controls_for' || - block.type == 'controls_whileUntil') { + if (block.isLoop) { legal = true; break; } diff --git a/blocks/maps.js b/blocks/maps.js new file mode 100644 index 00000000000..b3309e9e428 --- /dev/null +++ b/blocks/maps.js @@ -0,0 +1,530 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Map blocks for Blockly. + * @author toebes@extremenetworks.com (John Toebes) + */ +'use strict'; + +goog.provide('Blockly.Blocks.maps'); + +goog.require('Blockly.Blocks'); +goog.require('Blockly.Blocks.loops'); + + +/** + * Common HSV hue for all blocks in this category. + */ +Blockly.Blocks.maps.HUE = 345; + +Blockly.Blocks['maps_create_empty'] = { + /** + * Block for creating an empty list. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "id": "maps_create_empty", + "message0": Blockly.Msg.MAPS_CREATE_EMPTY_TITLE, + "args0": [], + "inputsInline": true, + "output": "Map", + "colour": Blockly.Blocks.maps.HUE, + "tooltip": Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP, + "helpUrl": Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL + }); + }, + typeblock: Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK +}; + + +Blockly.Blocks['maps_create_with'] = { + /** + * Block for creating a list with any number of elements of any type. + * @this Blockly.Block + */ + init: function() { + this.setHelpUrl(Blockly.Msg.MAPS_CREATE_WITH_HELPURL); + this.setColour(Blockly.Blocks.maps.HUE); + if (Blockly.useMutators) { + this.setMutator(new Blockly.Mutator(['maps_create_with_item'])); + } else { + this.appendAddSubGroup(Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH, 'items', + null, + Blockly.Msg.MAPS_CREATE_EMPTY_TITLE); + } + this.itemCount_ = 1; + this.updateShape_(); + this.setOutput(true, 'Map'); + this.setTooltip(Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP); + }, + getAddSubName: function(name,pos) { + return 'ADD'+pos; + }, + /** + * Create XML to represent list inputs. + * @return {!Element} XML storage element. + * @this Blockly.Block + */ + mutationToDom: function() { + var container = document.createElement('mutation'); + container.setAttribute('items', this.itemCount_); + return container; + }, + /** + * Parse XML to restore the list inputs. + * @param {!Element} xmlElement XML storage element. + * @this Blockly.Block + */ + domToMutation: function(xmlElement) { + this.itemCount_ = parseInt(xmlElement.getAttribute('items'), 10); + this.updateShape_(); + }, + /** + * Populate the mutator's dialog with this block's components. + * @param {!Blockly.Workspace} workspace Mutator's workspace. + * @return {!Blockly.Block} Root block in mutator. + * @this Blockly.Block + */ + decompose: function(workspace) { + var containerBlock = + Blockly.Block.obtain(workspace, 'maps_create_with_container'); + containerBlock.initSvg(); + var connection = containerBlock.getInput('STACK').connection; + for (var i = 0; i < this.itemCount_; i++) { + var itemBlock = Blockly.Block.obtain(workspace, 'maps_create_with_item'); + itemBlock.initSvg(); + connection.connect(itemBlock.previousConnection); + connection = itemBlock.nextConnection; + } + return containerBlock; + }, + /** + * Reconfigure this block based on the mutator dialog's components. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + compose: function(containerBlock) { + var itemBlock = containerBlock.getInputTargetBlock('STACK'); + // Count number of inputs. + var connections = []; + while (itemBlock) { + connections.push(itemBlock.valueConnection_); + itemBlock = itemBlock.nextConnection && + itemBlock.nextConnection.targetBlock(); + } + this.itemCount_ = connections.length; + this.updateShape_(); + // Reconnect any child blocks. + for (var i = 0; i < this.itemCount_; i++) { + if (connections[i]) { + this.getInput('ADD' + i).connection.connect(connections[i]); + } + } + }, + /** + * Store pointers to any connected child blocks. + * @param {!Blockly.Block} containerBlock Root block in mutator. + * @this Blockly.Block + */ + saveConnections: function(containerBlock) { + var itemBlock = containerBlock.getInputTargetBlock('STACK'); + var i = 0; + while (itemBlock) { + var input = this.getInput('ADD' + i); + itemBlock.valueConnection_ = input && input.connection.targetConnection; + i++; + itemBlock = itemBlock.nextConnection && + itemBlock.nextConnection.targetBlock(); + } + }, + /** + * Modify this block to have the correct number of inputs. + * @private + * @this Blockly.Block + */ + updateShape_: function() { + // Delete everything. + if (this.getInput('EMPTY')) { + this.removeInput('EMPTY'); + } else { + var i = 0; + while (this.getInput('ADD' + i)) { + this.removeInput('ADD' + i); + i++; + } + } + // Rebuild block. + if (this.itemCount_ == 0) { + this.appendDummyInput('EMPTY') + .appendField(Blockly.Msg.MAPS_CREATE_EMPTY_TITLE); + } else { + for (var i = 0; i < this.itemCount_; i++) { + var input = this.appendValueInput('ADD' + i); + if (i == 0) { + input.appendField(Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH); + } + } + } + }, + typeblock: [ + { entry: Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK, + mutatorAttributes: { items: 2 } } +// ,{ entry: Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK, +// mutatorAttributes: { items: 0 } } + ] +}; + +Blockly.Blocks['maps_create_with_container'] = { + /** + * Mutator block for list container. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.maps.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD); + this.appendStatementInput('STACK'); + this.setTooltip(Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP); + this.contextMenu = false; + }, + isTopLevel: true +}; + +Blockly.Blocks['maps_create_with_item'] = { + /** + * Mutator bolck for adding items. + * @this Blockly.Block + */ + init: function() { + this.setColour(Blockly.Blocks.maps.HUE); + this.appendDummyInput() + .appendField(Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE); + this.setPreviousStatement(true); + this.setNextStatement(true); + this.setTooltip(Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP); + this.contextMenu = false; + } +}; + +Blockly.Blocks['maps_length'] = { + /** + * Block for Map length. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "id": "maps_length", + "message0": Blockly.Msg.MAPS_LENGTH_TITLE, + "args0": [ + { + "type": "input_value", + "name": "MAP", + "check": "Map" + } + ], + "inputsInline": false, + "output": "Number", + "colour": Blockly.Blocks.maps.HUE, + "tooltip": Blockly.Msg.MAPS_LENGTH_TOOLTIP, + "helpUrl": Blockly.Msg.MAPS_LENGTH_URL + }); + }, + typeblock: Blockly.Msg.MAPS_LENGTH_TYPEBLOCK +}; + +Blockly.Blocks['maps_isempty'] = { + /** + * Block for is the list empty? + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "id": "maps_isempty", + "message0": Blockly.Msg.MAPS_ISEMPTY_TITLE, + "args0": [ + { + "type": "input_value", + "name": "MAP", + "check": "Map" + } + ], + "inputsInline": true, + "output": "Boolean", + "colour": Blockly.Blocks.maps.HUE, + "tooltip": Blockly.Msg.MAPS_ISEMPTY_TOOLTIP, + "helpUrl": Blockly.Msg.MAPS_ISEMPTY_HELPURL + }); + }, + typeblock: Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK +}; + +Blockly.Blocks['maps_create'] = { + /** + * Block for is the list empty? + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "id": "maps_create", + "message0": Blockly.Msg.MAPS_CREATE_TITLE, + "args0": [ + { + "type": "input_value", + "name": "KEY", + "check": "String" + }, + { + "type": "input_value", + "name": "VAL" + } + ], + "inputsInline": true, + "output": "Map", + "colour": Blockly.Blocks.maps.HUE, + "tooltip": Blockly.Msg.MAPS_CREATE_TOOLTIP, + "helpUrl": Blockly.Msg.MAPS_CREATE_HELPURL + }); + }, + typeblock: Blockly.Msg.MAPS_CREATE_TYPEBLOCK +}; + +Blockly.Blocks['maps_getIndex'] = { + /** + * Block for getting element at index. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "id": "maps_getIndex", + "message0": Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP + "%1 %2 %3", + "args0": [ + { + "type": "input_value", + "name": "MAP", + "check": "Map" + }, + { + "type": "field_dropdown", + "name": "MODE", + "options": [ + [ Blockly.Msg.LISTS_GET_INDEX_GET, "GET" ], + [ Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE, "GET_REMOVE" ], + [ Blockly.Msg.LISTS_GET_INDEX_REMOVE, "REMOVE" ] + ] + }, + { + "type": "input_value", + "name": "KEY", + "check": "String" + } + ], + "inputsInline": true, + "colour": Blockly.Blocks.maps.HUE, + "helpUrl": Blockly.Msg.MAPS_GET_INDEX_HELPURL + }); + + this.getField('MODE').setChangeHandler(function(value) { + var isStatement = (value == 'REMOVE'); + this.sourceBlock_.updateStatement_(isStatement); + }); + + this.updateStatement_(false); + // Assign 'this' to a variable for use in the tooltip closure below. + var thisBlock = this; + this.setTooltip(function() { + return Blockly.Msg['MAPS_GET_INDEX_TOOLTIP_' + + thisBlock.getFieldValue('MODE')]; + }); + }, + /** + * Create XML to represent whether the block is a statement or a value. + * @return {Element} XML storage element. + * @this Blockly.Block + */ + mutationToDom: function() { + var container = document.createElement('mutation'); + var isStatement = !this.outputConnection; + container.setAttribute('statement', isStatement); + return container; + }, + /** + * Parse XML to restore the inputs. + * @param {!Element} xmlElement XML storage element. + * @this Blockly.Block + */ + domToMutation: function(xmlElement) { + var isStatement = (xmlElement.getAttribute('statement') == 'true'); + this.updateStatement_(isStatement); + }, + /** + * Switch between a value block and a statement block. + * @param {boolean} newStatement True if the block should be a statement. + * False if the block should be a value. + * @private + * @this Blockly.Block + */ + updateStatement_: function(newStatement) { + var oldStatement = !this.outputConnection; + if (newStatement != oldStatement) { + this.unplug(true, true); + if (newStatement) { + this.setOutput(false); + this.setPreviousStatement(true); + this.setNextStatement(true); + } else { + this.setPreviousStatement(false); + this.setNextStatement(false); + this.setOutput(true); + } + } + }, + typeblock: function() { + var result = []; + var modeOptions = ['GET', 'GET_REMOVE', 'REMOVE']; + for (var modeSlot = 0; modeSlot < modeOptions.length; modeSlot++) { + var mode = modeOptions[modeSlot]; + result.push({ entry: Blockly.Msg['MAPS_GET_INDEX_'+ mode + '_TYPEBLOCK'], + values: { 'MAP': ''+ + 'map' }, + fields: { 'MODE': mode }}); + } + return result; + } +}; + +Blockly.Blocks['maps_setIndex'] = { + /** + * Block for setting the element at index. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "id": "maps_setindex", + "message0": Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP + "%1" + + Blockly.Msg.MAPS_SET_INDEX_SET + "%2" + + Blockly.Msg.MAPS_SET_INDEX_INPUT_TO + "%3", + "args0": [ + { + "type": "input_value", + "name": "MAP", + "check": "Map" + }, + { + "type": "input_value", + "name": "KEY", + "check": "String" + }, + { + "type": "input_value", + "name": "VAL" + } + ], + "inputsInline": true, + "previousStatement": null, + "nextStatement": null, + "colour": Blockly.Blocks.maps.HUE, + "tooltip": Blockly.Msg.MAPS_SET_INDEX_TOOLTIP, + "helpUrl": Blockly.Msg.MAPS_SET_INDEX_HELPURL + }); + }, + typeblock: [{ entry: Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK, + values: { 'MAP': ''+ + 'map' } + }] +}; + +Blockly.Blocks['maps_keys'] = { + /** + * Block for creating an empty list. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "id": "maps_keys", + "message0": Blockly.Msg.MAPS_KEYS_TITLE, + "args0": [ + { + "type": "input_value", + "name": "MAP", + "check": "Map" + } + ], + "inputsInline": true, + "output": "Array", + "colour": Blockly.Blocks.maps.HUE, + "tooltip": Blockly.Msg.MAPS_KEYS_TOOLTIP, + "helpUrl": Blockly.Msg.MAPS_KEYS_HELPURL + }); + }, + typeblock: Blockly.Msg.MAPS_KEYS_TYPEBLOCK +}; + +Blockly.Blocks['controls_forEachKey'] = { + /** + * Block for 'for each' loop. + * @this Blockly.Block + */ + init: function() { + this.jsonInit({ + "message0": Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE, + "args0": [ + { + "type": "field_variable", + "name": "VAR", + "variable": null + }, + { + "type": "input_value", + "name": "LIST", + "check": "Map" + } + ], + "previousStatement": null, + "nextStatement": null, + "colour": Blockly.Blocks.loops.HUE, + "helpUrl": Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL + }); + this.appendStatementInput('DO') + .appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO); + // Assign 'this' to a variable for use in the tooltip closure below. + var thisBlock = this; + this.setTooltip(function() { + return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace('%1', + thisBlock.getFieldValue('VAR')); + }); + }, + isLoop: true, + getVars: Blockly.Blocks['controls_forEach'].getVars, + /** + * Return all types of variables referenced by this block. + * @return {!Array.} List of variable names with their types. + * @this Blockly.Block + */ + getVarsTypes: function() { + var vartypes = {}; + vartypes[this.getFieldValue('VAR')] = ['String']; + return vartypes; + }, + renameVar: Blockly.Blocks['controls_forEach'].renameVar, + customContextMenu: Blockly.Blocks['controls_forEach'].customContextMenu, + typeblock: Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK +}; diff --git a/blocks/procedures.js b/blocks/procedures.js index a8601814095..c892303ff10 100644 --- a/blocks/procedures.js +++ b/blocks/procedures.js @@ -1049,8 +1049,7 @@ Blockly.Blocks['procedures_ifreturn'] = { // Is the block nested in a procedure? var block = this; do { - if (block.type == 'procedures_defnoreturn' || - block.type == 'procedures_defreturn') { + if (block.getProcedureDef) { legal = true; break; } diff --git a/blocks_compressed.js b/blocks_compressed.js index a73d2e7333d..2dfc7fabba7 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -62,18 +62,33 @@ Blockly.Blocks.logic_boolean={init:function(){this.jsonInit({message0:"%1",args0 Blockly.Blocks.logic_null={init:function(){this.jsonInit({message0:Blockly.Msg.LOGIC_NULL,output:null,colour:Blockly.Blocks.logic.HUE,tooltip:Blockly.Msg.LOGIC_NULL_TOOLTIP,helpUrl:Blockly.Msg.LOGIC_NULL_HELPURL})},typeblock:Blockly.Msg.LOGIC_NULL_TYPEBLOCK}; Blockly.Blocks.logic_ternary={init:function(){this.setHelpUrl(Blockly.Msg.LOGIC_TERNARY_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.appendValueInput("IF").setCheck("Boolean").appendField(Blockly.Msg.LOGIC_TERNARY_CONDITION);this.appendValueInput("THEN").appendField(Blockly.Msg.LOGIC_TERNARY_IF_TRUE);this.appendValueInput("ELSE").appendField(Blockly.Msg.LOGIC_TERNARY_IF_FALSE);this.setOutput(!0);this.setTooltip(Blockly.Msg.LOGIC_TERNARY_TOOLTIP);this.prevParentConnection_=null},onchange:function(){var a= this.getInputTargetBlock("THEN"),b=this.getInputTargetBlock("ELSE"),c=this.outputConnection.targetConnection;if((a||b)&&c)for(var d=0;2>d;d++){var e=1==d?a:b;e&&!e.outputConnection.checkType_(c)&&(c===this.prevParentConnection_?(this.setParent(null),c.sourceBlock_.bumpNeighbours_()):(e.setParent(null),e.bumpNeighbours_()))}this.prevParentConnection_=c},typeblock:Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK};Blockly.Blocks.loops={};Blockly.Blocks.loops.HUE=120; -Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO)},typeblock:[{entry:Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK,values:{TIMES:10}}]}; -Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_input",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setChangeHandler(Blockly.FieldTextInput.nonnegativeIntegerValidator)}}; +Blockly.Blocks.controls_repeat_ext={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"input_value",name:"TIMES",check:"Number"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO)},isLoop:!0,typeblock:[{entry:Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK,values:{TIMES:10}}]}; +Blockly.Blocks.controls_repeat={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_REPEAT_TITLE,args0:[{type:"field_input",name:"TIMES",text:"10"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,tooltip:Blockly.Msg.CONTROLS_REPEAT_TOOLTIP,helpUrl:Blockly.Msg.CONTROLS_REPEAT_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_REPEAT_INPUT_DO);this.getField("TIMES").setChangeHandler(Blockly.FieldTextInput.nonnegativeIntegerValidator)},isLoop:!0}; Blockly.Blocks.controls_whileUntil={init:function(){var a=[[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE,"WHILE"],[Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL,"UNTIL"]];this.setHelpUrl(Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendValueInput("BOOL").setCheck("Boolean").appendField(new Blockly.FieldDropdown(a),"MODE");this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO);this.setPreviousStatement(!0);this.setNextStatement(!0); -var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})},typeblock:[{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK,fields:{MODE:"WHILE"}},{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK,fields:{MODE:"UNTIL"}}]}; +var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE");return{WHILE:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE,UNTIL:Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL}[a]})},isLoop:!0,typeblock:[{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK,fields:{MODE:"WHILE"}},{entry:Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK,fields:{MODE:"UNTIL"}}]}; Blockly.Blocks.controls_for={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOR_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},{type:"input_value",name:"BY",check:"Number",align:"RIGHT"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOR_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOR_INPUT_DO); -var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Number"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:function(a){if(!this.isCollapsed()){var b={enabled:!0},c=this.getFieldValue("VAR");b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1", +var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},isLoop:!0,getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Number"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:function(a){if(!this.isCollapsed()){var b={enabled:!0},c=this.getFieldValue("VAR");b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1", c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR");c=goog.dom.createDom("block",null,c);c.setAttribute("type","variables_get");b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)}},typeblock:[{entry:Blockly.Msg.CONTROLS_FOR_TYPEBLOCK,values:{FROM:1,TO:10,BY:1}}]}; Blockly.Blocks.controls_forEach={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOREACH_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOREACH_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO);var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1", -a.getFieldValue("VAR"))})},getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Object"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}; +a.getFieldValue("VAR"))})},isLoop:!0,getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Object"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}; Blockly.Blocks.controls_flow_statements={init:function(){var a=[[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"FLOW");this.setPreviousStatement(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("FLOW");return{BREAK:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK, -CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){var a=!1,b=this;do{if("controls_repeat"==b.type||"controls_repeat_ext"==b.type||"controls_forEach"==b.type||"controls_for"==b.type||"controls_whileUntil"==b.type){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)},typeblock:[{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK,fields:{FLOW:"BREAK"}},{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK, -fields:{FLOW:"CONTINUE"}}]};Blockly.Blocks.math={};Blockly.Blocks.math.HUE=230;Blockly.Blocks.math_number={init:function(){this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.appendDummyInput().appendField(new Blockly.FieldTextInput("0",Blockly.FieldTextInput.numberValidator),"NUM");this.setOutput(!0,"Number");this.setTooltip(Blockly.Msg.MATH_NUMBER_TOOLTIP)}}; +CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){var a=!1,b=this;do{if(b.isLoop){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)},typeblock:[{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK,fields:{FLOW:"BREAK"}},{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK,fields:{FLOW:"CONTINUE"}}]};Blockly.Blocks.maps={};Blockly.Blocks.maps.HUE=345;Blockly.Blocks.maps_create_empty={init:function(){this.jsonInit({id:"maps_create_empty",message0:Blockly.Msg.MAPS_CREATE_EMPTY_TITLE,args0:[],inputsInline:!0,output:"Map",colour:Blockly.Blocks.maps.HUE,tooltip:Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP,helpUrl:Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL})},typeblock:Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK}; +Blockly.Blocks.maps_create_with={init:function(){this.setHelpUrl(Blockly.Msg.MAPS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.maps.HUE);Blockly.useMutators?this.setMutator(new Blockly.Mutator(["maps_create_with_item"])):this.appendAddSubGroup(Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH,"items",null,Blockly.Msg.MAPS_CREATE_EMPTY_TITLE);this.itemCount_=1;this.updateShape_();this.setOutput(!0,"Map");this.setTooltip(Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP)},getAddSubName:function(a,b){return"ADD"+b}, +mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items",this.itemCount_);return a},domToMutation:function(a){this.itemCount_=parseInt(a.getAttribute("items"),10);this.updateShape_()},decompose:function(a){var b=Blockly.Block.obtain(a,"maps_create_with_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;dmap'},fields:{MODE:d}})}return a}}; +Blockly.Blocks.maps_setIndex={init:function(){this.jsonInit({id:"maps_setindex",message0:Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP+"%1"+Blockly.Msg.MAPS_SET_INDEX_SET+"%2"+Blockly.Msg.MAPS_SET_INDEX_INPUT_TO+"%3",args0:[{type:"input_value",name:"MAP",check:"Map"},{type:"input_value",name:"KEY",check:"String"},{type:"input_value",name:"VAL"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Blocks.maps.HUE,tooltip:Blockly.Msg.MAPS_SET_INDEX_TOOLTIP,helpUrl:Blockly.Msg.MAPS_SET_INDEX_HELPURL})}, +typeblock:[{entry:Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK,values:{MAP:'map'}}]};Blockly.Blocks.maps_keys={init:function(){this.jsonInit({id:"maps_keys",message0:Blockly.Msg.MAPS_KEYS_TITLE,args0:[{type:"input_value",name:"MAP",check:"Map"}],inputsInline:!0,output:"Array",colour:Blockly.Blocks.maps.HUE,tooltip:Blockly.Msg.MAPS_KEYS_TOOLTIP,helpUrl:Blockly.Msg.MAPS_KEYS_HELPURL})},typeblock:Blockly.Msg.MAPS_KEYS_TYPEBLOCK}; +Blockly.Blocks.controls_forEachKey={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Map"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO);var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1", +a.getFieldValue("VAR"))})},isLoop:!0,getVars:Blockly.Blocks.controls_forEach.getVars,getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["String"];return a},renameVar:Blockly.Blocks.controls_forEach.renameVar,customContextMenu:Blockly.Blocks.controls_forEach.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK};Blockly.Blocks.math={};Blockly.Blocks.math.HUE=230;Blockly.Blocks.math_number={init:function(){this.setHelpUrl(Blockly.Msg.MATH_NUMBER_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.appendDummyInput().appendField(new Blockly.FieldTextInput("0",Blockly.FieldTextInput.numberValidator),"NUM");this.setOutput(!0,"Number");this.setTooltip(Blockly.Msg.MATH_NUMBER_TOOLTIP)}}; Blockly.Blocks.math_arithmetic={init:function(){var a=[[Blockly.Msg.MATH_ADDITION_SYMBOL,"ADD"],[Blockly.Msg.MATH_SUBTRACTION_SYMBOL,"MINUS"],[Blockly.Msg.MATH_MULTIPLICATION_SYMBOL,"MULTIPLY"],[Blockly.Msg.MATH_DIVISION_SYMBOL,"DIVIDE"],[Blockly.Msg.MATH_POWER_SYMBOL,"POWER"]];this.setHelpUrl(Blockly.Msg.MATH_ARITHMETIC_HELPURL);this.setColour(Blockly.Blocks.math.HUE);this.setOutput(!0,"Number");this.appendValueInput("A").setCheck("Number");this.appendValueInput("B").setCheck("Number").appendField(new Blockly.FieldDropdown(a), "OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("OP");return{ADD:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD,MINUS:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS,MULTIPLY:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY,DIVIDE:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE,POWER:Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER}[a]})},typeblock:[{entry:Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK,fields:{OP:"ADD"}},{entry:Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK,fields:{OP:"MINUS"}}, {entry:Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK,fields:{OP:"MULTIPLY"}},{entry:Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK,fields:{OP:"DIVIDE"}},{entry:Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK,fields:{OP:"POWER"}}]}; @@ -134,8 +149,8 @@ Blockly.Blocks.procedures_mutatorarg={init:function(){this.setColour(Blockly.Blo Blockly.Blocks.procedures_callreturn={init:function(){this.setHelpUrl(Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL);this.setColour(Blockly.Blocks.procedures.HUE);this.appendDummyInput("TOPROW").appendField(Blockly.Msg.PROCEDURES_CALLRETURN_CALL).appendField("","NAME");this.setOutput(!0);this.arguments_=[];this.quarkConnections_={};this.quarkArguments_=null},getProcedureCall:Blockly.Blocks.procedures_callnoreturn.getProcedureCall,renameProcedure:Blockly.Blocks.procedures_callnoreturn.renameProcedure, getVarsTypes:Blockly.Blocks.procedures_callnoreturn.getVarsTypes,setProcedureParameters:Blockly.Blocks.procedures_callnoreturn.setProcedureParameters,mutationToDom:Blockly.Blocks.procedures_callnoreturn.mutationToDom,domToMutation:Blockly.Blocks.procedures_callnoreturn.domToMutation,renameVar:Blockly.Blocks.procedures_callnoreturn.renameVar,customContextMenu:Blockly.Blocks.procedures_callnoreturn.customContextMenu}; Blockly.Blocks.procedures_ifreturn={init:function(){this.setHelpUrl("http://c2.com/cgi/wiki?GuardClause");this.setColour(Blockly.Blocks.procedures.HUE);this.appendValueInput("CONDITION").setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_IF);this.appendValueInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP);this.hasReturnValue_=!0},mutationToDom:function(){var a= -document.createElement("mutation");a.setAttribute("value",Number(this.hasReturnValue_));return a},domToMutation:function(a){this.hasReturnValue_=1==a.getAttribute("value");this.hasReturnValue_||(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN))},onchange:function(){var a=!1,b=this;do{if("procedures_defnoreturn"==b.type||"procedures_defreturn"==b.type){a=!0;break}b=b.getSurroundParent()}while(b);a?("procedures_defnoreturn"==b.type&&this.hasReturnValue_? -(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):"procedures_defreturn"!=b.type||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null)):this.setWarningText(Blockly.Msg.PROCEDURES_IFRETURN_WARNING)}};Blockly.Blocks.texts={};Blockly.Blocks.texts.HUE=160; +document.createElement("mutation");a.setAttribute("value",Number(this.hasReturnValue_));return a},domToMutation:function(a){this.hasReturnValue_=1==a.getAttribute("value");this.hasReturnValue_||(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN))},onchange:function(){var a=!1,b=this;do{if(b.getProcedureDef){a=!0;break}b=b.getSurroundParent()}while(b);a?("procedures_defnoreturn"==b.type&&this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN), +this.hasReturnValue_=!1):"procedures_defreturn"!=b.type||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null)):this.setWarningText(Blockly.Msg.PROCEDURES_IFRETURN_WARNING)}};Blockly.Blocks.texts={};Blockly.Blocks.texts.HUE=160; Blockly.Blocks.text={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_TEXT_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.appendDummyInput().appendField(this.newQuote_(!0)).appendField(new Blockly.FieldTextInput(""),"TEXT").appendField(this.newQuote_(!1));this.setOutput(!0,"String");this.setTooltip(Blockly.Msg.TEXT_TEXT_TOOLTIP)},newQuote_:function(a){return new Blockly.FieldImage(a==this.RTL?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAqUlEQVQI1z3KvUpCcRiA8ef9E4JNHhI0aFEacm1o0BsI0Slx8wa8gLauoDnoBhq7DcfWhggONDmJJgqCPA7neJ7p934EOOKOnM8Q7PDElo/4x4lFb2DmuUjcUzS3URnGib9qaPNbuXvBO3sGPHJDRG6fGVdMSeWDP2q99FQdFrz26Gu5Tq7dFMzUvbXy8KXeAj57cOklgA+u1B5AoslLtGIHQMaCVnwDnADZIFIrXsoXrgAAAABJRU5ErkJggg==":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAKCAQAAAAqJXdxAAAAn0lEQVQI1z3OMa5BURSF4f/cQhAKjUQhuQmFNwGJEUi0RKN5rU7FHKhpjEH3TEMtkdBSCY1EIv8r7nFX9e29V7EBAOvu7RPjwmWGH/VuF8CyN9/OAdvqIXYLvtRaNjx9mMTDyo+NjAN1HNcl9ZQ5oQMM3dgDUqDo1l8DzvwmtZN7mnD+PkmLa+4mhrxVA9fRowBWmVBhFy5gYEjKMfz9AylsaRRgGzvZAAAAAElFTkSuQmCC", 12,12,'"')}}; Blockly.Blocks.text_join={init:function(){this.setHelpUrl(Blockly.Msg.TEXT_JOIN_HELPURL);this.setColour(Blockly.Blocks.texts.HUE);this.setOutput(!0,"String");Blockly.useMutators?this.setMutator(new Blockly.Mutator(["text_create_join_item"])):this.appendAddSubGroup(Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH,"items",null,"-IGNORED-");this.itemCount_=2;this.updateShape_();this.setTooltip(Blockly.Msg.TEXT_JOIN_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items",this.itemCount_); diff --git a/core/block_svg.js b/core/block_svg.js index cebea600f47..6924c84a6f7 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -1164,18 +1164,22 @@ Blockly.BlockSvg.prototype.updateColour = function() { * Enable or disable a block. */ Blockly.BlockSvg.prototype.updateDisabled = function() { - var hasClass = Blockly.hasClass_(/** @type {!Element} */ (this.svgGroup_), - 'blocklyDisabled'); + var hasClass = Blockly.hasClass_(/** @type {!Element} */ (this.svgGroup_),'blocklyDisabled'); if (this.disabled || this.getInheritedDisabled()) { if (!hasClass) { - Blockly.addClass_(/** @type {!Element} */ (this.svgGroup_), - 'blocklyDisabled'); - this.svgPath_.setAttribute('fill', 'url(#blocklyDisabledPattern)'); + Blockly.addClass_(/** @type {!Element} */ (this.svgGroup_),'blocklyDisabled'); + this.svgPath_.setAttribute('stroke', 'red'); + this.svgPath_.setAttribute('stroke-width', '2'); + this.svgPath_.setAttribute('stroke-opacity', 'stroke-opacity:1.0'); + this.svgPath_.setAttribute('stroke-dasharray', '10, 5'); } } else { if (hasClass) { - Blockly.removeClass_(/** @type {!Element} */ (this.svgGroup_), - 'blocklyDisabled'); + Blockly.removeClass_(/** @type {!Element} */ (this.svgGroup_),'blocklyDisabled'); + this.svgPath_.removeAttribute('stroke', 'red'); + this.svgPath_.removeAttribute('stroke-width', '2'); + this.svgPath_.removeAttribute('stroke-opacity', 'stroke-opacity:1.0'); + this.svgPath_.removeAttribute('stroke-dasharray', '10, 5'); this.updateColour(); } } diff --git a/core/blockly.js b/core/blockly.js index 17b36939225..bac4e064689 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -252,7 +252,9 @@ Blockly.svgSize = function(svg) { * Defines list of variables for varius scopes * @type {Array.} */ -Blockly.scopeVariableList = { Types: ['String','Number','Boolean','Array']}; +Blockly.scopeVariableList = { + Types: ['String','Number','Boolean','Array','Map'] +}; /** * Defines whether to use mutators or +/- for objects diff --git a/core/generator.js b/core/generator.js index 03b3cdd7b77..467d0c1ec23 100644 --- a/core/generator.js +++ b/core/generator.js @@ -169,7 +169,7 @@ Blockly.Generator.prototype.blockToCode = function(block,parms,nostash) { if (!block) { return ''; } - if (block.disabled) { + if (block.disabled || block.getInheritedDisabled()) { // Skip past this block if it is disabled. return this.blockToCode(block.getNextBlock(),parms,nostash); } diff --git a/generators/java.js b/generators/java.js index 13fb0ac4bed..e25c0d840e1 100644 --- a/generators/java.js +++ b/generators/java.js @@ -1036,6 +1036,8 @@ Blockly.Java.init = function(workspace, imports) { type = 'Object'; } else if (type === 'Array') { type = 'LinkedList'; + } else if (type === 'Map') { + type = 'HashMap'; } else if (type === 'Var') { type = 'Var'; needVarClass = true; diff --git a/generators/java/maps.js b/generators/java/maps.js new file mode 100644 index 00000000000..7e23ce13a8e --- /dev/null +++ b/generators/java/maps.js @@ -0,0 +1,147 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Java for maps blocks. + * @author toebes@extremenetworks.com (John Toebes) + */ +'use strict'; + +goog.provide('Blockly.Java.maps'); + +goog.require('Blockly.Java'); + +Blockly.Java['maps_create_empty'] = function(block) { + // Create an empty list. + return ['new HashMap()', Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['maps_create_with'] = function(block) { + // Create a list with any number of elements of any type. + var declVar = Blockly.Java.variableDB_.getDistinctName( + 'hashMap', Blockly.Variables.NAME_TYPE); + var declCode = 'HashMap ' + declVar + ' = new HashMap();\n'; + Blockly.Java.addImport('java.util.HashMap'); + Blockly.Java.stashStatement(declCode); + for (var n = 0; n < block.itemCount_; n++) { + var inputName = 'ADD' + n; + var inputBlock = block.getInputTargetBlock(inputName); + if (inputBlock) { + if (inputBlock.type === 'maps_create') { + var val = Blockly.Java.valueToCode(inputBlock, 'VAL', + Blockly.Java.ORDER_NONE) || 'null'; + var key = Blockly.Java.valueToCode(inputBlock, 'KEY', + Blockly.Java.ORDER_NONE) || '""'; + declCode = declVar + '.put(' + key + ', ' + val + ');\n'; + Blockly.Java.stashStatement(declCode); + } else { + var itemCode = Blockly.Java.valueToCode(block, inputName, + Blockly.Java.ORDER_NONE); + if (itemCode) { + declCode = declVar + '.putAll(' + itemCode + ');\n'; + Blockly.Java.stashStatement(declCode); + } + } + } + } + return [declVar, Blockly.Java.ORDER_ATOMIC]; +}; + +Blockly.Java['maps_length'] = function(block) { + // List length. + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '[]'; + if (argument0.slice(-14) === '.cloneObject()' ) { + argument0 = argument0.slice(0,-14) + '.getObjectAsList()'; + } + return [argument0 + '.size()', Blockly.Java.ORDER_FUNCTION_CALL]; +}; + + +Blockly.Java['maps_isempty'] = function(block) { + // Is the list empty? + var argument0 = Blockly.Java.valueToCode(block, 'MAP', + Blockly.Java.ORDER_NONE) || ''; + var code = argument0 + '.size() == 0'; + if (argument0 === '') { + code = 'true'; + } + return [code, Blockly.Java.ORDER_LOGICAL_NOT]; +}; + +Blockly.Java['maps_create'] = function(block) { + var val = Blockly.Java.valueToCode(block, 'VAL', + Blockly.Java.ORDER_NONE) || 'null'; + var key = Blockly.Java.valueToCode(block, 'KEY', + Blockly.Java.ORDER_NONE) || '""'; + var declVar = Blockly.Java.variableDB_.getDistinctName( + 'hashMap', Blockly.Variables.NAME_TYPE); + + var declCode = 'HashMap ' + declVar + ' = new HashMap();\n' + + declVar + '.put(' + key + ', ' + val + ');\n'; + Blockly.Java.stashStatement(declCode); + return [declVar, Blockly.Java.ORDER_LOGICAL_NOT]; +}; + +Blockly.Java['maps_getIndex'] = function(block) { + var mode = block.getFieldValue('MODE') || 'GET'; + var key = Blockly.Java.valueToCode(block, 'KEY', + Blockly.Java.ORDER_NONE) || '""'; + var map = Blockly.Java.valueToCode(block, 'MAP', + Blockly.Java.ORDER_MEMBER) || ''; + if (map.slice(-14) === '.cloneObject()' ) { + map = map.slice(0,-14) + '.getObjectAsMap()'; + } + + if (mode == 'GET') { + var code = map + '.get(' + key + ')'; + return [code, Blockly.Java.ORDER_MEMBER]; + } else { + var code = map + '.remove(' + key + ')'; + if (mode == 'GET_REMOVE') { + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + return code + ';\n'; + } + } + throw 'Unhandled combination (maps_getIndex).'; +}; + +Blockly.Java['maps_setIndex'] = function(block) { + // Is the list empty? + var map = Blockly.Java.valueToCode(block, 'MAP', + Blockly.Java.ORDER_MEMBER) || '[]'; + var val = Blockly.Java.valueToCode(block, 'VAL', + Blockly.Java.ORDER_NONE) || 'null'; + var key = Blockly.Java.valueToCode(block, 'KEY', + Blockly.Java.ORDER_NONE) || '""'; + var code = map + '.put(' + key + ', '+ val + ');\n'; + return code; +}; + +Blockly.Java['maps_keys'] = function(block) { + // Is the list empty? + var argument0 = Blockly.Java.valueToCode(block, 'VALUE', + Blockly.Java.ORDER_NONE) || '[]'; + var code = argument0 + '.size() == 0'; + return [code, Blockly.Java.ORDER_LOGICAL_NOT]; +}; + +Blockly.Java['controls_forEachKey'] = Blockly.Java['controls_forEach'] ; diff --git a/generators/python/maps.js b/generators/python/maps.js new file mode 100644 index 00000000000..8d88fc334e2 --- /dev/null +++ b/generators/python/maps.js @@ -0,0 +1,147 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Python for maps blocks. + * @author toebes@extremenetworks.com (John Toebes) + */ +'use strict'; + +goog.provide('Blockly.Python.maps'); + +goog.require('Blockly.Python'); + +Blockly.Python['maps_create_empty'] = function(block) { + // Create an empty list. + return ['new HashMap()', Blockly.Python.ORDER_ATOMIC]; +}; + +Blockly.Python['maps_create_with'] = function(block) { + // Create a list with any number of elements of any type. + var declVar = Blockly.Python.variableDB_.getDistinctName( + 'hashMap', Blockly.Variables.NAME_TYPE); + var declCode = 'HashMap ' + declVar + ' = new HashMap();\n'; + Blockly.Python.addImport('Python.util.HashMap'); + Blockly.Python.stashStatement(declCode); + for (var n = 0; n < block.itemCount_; n++) { + var inputName = 'ADD' + n; + var inputBlock = block.getInputTargetBlock(inputName); + if (inputBlock) { + if (inputBlock.type === 'maps_create') { + var val = Blockly.Python.valueToCode(inputBlock, 'VAL', + Blockly.Python.ORDER_NONE) || 'null'; + var key = Blockly.Python.valueToCode(inputBlock, 'KEY', + Blockly.Python.ORDER_NONE) || '""'; + declCode = declVar + '.put(' + key + ', ' + val + ');\n'; + Blockly.Python.stashStatement(declCode); + } else { + var itemCode = Blockly.Python.valueToCode(block, inputName, + Blockly.Python.ORDER_NONE); + if (itemCode) { + declCode = declVar + '.putAll(' + itemCode + ');\n'; + Blockly.Python.stashStatement(declCode); + } + } + } + } + return [declVar, Blockly.Python.ORDER_ATOMIC]; +}; + +Blockly.Python['maps_length'] = function(block) { + // List length. + var argument0 = Blockly.Python.valueToCode(block, 'VALUE', + Blockly.Python.ORDER_NONE) || '[]'; + if (argument0.slice(-14) === '.cloneObject()' ) { + argument0 = argument0.slice(0,-14) + '.getObjectAsList()'; + } + return [argument0 + '.size()', Blockly.Python.ORDER_FUNCTION_CALL]; +}; + + +Blockly.Python['maps_isempty'] = function(block) { + // Is the list empty? + var argument0 = Blockly.Python.valueToCode(block, 'MAP', + Blockly.Python.ORDER_NONE) || ''; + var code = argument0 + '.size() == 0'; + if (argument0 === '') { + code = 'true'; + } + return [code, Blockly.Python.ORDER_LOGICAL_NOT]; +}; + +Blockly.Python['maps_create'] = function(block) { + var val = Blockly.Python.valueToCode(block, 'VAL', + Blockly.Python.ORDER_NONE) || 'null'; + var key = Blockly.Python.valueToCode(block, 'KEY', + Blockly.Python.ORDER_NONE) || '""'; + var declVar = Blockly.Python.variableDB_.getDistinctName( + 'hashMap', Blockly.Variables.NAME_TYPE); + + var declCode = 'HashMap ' + declVar + ' = new HashMap();\n' + + declVar + '.put(' + key + ', ' + val + ');\n'; + Blockly.Python.stashStatement(declCode); + return [declVar, Blockly.Python.ORDER_LOGICAL_NOT]; +}; + +Blockly.Python['maps_getIndex'] = function(block) { + var mode = block.getFieldValue('MODE') || 'GET'; + var key = Blockly.Python.valueToCode(block, 'KEY', + Blockly.Python.ORDER_NONE) || '""'; + var map = Blockly.Python.valueToCode(block, 'MAP', + Blockly.Python.ORDER_MEMBER) || ''; + if (map.slice(-14) === '.cloneObject()' ) { + map = map.slice(0,-14) + '.getObjectAsMap()'; + } + + if (mode == 'GET') { + var code = map + '.get(' + key + ')'; + return [code, Blockly.Python.ORDER_MEMBER]; + } else { + var code = map + '.remove(' + key + ')'; + if (mode == 'GET_REMOVE') { + return [code, Blockly.Python.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + return code + ';\n'; + } + } + throw 'Unhandled combination (maps_getIndex).'; +}; + +Blockly.Python['maps_setIndex'] = function(block) { + // Is the list empty? + var map = Blockly.Python.valueToCode(block, 'MAP', + Blockly.Python.ORDER_MEMBER) || '[]'; + var val = Blockly.Python.valueToCode(block, 'VAL', + Blockly.Python.ORDER_NONE) || 'null'; + var key = Blockly.Python.valueToCode(block, 'KEY', + Blockly.Python.ORDER_NONE) || '""'; + var code = map + '.put(' + key + ', '+ val + ');\n'; + return code; +}; + +Blockly.Python['maps_keys'] = function(block) { + // Is the list empty? + var argument0 = Blockly.Python.valueToCode(block, 'VALUE', + Blockly.Python.ORDER_NONE) || '[]'; + var code = argument0 + '.size() == 0'; + return [code, Blockly.Python.ORDER_LOGICAL_NOT]; +}; + +Blockly.Python['controls_forEachKey'] = Blockly.Python['controls_forEach'] ; diff --git a/java_compressed.js b/java_compressed.js index 57d0bae06d1..0ba81e87c48 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -15,8 +15,8 @@ Blockly.Java.provideVarClass=function(){this.INLINEVARCLASS?(Blockly.Java.addImp this.classes_.Var='/**\n *\n * @author bmoon\n */\nfinal class Var implements Comparable {\n\n public enum Type {\n\n STRING, INT, DOUBLE, LIST, UNKNOWN\n };\n\n private Type _type;\n private Object _object;\n private static final NumberFormat _formatter = new DecimalFormat("#.#####");\n\n /**\n * Construct a Var with an UNKNOWN type\n *\n */\n public Var() {\n _type = Type.UNKNOWN;\n } // end var\n\n /**\n * Construct a Var and assign its contained object to that specified.\n *\n * @param object The value to set this object to\n */\n public Var(Object object) {\n setObject(object);\n } // end var\n\n /**\n * Construct a Var from a given Var\n *\n * @param var var to construct this one from\n */\n public Var(Var var) {\n setObject(var.getObject());\n } // end var\n\n /**\n * Static constructor to make a var from some value.\n *\n * @param val some value to construct a var around\n * @return the Var object\n */\n public static Var valueOf(Object val) {\n return new Var(val);\n } // end valueOf\n\n /**\n * Get the type of the underlying object\n *\n * @return Will return the object\'s type as defined by Type\n */\n public Type getType() {\n return _type;\n } // end getType\n\n /**\n * Get the contained object\n *\n * @return the object\n */\n public Object getObject() {\n return _object;\n } // end getObject\n\n /**\n * Clone Object\n *\n * @return a new object equal to this one\n */\n public Object cloneObject() {\n Var tempVar = new Var(this);\n return tempVar.getObject();\n } // end cloneObject\n\n /**\n * Get object as an int. Does not make sense for a "LIST" type object\n *\n * @return an integer whose value equals this object\n */\n public int getObjectAsInt() {\n switch (getType()) {\n case STRING:\n return Integer.parseInt((String) getObject());\n case INT:\n return (int) getObject();\n case DOUBLE:\n return new Double((double) getObject()).intValue();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0;\n } // end getObjectAsInt\n\n /**\n * Get object as a double. Does not make sense for a "LIST" type object.\n *\n * @return a double whose value equals this object\n */\n public double getObjectAsDouble() {\n switch (getType()) {\n case STRING:\n return Double.parseDouble((String) getObject());\n case INT:\n return new Integer((int) getObject()).doubleValue();\n case DOUBLE:\n return (double) getObject();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0.0;\n } // end get object as double\n\n /**\n * Get object as a string.\n *\n * @return The string value of the object. Note that for lists, this is a\n * comma separated list of the form {x,y,z,...}\n */\n public String getObjectAsString() {\n return this.toString();\n } // end gotObjectAsString\n\n /**\n * Get the object as a list.\n *\n * @return a LinkedList whose elements are of type Var\n */\n public LinkedList getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): Blockly.Java.addImport("extreme.sdn.client.Var")}; Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.imports_=Object.create(null);this.classes_=Object.create(null);this.globals_=Object.create(null);for(var c=0;ce;e++)for(g=b[e].sort(),f=0;f "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),f+="}\n",f="Var"===a?f+("for ("+b+".setObject("+h+");\n "+d+" >= 0 ? "+ b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+c+";\n"+b+".incrementObject("+d+")) "):f+("for ("+b+" = "+h+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")");return f+=" {\n"+g+"} // end for\n"}; Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("it",Blockly.Variables.NAME_TYPE);b="Var"===c?b+".setObject("+a+".next())":b+" = "+a+".next()";Blockly.Java.addImport("java.util.Iterator"); -return"for (Iterator "+a+" = "+d+".iterator(); "+a+".hasNext();) {\n "+b+";\n"+e+"} // end for\n"};Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Java.math={};Blockly.Java.addReservedWords("math,random");Blockly.Java.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; +return"for (Iterator "+a+" = "+d+".iterator(); "+a+".hasNext();) {\n "+b+";\n"+e+"} // end for\n"};Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Java.maps={};Blockly.Java.maps_create_empty=function(a){return["new HashMap()",Blockly.Java.ORDER_ATOMIC]}; +Blockly.Java.maps_create_with=function(a){var b=Blockly.Java.variableDB_.getDistinctName("hashMap",Blockly.Variables.NAME_TYPE),c="HashMap "+b+" = new HashMap();\n";Blockly.Java.addImport("java.util.HashMap");Blockly.Java.stashStatement(c);for(var d=0;da?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; Blockly.Java.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Java.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Java.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Java.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Java.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Java.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Java.valueToCode(a,"A",b)||"0";a=Blockly.Java.valueToCode(a,"B",b)||"0";var e="";" ** "===c?(Blockly.Java.addImport("java.lang.Math"),e="Math.pow("+d+", "+a+")"):e=d+c+a;return[e, b]}; Blockly.Java.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Java.ORDER_UNARY_SIGN];Blockly.Java.addImport("java.lang.Math");a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0":Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_NONE)||"0";switch(b){case "ABS":c="Math.abs("+a+")";break;case "ROOT":c="Math.sqrt("+a+")";break;case "LN":c="Math.log("+ diff --git a/msg/js/ar.js b/msg/js/ar.js index 8e8f5489a08..d45856ab11b 100644 --- a/msg/js/ar.js +++ b/msg/js/ar.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "اخرج من الحلقة Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "تخط ما تبقى من هذه الحلقة، واستمر ابتداءا من التكرار التالي."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "تحذير: يمكن استخدام هذه القطعة فقط داخل حلقة."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "لكل عنصر %1 في قائمة %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "لكل عنصر في قائمة ما، عين المتغير '%1' لهذا الغنصر، ومن ثم نفذ بعض الأوامر."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "إذا كانت العبارة خاطئة" Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "إذا كانت العبارة صحيحة"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "تحقق الشرط في 'الاختبار'. إذا كان الشرط صحيح، يقوم بإرجاع قيمة 'اذا كانت العبارة صحيحة'؛ خلاف ذلك يرجع قيمة 'اذا كانت العبارة خاطئة'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "انشئ 'احصل على %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "تعيين هذا المتغير لتكون مساوية للقيمة المدخلة."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/az.js b/msg/js/az.js index 6c1862b4626..3ab6bc97ea6 100644 --- a/msg/js/az.js +++ b/msg/js/az.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Cari dövrdən çıx."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Bu dövrün qalanını ötür və növbəti addımla davam et."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Xəbərdarlıq: Bu blok ancaq dövr daxilində istifadə oluna bilər."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "hər element üçün %1 siyahıda %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Siyahıdakı hər element üçün \"%1\" dəyişənini elementə mənimsət və bundan sonra bəzi əmrləri yerinə yetir."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "əgər yalandırsa"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "əgər doğrudursa"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'Yoxla' əmrindəki şərtə nəzər yetirin. Əgər şərt \"doğru\"-dursa \"əgər doğru\", əks halda isə \"əgər yalan\" cavabını qaytarır."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "'%1 - i götür' - ü yarat"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Bu dəyişəni daxil edilmiş qiymətə bərabər edir."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/bcc.js b/msg/js/bcc.js index 8b816179bf3..efb4324168b 100644 --- a/msg/js/bcc.js +++ b/msg/js/bcc.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "شکستن حلقهٔ شا Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "پریدن از بقیهٔ حلقه و ادامه با تکرار بعدی."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "اخطار: این بلوک ممکن است فقط داخل یک حلقه استفاده شود."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "برای هر مورد %1 در فهرست %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "برای هر مورد در این فهرست، تنظیم متغیر «%1» به مورد و انجام تعدادی عبارت."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "اگر ناصحیح"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "اگر صحیح"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "بررسی وضعیت در «آزمایش». اگر وضعیت صحیح باشد، مقدار «اگر صحیح» را بر می‌گرداند در غیر اینصورت مقدار «اگر ناصحیح» را."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "درست‌کردن «تنظیم %1»"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "متغیر برابر با خروجی را مشخص می‌کند."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/be-tarask.js b/msg/js/be-tarask.js index 86ba95da4f2..81bab131ac8 100644 --- a/msg/js/be-tarask.js +++ b/msg/js/be-tarask.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Спыніць гэты ц Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Прапусьціць рэшту цыклю і перайсьці да наступнага кроку."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Увага: гэты блёк можа быць выкарыстаны толькі ў цыклі."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "для кожнага элемэнта %1 у сьпісе %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Для кожнага элемэнту сьпісу прысвойвае зьменнай '%1' ягонае значэньне і выконвае пэўныя апэрацыі."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "калі хлусьня"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "калі ісьціна"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Праверыць умову ў 'тэст'. Калі ўмова праўдзівая, будзе вернутае значэньне «калі ісьціна»; інакш будзе вернутае «калі хлусьня»."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Стварыць блёк «атрыма Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Надаць гэтай зьменнай значэньне ўстаўкі."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/bg.js b/msg/js/bg.js index 76e8a26a04a..a388b1b9d02 100644 --- a/msg/js/bg.js +++ b/msg/js/bg.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Прекъсни цикъ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Премини към следващата стъпка от цикъла"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Предупреждение: Този блок може да се използва само в цикъл."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "за всеки елемент %1 в списъка %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "За всеки елемент в списък присвои елемента на променливата '%1' и след това изпълни командите."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "Ако е невярно"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "Ако е вярно"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Провери исловието в \"тест\". Ако условието е истина, върни \"ако е истина\" стойността, иначе върни \"ако е лъжа\" стойността."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Създай \"вземи стойнос Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Задава тази променлива да бъде равен на входа."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/bn.js b/msg/js/bn.js index 8ef2286a1fc..15a9950c0c4 100644 --- a/msg/js/bn.js +++ b/msg/js/bn.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Break out of the containin Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "সর্তকীবার্তা: এই ব্লকটি শুধুমাত্র লুপের মধ্যে ব্যবহার করা যাবে।"; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "প্রত্যেকটি পদের জন্য %1 তালিকার মধ্যে %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "যদি মিথ্যা হয়"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "যদি সত্য হয়"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/br.js b/msg/js/br.js index 5b8a946acde..07e10eb1f2f 100644 --- a/msg/js/br.js +++ b/msg/js/br.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Mont e-maez ar boukl engro Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Lammat ar rest eus ar rodell, ha kenderc'hel gant an iteradur war-lerc'h."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Diwallit : ne c'hall ar bloc'h-mañ bezañ implijet nemet e-barzh ur boukl."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "evit pep elfenn %1 er roll %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Evit pep elfenn en ur roll, reiñ talvoud an elfenn d'an argemmenn '%1', ha seveniñ urzhioù zo da c'houde."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "m'eo gaou"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "m'eo gwir"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Gwiriañ an amplegad e 'prouad'. M'eo gwir an amplegad, distreiñ an dalvoudenn 'm'eo gwir'; anez distreiñ ar moned 'm'eo faos'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Krouiñ 'kaout %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Termenañ a ra argemm-mañ evit ma vo par da dalvoudenn ar moned."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/ca.js b/msg/js/ca.js index 9f94049621e..32bdb201f1d 100644 --- a/msg/js/ca.js +++ b/msg/js/ca.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Sortir del bucle interior. Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Ometre la resta d'aquest bucle, i continuar amb la següent iteració."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Advertència: Aquest bloc només es pot utilitzar dins d'un bucle."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "per a cada element %1 en la llista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Per a cada element en la llista, desar l'element dins la variable '%1', i llavors executar unes sentències."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si és fals"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si és cert"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Comprova la condició de 'condició'. Si la condició és certa, retorna el valor 'si és cert'; en cas contrari, retorna el valor 'si és fals'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Crear 'recupera %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Modifica aquesta variable al valor introduït."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/cs.js b/msg/js/cs.js index 0a927348a55..c710ba347d6 100644 --- a/msg/js/cs.js +++ b/msg/js/cs.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Přeruš vnitřní smyčku Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Přeskoč zbytek této smyčky a pokračuj dalším opakováním."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Upozornění: Tento blok může být použit pouze uvnitř smyčky."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pro každou položku %1 v seznamu %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pro každou položku v seznamu nastavte do proměnné '%1' danou položku a proveďte nějaké operace."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "je-li nepravda"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "je-li to pravda"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Zkontroluje podmínku v \"testu\". Když je podmínka pravda, vrátí hodnotu \"pokud pravda\"; v opačném případě vrátí hodnotu \"pokud nepravda\"."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Vytvořit \"získat %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Nastaví tuto proměnnou, aby se rovnala vstupu."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/da.js b/msg/js/da.js index 14f30e889e0..925d858b658 100644 --- a/msg/js/da.js +++ b/msg/js/da.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Bryd ud af den omgivende l Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Spring resten af denne løkke over, og fortsæt med den næste gentagelse."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Advarsel: Denne blok kan kun bruges i en løkke."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "for hvert element %1 i listen %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For hvert element i en liste, sæt variablen '%1' til elementet, og udfør derefter nogle kommandoer."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "hvis falsk"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "hvis sand"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kontrollér betingelsen i 'test'. Hvis betingelsen er sand, returnér \"hvis sand\" værdien; ellers returnér \"hvis falsk\" værdien."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Opret 'hent %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sætter denne variabel til at være lig med input."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/de.js b/msg/js/de.js index cec7969a936..029429872b5 100644 --- a/msg/js/de.js +++ b/msg/js/de.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Die umgebende Schleife bee Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Diese Anweisung abbrechen und mit der nächsten Schleifendurchlauf fortfahren."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warnung: Dieser Block sollte nur in einer Schleife verwendet werden."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://de.wikipedia.org/wiki/For-Schleife"; +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "Für Wert %1 aus der Liste %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Führe eine Anweisung für jeden Wert in der Liste aus und setzte dabei die Variable \"%1\" auf den aktuellen Listenwert."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "wenn falsch"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "wenn wahr"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Überprüft eine Bedingung \"teste\". Wenn die Bedingung wahr ist wird der \"wenn wahr\" Wert zurückgegeben, andernfalls der \"wenn falsch\" Wert"; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Erzeuge \"Lese %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://de.wikipedia.org/wiki/Variable_%28Programmierung%29"; Blockly.Msg.VARIABLES_SET_TOOLTIP = "Setzt den Wert einer Variable."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/el.js b/msg/js/el.js index bcb7214fdf3..49d178beb4f 100644 --- a/msg/js/el.js +++ b/msg/js/el.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Ξεφεύγει (βγαί Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Παραλείπει το υπόλοιπο τμήμα αυτού του μπλοκ επαναλήψεως, και συνεχίζει με την επόμενη επανάληψη."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Προειδοποίηση: Αυτό το μπλοκ μπορεί να χρησιμοποιηθεί μόνο μέσα σε μια επανάληψη."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "για κάθε στοιχείο %1 στη λίστα %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Για κάθε στοιχείο σε μια λίστα, ορίζει τη μεταβλητή «%1» στο στοιχείο και, στη συνέχεια, εκτελεί κάποιες εντολές."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "εάν είναι ψευδής"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "εάν είναι αληθής"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Ελέγχει την κατάσταση/συνθήκη στον «έλεγχο». Αν η κατάσταση/συνθήκη είναι αληθής, επιστρέφει την τιμή «εάν αληθής», διαφορετικά επιστρέφει την τιμή «εάν ψευδής»."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Δημιούργησε «πάρε %1»"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Ορίζει αυτή τη μεταβλητή να είναι ίση με την είσοδο."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/en.js b/msg/js/en.js index a8006063e64..3ebebc9087a 100644 --- a/msg/js/en.js +++ b/msg/js/en.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Break out of the containin Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be used within a loop."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; Blockly.Msg.CONTROLS_FOREACH_TITLE = "for each item %1 in list %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "if false"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "if true"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; +Blockly.Msg.MAPS_INMAP = "in map"; +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/es.js b/msg/js/es.js index 35d9cd80b1a..c1a314bb42a 100644 --- a/msg/js/es.js +++ b/msg/js/es.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Romper el bucle que lo con Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Saltar el resto de este bucle, y continuar con la siguiente iteración."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "ADVERTENCIA: Este bloque puede usarse sólo dentro de un bucle."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://es.wikipedia.org/wiki/Foreach"; +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "para cada elemento %1 en la lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para cada elemento en una lista, establecer la variable '%1' al elemento y luego hacer algunas declaraciones."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si es falso"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si es verdadero"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Comprueba la condición en \"prueba\". Si la condición es verdadera, devuelve el valor \"si es verdadero\"; de lo contrario, devuelve el valor \"si es falso\"."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Crear 'obtener %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Establece esta variable para que sea igual a la entrada."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/fa.js b/msg/js/fa.js index 7063402d590..d154f36fe65 100644 --- a/msg/js/fa.js +++ b/msg/js/fa.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "شکستن حلقهٔ شا Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "پریدن از بقیهٔ حلقه و ادامه با تکرار بعدی."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "اخطار: این بلوک ممکن است فقط داخل یک حلقه استفاده شود."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "برای هر مورد %1 در فهرست %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "برای هر مورد در این فهرست، تنظیم متغیر «%1» به مورد و انجام تعدادی عبارت."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "اگر ناصحیح"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "اگر صحیح"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "بررسی وضعیت در «آزمایش». اگر وضعیت صحیح باشد، مقدار «اگر صحیح» را بر می‌گرداند در غیر اینصورت مقدار «اگر ناصحیح» را."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "درست‌کردن «گرفتن %1»"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "متغیر برابر با خروجی را مشخص می‌کند."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/fi.js b/msg/js/fi.js index 0158f0a54a0..edd060d42e8 100644 --- a/msg/js/fi.js +++ b/msg/js/fi.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Poistu sisemmästä silmuk Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Ohita loput tästä silmukasta ja siirry seuraavaan toistoon."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Varoitus: Tätä lohkoa voi käyttää vain silmukan sisällä."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "kullekin kohteelle %1 listassa %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Aseta muuttujan %1 arvoksi kukin listan kohde vuorollaan ja suorita joukko lausekkeita."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jos epätosi"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "jos tosi"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Tarkistaa testin ehdon. Jos ehto on tosi, palauttaa \"jos tosi\" arvon, muuten palauttaa \"jos epätosi\" arvon."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Luo 'hae %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Asettaa muutujan arvoksi annetun syötteen."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/fr.js b/msg/js/fr.js index 5e5506e691d..129071b9a46 100644 --- a/msg/js/fr.js +++ b/msg/js/fr.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Sortir de la boucle englob Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Sauter le reste de cette boucle, et poursuivre avec l’itération suivante."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Attention : Ce bloc ne devrait être utilisé que dans une boucle."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pour chaque élément %1 dans la liste %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pour chaque élément dans une liste, donner la valeur de l’élément à la variable '%1', puis exécuter certains ordres."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si faux"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si vrai"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Vérifier la condition dans 'test'. Si elle est vraie, renvoie la valeur 'si vrai' ; sinon renvoie la valeur 'si faux'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Créer 'obtenir %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Fixe cette variable pour qu’elle soit égale à la valeur de l’entrée."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/he.js b/msg/js/he.js index 1c05548b6f6..7fa86a47f7d 100644 --- a/msg/js/he.js +++ b/msg/js/he.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "צא אל מחוץ ללו Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "דלג על שאר הלולאה והמשך עם האיטרציה הבאה."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "אזהרה: בלוק זה עשוי לשמש רק בתוך לולאה."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "לכל פריט %1 ברשימה %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "לכל פריט ברשימה, להגדיר את המשתנה '%1' לפריט הזה, ולאחר מכן לעשות כמה פעולות."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "אם שגוי"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "אם נכון"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "בדוק את התנאי ב'מבחן'. אם התנאי נכון, תחזיר את הערך 'אם נכון'; אחרת תחזיר את הערך 'אם שגוי'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "ליצור 'קרא %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "מגדיר משתנה זה להיות שווה לקלט."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/hi.js b/msg/js/hi.js index a9b7cd46425..7a10c2ebf87 100644 --- a/msg/js/hi.js +++ b/msg/js/hi.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "भीतरी लूप Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "बाकी बचे लूप को छोड़ें, और अगला आईटरेशन जारी रखें।"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "सावधान: ये ब्लॉक केवल लूप के अंदर इस्तेमाल किया जा सकता है।"; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "प्रत्येक आइटम के लिए %1 सूची में %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "सूची के प्रत्येक आयटम के लिए, आयटम में चर का मान '%1' रखें और बाद में कुछ कथन लिखें।"; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "यदि फॉल्स है"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "यदि ट्रू है"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "इस चर को इनपुट के बराबर सेट करता है।"; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/hrx.js b/msg/js/hrx.js index c9c9073317e..adf5e39fb7e 100644 --- a/msg/js/hrx.js +++ b/msg/js/hrx.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Die umgebne Schleif beenne Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Die Oonweisung abbreche und mit der nächste Schleifiteration fortfoohre."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warnung: Die block sollt nuar in en Schleif verwennet sin."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "Für Weart %1 aus der List %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Füahr en Oonweisung für jede Weart in der List aus und setzt dabei die Variable \"%1\" uff den aktuelle List Weart."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "wenn falsch"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "wenn woahr"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Üwerprüft en Bedingung \"test\". Wenn die Bedingung woahr ist weerd der \"wenn woahr\" Weart zurückgeb, annerfalls der \"wenn falsch\" Weart"; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Generier/erzeich \"Lese %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Setzt en Variable sei Weart."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/hu.js b/msg/js/hu.js index 97ff393ec63..b4b4d2bf764 100644 --- a/msg/js/hu.js +++ b/msg/js/hu.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Megszakítja végtelen cik Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Megszakítja az aktuális futást és folytatja elölről."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Figyelem: Ez a blokk, csak egy ciklusban használható."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "Minden %1 elemre a %2 listában"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "A lista elemszámának megfelelő lépésszámú ciklus. A \"%1\" változó minden lépésben megkapja a lista adott elemének értékét. Minden lépésben végrehajtódnak az utasítások."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "érték, ha hamis:"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "érték, ha igaz:"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kiértékeli a kifejezést. Ha a kifejezés igaz visszatér az \"érték, ha igaz\" értékkel, különben az \"érték, ha hamis\" értékkel."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Készíts \"kér %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "A változónak adhatunk értéket."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/ia.js b/msg/js/ia.js index 40ec9dd08a6..a981296dd81 100644 --- a/msg/js/ia.js +++ b/msg/js/ia.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Escappar del bucla contine Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Saltar le resto de iste bucla e continuar con le proxime iteration."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Attention: Iste bloco pote solmente esser usate in un bucla."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pro cata elemento %1 in lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pro cata elemento in un lista, mitter lo in le variabile '%1' e exequer certe instructiones."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si false"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si ver"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Verificar le condition in 'test'. Si le condition es ver, retorna le valor de 'si ver'; si non, retorna le valor de 'si false'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Crear 'prender %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Mitte iste variabile al valor del entrata."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/id.js b/msg/js/id.js index 81112a4db62..ec6bd4d7cf0 100644 --- a/msg/js/id.js +++ b/msg/js/id.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Keluar sementara dari peru Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Abaikan sisa dari loop ini, dan lanjutkan dengan iterasi berikutnya."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Peringatan: Blok ini hanya dapat digunakan dalam loop."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "untuk setiap item %1 di dalam list %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Untuk tiap-tiap item di dalam list, tetapkan variabel '%1' ke dalam item, selanjutnya kerjakan beberapa statement."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jika tidak benar (false)"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "jika benar (true)"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Periksa kondisi di \"test\". Jika kondisi benar (true), mengembalikan nilai \"jika benar\" ; Jik sebaliknya akan mengembalikan nilai \"jika salah\"."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Membuat 'dapatkan %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "tetapkan variabel ini dengan input yang sama."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/is.js b/msg/js/is.js index 3b2b5277f91..3d746fb0b01 100644 --- a/msg/js/is.js +++ b/msg/js/is.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Fara út úr umlykjandi ly Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Sleppa afganginum af lykkjunni og fara beint í næstu umferð hennar."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Aðvörun: Þennan kubb má aðeins nota innan lykkju."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "fyrir hvert %1 í lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Fyrir hvert atriði í lista er breyta '%1' stillt á atriðið og skipanir gerðar."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ef ósatt"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ef satt"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kanna skilyrðið í 'prófun'. Skilar 'ef satt' gildinu ef skilyrðið er satt, en skilar annars 'ef ósatt' gildinu."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Búa til 'sækja %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; Blockly.Msg.VARIABLES_SET_TOOLTIP = "Stillir þessa breytu á innihald inntaksins."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/it.js b/msg/js/it.js index 6f79f405568..507a8066ffa 100644 --- a/msg/js/it.js +++ b/msg/js/it.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Esce dal ciclo."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Salta il resto di questo ciclo e prosegue con la successiva iterazione."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Attenzioneː Questo blocco può essere usato solo in un ciclo."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "per ogni elemento %1 nella lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Per ogni elemento in una lista, imposta la variabile '%1' pari all'elemento e quindi esegue alcune istruzioni."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se falso"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se vero"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Verifica la condizione in 'test'. Se questa è vera restituisce il valore 'se vero' altrimenti restituisce il valore 'se falso'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Crea 'prendi %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Imposta questa variabile ad essere pari all'input."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/ja.js b/msg/js/ja.js index f66129d66f7..557bc345117 100644 --- a/msg/js/ja.js +++ b/msg/js/ja.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "含むループから抜 Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "このループの残りの部分をスキップし、次のイテレーションに進みます。"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "注意: このブロックは、ループ内でのみ使用します。"; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "各項目の %1 リストで %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "リストの各項目に対して変数 '%1' のアイテムに設定し、いくつかのステートメントをしてください。"; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "false の場合"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "true の場合"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'テスト' の条件をチェックします。条件が true の場合、'true' の値を返します。それ以外の場合 'false' のを返します。"; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "'%1 を取得' を作成します。"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "この入力を変数と等しくなるように設定します。"; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/ko.js b/msg/js/ko.js index 09394f930b0..b5247de20c5 100644 --- a/msg/js/ko.js +++ b/msg/js/ko.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "현재 반복 실행 블 Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "나머지 반복 부분을 더이상 실행하지 않고, 다음 반복을 수행합니다."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "경고 : 이 블록은 반복 실행 블럭 안에서만 사용됩니다."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "각 항목에 대해 %1 목록으로 %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "리스트 안에 들어있는 각 아이템들을, 순서대로 변수 '%1' 에 한 번씩 저장시키고, 그 때 마다 명령을 실행합니다."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "만약 거짓이라면"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "만약 참이라면"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'검사' 를 진행해, 결과가 참(true)이면 '참이면' 부분의 값을 돌려줍니다. ; 결과가 참이 아니면, '거짓이면' 부분의 값을 돌려줍니다."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "'%1 값 읽기' 블럭 생성"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "변수의 값을 입력한 값으로 변경해 줍니다."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/lb.js b/msg/js/lb.js index dc07dd3c556..52171180261 100644 --- a/msg/js/lb.js +++ b/msg/js/lb.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Break out of the containin Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be used within a loop."; // untranslated Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "fir all Element %1 an der Lëscht %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "wa falsch"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "wa wouer"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/lrc.js b/msg/js/lrc.js index d2d8d98c754..f4a53d9fddd 100644 --- a/msg/js/lrc.js +++ b/msg/js/lrc.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "حلقه شومل بیه Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be used within a loop."; // untranslated Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "سی هر قلم %1 د نوم گه %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ار غلط بی"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ار درس بی"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/lt.js b/msg/js/lt.js index b9678011a49..021ba715907 100644 --- a/msg/js/lt.js +++ b/msg/js/lt.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Nutraukia (artimiausią) v Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Praleidžia žemiau išvardintus kartojimo veiksmus (ir tęsia darbą nuo kartojimo pradinio veiksmo)."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Atsargiai: šis blokas gali būt naudojamas tik kartojimo bloko viduje."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "kartok su kiekvienu %1 iš sąrašo %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Kartok veiksmus, kol kintamasis \"%1\" paeiliui gauna kiekvieną sąrašo reikšmę."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jei ne"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "jei taip"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Jeigu sąlygą tenkinama, grąžina pirmą reikšmę, o jei ne - antrąją."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Sukurti 'kintamasis %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/mk.js b/msg/js/mk.js index b3a75b0a175..a1901297f75 100644 --- a/msg/js/mk.js +++ b/msg/js/mk.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Излези од содр Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be used within a loop."; // untranslated Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "за секој елемент %1 на списокот %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Му ја задава променливата „%1“ на секој елемент на списокот, а потоа исполнува наредби."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ако е невистинито"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ако е вистинито"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/ms.js b/msg/js/ms.js index 5917b4894aa..f5c7014dfd2 100644 --- a/msg/js/ms.js +++ b/msg/js/ms.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Keluar dari gelung pengand Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Langkau seluruh gelung yang tinggal dan bersambung dengan lelaran seterusnya."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Amaran: Blok ini hanya boleh digunakan dalam satu gelung."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "untuk setiap perkara %1 dalam senarai %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Untuk setiap perkara dalam senarai, tetapkan pembolehubah '%1' pada perkara, kemudian lakukan beberapa perintah."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "Jika palsu"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "Jika benar"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Hasilkan 'set %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Set pembolehubah ini supaya sama dengan input."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/nb.js b/msg/js/nb.js index 740f432fcc4..a92667559f4 100644 --- a/msg/js/nb.js +++ b/msg/js/nb.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Bryt ut av den gjeldende l Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Hopp over resten av denne løkken og fortsett med neste gjentakelse."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Advarsel: Denne blokken kan kun brukes innenfor en løkke."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "for hvert element %1 i listen %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For hvert element i en liste, angi variabelen '%1' til elementet, og deretter lag noen setninger."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "hvis usant"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "hvis sant"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Sjekk betingelsen i 'test'. Hvis betingelsen er sann, da returneres 'hvis sant' verdien. Hvis ikke returneres 'hvis usant' verdien."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Opprett 'hent %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Setter verdien av denne variablen lik parameteren."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/nl.js b/msg/js/nl.js index df09bc3fc6f..f5c9860197a 100644 --- a/msg/js/nl.js +++ b/msg/js/nl.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "uit de bovenliggende lus b Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "De rest van deze lus overslaan en doorgaan met de volgende herhaling."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Waarschuwing: dit blok mag alleen gebruikt worden in een lus."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "voor ieder item %1 in lijst %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Voor ieder item in een lijst, stel de variabele \"%1\" in op het item en voer daarna opdrachten uit."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "als onwaar"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "als waar"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Test de voorwaarde in \"test\". Als de voorwaarde \"waar\" is, geef de waarde van \"als waar\" terug; geef anders de waarde van \"als onwaar\" terug."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Maak 'opvragen van %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; Blockly.Msg.VARIABLES_SET_TOOLTIP = "Verandert de waarde van de variabele naar de waarde van de invoer."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/oc.js b/msg/js/oc.js index 211fbc59e95..237e59f558f 100644 --- a/msg/js/oc.js +++ b/msg/js/oc.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Break out of the containin Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warning: This block may only be used within a loop."; // untranslated Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "per cada element %1 dins la lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se fals"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se verai"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/pl.js b/msg/js/pl.js index ac7dcf80953..060ec7a151e 100644 --- a/msg/js/pl.js +++ b/msg/js/pl.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Wyjść z zawierającej p Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Pomiń resztę pętli i kontynuuj w kolejnej iteracji."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Ostrzeżenie: Ten blok może być użyty tylko w pętli."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "dla każdego elementu %1 na liście %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Dla każdego elementu z listy przyporządkuj zmienną '%1', a następnie wykonaj kilka instrukcji."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jeśli fałsz"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "jeśli prawda"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Sprawdź warunek w „test”. Jeśli warunek jest prawdziwy, to zwróci „jeśli prawda”; jeśli nie jest prawdziwy to zwróci „jeśli fałsz”."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Utwórz blok 'pobierz %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Nadaj tej zmiennej wartość."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/pms.js b/msg/js/pms.js index f9dc78a3c5d..e8dfa26bc0c 100644 --- a/msg/js/pms.js +++ b/msg/js/pms.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Seurte da la liassa anglob Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Sauté ël rest ëd sa liassa, e continué con l'iterassion apress."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Atension: Ës blòch a peul mach esse dovrà andrinta a na liassa."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "për minca n'element %1 ant la lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Për minca element an na lista, dé ël valor ëd l'element a la variàbil '%1', peui eseguì chèiche anstrussion."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se fàuss"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se ver"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Controlé la condission an 'preuva'. Se la condission a l'é vera, a rëspond con ël valor 'se ver'; dësnò a rëspond con ël valor 'se fàuss'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Creé 'oten-e %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Fissé costa variàbil ugual al valor d'imission."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/pt-br.js b/msg/js/pt-br.js index 2ccd9dc9d6f..866966065b2 100644 --- a/msg/js/pt-br.js +++ b/msg/js/pt-br.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Encerra o laço."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Ignora o resto deste laço, e continua com a próxima iteração."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Atenção: Este bloco só pode ser usado dentro de um laço."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "para cada item %1 na lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para cada item em uma lista, atribui o item à variável \"%1\", e então realiza algumas instruções."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se falso"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se verdadeiro"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Avalia a condição em \"teste\". Se a condição for verdadeira retorna o valor \"se verdadeiro\", senão retorna o valor \"se falso\"."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Criar \"obter %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Define esta variável para o valor da entrada."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/pt.js b/msg/js/pt.js index b543974e0d6..3d8bd65dcae 100644 --- a/msg/js/pt.js +++ b/msg/js/pt.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Sair do ciclo que está co Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Ignora o resto deste ciclo e continua na próxima iteração."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Atenção: Este bloco só pode ser usado dentro de um ciclo."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "para cada item %1 na lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para cada item numa lista, define a variável \"%1\" para o item e então faz algumas instruções."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "se falso"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "se verdadeiro"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Avalia a condição em \"teste\". Se a condição for verdadeira retorna o valor \"se verdadeiro\", senão retorna o valor \"se falso\"."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Criar \"obter %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Define esta variável para o valor inserido."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/ro.js b/msg/js/ro.js index 5bbd40b1a1d..a6421aa031d 100644 --- a/msg/js/ro.js +++ b/msg/js/ro.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Ieși din bucla care conţ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Sari peste restul aceastei bucle, şi continuă cu urmatoarea iteratie."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Avertisment: Acest bloc pote fi utilizat numai în interiorul unei bucle."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pentru fiecare element %1 în listă %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pentru fiecare element din listă, setaţi variabila '%1' ca valoarea elementului, şi apoi faceţi unele declaraţii."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "dacă este fals"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "dacă este adevărat"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Verifică condiţia din \"test\". Dacă condiţia este adevărată, returnează valoarea \"în cazul în care adevărat\"; în caz contrar întoarce valoarea \"în cazul în care e fals\"."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Crează 'get %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Setează această variabilă sa fie egală la intrare."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/ru.js b/msg/js/ru.js index ab07dc77649..13dd63c5d40 100644 --- a/msg/js/ru.js +++ b/msg/js/ru.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Прерывает это Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Пропускает остаток цикла и переходит к следующему шагу."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Предупреждение: этот блок может использоваться только внутри цикла."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "для каждого элемента %1 в списке %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Для каждого элемента в списке, присваивает переменной '%1' значение элемента и выполняет указанные команды."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "если ложь"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "если истина"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Проверяет условие выбора. Если условие истинно, возвращает первое значение, в противном случае возвращает второе значение."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Создать вставку %1"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Присваивает переменной значение вставки."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/sc.js b/msg/js/sc.js index aa7594af08a..be14f3218c4 100644 --- a/msg/js/sc.js +++ b/msg/js/sc.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Bessit de sa lòriga."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Sartiat su chi abarrat de sa loriga, e sighit cun su repicu afatànti."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Amonestu: Custu brocu ddu podis ponni sceti aintru de una lòriga."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "po dònnia item %1 in lista %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Po dònnia item in sa lista, ponit sa variàbili '%1' pari a s'item, e tandu fait pariga de cumandus."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "si frassu"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "si berus"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "‎Cumproa sa cunditzioni in 'cumproa'. Si sa cunditzioni est berus, torrat su valori 'si berus'; sinuncas torrat su valori 'si frassu'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Fait 'piga %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Imposta custa variabili uguali a s'input."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/sk.js b/msg/js/sk.js index c4d30b49c69..b6db53adfe6 100644 --- a/msg/js/sk.js +++ b/msg/js/sk.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Opustiť túto slučku."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Vynechať zvyšok tejto slučky a pokračovať ďalším opakovaním."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Upozornenie: Tento blok sa môže používať len v rámci slučky."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "pre každý prvok %1 v zozname %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Pre každý prvok v zozname priraď jeho hodnotu do premenej '%1' a vykonaj príkazy."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ak nepravda"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ak pravda"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Skontroluj podmienku testom. Ak je podmienka pravda, vráť hodnotu \"ak pravda\", inak vráť hodnotu \"ak nepravda\"."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Vytvoriť \"získať %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Nastaví túto premennú, aby sa rovnala vstupu."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/sq.js b/msg/js/sq.js index ed3949d03ec..ab0e914431c 100644 --- a/msg/js/sq.js +++ b/msg/js/sq.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Ndahu nga unaza."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Kapërce pjesën e mbetur të unazës, dhe vazhdo me ripërsëritjen tjetër."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Paralajmërim: Ky bllok mund të përdoret vetëm brenda unazës."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "per cdo produkt %1 ne liste %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Per cdo produkt ne nje \"liste\" \"vendos\" ndryshoren '%1' produktit, dhe pastaj bej disa deklarata."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "nëse e pasaktë"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "nëse e saktë"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kontrollo kushtin në 'test'. Nëse kushti është i saktë, kthen vlerën 'nëse e saktë'; përndryshe kthen vlerën 'nëse e pasaktë'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Krijo 'merr %1"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Vendos kete variable te jete e barabarte me te dhenat ne hyrje."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/sr.js b/msg/js/sr.js index 891e9aba4f3..3d0afed4e54 100644 --- a/msg/js/sr.js +++ b/msg/js/sr.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Напусти садрж Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Прескочи остатак ове петље, и настави са следећом итерацијом(понављанјем)."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Упозорење: Овај блок може да се употреби само унутар петље."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "за сваку ставку %1 на списку %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "За сваку ставку унутар листе, подеси промењиву '%1' по ставци, и онда начини неке изјаве-наредбе."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ако је нетачно"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ако је тачно"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Провери услов у 'test'. Ако је услов тачан, тада враћа 'if true' вредност; у другом случају враћа 'if false' вредност."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Направи „преузми %1“"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Поставља променљиву тако да буде једнака улазу."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/sv.js b/msg/js/sv.js index 63361fcacfe..03ddc197f38 100644 --- a/msg/js/sv.js +++ b/msg/js/sv.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Bryta ut ur den innehålla Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Hoppa över resten av denna loop och fortsätt med nästa loop."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Varning: Detta block kan endast användas i en loop."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "för varje föremål %1 i listan %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "För varje objekt i en lista, ange variabeln '%1' till objektet, och utför sedan några kommandon."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "om falskt"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "om sant"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kontrollera villkoret i \"test\". Om villkoret är sant, ge tillbaka \"om sant\"-värdet; annars ge tillbaka \"om falskt\"-värdet."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Skapa 'hämta %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Gör så att den här variabeln blir lika med inputen."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/ta.js b/msg/js/ta.js index 373a0dcd3a2..6f5d5a5d4f3 100644 --- a/msg/js/ta.js +++ b/msg/js/ta.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "மடக்கு கட Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "மடக்கு கட்டளையின் மீதியை விட்டுவிட்டு அடுத்த இயக்கநிலைக்கு செல்"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "எச்சரிக்கை : மடக்கு கூற்றில் இந்த தொகுதி ஒரு முறை மட்டுமே செயல்படுத்தப் படலாம்."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "உருப்படி ஒவ்வொன்றாக %1 பட்டியலில் உள்ள %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "பட்டியலில் உள்ள உருப்படியில் ஒவ்வொன்றாக, மாறியின் பொருள் '%1' ஆக வைக்க."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "பொய்யெனில்"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "மெய்யெனில்"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'test' உள்ள நிபந்தனையை சரிபார்க்கவும், நிபந்தனை மெய்யானால்,'if true'வை பின்கொடுக்கும் இல்லையெனில் 'if false'வை பின்கொடுக்கும்."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "'எடு %1' உருவாக்க Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "மாறியின் மதிப்பாய் உள்ளீட்டு மதிப்பை வை."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/th.js b/msg/js/th.js index b7bce0e2e72..8505961331a 100644 --- a/msg/js/th.js +++ b/msg/js/th.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "ออกจากกา Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "ข้ามสิ่งที่เหลืออยู่ และไปเริ่มวนซ้ำรอบต่อไปทันที"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "ระวัง: บล็อกชนิดนี้สามารถใช้งานได้เมื่ออยู่ภายในการวนซ้ำเท่านั้น"; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "วนซ้ำทุกรายการ %1 ในรายการ %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "ทำซ้ำทุกรายการ กำหนดค่าตัวแปร \"%1\" ตามรายการ และทำตามคำสั่งที่กำหนดไว้"; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ถ้า เป็นเท็จ"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ถ้า เป็นจริง"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "ตรวจสอบเงื่อนไขใน \"ทดสอบ\" ถ้าเงื่อนไขเป็นจริง จะคืนค่า \"ถ้า เป็นจริง\" ถ้าเงื่อนไขเป็นเท็จ จะคืนค่า \"ถ้า เป็นเท็จ\""; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "สร้าง \"get %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "กำหนดให้ตัวแปรนี้เท่ากับการป้อนข้อมูล"; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/tl.js b/msg/js/tl.js index d3eeb6c01f9..0bd06264314 100644 --- a/msg/js/tl.js +++ b/msg/js/tl.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Hatiin ang nilalaman ng lo Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Laktawan ang natitirang bahagi ng loop, at magpatuloy sa susunod na pag-ulit."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Babala: Ang block ito ay maaari lamang magamit sa loob ng loop."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "sa bawat bagay %1 sa listahan %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para sa bawat item sa isang list, i-set ang variable ng '%1' sa mga item, at pagkatapos ay gumawa ng ilang mga statements."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "kung mali"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "kung tama"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/tlh.js b/msg/js/tlh.js index 825e65446a1..695a6c9b823 100644 --- a/msg/js/tlh.js +++ b/msg/js/tlh.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Break out of the containin Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Skip the rest of this loop, and continue with the next iteration."; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "yIqIm! ghoDaq neH ngoghvam lo'laH vay'."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "ngIq Doch %1 ngaSbogh tetlh %2 nuDDI'"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "For each item in a list, set the variable '%1' to the item, and then do some statements."; // untranslated Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "teHbe'chugh"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "teHchugh"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "chel 'Suq %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/tr.js b/msg/js/tr.js index 4dcd89e2c0e..705c2ce52b4 100644 --- a/msg/js/tr.js +++ b/msg/js/tr.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "İçeren döngüden çık. Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Bu döngünün geri kalanını atlayın ve sonraki adım ile devam edin."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Uyarı: Bu blok sadece bir döngü içinde kullanılabilir."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "her öğe için %1 listede %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Bir listedeki her öğe için '%1' değişkenini maddeye atayın ve bundan sonra bazı açıklamalar yapın."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "yanlış ise"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "doğru ise"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "'test'deki şartı test eder. Eğer şart doğru ise 'doğru' değeri döndürür, aksi halde 'yanlış' değeri döndürür."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "'get %1' oluştur"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Bu değişkeni girilen değere eşitler."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/uk.js b/msg/js/uk.js index eb7e5522e75..a05823ad22a 100644 --- a/msg/js/uk.js +++ b/msg/js/uk.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Перервати вик Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Пропустити залишок цього циклу і перейти до виконання наступної ітерації."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Попередження: цей блок може бути використаний тільки в межах циклу."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "для кожного елемента %1 у списку %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Для кожного елемента в списку змінна '%1' отримує значення елемента, а потім виконуються певні дії."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "якщо хибність"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "якщо істина"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Перевіряє умову в 'тест'. Якщо умова істинна, то повертає значення 'якщо істина'; в іншому випадку повертає значення 'якщо хибність'."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Створити 'отримати %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Задає цю змінну рівною входу."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/vi.js b/msg/js/vi.js index 40cd5893c9f..159ac9144a5 100644 --- a/msg/js/vi.js +++ b/msg/js/vi.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Thoát khỏi vòng lặp Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Bỏ qua phần còn lại trong vòng lặp này, và sang lần lặp tiếp theo."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Chú ý: Mảnh này chỉ có thế dùng trong các vòng lặp."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "với mỗi thành phần %1 trong danh sách %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Trong một danh sách, lấy từng thành phần, gán vào biến \"%1\", rồi thực hiện một số lệnh."; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "nếu sai"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "nếu đúng"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kiểm tra điều kiện. Nếu điều kiện đúng, hoàn trả giá trị từ mệnh đề \"nếu đúng\" nếu không đúng, hoàn trả giá trị từ mệnh đề \"nếu sai\"."; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Tạo mảnh \"lấy %1\""; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "Đặt giá trị của biến này thành..."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/zh-hans.js b/msg/js/zh-hans.js index a8d2178b82f..da99848664f 100644 --- a/msg/js/zh-hans.js +++ b/msg/js/zh-hans.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "中断包含它的循环 Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "跳过这个循环的剩余部分,并继续下一次迭代。"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "警告:此块仅可用于在一个循环内。"; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "为每个项目 %1 在列表中 %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "遍历每个列表中的项目,将变量“%1”设定到该项中,然后执行某些语句。"; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "如果为假"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "如果为真"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "检查“test”中的条件。如果条件为真,则返回“if true”的值,否则,则返回“if false”的值。"; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "创建“获得%1”"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "设置此变量,以使它和输入值相等。"; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/js/zh-hant.js b/msg/js/zh-hant.js index 459a7749946..bb4288843b9 100644 --- a/msg/js/zh-hant.js +++ b/msg/js/zh-hant.js @@ -44,6 +44,9 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "離開當前的 迴圈"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "跳過這個迴圈的其餘步驟,並繼續下一次的迴圈運算。"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "警告: 此積木僅可用於迴圈內。"; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated Blockly.Msg.CONTROLS_FOREACH_TITLE = "取出每個 %1 自列表 %2"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "遍歷每個列表中的項目,將變量 '%1' 設定到該項目中,然後執行某些語句"; Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated @@ -239,6 +242,58 @@ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "如果為非"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "如果為真"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "檢查 'test' 中的條件。如果條件為 真,將返回 '如果為 真' 值 ;否則,返回 '如果為 否' 的值。"; Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated @@ -523,22 +578,27 @@ Blockly.Msg.VARIABLES_SET_CREATE_GET = "建立 '取得 %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated Blockly.Msg.VARIABLES_SET_TOOLTIP = "設定此變量,好和輸入值相等。"; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; -Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; -Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; -Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; -Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; -Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; -Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; -Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; \ No newline at end of file +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file diff --git a/msg/json/en.json b/msg/json/en.json index 1e425434c3b..bcd157fb9c6 100644 --- a/msg/json/en.json +++ b/msg/json/en.json @@ -1,7 +1,7 @@ { "@metadata": { "author": "Ellen Spertus ", - "lastupdated": "2015-08-16 14:10:36.300053", + "lastupdated": "2015-08-27 12:00:53.743873", "locale": "en", "messagedocumentation" : "qqq" }, @@ -76,6 +76,9 @@ "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_FOREACH_TYPEBLOCK": "For Each Item In List", + "CONTROLS_FOREACH_KEY_HELPURL": "https://github.com/google/blockly/wiki/Loops#for-each", + "CONTROLS_FOREACH_KEY_TITLE": "for each key %1 in map %2", + "CONTROLS_FOREACH_KEY_TYPEBLOCK": "For Each Key In Map", "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", @@ -478,6 +481,58 @@ "LISTS_SPLIT_TOOLTIP_JOIN": "Join a list of texts into one text, separated by a delimiter.", "LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK": "Make List From Text", "LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK": "Make Text From List", + "MAPS_CREATE_EMPTY_HELPURL": "https://github.com/google/blockly/wiki/Maps#create-empty-Map", + "MAPS_CREATE_EMPTY_TITLE": "create empty map", + "MAPS_CREATE_EMPTY_TOOLTIP": "Returns a Map, of length 0, containing no data records", + "MAPS_CREATE_EMPTY_TYPEBLOCK": "Create Empty Map", + "MAPS_CREATE_WITH_HELPURL": "https://github.com/google/blockly/wiki/Maps#create-Map-with", + "MAPS_CREATE_WITH_TOOLTIP": "Create a Map with any number of items.", + "MAPS_CREATE_WITH_INPUT_WITH": "create map with", + "MAPS_CREATE_WITH_TYPEBLOCK": "Create Map With", + "MAPS_CREATE_WITH_CONTAINER_TITLE_ADD": "Map", + "MAPS_CREATE_WITH_CONTAINER_TOOLTIP": "Add, remove, or reorder sections to reconfigure this Map block.", + "MAPS_CREATE_WITH_ITEM_TOOLTIP": "Add an item to the Map.", + "MAPS_CREATE_HELPURL": "https://github.com/google/blockly/wiki/Maps#create-empty-Map", + "MAPS_CREATE_TITLE": "map key %1 as %2", + "MAPS_CREATE_TOOLTIP": "Returns a Map, of length 0, containing no data records", + "MAPS_CREATE_TYPEBLOCK": "Map Key", + "MAPS_LENGTH_HELPURL": "https://github.com/google/blockly/wiki/Maps#length-of", + "MAPS_LENGTH_TITLE": "size of %1", + "MAPS_LENGTH_TOOLTIP": "Returns the number of entries in a Map.", + "MAPS_LENGTH_TYPEBLOCK": "Size Of Map", + "MAPS_ISEMPTY_HELPURL": "https://github.com/google/blockly/wiki/Maps#is-empty", + "MAPS_ISEMPTY_TITLE": "%1 is empty", + "MAPS_ISEMPTY_TOOLTIP": "Returns true if the Map is empty.", + "MAPS_ISEMPTY_TYPEBLOCK": "Is Map Empty?", + "MAPS_INMAP": "in map", + "MAPS_INDEX_OF_HELPURL": "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map", + "MAPS_INDEX_OF_FIRST": "find first occurrence of item", + "MAPS_INDEX_OF_LAST": "find last occurrence of item", + "MAPS_INDEX_OF_TOOLTIP": "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found.", + "MAPS_INDEX_OF_FIRST_TYPEBLOCK": "Find First Occurrence Of Item", + "MAPS_INDEX_OF_LAST_TYPEBLOCK": "Find Last Occurrence Of Item", + "MAPS_GET_INDEX_GET": "get", + "MAPS_GET_INDEX_GET_REMOVE": "get and remove", + "MAPS_GET_INDEX_REMOVE": "remove", + "MAPS_GET_INDEX_FROM_START": "#", + "MAPS_GET_INDEX_FROM_END": "# from end", + "MAPS_GET_INDEX_FIRST": "first", + "MAPS_GET_INDEX_LAST": "last", + "MAPS_GET_INDEX_TAIL": "", + "MAPS_GET_INDEX_TOOLTIP_GET": "Returns the item at the specified position in a Map.", + "MAPS_GET_INDEX_TOOLTIP_GET_REMOVE": "Removes and returns the item at the specified position in a Map.", + "MAPS_GET_INDEX_TOOLTIP_REMOVE": "Removes the item at the specified position in a Map.", + "MAPS_GET_INDEX_GET_TYPEBLOCK": "Get Item From a Map", + "MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK": "Get and Remove Item From a Map", + "MAPS_GET_INDEX_REMOVE_TYPEBLOCK": "Remove Item From a Map", + "MAPS_SET_INDEX_HELPURL": "https://github.com/google/blockly/wiki/Maps#in-Map--set", + "MAPS_SET_INDEX_SET": "set", + "MAPS_SET_INDEX_INSERT": "insert at", + "MAPS_SET_INDEX_INPUT_TO": "as", + "MAPS_SET_INDEX_TOOLTIP": "Sets the item at the specified position in a Map.", + "MAPS_SET_INDEX_TYPEBLOCK": "Set Item at Position in Map", + "MAPS_KEYS_TITLE": "get keys of %1", + "MAPS_KEYS_TYPEBLOCK": "Get Keys of Map", "ORDINAL_NUMBER_SUFFIX": "", "VARIABLES_GET_HELPURL": "https://github.com/google/blockly/wiki/Variables#get", "VARIABLES_GET_TOOLTIP": "Returns the value of this variable.", diff --git a/msg/json/qqq.json b/msg/json/qqq.json index a43d4b65ff6..98ecce5341b 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -70,6 +70,9 @@ "CONTROLS_FOREACH_TITLE": "block text - Title of [https://github.com/google/blockly/wiki/Loops#for-each for each block]. Sequentially assigns every item in array %2 to the valiable %1.", "CONTROLS_FOREACH_TOOLTIP": "block text - Description of [https://github.com/google/blockly/wiki/Loops#for-each for each blocks].\n\nParameters:\n* %1 - the name of the loop variable.", "CONTROLS_FOREACH_TYPEBLOCK": "typeblock - Typing to add the block", + "CONTROLS_FOREACH_KEY_HELPURL": "url - Describes 'for-each loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Foreach https://en.wikipedia.org/wiki/Foreach] if present.", + "CONTROLS_FOREACH_KEY_TITLE": "block text - Title of [https://github.com/google/blockly/wiki/Loops#for-each for each block]. Sequentially assigns every item in array %2 to the valiable %1.", + "CONTROLS_FOREACH_KEY_TYPEBLOCK": "typeblock - Typing to add the block", "CONTROLS_FLOW_STATEMENTS_HELPURL": "url - Describes control flow in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow], if it exists.", "CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK": "dropdown - The current loop should be exited. See [https://github.com/google/blockly/wiki/Loops#break https://github.com/google/blockly/wiki/Loops#break].", "CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE": "dropdown - The current iteration of the loop should be ended and the next should begin. See [https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration].", @@ -472,6 +475,58 @@ "LISTS_SPLIT_TOOLTIP_JOIN": "tooltip - See [https://github.com/google/blockly/wiki/Lists#make-text-from-list https://github.com/google/blockly/wiki/Lists#make-text-from-list] for more information.", "LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK": "typeblock - Typing to add the block", "LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_CREATE_EMPTY_HELPURL": "url - Information on empty Maps.", + "MAPS_CREATE_EMPTY_TITLE": "block text - See [https://github.com/google/blockly/wiki/Maps#create-empty-Map https://github.com/google/blockly/wiki/Maps#create-empty-Map].", + "MAPS_CREATE_EMPTY_TOOLTIP": "block text - See [https://github.com/google/blockly/wiki/Maps#create-empty-Map https://github.com/google/blockly/wiki/Maps#create-empty-Map].", + "MAPS_CREATE_EMPTY_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_CREATE_WITH_HELPURL": "url - Information on building Maps.", + "MAPS_CREATE_WITH_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Maps#create-Map-with https://github.com/google/blockly/wiki/Maps#create-Map-with].", + "MAPS_CREATE_WITH_INPUT_WITH": "block text - See [https://github.com/google/blockly/wiki/Maps#create-Map-with https://github.com/google/blockly/wiki/Maps#create-Map-with].", + "MAPS_CREATE_WITH_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_CREATE_WITH_CONTAINER_TITLE_ADD": "block text - This appears in a sub-block when [https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs changing the number of inputs in a ''''create Map with'''' block].", + "MAPS_CREATE_WITH_CONTAINER_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs].", + "MAPS_CREATE_WITH_ITEM_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs].", + "MAPS_CREATE_HELPURL": "url - Information on empty Maps.", + "MAPS_CREATE_TITLE": "block text - See [https://github.com/google/blockly/wiki/Maps#create-empty-Map https://github.com/google/blockly/wiki/Maps#create-empty-Map].", + "MAPS_CREATE_TOOLTIP": "block text - See [https://github.com/google/blockly/wiki/Maps#create-empty-Map https://github.com/google/blockly/wiki/Maps#create-empty-Map].", + "MAPS_CREATE_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_LENGTH_HELPURL": "url - Information about how the length of a Map is computed (i.e., by the total number of elements, not the number of different elements).", + "MAPS_LENGTH_TITLE": "block text - See [https://github.com/google/blockly/wiki/Maps#length-of https://github.com/google/blockly/wiki/Maps#length-of]. \n\nParameters:\n* %1 - the Map whose size is desired", + "MAPS_LENGTH_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Maps#length-of https://github.com/google/blockly/wiki/Maps#length-of Blockly:Maps:length of].", + "MAPS_LENGTH_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_ISEMPTY_HELPURL": "url - See [https://github.com/google/blockly/wiki/Maps#is-empty https://github.com/google/blockly/wiki/Maps#is-empty].", + "MAPS_ISEMPTY_TITLE": "block text - See [https://github.com/google/blockly/wiki/Maps#is-empty https://github.com/google/blockly/wiki/Maps#is-empty]. \n\nParameters:\n* %1 - the Map to test", + "MAPS_ISEMPTY_TOOLTIP": "block tooltip - See [https://github.com/google/blockly/wiki/Maps#is-empty https://github.com/google/blockly/wiki/Maps#is-empty].", + "MAPS_ISEMPTY_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_INMAP": "block text - Title of blocks operating on [https://github.com/google/blockly/wiki/Maps Maps].", + "MAPS_INDEX_OF_HELPURL": "url - See [https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map].", + "MAPS_INDEX_OF_FIRST": "dropdown - See [https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map Maps#finding-items-in-a-Map]. [[File:Blockly-Map-find.png]]", + "MAPS_INDEX_OF_LAST": "dropdown - See [https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map]. [[File:Blockly-Map-find.png]]", + "MAPS_INDEX_OF_TOOLTIP": "dropdown - See [https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map]. [[File:Blockly-Map-find.png]]", + "MAPS_INDEX_OF_FIRST_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_INDEX_OF_LAST_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_GET_INDEX_GET": "dropdown - Indicates that the user wishes to [https://github.com/google/blockly/wiki/Maps#getting-a-single-item get an item from a Map] without removing it from the Map.", + "MAPS_GET_INDEX_GET_REMOVE": "dropdown - Indicates that the user wishes to [https://github.com/google/blockly/wiki/Maps#getting-a-single-item get and remove an item from a Map], as opposed to merely getting it without modifying the Map.", + "MAPS_GET_INDEX_REMOVE": "dropdown - Indicates that the user wishes to [https://github.com/google/blockly/wiki/Maps#removing-an-item remove an item from a Map].\n{{Identical|Remove}}", + "MAPS_GET_INDEX_FROM_START": "dropdown - Indicates that an index relative to the front of the Map should be used to [https://github.com/google/blockly/wiki/Maps#getting-a-single-item get and/or remove an item from a Map]. Note: If {{msg-Blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will automatically appear ''after'' this number (and any other ordinal numbers on this block). See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly. [[File:Blockly-Map-get-item.png]]", + "MAPS_GET_INDEX_FROM_END": "dropdown - Indicates that an index relative to the end of the Map should be used to [https://github.com/google/blockly/wiki/Maps#getting-a-single-item access an item in a Map]. [[File:Blockly-Map-get-item.png]]", + "MAPS_GET_INDEX_FIRST": "dropdown - Indicates that the '''first''' item should be [https://github.com/google/blockly/wiki/Maps#getting-a-single-item accessed in a Map]. [[File:Blockly-Map-get-item.png]]", + "MAPS_GET_INDEX_LAST": "dropdown - Indicates that the '''last''' item should be [https://github.com/google/blockly/wiki/Maps#getting-a-single-item accessed in a Map]. [[File:Blockly-Map-get-item.png]]", + "MAPS_GET_INDEX_TAIL": "block text - Text that should go after the rightmost block/dropdown when [https://github.com/google/blockly/wiki/Maps#getting-a-single-item accessing an item from a Map]. In most languages, this will be the empty string. [[File:Blockly-Map-get-item.png]]", + "MAPS_GET_INDEX_TOOLTIP_GET": "tooltip - See [https://github.com/google/blockly/wiki/Maps#getting-a-single-item https://github.com/google/blockly/wiki/Maps#getting-a-single-item] for more information.", + "MAPS_GET_INDEX_TOOLTIP_GET_REMOVE": "tooltip - See [https://github.com/google/blockly/wiki/Maps#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Maps#getting-a-single-item] for '# from start'.", + "MAPS_GET_INDEX_TOOLTIP_REMOVE": "tooltip - See [https://github.com/google/blockly/wiki/Maps#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Maps#getting-a-single-item] for '# from start'.", + "MAPS_GET_INDEX_GET_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_GET_INDEX_REMOVE_TYPEBLOCK": "typeblock - Typing to add the block", + "MAPS_SET_INDEX_HELPURL": "url - Information about putting items in Maps.", + "MAPS_SET_INDEX_SET": "block text - [https://github.com/google/blockly/wiki/Maps#in-Map--set Replaces an item in a Map]. [[File:Blockly-in-Map-set-insert.png]]", + "MAPS_SET_INDEX_INSERT": "block text - [https://github.com/google/blockly/wiki/Maps#in-Map--insert-at Inserts an item into a Map]. [[File:Blockly-in-Map-set-insert.png]]", + "MAPS_SET_INDEX_INPUT_TO": "block text - The word(s) after the position in the Map and before the item to be set/inserted. [[File:Blockly-in-Map-set-insert.png]]", + "MAPS_SET_INDEX_TOOLTIP": "tooltip - See [https://github.com/google/blockly/wiki/Maps#getting-a-single-item} (even though the page describes the 'get' block, the idea is the same for the 'set' block).", + "MAPS_SET_INDEX_TYPEBLOCK": "", + "MAPS_KEYS_TITLE": "block text - This lays out the text of the block. %1 corresponds to a map", + "MAPS_KEYS_TYPEBLOCK": "tooltip - url - Information about putting items in Maps. typeblock - Typing to add the block", "ORDINAL_NUMBER_SUFFIX": "grammar - Text that follows an ordinal number (a number that indicates position relative to other numbers). In most languages, such text appears before the number, so this should be blank. An exception is Hungarian. See [[Translating:Blockly#Ordinal_numbers]] for more information.", "VARIABLES_GET_HELPURL": "url - Information about ''variables'' in computer programming. Consider using your language's translation of [https://en.wikipedia.org/wiki/Variable_(computer_science) https://en.wikipedia.org/wiki/Variable_(computer_science)], if it exists.", "VARIABLES_GET_TOOLTIP": "tooltip - This gets the value of the named variable without modifying it.", diff --git a/msg/json/synonyms.json b/msg/json/synonyms.json index 89b9187786a..321a8a6bd7c 100644 --- a/msg/json/synonyms.json +++ b/msg/json/synonyms.json @@ -1 +1 @@ -{"PROCEDURES_DEFRETURN_TITLE": "PROCEDURES_DEFNORETURN_TITLE", "CONTROLS_IF_IF_TITLE_IF": "CONTROLS_IF_MSG_IF", "CONTROLS_WHILEUNTIL_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_IF_MSG_THEN": "CONTROLS_REPEAT_INPUT_DO", "LISTS_GET_SUBLIST_INPUT_IN_LIST": "LISTS_INLIST", "PROCEDURES_CALLRETURN_CALL": "PROCEDURES_CALLNORETURN_CALL", "CONTROLS_IF_ELSE_TITLE_ELSE": "CONTROLS_IF_MSG_ELSE", "PROCEDURES_DEFRETURN_PROCEDURE": "PROCEDURES_DEFNORETURN_PROCEDURE", "TEXT_CREATE_JOIN_ITEM_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "LISTS_GET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "CONTROLS_IF_ELSEIF_TITLE_ELSEIF": "CONTROLS_IF_MSG_ELSEIF", "PROCEDURES_DEFRETURN_DO": "PROCEDURES_DEFNORETURN_DO", "CONTROLS_FOR_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "LISTS_GET_INDEX_HELPURL": "LISTS_INDEX_OF_HELPURL", "LISTS_INDEX_OF_INPUT_IN_LIST": "LISTS_INLIST", "CONTROLS_FOREACH_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "LISTS_CREATE_WITH_ITEM_TITLE": "VARIABLES_DEFAULT_NAME", "TEXT_APPEND_VARIABLE": "VARIABLES_DEFAULT_NAME", "MATH_CHANGE_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "LISTS_SET_INDEX_INPUT_IN_LIST": "LISTS_INLIST"} \ No newline at end of file +{"PROCEDURES_DEFRETURN_TITLE": "PROCEDURES_DEFNORETURN_TITLE", "LISTS_GET_SUBLIST_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_SET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "MAPS_CREATE_WITH_ITEM_TITLE": "VARIABLES_DEFAULT_NAME", "PROCEDURES_DEFRETURN_PROCEDURE": "PROCEDURES_DEFNORETURN_PROCEDURE", "LISTS_CREATE_WITH_ITEM_TITLE": "VARIABLES_DEFAULT_NAME", "CONTROLS_IF_ELSE_TITLE_ELSE": "CONTROLS_IF_MSG_ELSE", "PROCEDURES_DEFRETURN_DO": "PROCEDURES_DEFNORETURN_DO", "LISTS_GET_INDEX_HELPURL": "LISTS_INDEX_OF_HELPURL", "MAPS_GET_INDEX_HELPURL": "MAPS_INDEX_OF_HELPURL", "MAPS_SET_INDEX_INPUT_IN_MAP": "MAPS_INMAP", "TEXT_CREATE_JOIN_ITEM_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "CONTROLS_IF_MSG_THEN": "CONTROLS_REPEAT_INPUT_DO", "LISTS_INDEX_OF_INPUT_IN_LIST": "LISTS_INLIST", "PROCEDURES_CALLRETURN_CALL": "PROCEDURES_CALLNORETURN_CALL", "LISTS_GET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "CONTROLS_IF_ELSEIF_TITLE_ELSEIF": "CONTROLS_IF_MSG_ELSEIF", "MAPS_GET_INDEX_INPUT_IN_MAP": "MAPS_INMAP", "CONTROLS_FOREACH_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_IF_IF_TITLE_IF": "CONTROLS_IF_MSG_IF", "CONTROLS_WHILEUNTIL_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "MAPS_INDEX_OF_INPUT_IN_MAP": "MAPS_INMAP", "CONTROLS_FOR_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "TEXT_APPEND_VARIABLE": "VARIABLES_DEFAULT_NAME", "MATH_CHANGE_TITLE_ITEM": "VARIABLES_DEFAULT_NAME"} \ No newline at end of file diff --git a/msg/messages.js b/msg/messages.js index c53f832e63b..a9d02610525 100644 --- a/msg/messages.js +++ b/msg/messages.js @@ -218,6 +218,14 @@ Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = 'For each item in a list, set the variabl /// typeblock - Typing to add the block Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = 'For Each Item In List'; +/// url - Describes 'for-each loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Foreach https://en.wikipedia.org/wiki/Foreach] if present. +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = 'https://github.com/google/blockly/wiki/Loops#for-each'; +/// block text - Title of [https://github.com/google/blockly/wiki/Loops#for-each for each block]. +/// Sequentially assigns every item in array %2 to the valiable %1. +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = 'for each key %1 in map %2'; +/// typeblock - Typing to add the block +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = 'For Each Key In Map'; + /// url - Describes control flow in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow], if it exists. Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = 'https://github.com/google/blockly/wiki/Loops#loop-termination-blocks'; /// dropdown - The current loop should be exited. See [https://github.com/google/blockly/wiki/Loops#break https://github.com/google/blockly/wiki/Loops#break]. @@ -1315,6 +1323,169 @@ Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK = 'Make List From Text'; /// typeblock - Typing to add the block Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK = 'Make Text From List'; + +// Maps Blocks. +/// url - Information on empty Maps. +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = 'https://github.com/google/blockly/wiki/Maps#create-empty-Map'; +/// block text - See [https://github.com/google/blockly/wiki/Maps#create-empty-Map https://github.com/google/blockly/wiki/Maps#create-empty-Map]. +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = 'create empty map'; +/// block text - See [https://github.com/google/blockly/wiki/Maps#create-empty-Map https://github.com/google/blockly/wiki/Maps#create-empty-Map]. +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = 'Returns a Map, of length 0, containing no data records'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = 'Create Empty Map'; + +/// url - Information on building Maps. +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = 'https://github.com/google/blockly/wiki/Maps#create-Map-with'; +/// tooltip - See [https://github.com/google/blockly/wiki/Maps#create-Map-with https://github.com/google/blockly/wiki/Maps#create-Map-with]. +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = 'Create a Map with any number of items.'; +/// block text - See [https://github.com/google/blockly/wiki/Maps#create-Map-with https://github.com/google/blockly/wiki/Maps#create-Map-with]. +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = 'create map with'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = 'Create Map With'; +/// block text - This appears in a sub-block when [https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs changing the number of inputs in a ''''create Map with'''' block]. +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = 'Map'; +/// tooltip - See [https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs]. +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = 'Add, remove, or reorder sections to reconfigure this Map block.'; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; +/// tooltip - See [https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs https://github.com/google/blockly/wiki/Maps#changing-number-of-inputs]. +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = 'Add an item to the Map.'; + +/// url - Information on empty Maps. +Blockly.Msg.MAPS_CREATE_HELPURL = 'https://github.com/google/blockly/wiki/Maps#create-empty-Map'; +/// block text - See [https://github.com/google/blockly/wiki/Maps#create-empty-Map https://github.com/google/blockly/wiki/Maps#create-empty-Map]. +Blockly.Msg.MAPS_CREATE_TITLE = 'map key %1 as %2'; +/// block text - See [https://github.com/google/blockly/wiki/Maps#create-empty-Map https://github.com/google/blockly/wiki/Maps#create-empty-Map]. +Blockly.Msg.MAPS_CREATE_TOOLTIP = 'Returns a Map, of length 0, containing no data records'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = 'Map Key'; + +/// url - Information about how the length of a Map is computed (i.e., by the total number of elements, not the number of different elements). +Blockly.Msg.MAPS_LENGTH_HELPURL = 'https://github.com/google/blockly/wiki/Maps#length-of'; +/// block text - See [https://github.com/google/blockly/wiki/Maps#length-of https://github.com/google/blockly/wiki/Maps#length-of]. +/// \n\nParameters:\n* %1 - the Map whose size is desired +Blockly.Msg.MAPS_LENGTH_TITLE = 'size of %1'; +/// tooltip - See [https://github.com/google/blockly/wiki/Maps#length-of https://github.com/google/blockly/wiki/Maps#length-of Blockly:Maps:length of]. +Blockly.Msg.MAPS_LENGTH_TOOLTIP = 'Returns the number of entries in a Map.'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = 'Size Of Map'; + +/// url - See [https://github.com/google/blockly/wiki/Maps#is-empty https://github.com/google/blockly/wiki/Maps#is-empty]. +Blockly.Msg.MAPS_ISEMPTY_HELPURL = 'https://github.com/google/blockly/wiki/Maps#is-empty'; +/// block text - See [https://github.com/google/blockly/wiki/Maps#is-empty +/// https://github.com/google/blockly/wiki/Maps#is-empty]. +/// \n\nParameters:\n* %1 - the Map to test +Blockly.Msg.MAPS_ISEMPTY_TITLE = '%1 is empty'; +/// block tooltip - See [https://github.com/google/blockly/wiki/Maps#is-empty +/// https://github.com/google/blockly/wiki/Maps#is-empty]. +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = 'Returns true if the Map is empty.'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = 'Is Map Empty?'; + +/// block text - Title of blocks operating on [https://github.com/google/blockly/wiki/Maps Maps]. +Blockly.Msg.MAPS_INMAP = 'in map'; + +/// url - See [https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map +/// https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map]. +Blockly.Msg.MAPS_INDEX_OF_HELPURL = 'https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map'; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +/// dropdown - See [https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map +/// Maps#finding-items-in-a-Map]. +/// [[File:Blockly-Map-find.png]] +Blockly.Msg.MAPS_INDEX_OF_FIRST = 'find first occurrence of item'; +/// dropdown - See [https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map +/// https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map]. +/// [[File:Blockly-Map-find.png]] +Blockly.Msg.MAPS_INDEX_OF_LAST = 'find last occurrence of item'; +/// dropdown - See [https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map +/// https://github.com/google/blockly/wiki/Maps#finding-items-in-a-Map]. +/// [[File:Blockly-Map-find.png]] +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = 'Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found.'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = 'Find First Occurrence Of Item'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = 'Find Last Occurrence Of Item'; + +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +/// dropdown - Indicates that the user wishes to +/// [https://github.com/google/blockly/wiki/Maps#getting-a-single-item +/// get an item from a Map] without removing it from the Map. +Blockly.Msg.MAPS_GET_INDEX_GET = 'get'; +/// dropdown - Indicates that the user wishes to +/// [https://github.com/google/blockly/wiki/Maps#getting-a-single-item +/// get and remove an item from a Map], as opposed to merely getting +/// it without modifying the Map. +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = 'get and remove'; +/// dropdown - Indicates that the user wishes to +/// [https://github.com/google/blockly/wiki/Maps#removing-an-item +/// remove an item from a Map].\n{{Identical|Remove}} +Blockly.Msg.MAPS_GET_INDEX_REMOVE = 'remove'; +/// dropdown - Indicates that an index relative to the front of the Map should be used to +/// [https://github.com/google/blockly/wiki/Maps#getting-a-single-item get and/or remove +/// an item from a Map]. Note: If {{msg-Blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will +/// automatically appear ''after'' this number (and any other ordinal numbers on this block). +/// See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly. +/// [[File:Blockly-Map-get-item.png]] +Blockly.Msg.MAPS_GET_INDEX_FROM_START = '#'; +/// dropdown - Indicates that an index relative to the end of the Map should be used +/// to [https://github.com/google/blockly/wiki/Maps#getting-a-single-item access an item in a Map]. +/// [[File:Blockly-Map-get-item.png]] +Blockly.Msg.MAPS_GET_INDEX_FROM_END = '# from end'; +/// dropdown - Indicates that the '''first''' item should be +/// [https://github.com/google/blockly/wiki/Maps#getting-a-single-item accessed in a Map]. +/// [[File:Blockly-Map-get-item.png]] +Blockly.Msg.MAPS_GET_INDEX_FIRST = 'first'; +/// dropdown - Indicates that the '''last''' item should be +/// [https://github.com/google/blockly/wiki/Maps#getting-a-single-item accessed in a Map]. +/// [[File:Blockly-Map-get-item.png]] +Blockly.Msg.MAPS_GET_INDEX_LAST = 'last'; +/// block text - Text that should go after the rightmost block/dropdown when +/// [https://github.com/google/blockly/wiki/Maps#getting-a-single-item +/// accessing an item from a Map]. In most languages, this will be the empty string. +/// [[File:Blockly-Map-get-item.png]] +Blockly.Msg.MAPS_GET_INDEX_TAIL = ''; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +/// tooltip - See [https://github.com/google/blockly/wiki/Maps#getting-a-single-item +/// https://github.com/google/blockly/wiki/Maps#getting-a-single-item] for more information. +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = 'Returns the item at the specified position in a Map.'; +/// tooltip - See [https://github.com/google/blockly/wiki/Maps#getting-and-removing-an-item] +/// (for remove and return) and +/// [https://github.com/google/blockly/wiki/Maps#getting-a-single-item] for '# from start'. +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = 'Removes and returns the item at the specified position in a Map.'; +/// tooltip - See [https://github.com/google/blockly/wiki/Maps#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Maps#getting-a-single-item] for '# from start'. +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = 'Removes the item at the specified position in a Map.'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = 'Get Item From a Map'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = 'Get and Remove Item From a Map'; +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = 'Remove Item From a Map'; +/// url - Information about putting items in Maps. +Blockly.Msg.MAPS_SET_INDEX_HELPURL = 'https://github.com/google/blockly/wiki/Maps#in-Map--set'; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +/// block text - [https://github.com/google/blockly/wiki/Maps#in-Map--set +/// Replaces an item in a Map]. +/// [[File:Blockly-in-Map-set-insert.png]] +Blockly.Msg.MAPS_SET_INDEX_SET = 'set'; +/// block text - [https://github.com/google/blockly/wiki/Maps#in-Map--insert-at +/// Inserts an item into a Map]. +/// [[File:Blockly-in-Map-set-insert.png]] +Blockly.Msg.MAPS_SET_INDEX_INSERT = 'insert at'; +/// block text - The word(s) after the position in the Map and before the item to be set/inserted. +/// [[File:Blockly-in-Map-set-insert.png]] +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = 'as'; +/// tooltip - See [https://github.com/google/blockly/wiki/Maps#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block). +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = 'Sets the item at the specified position in a Map.'; +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = 'Set Item at Position in Map'; + +/// block text - This lays out the text of the block. %1 corresponds to a map +Blockly.Msg.MAPS_KEYS_TITLE = 'get keys of %1'; +/// tooltip - +Blockly.Msg.MAPS_KEYS_TOOLTIP +/// url - Information about putting items in Maps. +Blockly.Msg.MAPS_KEYS_HELPURL +/// typeblock - Typing to add the block +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = 'Get Keys of Map'; + /// grammar - Text that follows an ordinal number (a number that indicates /// position relative to other numbers). In most languages, such text appears /// before the number, so this should be blank. An exception is Hungarian. diff --git a/python_compressed.js b/python_compressed.js index d1e287c8f4d..faec714f6e0 100644 --- a/python_compressed.js +++ b/python_compressed.js @@ -39,7 +39,13 @@ Blockly.Python.controls_for=function(a){var b=Blockly.Python.variableDB_.getName ["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):"," while start <= stop:"," yield start"," start += abs(step)"])},k=function(){return Blockly.Python.provideFunction_("downRange",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):"," while start >= stop:"," yield start"," start -= abs(step)"])};a=function(a,b,c){return"("+a+" <= "+b+") and "+h()+"("+a+", "+b+", "+c+") or "+k()+"("+a+", "+b+", "+c+")"};if(Blockly.isNumber(c)&&Blockly.isNumber(d)&& Blockly.isNumber(e))c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),0===c%1&&0===d%1&&0===e%1?(c<=d?(d++,a=0==c&&1==e?d:c+", "+d,1!=e&&(a+=", "+e)):(d--,a=c+", "+d+", -"+e),a="range("+a+")"):(a=ca?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC]}; +Blockly.Python.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break\n";case "CONTINUE":return"continue\n"}throw"Unknown flow statement.";};Blockly.Python.maps={};Blockly.Python.maps_create_empty=function(a){return["new HashMap()",Blockly.Python.ORDER_ATOMIC]}; +Blockly.Python.maps_create_with=function(a){var b=Blockly.Python.variableDB_.getDistinctName("hashMap",Blockly.Variables.NAME_TYPE),c="HashMap "+b+" = new HashMap();\n";Blockly.Python.addImport("Python.util.HashMap");Blockly.Python.stashStatement(c);for(var d=0;da?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC]}; Blockly.Python.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Python.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Python.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Python.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Python.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Python.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Python.valueToCode(a,"A",b)||"0";a=Blockly.Python.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; Blockly.Python.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Python.ORDER_UNARY_SIGN];Blockly.Python.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_MULTIPLICATIVE)||"0":Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_NONE)||"0";switch(b){case "ABS":c="math.fabs("+a+")";break;case "ROOT":c="math.sqrt("+ a+")";break;case "LN":c="math.log("+a+")";break;case "LOG10":c="math.log10("+a+")";break;case "EXP":c="math.exp("+a+")";break;case "POW10":c="math.pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="math.ceil("+a+")";break;case "ROUNDDOWN":c="math.floor("+a+")";break;case "SIN":c="math.sin("+a+" / 180.0 * math.pi)";break;case "COS":c="math.cos("+a+" / 180.0 * math.pi)";break;case "TAN":c="math.tan("+a+" / 180.0 * math.pi)"}if(c)return[c,Blockly.Python.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c= From 4af9ac06d75f8e93f26e512647b8346e08839c99 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 28 Aug 2015 13:43:16 -0400 Subject: [PATCH 38/84] Fix dragging of variable blocks and Java class names with spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t change the title on the variable blocks until dragging has stopped. Fix generation of app/base class names which are illegal to start with (such as spaces in the app name) --- blocks/variables.js | 5 +++++ blocks_compressed.js | 2 +- generators/java.js | 4 ++-- java_compressed.js | 10 +++++----- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/blocks/variables.js b/blocks/variables.js index d62cafbe2df..401f5231e57 100644 --- a/blocks/variables.js +++ b/blocks/variables.js @@ -379,6 +379,10 @@ Blockly.Blocks['initialize_variable'] = { }, isTopLevel: true, onchange: function() { + if (Blockly.dragMode_ != 0) { + // Don't update blocks around while the user is moving them. + return; + } // Is the block nested in a procedure? var prefix = Blockly.Variables.getLocalContext(this, null); @@ -391,6 +395,7 @@ Blockly.Blocks['initialize_variable'] = { colour = Blockly.Blocks.procedures.HUE; title = Blockly.Msg.INITIALIZE_LOCAL_VARIABLE } + // Update the block with the right color and text this.getInput('VALUE').fieldRow[0].setText(title); if (colour != this.getColour()) { diff --git a/blocks_compressed.js b/blocks_compressed.js index 2dfc7fabba7..e1a62fd1fe9 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -209,6 +209,6 @@ Blockly.Blocks.hash_variables_set={init:function(){this.jsonInit({message0:Block "";this.contextMenuMsg_=Blockly.Msg.VARIABLES_SET_CREATE_GET;this.contextMenuType_="hash_variables_get"},onchange:Blockly.Blocks.hash_variables_get.onchange,getVars:Blockly.Blocks.hash_variables_get.getVars,renameVar:Blockly.Blocks.hash_variables_get.renameVar,getScopeVars:Blockly.Blocks.hash_variables_get.getScopeVars,getVarsTypes:Blockly.Blocks.hash_variables_get.getVarsTypes,renameScopeVar:Blockly.Blocks.hash_variables_get.renameScopeVar,customContextMenu:Blockly.Blocks.hash_variables_get.customContextMenu, typeblock:Blockly.getMsgString("variables_hash_param_set_typeblock")}; Blockly.Blocks.initialize_variable={init:function(){this.jsonInit({message0:Blockly.Msg.INITIALIZE_VARIABLE,args0:[{type:"field_variable",name:"VAR",variable:"Variable"},{type:"field_scopevariable",scope:"Types",name:"TYPE"},{type:"input_value",name:"VALUE",align:"RIGHT"}],inputsInline:!0,previousStatement:null,nextStatement:null,colour:Blockly.Blocks.variables.HUE,tooltip:"",helpUrl:"http://www.example.com/"});this.procedurePrefix_="";var a=this.getField("TYPE");a.setChangeHandler(this.changeType); -a.setMsgEmpty("Any");a.setValue("");this.contextMenuMsg_=Blockly.Msg.VARIABLES_SET_CREATE_GET},isTopLevel:!0,onchange:function(){var a=Blockly.Variables.getLocalContext(this,null),b=Blockly.Msg.INITIALIZE_GLOBAL_VARIABLE,c=Blockly.Blocks.variables.HUE;this.procedurePrefix_="";null!=a&&(this.procedurePrefix_=a,c=Blockly.Blocks.procedures.HUE,b=Blockly.Msg.INITIALIZE_LOCAL_VARIABLE);this.getInput("VALUE").fieldRow[0].setText(b);c!=this.getColour()&&this.setColour(c)},getVars:Blockly.Blocks.variables_get.getVars, +a.setMsgEmpty("Any");a.setValue("");this.contextMenuMsg_=Blockly.Msg.VARIABLES_SET_CREATE_GET},isTopLevel:!0,onchange:function(){if(0==Blockly.dragMode_){var a=Blockly.Variables.getLocalContext(this,null),b=Blockly.Msg.INITIALIZE_GLOBAL_VARIABLE,c=Blockly.Blocks.variables.HUE;this.procedurePrefix_="";null!=a&&(this.procedurePrefix_=a,c=Blockly.Blocks.procedures.HUE,b=Blockly.Msg.INITIALIZE_LOCAL_VARIABLE);this.getInput("VALUE").fieldRow[0].setText(b);c!=this.getColour()&&this.setColour(c)}},getVars:Blockly.Blocks.variables_get.getVars, renameVar:Blockly.Blocks.variables_get.renameVar,changeType:function(a){this.sourceBlock_.getInput("VALUE").setCheck(a)},getScopeVars:function(a){var b=[];"Types"===a&&b.push(this.getFieldValue("TYPE"));return b},getVarsTypes:function(){var a={};a[this.procedurePrefix_+this.getFieldValue("VAR")]=[this.getFieldValue("TYPE")];return a},renameScopeVar:function(a,b,c){"Types"===c&&Blockly.Names.equals(a,this.getFieldValue("TYPE"))&&this.setFieldValue(b,"TYPE")},contextMenuType_:"variables_get",customContextMenu:Blockly.Blocks.variables_get.customContextMenu, typeblock:Blockly.getMsgString("variables_hash_param_set_typeblock")}; \ No newline at end of file diff --git a/generators/java.js b/generators/java.js index e25c0d840e1..e7b57b36c40 100644 --- a/generators/java.js +++ b/generators/java.js @@ -163,7 +163,7 @@ Blockly.Java.setAppName = function(name) { * @return {string} name Name for the application for any generated code */ Blockly.Java.getAppName = function() { - return this.AppName_; + return Blockly.Java.variableDB_.getName(this.AppName_,'CLASS'); } /** @@ -198,7 +198,7 @@ Blockly.Java.setBaseclass = function(baseclass) { * @return {string} baseclass Name of a base class this workspace is derived from */ Blockly.Java.getBaseclass = function() { - return this.Baseclass_; + return Blockly.Java.variableDB_.getName(this.Baseclass_,'CLASS'); } /** diff --git a/java_compressed.js b/java_compressed.js index 0ba81e87c48..90fe93ee6d6 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -6,11 +6,11 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern,equal"); Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.INDENT=" ";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_=""; -Blockly.Java.needImports_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.INLINEVARCLASS=!0;Blockly.Java.classes_=[];Blockly.Java.globals_={};Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return this.Baseclass_}; -Blockly.Java.setGlobalVar=function(a,b,c){null!=Blockly.Variables.getLocalContext(a,b)||"undefined"!==typeof this.globals_[b]&&null!==this.globals_[b]||(this.globals_[b]=c)};Blockly.Java.GetVariableType=function(a){a=this.variableTypes_[a];a||(a="Var",Blockly.Java.provideVarClass());return a};Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a}; -Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): Blockly.Java.addImport("extreme.sdn.client.Var")}; From ab67274f3a8c417c1d630ef0d35f7765f1fd226a Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 31 Aug 2015 08:12:25 -0400 Subject: [PATCH 39/84] Added Dart Implementation of Maps --- generators/dart/maps.js | 159 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 generators/dart/maps.js diff --git a/generators/dart/maps.js b/generators/dart/maps.js new file mode 100644 index 00000000000..130e604b6c0 --- /dev/null +++ b/generators/dart/maps.js @@ -0,0 +1,159 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating Dart for maps blocks. + * @author toebes@extremenetworks.com (John Toebes) + */ +'use strict'; + +goog.provide('Blockly.Dart.maps'); + +goog.require('Blockly.Dart'); + +Blockly.Dart['maps_create_empty'] = function(block) { + // Create an empty list. + return ['{}', Blockly.Dart.ORDER_ATOMIC]; +}; + +Blockly.Dart['maps_create_with'] = function(block) { + var declVar = null; + var code = ''; + var addCode = ''; + + // Create a list with any number of elements of any type. + + var extra = '{'; + for (var n = 0; n < block.itemCount_; n++) { + var inputName = 'ADD' + n; + var inputBlock = block.getInputTargetBlock(inputName); + if (inputBlock) { + if (inputBlock.type === 'maps_create') { + var val = Blockly.Dart.valueToCode(inputBlock, 'VAL', + Blockly.Dart.ORDER_NONE) || 'null'; + var key = Blockly.Dart.valueToCode(inputBlock, 'KEY', + Blockly.Dart.ORDER_NONE) || '""'; + code += extra + key + ': ' + val; + extra = ', '; + } else { + if (!declVar) { + declVar = Blockly.Dart.variableDB_.getDistinctName( + 'map', Blockly.Variables.NAME_TYPE); + if (code != '') { + code = 'var ' + declVar + ' = ' + code + '};\n'; + Blockly.Dart.stashStatement(code); + code = ''; + extra = '{'; + } + } + if (code != '') { + Blockly.Dart.stashStatement(declVar + '.addAll(' + code + '});\n'); + code = ''; + extra = '{'; + } + var itemCode = Blockly.Dart.valueToCode(block, inputName, + Blockly.Dart.ORDER_NONE); + if (itemCode) { + declCode = declVar + '.addAll(' + itemCode + ');\n'; + Blockly.Dart.stashStatement(declCode); + } + } + } + } + if (declVar) { + if (code != '') { + Blockly.Dart.stashStatement(declVar + '.addAll(' + code + '});\n'); + } + code = declVar; + } + return [code, Blockly.Dart.ORDER_ATOMIC]; +}; + +Blockly.Dart['maps_length'] = function(block) { + // List length. + var argument0 = Blockly.Dart.valueToCode(block, 'VALUE', + Blockly.Dart.ORDER_NONE) || '[]'; + } + return [argument0 + '.length()', Blockly.Dart.ORDER_FUNCTION_CALL]; +}; + + +Blockly.Dart['maps_isempty'] = function(block) { + // Is the list empty? + var argument0 = Blockly.Dart.valueToCode(block, 'MAP', + Blockly.Dart.ORDER_NONE) || ''; + var code = argument0 + '.isempty'; + if (argument0 === '') { + code = 'true'; + } + return [code, Blockly.Dart.ORDER_LOGICAL_NOT]; +}; + +Blockly.Dart['maps_create'] = function(block) { + var val = Blockly.Dart.valueToCode(block, 'VAL', + Blockly.Dart.ORDER_NONE) || 'null'; + var key = Blockly.Dart.valueToCode(block, 'KEY', + Blockly.Dart.ORDER_NONE) || '""'; + var code = '{' + key + ': ' + val + '}'; + return [code, Blockly.Dart.ORDER_ATOMIC]; +}; + +Blockly.Dart['maps_getIndex'] = function(block) { + var mode = block.getFieldValue('MODE') || 'GET'; + var key = Blockly.Dart.valueToCode(block, 'KEY', + Blockly.Dart.ORDER_NONE) || '""'; + var map = Blockly.Dart.valueToCode(block, 'MAP', + Blockly.Dart.ORDER_MEMBER) || ''; + + if (mode == 'GET') { + var code = map + '[' + key + ']'; + return [code, Blockly.Dart.ORDER_MEMBER]; + } else { + var code = map + '.remove(' + key + ')'; + if (mode == 'GET_REMOVE') { + return [code, Blockly.Dart.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + return code + ';\n'; + } + } + throw 'Unhandled combination (maps_getIndex).'; +}; + +Blockly.Dart['maps_setIndex'] = function(block) { + // Is the list empty? + var map = Blockly.Dart.valueToCode(block, 'MAP', + Blockly.Dart.ORDER_MEMBER) || '[]'; + var val = Blockly.Dart.valueToCode(block, 'VAL', + Blockly.Dart.ORDER_NONE) || 'null'; + var key = Blockly.Dart.valueToCode(block, 'KEY', + Blockly.Dart.ORDER_NONE) || '""'; + var code = map + '[' + key + '] = '+ val + ';\n'; + return code; +}; + +Blockly.Dart['maps_keys'] = function(block) { + // Is the list empty? + var argument0 = Blockly.Dart.valueToCode(block, 'VALUE', + Blockly.Dart.ORDER_NONE) || '[]'; + var code = argument0 + '.keys()'; + return [code, Blockly.Dart.ORDER_LOGICAL_NOT]; +}; + +Blockly.Dart['controls_forEachKey'] = Blockly.Dart['controls_forEach'] ; From 671c709f9ddb939540a7c988e03effe0d6353f26 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 31 Aug 2015 10:51:19 -0400 Subject: [PATCH 40/84] Added typeIndicator.js from Hendrik Diel --- core/typeIndicator.js | 179 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 core/typeIndicator.js diff --git a/core/typeIndicator.js b/core/typeIndicator.js new file mode 100644 index 00000000000..c6934e14b56 --- /dev/null +++ b/core/typeIndicator.js @@ -0,0 +1,179 @@ +/** + @license + Copyright 2015 Hendrik Diel + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + @fileoverview + This file adds a indicator to all connections that shows if a dragging block is type compatible + + @author + diel.hendrik@gmail.com (Hendrik Diel) +*/ + +(function() { + + // keep in mind if we are dragging right now + var draggingWorkspace = null; + + /** + * This Event is beeing called when a block is droped. We then need to remove all + * type indicators from the workspace. + * @return {undefined} + */ + // Store google's terminateDrag in a variable so we can expand it. + var oldTerminateDrag_ = Blockly.BlockSvg.terminateDrag_; + Blockly.BlockSvg.terminateDrag_ = function() { + // Only if the user was + if (draggingWorkspace) { + // Go through all the blocks + var allBlocks = draggingWorkspace.getAllBlocks(); + allBlocks.forEach(function(otherBlock) { + // And all their visible connections + var otherConnections = otherBlock.getConnections_(false); + otherConnections.forEach(function(otherConn) { + // remove the type highlight if it has one + if (otherConn.typeHighlightSvgPath) { + goog.dom.removeNode(otherConn.typeHighlightSvgPath); + delete otherConn.typeHighlightSvgPath; + otherConn.typeHighlightSvgPath = false; + } + }); + }); + //now theres no workspace in which the user is dragging + draggingWorkspace = null; + } + // call the original terminateDrag_ so it can do its job + oldTerminateDrag_(); + }; + + /** + * Creates the indicators on the first mouse move of an drag since all the + * blocks have moved then we dont need to worry about moving the indicators + * along with the blocks. + * @type {undefined} + */ + //save old onMouseMove_() for later call + var oldOnMouseMove_ = Blockly.BlockSvg.prototype.onMouseMove_; + Blockly.BlockSvg.prototype.onMouseMove_ = function(e) { + var this_ = this; // we need to dave the this context so the command beeing created can access it + Blockly.doCommand(function() { + if (Blockly.dragMode_ == 2 && !draggingWorkspace) { // Only on first drag move + draggingWorkspace = this_.workspace; + // If this is a Value block we need to check the outputConnection, + // otherwise its a statement connection so we need the previousConnection + // or a block without relevant conenctions at all. + var typ = "dummy"; + var outCon = null; + if (this_.outputConnection) { + outCon = this_.outputConnection; + typ = "input"; + } else if (this_.previousConnection) { + outCon = this_.previousConnection; + typ = "statement"; + } + if (outCon) { + // To get all potential connections by looking up the opposite type + // and geting all connections of that type from the workspace + var oppositeType = Blockly.OPPOSITE_TYPE[outCon.type]; + var cons = draggingWorkspace.connectionDBList[oppositeType]; + + cons.forEach(function(otherConn) { + if (outCon.checkType_(otherConn) && // type must match + !otherConn.typeHighlightSvgPath && // only highlight if not already highlighted + !this_.isParentOf(otherConn.sourceBlock_) // don't highlight childblocks + ) { + // Add the highlight and save the node so we can remove it later + if (((typ == "statement") || (typ == "input") && !(otherConn.targetConnection))) + otherConn.typeHighlightSvgPath = otherConn.typeHighlight(); + else + otherConn.typeHighlightSvgPath = otherConn.typeHighlight('blocklyOccupiedTypeHighlightedConnectionPath'); + } + }); + } + } + }); + // Call googles onMouseMove_() so it can do the rest + oldOnMouseMove_.call(this, e); + }; + + /** + * Creates the svg path for a highlight on a connection + * @return {SvgElement} the created path + */ + Blockly.Connection.prototype.typeHighlight = function(type) { + if (typeof type === 'undefined') + type = 'blocklyTypeHighlightedConnectionPath'; + var steps; + if (this.type == Blockly.INPUT_VALUE || this.type == Blockly.OUTPUT_VALUE) { + var tabWidth = this.sourceBlock_.RTL ? -Blockly.BlockSvg.TAB_WIDTH : + Blockly.BlockSvg.TAB_WIDTH; + steps = 'm 0,0 v 5 c 0,10 ' + -tabWidth + ',-8 ' + -tabWidth + ',7.5 s ' + + tabWidth + ',-2.5 ' + tabWidth + ',7.5 v 5'; + } else { + if (this.sourceBlock_.RTL) { + steps = 'm 20,0 h -5 ' + Blockly.BlockSvg.NOTCH_PATH_RIGHT + ' h -5'; + } else { + steps = 'm -20,0 h 5 ' + Blockly.BlockSvg.NOTCH_PATH_LEFT + ' h 5'; + } + } + var xy = this.sourceBlock_.getRelativeToSurfaceXY(); + var x = this.x_ - xy.x; + var y = this.y_ - xy.y; + + return Blockly.createSvgElement('path', { + 'class': type, + 'd': steps, + transform: 'translate(' + x + ', ' + y + ')' + }, + this.sourceBlock_.getSvgRoot() + ); + }; + + /** + * Checks if the given block is a child of this block + * @param {Block} block + * @return {Boolean} true if block is a child of this or equals this. false otherwise + */ + Blockly.Block.prototype.isParentOf = function(block) { + if (block === null || block.parentBlock_ === undefined) + return false; + if (this === block) + return true; + else + return this.isParentOf(block.parentBlock_); + }; + + // Add some styling to the type indicator + Blockly.Css.CONTENT.push( + '.blocklyTypeHighlightedConnectionPath {', + ' fill: none;', + ' stroke: #fc3;', + ' stroke-width: 4px;', + '}'); + + // Add some styling to the occupied type indicator + Blockly.Css.CONTENT.push( + '.blocklyOccupiedTypeHighlightedConnectionPath {', + ' fill: none;', + ' stroke: #fd4;', + ' stroke-width: 2px;', + ' opacity: 0.6;', + '}'); + + // Change googles indicator color + Blockly.Css.CONTENT.push( + '.blocklyHighlightedConnectionPath {', + ' stroke: #5F6;', + '}'); +})(); \ No newline at end of file From 86562893ed2eae4955e19fd4bc149971f6a4e8c6 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Tue, 1 Sep 2015 07:26:48 -0400 Subject: [PATCH 41/84] Basic recompile. No change --- blockly_compressed.js | 2 +- blockly_uncompressed.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 4cb7cb3fb7f..010558f2d5e 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1507,7 +1507,7 @@ Blockly.fireUiEventNow=function(a,b){var c=Blockly.fireUiEvent.DB_[b];if(c){var Blockly.fireUiEvent=function(a,b){var c=Blockly.fireUiEvent.DB_[b];if(c){if(-1!=c.indexOf(a))return;c.push(a)}else Blockly.fireUiEvent.DB_[b]=[a];setTimeout(function(){Blockly.fireUiEventNow(a,b)},0)};Blockly.fireUiEvent.DB_={};Blockly.noEvent=function(a){a.preventDefault();a.stopPropagation()}; Blockly.isTargetInput_=function(a){return"textarea"==a.target.type||"text"==a.target.type||"number"==a.target.type||"email"==a.target.type||"password"==a.target.type||"search"==a.target.type||"tel"==a.target.type||"url"==a.target.type||a.target.isContentEditable}; Blockly.getRelativeXY_=function(a){var b={x:0,y:0},c=a.getAttribute("x");c&&(b.x=parseInt(c,10));if(c=a.getAttribute("y"))b.y=parseInt(c,10);if(a=(a=a.getAttribute("transform"))&&a.match(Blockly.getRelativeXY_.XY_REGEXP_))b.x+=parseFloat(a[1]),a[3]&&(b.y+=parseFloat(a[3]));return b};Blockly.getRelativeXY_.XY_REGEXP_=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*\))?/; -Blockly.getSvgXY_=function(a,b){var c=0,d=0,e=!goog.dom.contains(b.getCanvas(),a)&&!goog.dom.contains(b.getBubbleCanvas(),a);do{var f=Blockly.getRelativeXY_(a);if(a==b.getCanvas()||a==b.getBubbleCanvas())e=!0;e?(c+=f.x,d+=f.y):(c+=f.x*b.scale,d+=f.y*b.scale);a=a.parentNode}while(a&&a!=b.options.svg);return{x:c,y:d}}; +Blockly.getSvgXY_=function(a,b){var c=0,d=0,e=goog.dom.contains(b.getCanvas(),a)||goog.dom.contains(b.getBubbleCanvas(),a);do{var f=Blockly.getRelativeXY_(a);if(a==b.getCanvas()||a==b.getBubbleCanvas())e=!1;e?(c+=f.x*b.scale,d+=f.y*b.scale):(c+=f.x,d+=f.y);a=a.parentNode}while(a&&a!=b.options.svg);return new goog.math.Coordinate(c,d)}; Blockly.createSvgElement=function(a,b,c,d){a=document.createElementNS(Blockly.SVG_NS,a);for(var e in b)a.setAttribute(e,b[e]);document.body.runtimeStyle&&(a.runtimeStyle=a.currentStyle=a.style);c&&c.appendChild(a);return a};Blockly.removeAllRanges=function(){window.getSelection&&setTimeout(function(){try{var a=window.getSelection();a.isCollapsed||a.removeAllRanges()}catch(b){}},0)};Blockly.isRightButton=function(a){return a.ctrlKey&&goog.userAgent.MAC?!0:2==a.button}; Blockly.mouseToSvg=function(a,b){var c=b.createSVGPoint();c.x=a.clientX;c.y=a.clientY;var d=b.getScreenCTM(),d=d.inverse();return c.matrixTransform(d)};Blockly.shortestStringLength=function(a){if(!a.length)return 0;for(var b=a[0].length,c=1;c Date: Tue, 1 Sep 2015 10:11:17 -0400 Subject: [PATCH 42/84] Fix indentation for loops to use Blocky.Java.Indent --- generators/java/loops.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generators/java/loops.js b/generators/java/loops.js index 06e824a3313..2719d979fc7 100644 --- a/generators/java/loops.js +++ b/generators/java/loops.js @@ -171,16 +171,16 @@ Blockly.Java['controls_for'] = function(block) { code += '}\n'; if (variable0Type === 'Var') { code += 'for (' + variable0 + '.setObject(' + startVar + ');\n' + - ' ' + incVar + ' >= 0 ? ' + + Blockly.Java.INDENT + incVar + ' >= 0 ? ' + variable0 + '.getObjectAsDouble() <= ' + endVar + ' : ' + variable0 + '.getObjectAsDouble() >= ' + endVar + ';\n' + variable0 + '.incrementObject(' + incVar + ')) '; } else { code += 'for (' + variable0 + ' = ' + startVar + ';\n' + - ' ' + incVar + ' >= 0 ? ' + + Blockly.Java.INDENT + incVar + ' >= 0 ? ' + variable0 + ' <= ' + endVar + ' : ' + variable0 + ' >= ' + endVar + ';\n' + - ' ' + variable0 + ' += ' + incVar + ')'; + Blockly.Java.INDENT + variable0 + ' += ' + incVar + ')'; } } code += ' {\n' + @@ -212,7 +212,7 @@ Blockly.Java['controls_forEach'] = function(block) { Blockly.Java.addImport('java.util.Iterator'); var code = 'for (Iterator ' + loopVar + ' = ' + argument0 + '.iterator(); ' + loopVar + '.hasNext();) {\n'+ - ' ' + setvar0 + ';\n' + Blockly.Java.INDENT + setvar0 + ';\n' + branch + '} // end for\n'; return code; }; From 081af753315f1e7c98e07991c0a28e30d5e8d19a Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Wed, 2 Sep 2015 07:58:04 -0400 Subject: [PATCH 43/84] Basic recompile. Fix syntax error on dart/maps.js --- blockly_compressed.js | 35 ++++++++++++++++++----------------- generators/dart/maps.js | 1 - java_compressed.js | 6 +++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 010558f2d5e..61092d36885 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1097,22 +1097,22 @@ Blockly.Scrollbar.prototype.onMouseMoveKnob_=function(a){this.svgKnob_.setAttrib Blockly.Scrollbar.prototype.onMouseUpKnob_=function(){Blockly.removeAllRanges();Blockly.hideChaff(!0);Blockly.Scrollbar.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseUpWrapper_),Blockly.Scrollbar.onMouseUpWrapper_=null);Blockly.Scrollbar.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Scrollbar.onMouseMoveWrapper_),Blockly.Scrollbar.onMouseMoveWrapper_=null)}; Blockly.Scrollbar.prototype.constrainKnob_=function(a){if(0>=a||isNaN(a))a=0;else{var b=this.horizontal_?"width":"height",c=parseFloat(this.svgBackground_.getAttribute(b)),b=parseFloat(this.svgKnob_.getAttribute(b));a=Math.min(a,c-b)}return a}; Blockly.Scrollbar.prototype.onScroll_=function(){var a=parseFloat(this.svgKnob_.getAttribute(this.horizontal_?"x":"y")),b=parseFloat(this.svgBackground_.getAttribute(this.horizontal_?"width":"height")),a=a/b;isNaN(a)&&(a=0);b={};this.horizontal_?b.x=a:b.y=a;this.workspace_.setMetrics(b)};Blockly.Scrollbar.prototype.set=function(a){this.svgKnob_.setAttribute(this.horizontal_?"x":"y",a*this.ratio_);this.onScroll_()}; -Blockly.Scrollbar.insertAfter_=function(a,b){var c=b.nextSibling,d=b.parentNode;if(!d)throw"Reference node has no parent.";c?d.insertBefore(a,c):d.appendChild(a)};Blockly.Trashcan=function(a){this.workspace_=a};Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=45;Blockly.Trashcan.prototype.LID_HEIGHT_=15;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=35;Blockly.Trashcan.prototype.MARGIN_SIDE_=35;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=25;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.svgGroup_=null;Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0; +Blockly.Scrollbar.insertAfter_=function(a,b){var c=b.nextSibling,d=b.parentNode;if(!d)throw"Reference node has no parent.";c?d.insertBefore(a,c):d.appendChild(a)};Blockly.Trashcan=function(a){this.workspace_=a};Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=45;Blockly.Trashcan.prototype.LID_HEIGHT_=15;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20;Blockly.Trashcan.prototype.MARGIN_SIDE_=20;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=25;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.svgGroup_=null;Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0; Blockly.Trashcan.prototype.left_=0;Blockly.Trashcan.prototype.top_=0; Blockly.Trashcan.prototype.createDom=function(){this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyTrash"},null);var a=String(Math.random()).substring(2),b=Blockly.createSvgElement("clipPath",{id:"blocklyTrashBodyClipPath"+a},this.svgGroup_);Blockly.createSvgElement("rect",{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},b);Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-32,"clip-path":"url(#blocklyTrashBodyClipPath"+a+")"},this.svgGroup_).setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);b=Blockly.createSvgElement("clipPath",{id:"blocklyTrashLidClipPath"+a},this.svgGroup_);Blockly.createSvgElement("rect",{width:this.WIDTH_,height:this.LID_HEIGHT_},b);this.svgLid_=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-32,"clip-path":"url(#blocklyTrashLidClipPath"+a+")"},this.svgGroup_);this.svgLid_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.workspace_.options.pathToMedia+ -Blockly.SPRITE.url);this.animateLid_();return this.svgGroup_};Blockly.Trashcan.prototype.init=function(){this.setOpen_(!1)};Blockly.Trashcan.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=this.svgLid_=null;goog.Timer.clear(this.lidTask_)}; -Blockly.Trashcan.prototype.position=function(){var a=this.workspace_.getMetrics();a&&(this.left_=this.workspace_.RTL?this.MARGIN_SIDE_:a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_,this.top_=a.viewHeight+a.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-this.MARGIN_BOTTOM_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}; +Blockly.SPRITE.url);this.animateLid_();return this.svgGroup_};Blockly.Trashcan.prototype.init=function(a){this.bottom_=this.MARGIN_BOTTOM_+a;this.setOpen_(!1);return this.bottom_+this.BODY_HEIGHT_+this.LID_HEIGHT_};Blockly.Trashcan.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=this.svgLid_=null;goog.Timer.clear(this.lidTask_)}; +Blockly.Trashcan.prototype.position=function(){var a=this.workspace_.getMetrics();a&&(this.left_=this.workspace_.RTL?this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness:a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,this.top_=a.viewHeight+a.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-this.bottom_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}; Blockly.Trashcan.prototype.getRect=function(){var a=Blockly.getSvgXY_(this.svgGroup_,this.workspace_);return new goog.math.Rect(a.x-this.MARGIN_HOTSPOT_,a.y-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.BODY_HEIGHT_+this.LID_HEIGHT_+2*this.MARGIN_HOTSPOT_)};Blockly.Trashcan.prototype.setOpen_=function(a){this.isOpen!=a&&(goog.Timer.clear(this.lidTask_),this.isOpen=a,this.animateLid_())}; Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2;this.lidOpen_=goog.math.clamp(this.lidOpen_,0,1);var a=45*this.lidOpen_;this.svgLid_.setAttribute("transform","rotate("+(this.workspace_.RTL?-a:a)+","+(this.workspace_.RTL?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")");a=goog.math.lerp(.4,.8,this.lidOpen_);this.svgGroup_.style.opacity=a;0this.lidOpen_&&(this.lidTask_=goog.Timer.callOnce(this.animateLid_,20,this))}; Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)}; // Copyright 2015 Google Inc. Apache License 2.0 -Blockly.ZoomControls=function(a){this.workspace_=a};Blockly.ZoomControls.prototype.WIDTH_=32;Blockly.ZoomControls.prototype.HEIGHT_=110;Blockly.ZoomControls.prototype.MARGIN_BOTTOM_=100;Blockly.ZoomControls.prototype.MARGIN_SIDE_=35;Blockly.ZoomControls.prototype.svgGroup_=null;Blockly.ZoomControls.prototype.left_=0;Blockly.ZoomControls.prototype.top_=0; +Blockly.ZoomControls=function(a){this.workspace_=a};Blockly.ZoomControls.prototype.WIDTH_=32;Blockly.ZoomControls.prototype.HEIGHT_=110;Blockly.ZoomControls.prototype.MARGIN_BOTTOM_=20;Blockly.ZoomControls.prototype.MARGIN_SIDE_=20;Blockly.ZoomControls.prototype.svgGroup_=null;Blockly.ZoomControls.prototype.left_=0;Blockly.ZoomControls.prototype.top_=0; Blockly.ZoomControls.prototype.createDom=function(){var a=this.workspace_;this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyZoom"},null);var b=String(Math.random()).substring(2),c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomoutClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:77},c);var d=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-64,y:-15,"clip-path":"url(#blocklyZoomoutClipPath"+b+")"},this.svgGroup_); d.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoominClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32,y:43},c);var e=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-32,y:-49,"clip-path":"url(#blocklyZoominClipPath"+b+")"},this.svgGroup_);e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+ Blockly.SPRITE.url);c=Blockly.createSvgElement("clipPath",{id:"blocklyZoomresetClipPath"+b},this.svgGroup_);Blockly.createSvgElement("rect",{width:32,height:32},c);b=Blockly.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+b+")"},this.svgGroup_);b.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEvent_(b,"mousedown",a,a.zoomReset);Blockly.bindEvent_(e, -"mousedown",null,function(){a.zoomCenter(1)});Blockly.bindEvent_(d,"mousedown",null,function(){a.zoomCenter(-1)});return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(){};Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=null}; -Blockly.ZoomControls.prototype.position=function(){var a=this.workspace_.getMetrics();a&&(this.left_=this.workspace_.RTL?this.MARGIN_SIDE_:a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_,this.top_=a.viewHeight+a.absoluteTop-this.HEIGHT_-this.MARGIN_BOTTOM_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))};Blockly.Xml={};Blockly.Xml.workspaceToDom=function(a){var b;a.RTL&&(b=a.getWidth());for(var c=goog.dom.createDom("xml"),d=a.getTopBlocks(!0),e=0,f;f=d[e];e++){var g=Blockly.Xml.blockToDom_(f);f=f.getRelativeToSurfaceXY();g.setAttribute("x",Math.round(a.RTL?b-f.x:f.x));g.setAttribute("y",Math.round(f.y));c.appendChild(g)}return c}; +"mousedown",null,function(){a.zoomCenter(1)});Blockly.bindEvent_(d,"mousedown",null,function(){a.zoomCenter(-1)});return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(a){this.bottom_=this.MARGIN_BOTTOM_+a;return this.bottom_+this.HEIGHT_};Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=null}; +Blockly.ZoomControls.prototype.position=function(){var a=this.workspace_.getMetrics();a&&(this.left_=this.workspace_.RTL?this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness:a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,this.top_=a.viewHeight+a.absoluteTop-this.HEIGHT_-this.bottom_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))};Blockly.Xml={};Blockly.Xml.workspaceToDom=function(a){var b;a.RTL&&(b=a.getWidth());for(var c=goog.dom.createDom("xml"),d=a.getTopBlocks(!0),e=0,f;f=d[e];e++){var g=Blockly.Xml.blockToDom_(f);f=f.getRelativeToSurfaceXY();g.setAttribute("x",Math.round(a.RTL?b-f.x:f.x));g.setAttribute("y",Math.round(f.y));c.appendChild(g)}return c}; Blockly.Xml.blockToDom_=function(a){var b=goog.dom.createDom("block");b.setAttribute("type",a.type);Blockly.Realtime.isEnabled()&&b.setAttribute("id",a.id);if(a.mutationToDom){var c=a.mutationToDom();c&&(c.hasChildNodes()||c.hasAttributes())&&b.appendChild(c)}for(var c=0,d;d=a.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)if(f.name&&f.SERIALIZABLE){var g=goog.dom.createDom("field",null,f.getValue());g.setAttribute("name",f.name);b.appendChild(g)}if(c=a.getCommentText())c=goog.dom.createDom("comment", null,c),"object"==typeof a.comment&&(c.setAttribute("pinned",a.comment.isVisible()),d=a.comment.getBubbleSize(),c.setAttribute("h",d.height),c.setAttribute("w",d.width)),b.appendChild(c);a.data&&(c=goog.dom.createDom("data",null,a.data),b.appendChild(c));for(c=0;d=a.inputList[c];c++){var h,e=!0;d.type!=Blockly.DUMMY_INPUT&&(f=d.connection.targetBlock(),d.type==Blockly.INPUT_VALUE?h=goog.dom.createDom("value"):d.type==Blockly.NEXT_STATEMENT&&(h=goog.dom.createDom("statement")),f&&(h.appendChild(Blockly.Xml.blockToDom_(f)), e=!1),h.setAttribute("name",d.name),e||b.appendChild(h))}a.inputsInlineDefault!=a.inputsInline&&b.setAttribute("inline",a.inputsInline);a.isCollapsed()&&b.setAttribute("collapsed",!0);a.disabled&&b.setAttribute("disabled",!0);a.isDeletable()||b.setAttribute("deletable",!1);a.isMovable()||b.setAttribute("movable",!1);a.isEditable()||b.setAttribute("editable",!1);if(a=a.getNextBlock())h=goog.dom.createDom("next",null,Blockly.Xml.blockToDom_(a)),b.appendChild(h);return b};Blockly.Xml.domToText=function(a){return(new XMLSerializer).serializeToString(a)}; @@ -1130,10 +1130,10 @@ goog.global.Blockly.Xml.domToWorkspace=Blockly.Xml.domToWorkspace;goog.global.Bl Blockly.WorkspaceSvg=function(a){Blockly.WorkspaceSvg.superClass_.constructor.call(this,a);this.getMetrics=a.getMetrics;this.setMetrics=a.setMetrics;Blockly.ConnectionDB.init(this);this.SOUNDS_=Object.create(null);this.eventWrappers_=[]};goog.inherits(Blockly.WorkspaceSvg,Blockly.Workspace);Blockly.WorkspaceSvg.prototype.rendered=!0;Blockly.WorkspaceSvg.prototype.isFlyout=!1;Blockly.WorkspaceSvg.prototype.isScrolling=!1;Blockly.WorkspaceSvg.prototype.scrollX=0; Blockly.WorkspaceSvg.prototype.scrollY=0;Blockly.WorkspaceSvg.prototype.dragDeltaX_=0;Blockly.WorkspaceSvg.prototype.dragDeltaY_=0;Blockly.WorkspaceSvg.prototype.scale=1;Blockly.WorkspaceSvg.prototype.trashcan=null;Blockly.WorkspaceSvg.prototype.scrollbar=null; Blockly.WorkspaceSvg.prototype.createDom=function(a){this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyWorkspace"},null);a&&(this.svgBackground_=Blockly.createSvgElement("rect",{height:"100%",width:"100%","class":a},this.svgGroup_),"blocklyMainBackground"==a&&(this.svgBackground_.style.fill="url(#"+this.options.gridPattern.id+")"));this.svgBlockCanvas_=Blockly.createSvgElement("g",{"class":"blocklyBlockCanvas"},this.svgGroup_,this);this.svgBubbleCanvas_=Blockly.createSvgElement("g",{"class":"blocklyBubbleCanvas"}, -this.svgGroup_,this);this.options.hasTrashcan&&this.addTrashcan_();this.options.zoomOptions&&this.options.zoomOptions.controls&&this.addZoomControls_();Blockly.bindEvent_(this.svgGroup_,"mousedown",this,this.onMouseDown_);var b=this;Blockly.bindEvent_(this.svgGroup_,"touchstart",null,function(a){Blockly.longStart_(a,b)});this.options.zoomOptions&&this.options.zoomOptions.wheel&&Blockly.bindEvent_(this.svgGroup_,"wheel",this,this.onMouseWheel_);this.options.hasCategories?this.toolbox_=new Blockly.Toolbox(this): -this.options.languageTree&&this.addFlyout_();this.updateGridPattern_();return this.svgGroup_}; +this.svgGroup_,this);a=Blockly.Scrollbar.scrollbarThickness;this.options.hasTrashcan&&(a=this.addTrashcan_(a));this.options.zoomOptions&&this.options.zoomOptions.controls&&(a=this.addZoomControls_(a));Blockly.bindEvent_(this.svgGroup_,"mousedown",this,this.onMouseDown_);var b=this;Blockly.bindEvent_(this.svgGroup_,"touchstart",null,function(a){Blockly.longStart_(a,b)});this.options.zoomOptions&&this.options.zoomOptions.wheel&&Blockly.bindEvent_(this.svgGroup_,"wheel",this,this.onMouseWheel_);this.options.hasCategories? +this.toolbox_=new Blockly.Toolbox(this):this.options.languageTree&&this.addFlyout_();this.updateGridPattern_();return this.svgGroup_}; Blockly.WorkspaceSvg.prototype.dispose=function(){this.rendered=!1;Blockly.unbindEvent_(this.eventWrappers_);Blockly.WorkspaceSvg.superClass_.dispose.call(this);this.svgGroup_&&(goog.dom.removeNode(this.svgGroup_),this.svgGroup_=null);this.svgBubbleCanvas_=this.svgBlockCanvas_=null;this.flyout_&&(this.flyout_.dispose(),this.flyout_=null);this.trashcan&&(this.trashcan.dispose(),this.trashcan=null);this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=null);this.zoomControls_&&(this.zoomControls_.dispose(), -this.zoomControls_=null);this.options.parentWorkspace||goog.dom.removeNode(this.options.svg)};Blockly.WorkspaceSvg.prototype.addTrashcan_=function(){this.trashcan=new Blockly.Trashcan(this);var a=this.trashcan.createDom();this.svgGroup_.insertBefore(a,this.svgBlockCanvas_);this.trashcan.init()};Blockly.WorkspaceSvg.prototype.addZoomControls_=function(){this.zoomControls_=new Blockly.ZoomControls(this);var a=this.zoomControls_.createDom();this.svgGroup_.appendChild(a);this.zoomControls_.init()}; +this.zoomControls_=null);this.options.parentWorkspace||goog.dom.removeNode(this.options.svg)};Blockly.WorkspaceSvg.prototype.addTrashcan_=function(a){this.trashcan=new Blockly.Trashcan(this);var b=this.trashcan.createDom();this.svgGroup_.insertBefore(b,this.svgBlockCanvas_);return this.trashcan.init(a)};Blockly.WorkspaceSvg.prototype.addZoomControls_=function(a){this.zoomControls_=new Blockly.ZoomControls(this);var b=this.zoomControls_.createDom();this.svgGroup_.appendChild(b);return this.zoomControls_.init(a)}; Blockly.WorkspaceSvg.prototype.addFlyout_=function(){this.flyout_=new Blockly.Flyout({parentWorkspace:this,RTL:this.RTL});this.flyout_.autoClose=!1;var a=this.flyout_.createDom();this.svgGroup_.insertBefore(a,this.svgBlockCanvas_)};Blockly.WorkspaceSvg.prototype.resize=function(){this.toolbox_&&this.toolbox_.position();this.flyout_&&this.flyout_.position();this.trashcan&&this.trashcan.position();this.zoomControls_&&this.zoomControls_.position();this.scrollbar&&this.scrollbar.resize()}; Blockly.WorkspaceSvg.prototype.getCanvas=function(){return this.svgBlockCanvas_};Blockly.WorkspaceSvg.prototype.getBubbleCanvas=function(){return this.svgBubbleCanvas_};Blockly.WorkspaceSvg.prototype.translate=function(a,b){var c="translate("+a+","+b+")scale("+this.scale+")";this.svgBlockCanvas_.setAttribute("transform",c);this.svgBubbleCanvas_.setAttribute("transform",c)}; Blockly.WorkspaceSvg.prototype.addTopBlock=function(a){Blockly.WorkspaceSvg.superClass_.addTopBlock.call(this,a);Blockly.Realtime.isEnabled()&&!this.options.parentWorkspace&&Blockly.Realtime.addTopBlock(a)};Blockly.WorkspaceSvg.prototype.removeTopBlock=function(a){Blockly.WorkspaceSvg.superClass_.removeTopBlock.call(this,a);Blockly.Realtime.isEnabled()&&!this.options.parentWorkspace&&Blockly.Realtime.removeTopBlock(a)};Blockly.WorkspaceSvg.prototype.getWidth=function(){return this.getMetrics().viewWidth}; @@ -1146,7 +1146,7 @@ Blockly.WorkspaceSvg.prototype.isDeleteArea=function(a){a=Blockly.mouseToSvg(a,B Blockly.WorkspaceSvg.prototype.onMouseDown_=function(a){Blockly.latestClick={x:a.clientX,y:a.clientY};this.markFocused();Blockly.isTargetInput_(a)||(Blockly.svgResize(this),Blockly.terminateDrag_(),Blockly.hideChaff(),a.target&&a.target.nodeName&&("svg"==a.target.nodeName.toLowerCase()||a.target==this.svgBackground_)&&Blockly.selected&&!this.options.readOnly&&Blockly.selected.unselect(),Blockly.isRightButton(a)?this.showContextMenu_(a):this.scrollbar&&(Blockly.removeAllRanges(),this.isScrolling=!0, this.startDragMouseX=a.clientX,this.startDragMouseY=a.clientY,this.startDragMetrics=this.getMetrics(),this.startScrollX=this.scrollX,this.startScrollY=this.scrollY,"mouseup"in Blockly.bindEvent_.TOUCH_MAP&&(Blockly.onTouchUpWrapper_=Blockly.bindEvent_(document,"mouseup",null,Blockly.onMouseUp_)),Blockly.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",null,Blockly.onMouseMove_)),a.stopPropagation())}; Blockly.WorkspaceSvg.prototype.startDrag=function(a,b,c){a=Blockly.mouseToSvg(a,this.options.svg);a.x/=this.scale;a.y/=this.scale;this.dragDeltaX_=b-a.x;this.dragDeltaY_=c-a.y};Blockly.WorkspaceSvg.prototype.moveDrag=function(a){a=Blockly.mouseToSvg(a,this.options.svg);a.x/=this.scale;a.y/=this.scale;return new goog.math.Coordinate(this.dragDeltaX_+a.x,this.dragDeltaY_+a.y)}; -Blockly.WorkspaceSvg.prototype.onMouseWheel_=function(a){Blockly.hideChaff(!0);Blockly.terminateDrag_();var b=0this.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale:d=a.clientX&&0==a.clientY&&0==a.button)a.stopPropagation();else{Blockly.removeAllRanges();var b=a.clientX-Blockly.Flyout.startDownEvent_.clientX;a=a.clientY-Blockly.Flyout.startDownEvent_.clientY;Math.sqrt(b*b+a*a)>Blockly.DRAG_RADIUS&&Blockly.Flyout.startFlyout_.createBlockFunc_(Blockly.Flyout.startBlock_)(Blockly.Flyout.startDownEvent_)}}; -Blockly.Flyout.prototype.createBlockFunc_=function(a){var b=this,c=this.targetWorkspace_;return function(d){if(!Blockly.isRightButton(d)&&!a.disabled){var e=Blockly.Xml.blockToDom_(a),e=Blockly.Xml.domToBlock(c,e),f=a.getSvgRoot();if(!f)throw"originBlock is not rendered.";var f=Blockly.getSvgXY_(f,c),g=e.getSvgRoot();if(!g)throw"block is not rendered.";if(1==c.scale){var h=Blockly.getSvgXY_(g,c);e.moveBy(f.x-h.x,f.y-h.y)}else{var k=Blockly.mouseToSvg(d,c.options.svg),h=k.x-f.x,k=k.y-f.y;f.x/=c.scale; -f.y/=c.scale;var l=Blockly.getRelativeXY_(c.getCanvas()),g=Blockly.getRelativeXY_(g);e.moveBy(f.x-(l.x/c.scale+g.x)-(h-h/c.scale),f.y-(l.y/c.scale+g.y)-(k-k/c.scale))}b.autoClose?b.hide():b.filterForCapacity_();e.onMouseDown_(d)}}};Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.targetWorkspace_.remainingCapacity(),b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++){var e=d.getDescendants().length>a;d.setDisabled(e)}}; +Blockly.Flyout.prototype.createBlockFunc_=function(a){var b=this,c=this.targetWorkspace_;return function(d){if(!Blockly.isRightButton(d)&&!a.disabled){var e=Blockly.Xml.blockToDom_(a),e=Blockly.Xml.domToBlock(c,e),f=a.getSvgRoot();if(!f)throw"originBlock is not rendered.";f=Blockly.getSvgXY_(f,c);if(b.RTL){var g=c.getMetrics().viewWidth-b.width_;f.x+=g/c.scale-g}else f.x+=b.workspace_.scrollX/b.workspace_.scale-b.workspace_.scrollX;f.y+=b.workspace_.scrollY/b.workspace_.scale-b.workspace_.scrollY; +g=e.getSvgRoot();if(!g)throw"block is not rendered.";g=Blockly.getSvgXY_(g,c);g.x+=c.scrollX/c.scale-c.scrollX;g.y+=c.scrollY/c.scale-c.scrollY;e.moveBy(f.x-g.x,f.y-g.y);b.autoClose?b.hide():b.filterForCapacity_();e.onMouseDown_(d)}}};Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.targetWorkspace_.remainingCapacity(),b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++){var e=d.getDescendants().length>a;d.setDisabled(e)}}; Blockly.Flyout.prototype.getRect=function(){var a=Blockly.mainWorkspace,b=Blockly.getSvgXY_(this.svgGroup_,a).x;this.RTL||(b-=1E9);return new goog.math.Rect(b,-1E9,1E9+this.width_*(this.targetWorkspace_==a?1:a.scale),2E9)}; Blockly.Flyout.terminateDrag_=function(){Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_),Blockly.Flyout.onMouseUpWrapper_=null);Blockly.Flyout.onMouseMoveBlockWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveBlockWrapper_),Blockly.Flyout.onMouseMoveBlockWrapper_=null);Blockly.Flyout.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveWrapper_),Blockly.Flyout.onMouseMoveWrapper_=null);Blockly.Flyout.onMouseUpWrapper_&&(Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_), Blockly.Flyout.onMouseUpWrapper_=null);Blockly.Flyout.startDownEvent_=null;Blockly.Flyout.startBlock_=null;Blockly.Flyout.startFlyout_=null};Blockly.Toolbox=function(a){this.workspace_=a};Blockly.Toolbox.prototype.width=0;Blockly.Toolbox.prototype.selectedOption_=null;Blockly.Toolbox.prototype.lastCategory_=null;Blockly.Toolbox.prototype.CONFIG_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"}; @@ -1506,8 +1507,8 @@ Blockly.bindEvent_.TOUCH_MAP={};goog.events.BrowserFeature.TOUCH_ENABLED&&(Block Blockly.fireUiEventNow=function(a,b){var c=Blockly.fireUiEvent.DB_[b];if(c){var d=c.indexOf(a);-1!=d&&c.splice(d,1)}if(document.createEvent)c=document.createEvent("UIEvents"),c.initEvent(b,!0,!0),a.dispatchEvent(c);else if(document.createEventObject)c=document.createEventObject(),a.fireEvent("on"+b,c);else throw"FireEvent: No event creation mechanism.";}; Blockly.fireUiEvent=function(a,b){var c=Blockly.fireUiEvent.DB_[b];if(c){if(-1!=c.indexOf(a))return;c.push(a)}else Blockly.fireUiEvent.DB_[b]=[a];setTimeout(function(){Blockly.fireUiEventNow(a,b)},0)};Blockly.fireUiEvent.DB_={};Blockly.noEvent=function(a){a.preventDefault();a.stopPropagation()}; Blockly.isTargetInput_=function(a){return"textarea"==a.target.type||"text"==a.target.type||"number"==a.target.type||"email"==a.target.type||"password"==a.target.type||"search"==a.target.type||"tel"==a.target.type||"url"==a.target.type||a.target.isContentEditable}; -Blockly.getRelativeXY_=function(a){var b={x:0,y:0},c=a.getAttribute("x");c&&(b.x=parseInt(c,10));if(c=a.getAttribute("y"))b.y=parseInt(c,10);if(a=(a=a.getAttribute("transform"))&&a.match(Blockly.getRelativeXY_.XY_REGEXP_))b.x+=parseFloat(a[1]),a[3]&&(b.y+=parseFloat(a[3]));return b};Blockly.getRelativeXY_.XY_REGEXP_=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*\))?/; -Blockly.getSvgXY_=function(a,b){var c=0,d=0,e=goog.dom.contains(b.getCanvas(),a)||goog.dom.contains(b.getBubbleCanvas(),a);do{var f=Blockly.getRelativeXY_(a);if(a==b.getCanvas()||a==b.getBubbleCanvas())e=!1;e?(c+=f.x*b.scale,d+=f.y*b.scale):(c+=f.x,d+=f.y);a=a.parentNode}while(a&&a!=b.options.svg);return new goog.math.Coordinate(c,d)}; +Blockly.getRelativeXY_=function(a){var b=new goog.math.Coordinate(0,0),c=a.getAttribute("x");c&&(b.x=parseInt(c,10));if(c=a.getAttribute("y"))b.y=parseInt(c,10);if(a=(a=a.getAttribute("transform"))&&a.match(Blockly.getRelativeXY_.XY_REGEXP_))b.x+=parseFloat(a[1]),a[3]&&(b.y+=parseFloat(a[3]));return b};Blockly.getRelativeXY_.XY_REGEXP_=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*\))?/; +Blockly.getSvgXY_=function(a,b){var c=0,d=0,e=1;if(goog.dom.contains(b.getCanvas(),a)||goog.dom.contains(b.getBubbleCanvas(),a))e=b.scale;do{var f=Blockly.getRelativeXY_(a);if(a==b.getCanvas()||a==b.getBubbleCanvas())e=1;c+=f.x*e;d+=f.y*e;a=a.parentNode}while(a&&a!=b.options.svg);return new goog.math.Coordinate(c,d)}; Blockly.createSvgElement=function(a,b,c,d){a=document.createElementNS(Blockly.SVG_NS,a);for(var e in b)a.setAttribute(e,b[e]);document.body.runtimeStyle&&(a.runtimeStyle=a.currentStyle=a.style);c&&c.appendChild(a);return a};Blockly.removeAllRanges=function(){window.getSelection&&setTimeout(function(){try{var a=window.getSelection();a.isCollapsed||a.removeAllRanges()}catch(b){}},0)};Blockly.isRightButton=function(a){return a.ctrlKey&&goog.userAgent.MAC?!0:2==a.button}; Blockly.mouseToSvg=function(a,b){var c=b.createSVGPoint();c.x=a.clientX;c.y=a.clientY;var d=b.getScreenCTM(),d=d.inverse();return c.matrixTransform(d)};Blockly.shortestStringLength=function(a){if(!a.length)return 0;for(var b=a[0].length,c=1;cd&&(h=">=",e=-e);"Var"===a?f="for ("+b+".setObject("+c+"); "+b+".getObjectAsDouble() "+h+d+"; "+b+".incrementObject("+e+")) ":(0>e?l=" -= "+Math.abs(e):1!=e&&(l=" += "+e),f+="for ("+b+" = "+c+"; "+b+h+d+"; "+b+l+")")}else h=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(h=Blockly.Java.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE), -f+="double "+h+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),f+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),f+="double "+d+" = ",f=Blockly.isNumber(e)?f+(Math.abs(e)+";\n"):f+("Math.abs("+e+");\n"),f=f+("if ("+h+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),f+="}\n",f="Var"===a?f+("for ("+b+".setObject("+h+");\n "+d+" >= 0 ? "+ -b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+c+";\n"+b+".incrementObject("+d+")) "):f+("for ("+b+" = "+h+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+")");return f+=" {\n"+g+"} // end for\n"}; +f+="double "+h+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Java.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),f+="double "+c+" = "+d+";\n"),d=Blockly.Java.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),f+="double "+d+" = ",f=Blockly.isNumber(e)?f+(Math.abs(e)+";\n"):f+("Math.abs("+e+");\n"),f=f+("if ("+h+" > "+c+") {\n")+(Blockly.Java.INDENT+d+" = -"+d+";\n"),f+="}\n",f="Var"===a?f+("for ("+b+".setObject("+h+");\n"+Blockly.Java.INDENT+ +d+" >= 0 ? "+b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+c+";\n"+b+".incrementObject("+d+")) "):f+("for ("+b+" = "+h+";\n"+Blockly.Java.INDENT+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n"+Blockly.Java.INDENT+b+" += "+d+")");return f+=" {\n"+g+"} // end for\n"}; Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("it",Blockly.Variables.NAME_TYPE);b="Var"===c?b+".setObject("+a+".next())":b+" = "+a+".next()";Blockly.Java.addImport("java.util.Iterator"); -return"for (Iterator "+a+" = "+d+".iterator(); "+a+".hasNext();) {\n "+b+";\n"+e+"} // end for\n"};Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Java.maps={};Blockly.Java.maps_create_empty=function(a){return["new HashMap()",Blockly.Java.ORDER_ATOMIC]}; +return"for (Iterator "+a+" = "+d+".iterator(); "+a+".hasNext();) {\n"+Blockly.Java.INDENT+b+";\n"+e+"} // end for\n"};Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Java.maps={};Blockly.Java.maps_create_empty=function(a){return["new HashMap()",Blockly.Java.ORDER_ATOMIC]}; Blockly.Java.maps_create_with=function(a){var b=Blockly.Java.variableDB_.getDistinctName("hashMap",Blockly.Variables.NAME_TYPE),c="HashMap "+b+" = new HashMap();\n";Blockly.Java.addImport("java.util.HashMap");Blockly.Java.stashStatement(c);for(var d=0;d Date: Thu, 3 Sep 2015 13:14:19 -0400 Subject: [PATCH 44/84] Python implementation of Maps, Minor fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated build.py to allow not generating the compressed when you pass —uncompressed-only or -u as an option Updated BlockFactory to output click image, scope variables and add/sub inputs --- blocks/text.js | 2 +- blocks_compressed.js | 2 +- build.py | 16 ++++- demos/blockfactory/blocks.js | 115 +++++++++++++++++++++++++++++++++ demos/blockfactory/factory.js | 42 +++++++++++- demos/blockfactory/index.html | 6 ++ generators/java.js | 2 +- generators/java/variables.js | 2 +- generators/python.js | 26 ++++++++ generators/python/maps.js | 44 ++++++------- generators/python/variables.js | 15 +++++ python_compressed.js | 18 +++--- 12 files changed, 247 insertions(+), 43 deletions(-) diff --git a/blocks/text.js b/blocks/text.js index e4f4b1695be..c9c84bb227b 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -810,7 +810,7 @@ Blockly.Blocks['text_printf'] = { return inputItem; }, newQuote_: Blockly.Blocks['text'].newQuote_, - typeblock: Blockly.Msg.TEXT_PRINT_TYPEBLOCK + typeblock: Blockly.Msg.TEXT_PRINTF_TYPEBLOCK }; Blockly.Blocks['text_sprintf'] = { diff --git a/blocks_compressed.js b/blocks_compressed.js index e1a62fd1fe9..9c43893b9ca 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -182,7 +182,7 @@ Blockly.Blocks.text_trim={init:function(){var a=[[Blockly.Msg.TEXT_TRIM_OPERATOR fields:{MODE:"BOTH"}},{entry:Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK,fields:{MODE:"LEFT"}},{entry:Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK,fields:{MODE:"RIGHT"}}]};Blockly.Blocks.text_print={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_PRINT_TITLE,args0:[{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_PRINT_TOOLTIP,helpUrl:Blockly.Msg.TEXT_PRINT_HELPURL})},typeblock:Blockly.Msg.TEXT_PRINT_TYPEBLOCK}; Blockly.Blocks.text_printf={init:function(){this.jsonInit({message0:Blockly.Msg.TEXT_PRINTF_TITLE,args0:[{type:"input_value",name:"TEXT",check:"String"}],colour:Blockly.Blocks.texts.HUE,tooltip:Blockly.Msg.TEXT_PRINTF_TOOLTIP,helpUrl:Blockly.Msg.TEXT_PRINTF_HELPURL});this.itemCount_=1;this.setPreviousStatement(!0);this.setNextStatement(!0);this.appendAddSubGroup(Blockly.Msg.TEXT_PRINTF_CREATEWITH,"items",null,"-IGNORED-")},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items", this.itemCount_);return a},domToMutation:function(a){this.itemCount_=parseInt(a.getAttribute("items"),10);this.updateShape_()},decompose:function(a){var b=Blockly.Block.obtain(a,"text_printf_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;dGenerator stub: + @@ -179,6 +180,8 @@

Generator stub: + + @@ -193,7 +196,9 @@

Generator stub: --> + + @@ -202,6 +207,7 @@

Generator stub: + diff --git a/generators/java.js b/generators/java.js index e7b57b36c40..3cbaf21c1a8 100644 --- a/generators/java.js +++ b/generators/java.js @@ -213,7 +213,7 @@ Blockly.Java.setGlobalVar = function(block,name,val) { this.globals_[name] === null)) { this.globals_[name] = val; } -} +}; /** * Get the Java type of a variable by name * @param {string} variable Name of the variable to get the type for diff --git a/generators/java/variables.js b/generators/java/variables.js index ddb33cae5da..bde3947a7da 100644 --- a/generators/java/variables.js +++ b/generators/java/variables.js @@ -166,4 +166,4 @@ Blockly.Java['initialize_variable'] = function (block) { Blockly.Java.setGlobalVar(block,block.getFieldValue('VAR'), argument0); return ''; } -} +}; diff --git a/generators/python.js b/generators/python.js index 0eecb3fe1c7..c050098c0a7 100644 --- a/generators/python.js +++ b/generators/python.js @@ -210,3 +210,29 @@ Blockly.Python.scrub_ = function(block, code) { } return commentCode + code + nextCode; }; + + +/** + * Mark a variable as a global for the generated Java code + * @param {block} block Block that the variable is contained in + * @param {string} name Name of the global to initialize + * @param {string} val Initializer value for the gloabl + */ +Blockly.Python.setGlobalVar = function(block,name,val) { + if (Blockly.Variables.getLocalContext(block,name) == null && + (typeof this.globals_[name] === 'undefined' || + this.globals_[name] === null)) { + this.globals_[name] = val; + } +}; + +/** + * Add a reference to a library to import + * @param {string} importlib Name of the library to add to the import list + */ +Blockly.Python.addImport = function(importlib) { +// var importStr = 'import ' + importlib; +// this.imports_[importStr] = importStr; +}; + + diff --git a/generators/python/maps.js b/generators/python/maps.js index 8d88fc334e2..73a7a21a4e5 100644 --- a/generators/python/maps.js +++ b/generators/python/maps.js @@ -29,15 +29,15 @@ goog.provide('Blockly.Python.maps'); goog.require('Blockly.Python'); Blockly.Python['maps_create_empty'] = function(block) { - // Create an empty list. - return ['new HashMap()', Blockly.Python.ORDER_ATOMIC]; + // Create an empty map. + return ['{}', Blockly.Python.ORDER_ATOMIC]; }; Blockly.Python['maps_create_with'] = function(block) { - // Create a list with any number of elements of any type. + // Create a map with any number of elements of any type. var declVar = Blockly.Python.variableDB_.getDistinctName( 'hashMap', Blockly.Variables.NAME_TYPE); - var declCode = 'HashMap ' + declVar + ' = new HashMap();\n'; + var declCode = declVar + ' = {}\n'; Blockly.Python.addImport('Python.util.HashMap'); Blockly.Python.stashStatement(declCode); for (var n = 0; n < block.itemCount_; n++) { @@ -49,13 +49,13 @@ Blockly.Python['maps_create_with'] = function(block) { Blockly.Python.ORDER_NONE) || 'null'; var key = Blockly.Python.valueToCode(inputBlock, 'KEY', Blockly.Python.ORDER_NONE) || '""'; - declCode = declVar + '.put(' + key + ', ' + val + ');\n'; + declCode = declVar + "[" + key + "] = " + val + "\n"; Blockly.Python.stashStatement(declCode); } else { var itemCode = Blockly.Python.valueToCode(block, inputName, Blockly.Python.ORDER_NONE); if (itemCode) { - declCode = declVar + '.putAll(' + itemCode + ');\n'; + declCode = declVar + '.update(' + itemCode + ')\n'; Blockly.Python.stashStatement(declCode); } } @@ -67,11 +67,8 @@ Blockly.Python['maps_create_with'] = function(block) { Blockly.Python['maps_length'] = function(block) { // List length. var argument0 = Blockly.Python.valueToCode(block, 'VALUE', - Blockly.Python.ORDER_NONE) || '[]'; - if (argument0.slice(-14) === '.cloneObject()' ) { - argument0 = argument0.slice(0,-14) + '.getObjectAsList()'; - } - return [argument0 + '.size()', Blockly.Python.ORDER_FUNCTION_CALL]; + Blockly.Python.ORDER_NONE) || '{}'; + return ['len(' + argument0 + ')', Blockly.Python.ORDER_FUNCTION_CALL]; }; @@ -79,7 +76,7 @@ Blockly.Python['maps_isempty'] = function(block) { // Is the list empty? var argument0 = Blockly.Python.valueToCode(block, 'MAP', Blockly.Python.ORDER_NONE) || ''; - var code = argument0 + '.size() == 0'; + var code = 'len(' + argument0 + ') == 0'; if (argument0 === '') { code = 'true'; } @@ -94,8 +91,8 @@ Blockly.Python['maps_create'] = function(block) { var declVar = Blockly.Python.variableDB_.getDistinctName( 'hashMap', Blockly.Variables.NAME_TYPE); - var declCode = 'HashMap ' + declVar + ' = new HashMap();\n' + - declVar + '.put(' + key + ', ' + val + ');\n'; + var declCode = declVar + ' = {}\n' + + declVar + '[' + key + '] = ' + val + '\n'; Blockly.Python.stashStatement(declCode); return [declVar, Blockly.Python.ORDER_LOGICAL_NOT]; }; @@ -106,19 +103,18 @@ Blockly.Python['maps_getIndex'] = function(block) { Blockly.Python.ORDER_NONE) || '""'; var map = Blockly.Python.valueToCode(block, 'MAP', Blockly.Python.ORDER_MEMBER) || ''; - if (map.slice(-14) === '.cloneObject()' ) { - map = map.slice(0,-14) + '.getObjectAsMap()'; - } if (mode == 'GET') { - var code = map + '.get(' + key + ')'; + var code = map + '[' + key + ']'; return [code, Blockly.Python.ORDER_MEMBER]; } else { - var code = map + '.remove(' + key + ')'; if (mode == 'GET_REMOVE') { + var code = map + '[' + key + ']\n'; + code += 'del ' + map + '[' + key + ']'; return [code, Blockly.Python.ORDER_FUNCTION_CALL]; } else if (mode == 'REMOVE') { - return code + ';\n'; + var code = 'del ' + map + '[' + key + ']'; + return code + '\n'; } } throw 'Unhandled combination (maps_getIndex).'; @@ -127,20 +123,20 @@ Blockly.Python['maps_getIndex'] = function(block) { Blockly.Python['maps_setIndex'] = function(block) { // Is the list empty? var map = Blockly.Python.valueToCode(block, 'MAP', - Blockly.Python.ORDER_MEMBER) || '[]'; + Blockly.Python.ORDER_MEMBER) || '{}'; var val = Blockly.Python.valueToCode(block, 'VAL', Blockly.Python.ORDER_NONE) || 'null'; var key = Blockly.Python.valueToCode(block, 'KEY', Blockly.Python.ORDER_NONE) || '""'; - var code = map + '.put(' + key + ', '+ val + ');\n'; + var code = map + '[' + key + '] = '+ val + '\n'; return code; }; Blockly.Python['maps_keys'] = function(block) { // Is the list empty? var argument0 = Blockly.Python.valueToCode(block, 'VALUE', - Blockly.Python.ORDER_NONE) || '[]'; - var code = argument0 + '.size() == 0'; + Blockly.Python.ORDER_NONE) || '{}'; + var code = 'len(' + argument0 + ') == 0'; return [code, Blockly.Python.ORDER_LOGICAL_NOT]; }; diff --git a/generators/python/variables.js b/generators/python/variables.js index f70157695a1..0230e3257e5 100644 --- a/generators/python/variables.js +++ b/generators/python/variables.js @@ -63,3 +63,18 @@ Blockly.Python['hash_variables_set'] = function(block) { var hashkey = Blockly.Python.quote_(block.getFieldValue('HASHKEY')); return varName + '[' + hashkey + '] = ' + argument0 + '\n'; }; + +Blockly.Python['initialize_variable'] = function (block) { + var argument0 = Blockly.Python.valueToCode(block, 'VALUE', + Blockly.Python.ORDER_NONE) || '0'; + if(block.procedurePrefix_ != '') { + // Variable setter. + var varName = Blockly.Python.variableDB_.getName(block.getFieldValue('VAR'), + Blockly.Variables.NAME_TYPE); + return varName + ' = ' + argument0 + '\n'; + } else { + // Remember if this is a global variable to be initialized + Blockly.Python.setGlobalVar(block,block.getFieldValue('VAR'), argument0); + return ''; + } +}; diff --git a/python_compressed.js b/python_compressed.js index faec714f6e0..dadc8707e1c 100644 --- a/python_compressed.js +++ b/python_compressed.js @@ -10,7 +10,7 @@ Blockly.Python.init=function(a){Blockly.Python.definitions_=Object.create(null); Blockly.Python.finish=function(a){var b=[],c=[],d;for(d in Blockly.Python.definitions_){var e=Blockly.Python.definitions_[d];e.match(/^(from\s+\S+\s+)?import\s+\S+/)?b.push(e):c.push(e)}delete Blockly.Python.definitions_;delete Blockly.Python.functionNames_;Blockly.Python.variableDB_.reset();return(b.join("\n")+"\n\n"+c.join("\n\n")).replace(/\n\n+/g,"\n\n").replace(/\n*$/,"\n\n\n")+a};Blockly.Python.scrubNakedValue=function(a){return a+"\n"}; Blockly.Python.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/\%/g,"\\%").replace(/'/g,"\\'");return"'"+a+"'"}; Blockly.Python.scrub_=function(a,b){var c="";if(!a.outputConnection||!a.outputConnection.targetConnection){var d=a.getCommentText();d&&(c+=Blockly.Python.prefixLines(d,"# ")+"\n");for(var e=0;e= stop:"," yield start"," start -= abs(step)"])};a=function(a,b,c){return"("+a+" <= "+b+") and "+h()+"("+a+", "+b+", "+c+") or "+k()+"("+a+", "+b+", "+c+")"};if(Blockly.isNumber(c)&&Blockly.isNumber(d)&& Blockly.isNumber(e))c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),0===c%1&&0===d%1&&0===e%1?(c<=d?(d++,a=0==c&&1==e?d:c+", "+d,1!=e&&(a+=", "+e)):(d--,a=c+", "+d+", -"+e),a="range("+a+")"):(a=ca?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC]}; +Blockly.Python.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break\n";case "CONTINUE":return"continue\n"}throw"Unknown flow statement.";};Blockly.Python.maps={};Blockly.Python.maps_create_empty=function(a){return["{}",Blockly.Python.ORDER_ATOMIC]}; +Blockly.Python.maps_create_with=function(a){var b=Blockly.Python.variableDB_.getDistinctName("hashMap",Blockly.Variables.NAME_TYPE),c=b+" = {}\n";Blockly.Python.addImport("Python.util.HashMap");Blockly.Python.stashStatement(c);for(var d=0;da?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC]}; Blockly.Python.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Python.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Python.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Python.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Python.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Python.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Python.valueToCode(a,"A",b)||"0";a=Blockly.Python.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; Blockly.Python.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Python.ORDER_UNARY_SIGN];Blockly.Python.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_MULTIPLICATIVE)||"0":Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_NONE)||"0";switch(b){case "ABS":c="math.fabs("+a+")";break;case "ROOT":c="math.sqrt("+ a+")";break;case "LN":c="math.log("+a+")";break;case "LOG10":c="math.log10("+a+")";break;case "EXP":c="math.exp("+a+")";break;case "POW10":c="math.pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="math.ceil("+a+")";break;case "ROUNDDOWN":c="math.floor("+a+")";break;case "SIN":c="math.sin("+a+" / 180.0 * math.pi)";break;case "COS":c="math.cos("+a+" / 180.0 * math.pi)";break;case "TAN":c="math.tan("+a+" / 180.0 * math.pi)"}if(c)return[c,Blockly.Python.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c= @@ -82,4 +81,5 @@ Blockly.Python.text_sprintf=function(a){var b,c=Blockly.Python.valueToCode(a,"TE Blockly.Python.text_prompt_ext=function(a){var b=Blockly.Python.provideFunction_("text_prompt",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(msg):"," try:"," return raw_input(msg)"," except NameError:"," return input(msg)"]),c=a.getField("TEXT")?Blockly.Python.quote_(a.getFieldValue("TEXT")):Blockly.Python.valueToCode(a,"TEXT",Blockly.Python.ORDER_NONE)||"''",b=b+"("+c+")";"NUMBER"==a.getFieldValue("TYPE")&&(b="float("+b+")");return[b,Blockly.Python.ORDER_FUNCTION_CALL]}; Blockly.Python.text_prompt=Blockly.Python.text_prompt_ext;Blockly.Python.text_comment=function(a){return["/*\n"+(a.getFieldValue("COMMENT")||"")+"\n*/\n",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.variables={};Blockly.Python.variables_get=function(a){return[Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),Blockly.Python.ORDER_ATOMIC]};Blockly.Python.variables_set=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0";return Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE)+" = "+b+"\n"}; Blockly.Python.hash_variables_get=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);a=Blockly.Python.quote_(a.getFieldValue("HASHKEY"));return[b+"["+a+"]",Blockly.Python.ORDER_ATOMIC]}; -Blockly.Python.hash_variables_set=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0",c=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);a=Blockly.Python.quote_(a.getFieldValue("HASHKEY"));return c+"["+a+"] = "+b+"\n"}; \ No newline at end of file +Blockly.Python.hash_variables_set=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0",c=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);a=Blockly.Python.quote_(a.getFieldValue("HASHKEY"));return c+"["+a+"] = "+b+"\n"}; +Blockly.Python.initialize_variable=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0";if(""!=a.procedurePrefix_)return Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE)+" = "+b+"\n";Blockly.Python.setGlobalVar(a,a.getFieldValue("VAR"),b);return""}; \ No newline at end of file From 96bcef2f533d9a245416b0751ba654b6cc9f2f28 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Tue, 8 Sep 2015 14:36:19 -0400 Subject: [PATCH 45/84] Added python and php versions of maps Updated unit test cases for maps to run --- dart_compressed.js | 4 +- generators/dart/maps.js | 4 +- generators/java.js | 29 +- generators/java/maps.js | 12 +- generators/java/text.js | 15 +- generators/java/variables.js | 2 +- generators/javascript/maps.js | 142 +++ generators/php/maps.js | 142 +++ generators/python/maps.js | 6 +- java_compressed.js | 21 +- javascript_compressed.js | 9 +- php_compressed.js | 9 +- python_compressed.js | 4 +- tests/generators/index.html | 18 + tests/generators/maps.xml | 1674 +++++++++++++++++++++++++++++++++ 15 files changed, 2045 insertions(+), 46 deletions(-) create mode 100644 generators/javascript/maps.js create mode 100644 generators/php/maps.js create mode 100644 tests/generators/maps.xml diff --git a/dart_compressed.js b/dart_compressed.js index 2c6c2236648..f987ef41fd2 100644 --- a/dart_compressed.js +++ b/dart_compressed.js @@ -43,10 +43,10 @@ Blockly.Dart.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW") // Copyright 2012 Google Inc. Apache License 2.0 Blockly.Dart.maps={};Blockly.Dart.maps_create_empty=function(a){return["{}",Blockly.Dart.ORDER_ATOMIC]}; Blockly.Dart.maps_create_with=function(a){for(var b=null,c="",d="{",e=0;ea?Blockly.Dart.ORDER_UNARY_PREFIX:Blockly.Dart.ORDER_ATOMIC]}; +Blockly.Dart.maps_setIndex=function(a){var b=Blockly.Dart.valueToCode(a,"MAP",Blockly.Dart.ORDER_MEMBER)||"[]",c=Blockly.Dart.valueToCode(a,"VAL",Blockly.Dart.ORDER_NONE)||"null";a=Blockly.Dart.valueToCode(a,"KEY",Blockly.Dart.ORDER_NONE)||'""';return b+"["+a+"] = "+c+";\n"};Blockly.Dart.maps_keys=function(a){return[(Blockly.Dart.valueToCode(a,"MAP",Blockly.Dart.ORDER_NONE)||"[]")+".keys()",Blockly.Dart.ORDER_LOGICAL_NOT]};Blockly.Dart.controls_forEachKey=Blockly.Dart.controls_forEach;Blockly.Dart.math={};Blockly.Dart.addReservedWords("Math");Blockly.Dart.math_number=function(a){a=window.parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Dart.ORDER_UNARY_PREFIX:Blockly.Dart.ORDER_ATOMIC]}; Blockly.Dart.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Dart.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Dart.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Dart.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Dart.ORDER_MULTIPLICATIVE],POWER:[null,Blockly.Dart.ORDER_NONE]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Dart.valueToCode(a,"A",b)||"0";a=Blockly.Dart.valueToCode(a,"B",b)||"0";return c?[d+c+a,b]:(Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;",["Math.pow("+d+", "+a+ ")",Blockly.Dart.ORDER_UNARY_POSTFIX])}; Blockly.Dart.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return a=Blockly.Dart.valueToCode(a,"NUM",Blockly.Dart.ORDER_UNARY_PREFIX)||"0","-"==a[0]&&(a=" "+a),["-"+a,Blockly.Dart.ORDER_UNARY_PREFIX];Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;";a="ABS"==b||"ROUND"==b.substring(0,5)?Blockly.Dart.valueToCode(a,"NUM",Blockly.Dart.ORDER_UNARY_POSTFIX)||"0":"SIN"==b||"COS"==b||"TAN"==b?Blockly.Dart.valueToCode(a,"NUM",Blockly.Dart.ORDER_MULTIPLICATIVE)|| diff --git a/generators/dart/maps.js b/generators/dart/maps.js index 3cc42247ef8..2e8a78e8bca 100644 --- a/generators/dart/maps.js +++ b/generators/dart/maps.js @@ -88,7 +88,7 @@ Blockly.Dart['maps_create_with'] = function(block) { Blockly.Dart['maps_length'] = function(block) { // List length. - var argument0 = Blockly.Dart.valueToCode(block, 'VALUE', + var argument0 = Blockly.Dart.valueToCode(block, 'MAP', Blockly.Dart.ORDER_NONE) || '[]'; return [argument0 + '.length()', Blockly.Dart.ORDER_FUNCTION_CALL]; }; @@ -149,7 +149,7 @@ Blockly.Dart['maps_setIndex'] = function(block) { Blockly.Dart['maps_keys'] = function(block) { // Is the list empty? - var argument0 = Blockly.Dart.valueToCode(block, 'VALUE', + var argument0 = Blockly.Dart.valueToCode(block, 'MAP', Blockly.Dart.ORDER_NONE) || '[]'; var code = argument0 + '.keys()'; return [code, Blockly.Dart.ORDER_LOGICAL_NOT]; diff --git a/generators/java.js b/generators/java.js index 3cbaf21c1a8..cf2d149b9a8 100644 --- a/generators/java.js +++ b/generators/java.js @@ -198,7 +198,11 @@ Blockly.Java.setBaseclass = function(baseclass) { * @return {string} baseclass Name of a base class this workspace is derived from */ Blockly.Java.getBaseclass = function() { - return Blockly.Java.variableDB_.getName(this.Baseclass_,'CLASS'); + var baseClass = this.Baseclass_; + if (baseClass != '') { + baseClass = Blockly.Java.variableDB_.getName(baseClass,'CLASS'); + } + return baseClass; } /** @@ -313,8 +317,9 @@ Blockly.Java.workspaceToCode = function(workspace, parms) { var finalcode = 'package ' + this.getPackage() + ';\n\n' + this.getImports() + '\n\n' + 'public class ' + this.getAppName(); - if (this.getBaseclass()) { - finalcode += ' extends ' + this.getBaseclass(); + var baseClass = this.getBaseclass(); + if (baseClass != '') { + finalcode += ' extends ' + baseClass; } finalcode += ' {\n\n' + code + '\n' + @@ -355,7 +360,7 @@ Blockly.Java.provideVarClass = function() { '', ' public enum Type {', '', - ' STRING, INT, DOUBLE, LIST, UNKNOWN', + ' STRING, INT, DOUBLE, LIST, NULL, UNKNOWN', ' };', '', ' private Type _type;', @@ -644,10 +649,10 @@ Blockly.Java.provideVarClass = function() { ' */', ' @Override', ' public boolean equals(Object obj) {', - ' if (obj == null) {', - ' return false;', - ' }', ' final Var other = Var.valueOf(obj);', + ' if (getType() == Var.Type.NULL || other.getType() == Var.Type.NULL) {', + ' return getType().equals(other.getType());', + ' }', ' return this.toString().equals(other.toString());', ' } // end equals', '', @@ -851,6 +856,8 @@ Blockly.Java.provideVarClass = function() { ' } // end for each Var', ' sb.append("}");', ' return sb.toString();', + ' case NULL:', + ' return null;', ' default:', ' return getObject().toString();', ' }// end switch', @@ -862,7 +869,13 @@ Blockly.Java.provideVarClass = function() { ' * referenced later on when various method calls are made on this object.', ' */', ' private void inferType() {', - ' if (_object instanceof String) {', + ' if (_object == null) {', + ' _type = Type.NULL;', + ' } else if (_object instanceof Var) {', + ' Var oldObj = (Var)_object;', + ' _type = oldObj.getType();', + ' _object = oldObj.getObject();', + ' } else if (_object instanceof String) {', ' _type = Type.STRING;', ' } else {', ' // must be a number or a list', diff --git a/generators/java/maps.js b/generators/java/maps.js index 7e23ce13a8e..22a893d1bb0 100644 --- a/generators/java/maps.js +++ b/generators/java/maps.js @@ -66,8 +66,8 @@ Blockly.Java['maps_create_with'] = function(block) { Blockly.Java['maps_length'] = function(block) { // List length. - var argument0 = Blockly.Java.valueToCode(block, 'VALUE', - Blockly.Java.ORDER_NONE) || '[]'; + var argument0 = Blockly.Java.valueToCode(block, 'MAP', + Blockly.Java.ORDER_NONE) || 'new HashMap()'; if (argument0.slice(-14) === '.cloneObject()' ) { argument0 = argument0.slice(0,-14) + '.getObjectAsList()'; } @@ -127,7 +127,7 @@ Blockly.Java['maps_getIndex'] = function(block) { Blockly.Java['maps_setIndex'] = function(block) { // Is the list empty? var map = Blockly.Java.valueToCode(block, 'MAP', - Blockly.Java.ORDER_MEMBER) || '[]'; + Blockly.Java.ORDER_MEMBER) || 'new HashMap()'; var val = Blockly.Java.valueToCode(block, 'VAL', Blockly.Java.ORDER_NONE) || 'null'; var key = Blockly.Java.valueToCode(block, 'KEY', @@ -138,9 +138,9 @@ Blockly.Java['maps_setIndex'] = function(block) { Blockly.Java['maps_keys'] = function(block) { // Is the list empty? - var argument0 = Blockly.Java.valueToCode(block, 'VALUE', - Blockly.Java.ORDER_NONE) || '[]'; - var code = argument0 + '.size() == 0'; + var argument0 = Blockly.Java.valueToCode(block, 'MAP', + Blockly.Java.ORDER_NONE) || 'new HashMap()'; + var code = argument0 + '.keySet()'; return [code, Blockly.Java.ORDER_LOGICAL_NOT]; }; diff --git a/generators/java/text.js b/generators/java/text.js index c2fa296b0ed..4ddf8bd9ad9 100644 --- a/generators/java/text.js +++ b/generators/java/text.js @@ -62,18 +62,15 @@ Blockly.Java['text_append'] = function(block) { Blockly.Variables.NAME_TYPE); var argument0 = Blockly.Java.valueToCode(block, 'TEXT', Blockly.Java.ORDER_NONE) || '""'; - // First we want to see if the input variable happens to be a non string type - var argument0Type = Blockly.Java.getValueType(block, 'TEXT'); - var code = ''; + var code = varName + ' = '; + var extra = ''; if (Blockly.Java.GetVariableType(block.getFieldValue('VAR')) === 'Var') { - code = varName + ' = new Var(' + varName + '.getObjectAsString() + ' + - Blockly.Java.toStringCode(argument0) + ');\n'; - } else { - // See if we need to convert the non-string to a string - code = varName + ' = ' + varName + ' + ' + - Blockly.Java.toStringCode(argument0) + ';\n'; + varName = 'new Var(' + varName + '.getObjectAsString()'; + extra = ')'; } + code += varName + ' + ' + + Blockly.Java.toStringCode(argument0) + extra + ';\n'; return code; }; diff --git a/generators/java/variables.js b/generators/java/variables.js index bde3947a7da..979a0c3efa9 100644 --- a/generators/java/variables.js +++ b/generators/java/variables.js @@ -60,7 +60,7 @@ Blockly.Java['variables_set'] = function(block) { compatible = true; } if (destType === 'String' && !compatible) { - argument0 = Blockly.Java.toStringCode(argument0); + argument0 = Blockly.Java.toStringCode(block, 'VALUE'); } var code = varName; if(Blockly.Java.GetVariableType(this.procedurePrefix_+ diff --git a/generators/javascript/maps.js b/generators/javascript/maps.js new file mode 100644 index 00000000000..93137d65f28 --- /dev/null +++ b/generators/javascript/maps.js @@ -0,0 +1,142 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating JavaScript for maps blocks. + * @author toebes@extremenetworks.com (John Toebes) + */ +'use strict'; + +goog.provide('Blockly.JavaScript.maps'); + +goog.require('Blockly.JavaScript'); + +Blockly.JavaScript['maps_create_empty'] = function(block) { + // Create an empty map. + return ['{}', Blockly.JavaScript.ORDER_ATOMIC]; +}; + +Blockly.JavaScript['maps_create_with'] = function(block) { + // Create a map with any number of elements of any type. + var declVar = Blockly.JavaScript.variableDB_.getDistinctName( + 'hashMap', Blockly.Variables.NAME_TYPE); + var declCode = declVar + ' = {};\n'; + Blockly.JavaScript.stashStatement(declCode); + for (var n = 0; n < block.itemCount_; n++) { + var inputName = 'ADD' + n; + var inputBlock = block.getInputTargetBlock(inputName); + if (inputBlock) { + if (inputBlock.type === 'maps_create') { + var val = Blockly.JavaScript.valueToCode(inputBlock, 'VAL', + Blockly.JavaScript.ORDER_NONE) || 'null'; + var key = Blockly.JavaScript.valueToCode(inputBlock, 'KEY', + Blockly.JavaScript.ORDER_NONE) || '""'; + declCode = declVar + "[" + key + "] = " + val + ";\n"; + Blockly.JavaScript.stashStatement(declCode); + } else { + var itemCode = Blockly.JavaScript.valueToCode(block, inputName, + Blockly.JavaScript.ORDER_NONE); + if (itemCode) { //this is assuming jquery is available + declCode = '$.extend({}, '+declVar + ', ' + itemCode + ');\n'; + Blockly.JavaScript.stashStatement(declCode); + } + } + } + } + return [declVar, Blockly.JavaScript.ORDER_ATOMIC]; +}; + +Blockly.JavaScript['maps_length'] = function(block) { + // List length. + var argument0 = Blockly.JavaScript.valueToCode(block, 'MAP', + Blockly.JavaScript.ORDER_NONE) || '{}'; + return [argument0 + '.length', Blockly.JavaScript.ORDER_FUNCTION_CALL]; +}; + + +Blockly.JavaScript['maps_isempty'] = function(block) { + // Is the list empty? + var argument0 = Blockly.JavaScript.valueToCode(block, 'MAP', + Blockly.JavaScript.ORDER_NONE) || ''; + var code = argument0 + '.length == 0'; + if (argument0 === '') { + code = 'true'; + } + return [code, Blockly.JavaScript.ORDER_LOGICAL_NOT]; +}; + +Blockly.JavaScript['maps_create'] = function(block) { + var val = Blockly.JavaScript.valueToCode(block, 'VAL', + Blockly.JavaScript.ORDER_NONE) || 'null'; + var key = Blockly.JavaScript.valueToCode(block, 'KEY', + Blockly.JavaScript.ORDER_NONE) || '""'; + var declVar = Blockly.JavaScript.variableDB_.getDistinctName( + 'hashMap', Blockly.Variables.NAME_TYPE); + + var declCode = declVar + ' = {};\n' + + declVar + '[' + key + '] = ' + val + ';\n'; + Blockly.JavaScript.stashStatement(declCode); + return [declVar, Blockly.JavaScript.ORDER_LOGICAL_NOT]; +}; + +Blockly.JavaScript['maps_getIndex'] = function(block) { + var mode = block.getFieldValue('MODE') || 'GET'; + var key = Blockly.JavaScript.valueToCode(block, 'KEY', + Blockly.JavaScript.ORDER_NONE) || '""'; + var map = Blockly.JavaScript.valueToCode(block, 'MAP', + Blockly.JavaScript.ORDER_MEMBER) || ''; + + if (mode == 'GET') { + var code = map + '[' + key + ']'; + return [code, Blockly.JavaScript.ORDER_MEMBER]; + } else { + if (mode == 'GET_REMOVE') { + var code = map + '[' + key + '];\n'; + code += 'delete ' + map + '[' + key + ']'; + return [code, Blockly.JavaScript.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + var code = 'delete ' + map + '[' + key + ']'; + return code + ';\n'; + } + } + throw 'Unhandled combination (maps_getIndex).'; +}; + +Blockly.JavaScript['maps_setIndex'] = function(block) { + // Is the list empty? + var map = Blockly.JavaScript.valueToCode(block, 'MAP', + Blockly.JavaScript.ORDER_MEMBER) || '{}'; + var val = Blockly.JavaScript.valueToCode(block, 'VAL', + Blockly.JavaScript.ORDER_NONE) || 'null'; + var key = Blockly.JavaScript.valueToCode(block, 'KEY', + Blockly.JavaScript.ORDER_NONE) || '""'; + var code = map + '[' + key + '] = '+ val + ';\n'; + return code; +}; + +Blockly.JavaScript['maps_keys'] = function(block) { + // Is the list empty? + var argument0 = Blockly.JavaScript.valueToCode(block, 'MAP', + Blockly.JavaScript.ORDER_NONE) || '{}'; + var code = 'Object.keys(' + argument0 + ')'; + return [code, Blockly.JavaScript.ORDER_LOGICAL_NOT]; +}; + +Blockly.JavaScript['controls_forEachKey'] = Blockly.JavaScript['controls_forEach'] ; diff --git a/generators/php/maps.js b/generators/php/maps.js new file mode 100644 index 00000000000..de7c96da130 --- /dev/null +++ b/generators/php/maps.js @@ -0,0 +1,142 @@ +/** + * @license + * Visual Blocks Language + * + * Copyright 2012 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generating PHP for maps blocks. + * @author toebes@extremenetworks.com (John Toebes) + */ +'use strict'; + +goog.provide('Blockly.PHP.maps'); + +goog.require('Blockly.PHP'); + +Blockly.PHP['maps_create_empty'] = function(block) { + // Create an empty list. + return ['array()', Blockly.PHP.ORDER_ATOMIC]; +}; + +Blockly.PHP['maps_create_with'] = function(block) { + // Create a map with any number of elements of any type. + var declVar = Blockly.PHP.variableDB_.getDistinctName( + 'hashMap', Blockly.Variables.NAME_TYPE); + var declCode = declVar + ' = array();\n'; + Blockly.PHP.stashStatement(declCode); + for (var n = 0; n < block.itemCount_; n++) { + var inputName = 'ADD' + n; + var inputBlock = block.getInputTargetBlock(inputName); + if (inputBlock) { + if (inputBlock.type === 'maps_create') { + var val = Blockly.PHP.valueToCode(inputBlock, 'VAL', + Blockly.PHP.ORDER_NONE) || 'null'; + var key = Blockly.PHP.valueToCode(inputBlock, 'KEY', + Blockly.PHP.ORDER_NONE) || '""'; + declCode = declVar + "[" + key + "] = " + val + ";\n"; + Blockly.PHP.stashStatement(declCode); + } else { + var itemCode = Blockly.PHP.valueToCode(block, inputName, + Blockly.PHP.ORDER_NONE); + if (itemCode) { + declCode = 'array_merge('+declVar + ',' + itemCode + ');\n'; + Blockly.PHP.stashStatement(declCode); + } + } + } + } + return [declVar, Blockly.PHP.ORDER_ATOMIC]; +}; + +Blockly.PHP['maps_length'] = function(block) { + // List length. + var argument0 = Blockly.PHP.valueToCode(block, 'MAP', + Blockly.PHP.ORDER_NONE) || 'array()'; + return ['count(' + argument0 + ')', Blockly.PHP.ORDER_FUNCTION_CALL]; +}; + + +Blockly.PHP['maps_isempty'] = function(block) { + // Is the list empty? + var argument0 = Blockly.PHP.valueToCode(block, 'MAP', + Blockly.PHP.ORDER_NONE) || ''; + var code = 'count(' + argument0 + ') == 0'; + if (argument0 === '') { + code = 'true'; + } + return [code, Blockly.PHP.ORDER_LOGICAL_NOT]; +}; + +Blockly.PHP['maps_create'] = function(block) { + var val = Blockly.PHP.valueToCode(block, 'VAL', + Blockly.PHP.ORDER_NONE) || 'null'; + var key = Blockly.PHP.valueToCode(block, 'KEY', + Blockly.PHP.ORDER_NONE) || '""'; + var declVar = Blockly.PHP.variableDB_.getDistinctName( + 'hashMap', Blockly.Variables.NAME_TYPE); + + var declCode = declVar + ' = array();\n' + + declVar + '[' + key + '] = ' + val + ';\n'; + Blockly.PHP.stashStatement(declCode); + return [declVar, Blockly.PHP.ORDER_LOGICAL_NOT]; +}; + +Blockly.PHP['maps_getIndex'] = function(block) { + var mode = block.getFieldValue('MODE') || 'GET'; + var key = Blockly.PHP.valueToCode(block, 'KEY', + Blockly.PHP.ORDER_NONE) || '""'; + var map = Blockly.PHP.valueToCode(block, 'MAP', + Blockly.PHP.ORDER_MEMBER) || ''; + + if (mode == 'GET') { + var code = map + '[' + key + ']'; + return [code, Blockly.PHP.ORDER_MEMBER]; + } else { + if (mode == 'GET_REMOVE') { + var code = map + '[' + key + '];\n'; + code += 'unset(' + map + '[' + key + '])'; + return [code, Blockly.PHP.ORDER_FUNCTION_CALL]; + } else if (mode == 'REMOVE') { + var code = 'unset(' + map + '[' + key + '])'; + return code + ';\n'; + } + } + throw 'Unhandled combination (maps_getIndex).'; +}; + +Blockly.PHP['maps_setIndex'] = function(block) { + // Is the list empty? + var map = Blockly.PHP.valueToCode(block, 'MAP', + Blockly.PHP.ORDER_MEMBER) || 'array()'; + var val = Blockly.PHP.valueToCode(block, 'VAL', + Blockly.PHP.ORDER_NONE) || 'null'; + var key = Blockly.PHP.valueToCode(block, 'KEY', + Blockly.PHP.ORDER_NONE) || '""'; + var code = map + '[' + key + '] = '+ val + ';\n'; + return code; +}; + +Blockly.PHP['maps_keys'] = function(block) { + // Is the list empty? + var argument0 = Blockly.PHP.valueToCode(block, 'MAP', + Blockly.PHP.ORDER_NONE) || 'array()'; + var code = 'array_keys(' + argument0 + ')'; + return [code, Blockly.PHP.ORDER_LOGICAL_NOT]; +}; + +Blockly.PHP['controls_forEachKey'] = Blockly.PHP['controls_forEach'] ; diff --git a/generators/python/maps.js b/generators/python/maps.js index 73a7a21a4e5..5dfc5a3b3b1 100644 --- a/generators/python/maps.js +++ b/generators/python/maps.js @@ -66,7 +66,7 @@ Blockly.Python['maps_create_with'] = function(block) { Blockly.Python['maps_length'] = function(block) { // List length. - var argument0 = Blockly.Python.valueToCode(block, 'VALUE', + var argument0 = Blockly.Python.valueToCode(block, 'MAP', Blockly.Python.ORDER_NONE) || '{}'; return ['len(' + argument0 + ')', Blockly.Python.ORDER_FUNCTION_CALL]; }; @@ -134,9 +134,9 @@ Blockly.Python['maps_setIndex'] = function(block) { Blockly.Python['maps_keys'] = function(block) { // Is the list empty? - var argument0 = Blockly.Python.valueToCode(block, 'VALUE', + var argument0 = Blockly.Python.valueToCode(block, 'MAP', Blockly.Python.ORDER_NONE) || '{}'; - var code = 'len(' + argument0 + ') == 0'; + var code = ' list(' + argument0 + '.keys())'; return [code, Blockly.Python.ORDER_LOGICAL_NOT]; }; diff --git a/java_compressed.js b/java_compressed.js index 39c6f6007b7..a694bc7ccac 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -7,12 +7,12 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstra Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.INDENT=" ";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_=""; Blockly.Java.needImports_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.INLINEVARCLASS=!0;Blockly.Java.classes_=[];Blockly.Java.globals_={};Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return Blockly.Java.variableDB_.getName(this.AppName_,"CLASS")};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_}; -Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){return Blockly.Java.variableDB_.getName(this.Baseclass_,"CLASS")};Blockly.Java.setGlobalVar=function(a,b,c){null!=Blockly.Variables.getLocalContext(a,b)||"undefined"!==typeof this.globals_[b]&&null!==this.globals_[b]||(this.globals_[b]=c)};Blockly.Java.GetVariableType=function(a){a=this.variableTypes_[a];a||(a="Var",Blockly.Java.provideVarClass());return a};Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]}; -Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n final Var other = Var.valueOf(obj);\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): +this.classes_.Var='/**\n *\n * @author bmoon\n */\nfinal class Var implements Comparable {\n\n public enum Type {\n\n STRING, INT, DOUBLE, LIST, NULL, UNKNOWN\n };\n\n private Type _type;\n private Object _object;\n private static final NumberFormat _formatter = new DecimalFormat("#.#####");\n\n /**\n * Construct a Var with an UNKNOWN type\n *\n */\n public Var() {\n _type = Type.UNKNOWN;\n } // end var\n\n /**\n * Construct a Var and assign its contained object to that specified.\n *\n * @param object The value to set this object to\n */\n public Var(Object object) {\n setObject(object);\n } // end var\n\n /**\n * Construct a Var from a given Var\n *\n * @param var var to construct this one from\n */\n public Var(Var var) {\n setObject(var.getObject());\n } // end var\n\n /**\n * Static constructor to make a var from some value.\n *\n * @param val some value to construct a var around\n * @return the Var object\n */\n public static Var valueOf(Object val) {\n return new Var(val);\n } // end valueOf\n\n /**\n * Get the type of the underlying object\n *\n * @return Will return the object\'s type as defined by Type\n */\n public Type getType() {\n return _type;\n } // end getType\n\n /**\n * Get the contained object\n *\n * @return the object\n */\n public Object getObject() {\n return _object;\n } // end getObject\n\n /**\n * Clone Object\n *\n * @return a new object equal to this one\n */\n public Object cloneObject() {\n Var tempVar = new Var(this);\n return tempVar.getObject();\n } // end cloneObject\n\n /**\n * Get object as an int. Does not make sense for a "LIST" type object\n *\n * @return an integer whose value equals this object\n */\n public int getObjectAsInt() {\n switch (getType()) {\n case STRING:\n return Integer.parseInt((String) getObject());\n case INT:\n return (int) getObject();\n case DOUBLE:\n return new Double((double) getObject()).intValue();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0;\n } // end getObjectAsInt\n\n /**\n * Get object as a double. Does not make sense for a "LIST" type object.\n *\n * @return a double whose value equals this object\n */\n public double getObjectAsDouble() {\n switch (getType()) {\n case STRING:\n return Double.parseDouble((String) getObject());\n case INT:\n return new Integer((int) getObject()).doubleValue();\n case DOUBLE:\n return (double) getObject();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0.0;\n } // end get object as double\n\n /**\n * Get object as a string.\n *\n * @return The string value of the object. Note that for lists, this is a\n * comma separated list of the form {x,y,z,...}\n */\n public String getObjectAsString() {\n return this.toString();\n } // end gotObjectAsString\n\n /**\n * Get the object as a list.\n *\n * @return a LinkedList whose elements are of type Var\n */\n public LinkedList getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n final Var other = Var.valueOf(obj);\n if (getType() == Var.Type.NULL || other.getType() == Var.Type.NULL) {\n return getType().equals(other.getType());\n }\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n case NULL:\n return null;\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object == null) {\n _type = Type.NULL;\n } else if (_object instanceof Var) {\n Var oldObj = (Var)_object;\n _type = oldObj.getType();\n _object = oldObj.getObject();\n } else if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): Blockly.Java.addImport("extreme.sdn.client.Var")}; Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.imports_=Object.create(null);this.classes_=Object.create(null);this.globals_=Object.create(null);for(var c=0;c= 0 ? "+b+".getObjectAsDouble() <= "+c+" : "+b+".getObjectAsDouble() >= "+ Blockly.Java.controls_forEach=function(a){var b=Blockly.Java.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Java.GetVariableType(a.getFieldValue("VAR")),d=Blockly.Java.valueToCode(a,"LIST",Blockly.Java.ORDER_RELATIONAL)||"[]",e=Blockly.Java.statementToCode(a,"DO"),e=Blockly.Java.addLoopTrap(e,a.id)||Blockly.Java.PASS;a=Blockly.Java.variableDB_.getDistinctName("it",Blockly.Variables.NAME_TYPE);b="Var"===c?b+".setObject("+a+".next())":b+" = "+a+".next()";Blockly.Java.addImport("java.util.Iterator"); return"for (Iterator "+a+" = "+d+".iterator(); "+a+".hasNext();) {\n"+Blockly.Java.INDENT+b+";\n"+e+"} // end for\n"};Blockly.Java.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Java.maps={};Blockly.Java.maps_create_empty=function(a){return["new HashMap()",Blockly.Java.ORDER_ATOMIC]}; Blockly.Java.maps_create_with=function(a){var b=Blockly.Java.variableDB_.getDistinctName("hashMap",Blockly.Variables.NAME_TYPE),c="HashMap "+b+" = new HashMap();\n";Blockly.Java.addImport("java.util.HashMap");Blockly.Java.stashStatement(c);for(var d=0;da?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; +};Blockly.Java.maps_setIndex=function(a){var b=Blockly.Java.valueToCode(a,"MAP",Blockly.Java.ORDER_MEMBER)||"new HashMap()",c=Blockly.Java.valueToCode(a,"VAL",Blockly.Java.ORDER_NONE)||"null";a=Blockly.Java.valueToCode(a,"KEY",Blockly.Java.ORDER_NONE)||'""';return b+".put("+a+", "+c+");\n"};Blockly.Java.maps_keys=function(a){return[(Blockly.Java.valueToCode(a,"MAP",Blockly.Java.ORDER_NONE)||"new HashMap()")+".keySet()",Blockly.Java.ORDER_LOGICAL_NOT]};Blockly.Java.controls_forEachKey=Blockly.Java.controls_forEach;Blockly.Java.math={};Blockly.Java.addReservedWords("math,random");Blockly.Java.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Java.ORDER_UNARY_SIGN:Blockly.Java.ORDER_ATOMIC]}; Blockly.Java.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Java.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Java.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Java.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Java.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Java.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Java.valueToCode(a,"A",b)||"0";a=Blockly.Java.valueToCode(a,"B",b)||"0";var e="";" ** "===c?(Blockly.Java.addImport("java.lang.Math"),e="Math.pow("+d+", "+a+")"):e=d+c+a;return[e, b]}; Blockly.Java.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Java.ORDER_UNARY_SIGN];Blockly.Java.addImport("java.lang.Math");a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_MULTIPLICATIVE)||"0":Blockly.Java.valueToCode(a,"NUM",Blockly.Java.ORDER_NONE)||"0";switch(b){case "ABS":c="Math.abs("+a+")";break;case "ROOT":c="Math.sqrt("+a+")";break;case "LN":c="Math.log("+ @@ -89,9 +89,8 @@ Blockly.Java.valueToCode(a,"RETURN",Blockly.Java.ORDER_NONE)||"";g?g="Var"===e?" Blockly.Java.procedures_defnoreturn=Blockly.Java.procedures_defreturn;Blockly.Java.procedures_callreturn=function(a){for(var b=Blockly.Java.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=[],d=0;d= ")+d+"; "+b;b=Math.abs(parseFloat(e));a=(1==b?a+(g?"++":"--"):a+((g?" += ":" -= ")+b))+(") {\n"+f+"}\n")}else a="",g=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(g=Blockly.JavaScript.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="var "+g+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.JavaScript.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE), a+="var "+c+" = "+d+";\n"),d=Blockly.JavaScript.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+="var "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("Math.abs("+e+");\n"),a+="if ("+g+" > "+c+") {\n",a+=Blockly.JavaScript.INDENT+d+" = -"+d+";\n",a+="}\n",a+="for ("+b+" = "+g+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+") {\n"+f+"}\n";return a}; Blockly.JavaScript.controls_forEach=function(a){var b=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_ASSIGNMENT)||"[]",d=Blockly.JavaScript.statementToCode(a,"DO"),d=Blockly.JavaScript.addLoopTrap(d,a.id);a="";var e=c;c.match(/^\w+$/)||(e=Blockly.JavaScript.variableDB_.getDistinctName(b+"_list",Blockly.Variables.NAME_TYPE),a+="var "+e+" = "+c+";\n");c=Blockly.JavaScript.variableDB_.getDistinctName(b+ -"_index",Blockly.Variables.NAME_TYPE);d=Blockly.JavaScript.INDENT+b+" = "+e+"["+c+"];\n"+d;return a+("for (var "+c+" in "+e+") {\n"+d+"}\n")};Blockly.JavaScript.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.JavaScript.math={};Blockly.JavaScript.math_number=function(a){return[parseFloat(a.getFieldValue("NUM")),Blockly.JavaScript.ORDER_ATOMIC]}; +"_index",Blockly.Variables.NAME_TYPE);d=Blockly.JavaScript.INDENT+b+" = "+e+"["+c+"];\n"+d;return a+("for (var "+c+" in "+e+") {\n"+d+"}\n")};Blockly.JavaScript.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.JavaScript.maps={};Blockly.JavaScript.maps_create_empty=function(a){return["{}",Blockly.JavaScript.ORDER_ATOMIC]}; +Blockly.JavaScript.maps_create_with=function(a){var b=Blockly.JavaScript.variableDB_.getDistinctName("hashMap",Blockly.Variables.NAME_TYPE),c;Blockly.JavaScript.stashStatement(b+" = {};\n");for(var d=0;d= ")+d+"; "+b;b=Math.abs(parseFloat(e));a=(1==b?a+(f?"++":"--"):a+((f?" += ":" -= ")+b))+(") {\n"+g+"}\n")}else a="",f=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(f=Blockly.PHP.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+=f+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.PHP.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),a+=c+" = "+d+";\n"),d=Blockly.PHP.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE), a+=d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("abs("+e+");\n"),a+="if ("+f+" > "+c+") {\n",a+=Blockly.PHP.INDENT+d+" = -"+d+";\n",a+="}\n",a+="for ("+b+" = "+f+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+") {\n"+g+"}\n";return a}; Blockly.PHP.controls_forEach=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_ASSIGNMENT)||"[]",d=Blockly.PHP.statementToCode(a,"DO"),d=Blockly.PHP.addLoopTrap(d,a.id);return""+("foreach ("+c+" as "+b+") {\n"+d+"}\n")}; -Blockly.PHP.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.PHP.math={};Blockly.PHP.math_number=function(a){return[parseFloat(a.getFieldValue("NUM")),Blockly.PHP.ORDER_ATOMIC]}; +Blockly.PHP.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";}; +// Copyright 2012 Google Inc. Apache License 2.0 +Blockly.PHP.maps={};Blockly.PHP.maps_create_empty=function(a){return["array()",Blockly.PHP.ORDER_ATOMIC]}; +Blockly.PHP.maps_create_with=function(a){var b=Blockly.PHP.variableDB_.getDistinctName("hashMap",Blockly.Variables.NAME_TYPE),c;Blockly.PHP.stashStatement(b+" = array();\n");for(var d=0;da?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC]}; +Blockly.Python.maps_setIndex=function(a){var b=Blockly.Python.valueToCode(a,"MAP",Blockly.Python.ORDER_MEMBER)||"{}",c=Blockly.Python.valueToCode(a,"VAL",Blockly.Python.ORDER_NONE)||"null";a=Blockly.Python.valueToCode(a,"KEY",Blockly.Python.ORDER_NONE)||'""';return b+"["+a+"] = "+c+"\n"};Blockly.Python.maps_keys=function(a){return[" list("+(Blockly.Python.valueToCode(a,"MAP",Blockly.Python.ORDER_NONE)||"{}")+".keys())",Blockly.Python.ORDER_LOGICAL_NOT]};Blockly.Python.controls_forEachKey=Blockly.Python.controls_forEach;Blockly.Python.math={};Blockly.Python.addReservedWords("math,random");Blockly.Python.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC]}; Blockly.Python.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Python.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Python.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Python.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Python.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Python.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Python.valueToCode(a,"A",b)||"0";a=Blockly.Python.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; Blockly.Python.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return c=Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_UNARY_SIGN)||"0",["-"+c,Blockly.Python.ORDER_UNARY_SIGN];Blockly.Python.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_MULTIPLICATIVE)||"0":Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_NONE)||"0";switch(b){case "ABS":c="math.fabs("+a+")";break;case "ROOT":c="math.sqrt("+ a+")";break;case "LN":c="math.log("+a+")";break;case "LOG10":c="math.log10("+a+")";break;case "EXP":c="math.exp("+a+")";break;case "POW10":c="math.pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="math.ceil("+a+")";break;case "ROUNDDOWN":c="math.floor("+a+")";break;case "SIN":c="math.sin("+a+" / 180.0 * math.pi)";break;case "COS":c="math.cos("+a+" / 180.0 * math.pi)";break;case "TAN":c="math.tan("+a+" / 180.0 * math.pi)"}if(c)return[c,Blockly.Python.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c= diff --git a/tests/generators/index.html b/tests/generators/index.html index 5148d024f6c..a86401bca6a 100644 --- a/tests/generators/index.html +++ b/tests/generators/index.html @@ -10,6 +10,7 @@ + @@ -20,6 +21,7 @@ + @@ -30,6 +32,7 @@ + @@ -40,6 +43,7 @@ + @@ -50,6 +54,7 @@ + @@ -60,6 +65,7 @@ + @@ -239,6 +245,7 @@ + @@ -372,6 +379,16 @@ + + + + + + + + + + @@ -427,6 +444,7 @@

Blockly Generator Tests

+ diff --git a/tests/generators/maps.xml b/tests/generators/maps.xml new file mode 100644 index 00000000000..70dd011cf68 --- /dev/null +++ b/tests/generators/maps.xml @@ -0,0 +1,1674 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + test create + + + test create empty + + + + + + + + + + + test create item + + + + + + + + love + + + + + TRUE + + + + + + + + + + + love + + + + + TRUE + + + + + + + test create items + + + + + + + + love + + + + + TRUE + + + + + + + + + hate + + + + + FALSE + + + + + + + + + + + + + + love + + + + + TRUE + + + + + + + + + hate + + + + + FALSE + + + + + + + + + test create repeated + + + + + + + + Eject + + + + + TRUE + + + + + + + + + Eject + + + + + TRUE + + + + + + + + + Eject + + + + + TRUE + + + + + + + + + + + Eject + + + + + TRUE + + + + + + + + + + + + + + + test empty + + + not empty + FALSE + + + + + + + Eject + + + + + TRUE + + + + + + + + + empty + TRUE + + + + + + + + + + emptymap + TRUE + + + + + + + + + + + + + + + + + + test length + + + zero size + + + + + + + + + + 0 + + + + + one size + + + + + + + cat + + + + + TRUE + + + + + + + + + 1 + + + + + one size of three + + + + + + + + + + Eject + + + + + TRUE + + + + + + + + + Eject + + + + + TRUE + + + + + + + + + Eject + + + + + TRUE + + + + + + + + + + + 1 + + + + + three size + + + + + + + + + + cat + + + + + TRUE + + + + + + + + + dog + + + + + TRUE + + + + + + + + + fish + + + + + FALSE + + + + + + + + + + + 3 + + + + + + + + + + + + + test get + + + map + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + get captain + + + + GET + + + map + + + + + Captain + + + + + + + Kirk + + + + + get doctor + + + + GET + + + map + + + + + Doctor + + + + + + + McCoy + + + + + get noexist + + + + GET + + + map + + + + + Klingon + + + + + + + + + + + + + + + + + + test get remove + + + map + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + getremove first + + + + GET_REMOVE + + + map + + + + + Captain + + + + + + + Kirk + + + + + getremove first list + + + map + + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + map + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + getremove last + + + + GET_REMOVE + + + map + + + + + Doctor + + + + + + + McCoy + + + + + getremove last list + + + map + + + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + map + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + getremove missing + + + + GET_REMOVE + + + map + + + + + Klingon + + + + + + + + + + getremove # list + + + map + + + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + map + + + + + Captain + + + + + Kirk + + + + + + + getremove only + + + + GET_REMOVE + + + map + + + + + Captain + + + + + + + Kirk + + + + + getremove only list + + + map + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + test remove + + + map + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + + REMOVE + + + map + + + + + Captain + + + + + remove first list + + + map + + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + map + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + + REMOVE + + + map + + + + + Doctor + + + + + remove last list + + + map + + + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + map + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + + REMOVE + + + map + + + + + Klingon + + + + + remove nothing + + + map + + + + + + + + + + Captain + + + + + Kirk + + + + + + + + + Science Officer + + + + + Spock + + + + + + + + + Doctor + + + + + McCoy + + + + + + + + + map + + + + + Captain + + + + + Kirk + + + + + + + + REMOVE + + + map + + + + + Captain + + + + + remove only + + + map + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + test set + + + x + + + + + + + + Captain + + + + + Picard + + + + + + + + + First Officer + + + + + Riker + + + + + + + + + Doctor + + + + + Crusher + + + + + + + + + + + x + + + + + Captain + + + + + Jean-Luc + + + + + set first list + + + x + + + + + + + + + + Captain + + + + + Jean-Luc + + + + + + + + + First Officer + + + + + Riker + + + + + + + + + Doctor + + + + + Crusher + + + + + + + + + x + + + + + + + + Captain + + + + + Picard + + + + + + + + + First Officer + + + + + Riker + + + + + + + + + Doctor + + + + + Crusher + + + + + + + + + + + x + + + + + Doctor + + + + + Beverly + + + + + set last list + + + x + + + + + + + + + + Captain + + + + + Picard + + + + + + + + + First Officer + + + + + Riker + + + + + + + + + Doctor + + + + + Beverly + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 2f0d7f2ec4e6fbc1558f6922f19eddd1a3cf8f50 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Wed, 9 Sep 2015 10:11:53 -0400 Subject: [PATCH 46/84] Fix calls to Blocky.Java.toStringCode to handle more cases of parameters and Var values Cleaned up text_printf and text_sprintf to properly handle the case of no substitution strings. Updated text_prompt/text_prompt_ext to work like the other code generators. Updated Var class to handle the NULL type --- generators/java.js | 79 +++++++------------- generators/java/text.js | 156 ++++++++++++++++------------------------ java_compressed.js | 20 +++--- 3 files changed, 94 insertions(+), 161 deletions(-) diff --git a/generators/java.js b/generators/java.js index cf2d149b9a8..83221fd7083 100644 --- a/generators/java.js +++ b/generators/java.js @@ -717,6 +717,8 @@ Blockly.Java.provideVarClass = function() { ' }', ' }', ' return true;', + ' case NULL:', + ' return (var.getType() == Var.Type.NULL);', ' default:', ' return false;', ' }// end switch', @@ -729,30 +731,7 @@ Blockly.Java.provideVarClass = function() { ' * @return true if this object is grater than the given var', ' */', ' public boolean greaterThan(Var var) {', - ' switch (getType()) {', - ' case STRING:', - ' return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;', - ' case INT:', - ' return this.getObjectAsInt() > var.getObjectAsDouble();', - ' case DOUBLE:', - ' return this.getObjectAsDouble() > var.getObjectAsDouble();', - ' case LIST:', - ' if (size() != var.size()) {', - ' return false;', - ' }', - ' if (!var.getType().equals(Var.Type.LIST)) {', - ' return false;', - ' }', - ' int index = 0;', - ' for (Var myVar : this.getObjectAsList()) {', - ' if (!myVar.greaterThan(var.get(index))) {', - ' return false;', - ' }', - ' } // end myVar', - ' return true;', - ' default:', - ' return false;', - ' }// end switch', + ' return var.lessThan(this);', ' } // end greaterThan', '', ' /**', @@ -762,30 +741,7 @@ Blockly.Java.provideVarClass = function() { ' * @return true if this var is greater than or equal to the given var', ' */', ' public boolean greaterThanOrEqual(Var var) {', - ' switch (getType()) {', - ' case STRING:', - ' return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;', - ' case INT:', - ' return this.getObjectAsInt() >= var.getObjectAsDouble();', - ' case DOUBLE:', - ' return this.getObjectAsDouble() >= var.getObjectAsDouble();', - ' case LIST:', - ' if (size() != var.size()) {', - ' return false;', - ' }', - ' if (!var.getType().equals(Var.Type.LIST)) {', - ' return false;', - ' }', - ' int index = 0;', - ' for (Var myVar : this.getObjectAsList()) {', - ' if (!myVar.greaterThanOrEqual(var.get(index))) {', - ' return false;', - ' }', - ' } // end for myVar', - ' return true;', - ' default:', - ' return false;', - ' }// end switch', + ' return var.lessThanOrEqual(this);', ' } // end greaterThanOrEqual', '', ' /**', @@ -1203,17 +1159,32 @@ Blockly.Java.quote_ = function(string) { * Generate code to treat an item as a string. If it is numeric, quote it * if it is a string already, do nothing. Otherwise use the blocklyToString * function at runtime. - * @param {string} string Text to encode. - * @return {string} Java code for string. + * @param {!Blockly.Block} block The block containing the input. + * @param {string} name The name of the input. + * @return {string} Generated Java code or '' if no blocks are connected or the + * specified input does not exist. */ -Blockly.Java.toStringCode = function(item) { + + +Blockly.Java.toStringCode = function(block,name) { + var targetBlock = block.getInputTargetBlock(name); + if (!targetBlock) { + return ''; + } + var item = Blockly.Java.valueToCode(block,name,Blockly.Java.ORDER_NONE); item = item.trim(); + // Empty strings and quoted strings are perfectly fine as they are if (item !== '' && item.charAt(0) !== '"') { - // Pure numbers get quoted - if (Blockly.isNumber(item)) { + if ((targetBlock.type === 'variables_get') && + (Blockly.Java.GetVariableType(targetBlock.procedurePrefix_+ + targetBlock.getFieldValue('VAR')) === 'Var')) { + item += '.toString()'; + } else if (Blockly.isNumber(item)) { + // Pure numbers get quoted item = '"' + item + '"'; - } else if(Blockly.Java.GetVariableType(item) === 'Var') { + } else if(targetBlock.type !== 'variables_get' && + Blockly.Java.GetVariableType(item) === 'Var') { item = item + '.toString()'; } else { // It is something else so we need to convert it on the fly diff --git a/generators/java/text.js b/generators/java/text.js index 4ddf8bd9ad9..fb0639a5291 100644 --- a/generators/java/text.js +++ b/generators/java/text.js @@ -38,30 +38,26 @@ Blockly.Java['text'] = function(block) { Blockly.Java['text_join'] = function(block) { // Create a string made up of any number of elements of any type. // Should we allow joining by '-' or ',' or any other characters? - var code; - if (block.itemCount_ == 0) { - return ['""', Blockly.Java.ORDER_ATOMIC]; - } else { - var code = ''; - var extra = ''; - for (var n = 0; n < block.itemCount_; n++) { - var item = Blockly.Java.valueToCode(block, 'ADD' + n, - Blockly.Java.ORDER_NONE); - if (item) { - code += extra + Blockly.Java.toStringCode(item); - extra = ' + '; - } + var code = ''; + var extra = ''; + for (var n = 0; n < block.itemCount_; n++) { + var item = Blockly.Java.toStringCode(block, 'ADD' + n); + if (item) { + code += extra + (item); + extra = ' + '; } - return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } + if (code === '') { + code = '""'; + } + return [code, Blockly.Java.ORDER_ADDITIVE]; }; Blockly.Java['text_append'] = function(block) { // Append to a variable in place. var varName = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), Blockly.Variables.NAME_TYPE); - var argument0 = Blockly.Java.valueToCode(block, 'TEXT', - Blockly.Java.ORDER_NONE) || '""'; + var argument0 = Blockly.Java.toStringCode(block, 'TEXT') || '""'; var code = varName + ' = '; var extra = ''; @@ -69,8 +65,7 @@ Blockly.Java['text_append'] = function(block) { varName = 'new Var(' + varName + '.getObjectAsString()'; extra = ')'; } - code += varName + ' + ' + - Blockly.Java.toStringCode(argument0) + extra + ';\n'; + code += varName + ' + ' + argument0 + extra + ';\n'; return code; }; @@ -284,89 +279,60 @@ Blockly.Java['text_printf'] = function(block) { }; Blockly.Java['text_printf'] = function(block) { - // Create a string made up of any number of elements of any type. - // Should we allow joining by '-' or ',' or any other characters? - var code; - var argument0 = Blockly.Java.valueToCode(block, 'TEXT', Blockly.Java.ORDER_NONE) || '""'; + // Create a string made up of any number of elements of any type. + // Should we allow joining by '-' or ',' or any other characters? + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_NONE) || '""'; + var code = 'System.out.format(' + argument0; + for (var n = 0; n < block.itemCount_; n++) { + var item = Blockly.Java.toStringCode(block, 'ADD' + n); + if (item) { + code += ', ' + item; + } + } + code += ');\n'; + return code; +}; + +Blockly.Java['text_sprintf'] = function(block) { + // Create a string made up of any number of elements of any type. + // Should we allow joining by '-' or ',' or any other characters? + var argument0 = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_NONE) || '""'; if (block.itemCount_ == 0) { - return ['""', Blockly.Java.ORDER_ATOMIC]; + return [argument0, Blockly.Java.ORDER_ATOMIC]; } else { - var code = ''; - var extra = ''; + var code = 'String.format(' + argument0; for (var n = 0; n < block.itemCount_; n++) { - var item = Blockly.Java.valueToCode(block, 'ADD' + n, - Blockly.Java.ORDER_NONE); + var item = Blockly.Java.toStringCode(block, 'ADD' + n); if (item) { - code += extra + Blockly.Java.toStringCode(item); - extra = ', '; + code += ', ' + item; } } - code = 'System.out.format(' + argument0 + ','+code+' );\n'; - return code; - } -}; - -Blockly.Java['text_sprintf'] = function(block) { - // Create a string made up of any number of elements of any type. - // Should we allow joining by '-' or ',' or any other characters? - var code; - var argument0 = Blockly.Java.valueToCode(block, 'TEXT', Blockly.Java.ORDER_NONE) || '""'; - if (block.itemCount_ == 0) { - return ['""', Blockly.Java.ORDER_ATOMIC]; - } else { - var code = ''; - var extra = ''; - for (var n = 0; n < block.itemCount_; n++) { - var item = Blockly.Java.valueToCode(block, 'ADD' + n, - Blockly.Java.ORDER_NONE); - if (item) { - code += extra + Blockly.Java.toStringCode(item); - extra = ', '; - } - } - code = 'String.format(' + argument0 + ','+code+' )'; - return [code, Blockly.Java.ORDER_FUNCTION_CALL]; - } -}; - - -Blockly.Java['text_prompt'] = function(block) { - // Prompt function (internal message). - var functionName = Blockly.Java.provideFunction_( - 'text_prompt', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(msg):', - ' try:', - ' return raw_input(msg)', - ' except NameError:', - ' return input(msg)']); - var msg = Blockly.Java.quote_(block.getFieldValue('TEXT')); - var code = functionName + '(' + msg + ')'; - var toNumber = block.getFieldValue('TYPE') == 'NUMBER'; - if (toNumber) { - code = 'float(' + code + ')'; + code += ')'; + return [code, Blockly.Java.ORDER_FUNCTION_CALL]; } - return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; Blockly.Java['text_prompt_ext'] = function(block) { - // Prompt function (external message). - var functionName = Blockly.Java.provideFunction_( - 'text_prompt', - ['def ' + Blockly.Java.FUNCTION_NAME_PLACEHOLDER_ + '(msg):', - ' try:', - ' return raw_input(msg)', - ' except NameError:', - ' return input(msg)']); - var msg = Blockly.Java.valueToCode(block, 'TEXT', - Blockly.Java.ORDER_NONE) || '""'; - var code = functionName + '(' + msg + ')'; + // Prompt function. + if (block.getField('TEXT')) { + // Internal message. + var msg = Blockly.Java.quote_(block.getFieldValue('TEXT')); + } else { + // External message. + var msg = Blockly.Java.valueToCode(block, 'TEXT', + Blockly.Java.ORDER_NONE) || '\'\''; + } + var code = 'window.prompt(' + msg + ')'; var toNumber = block.getFieldValue('TYPE') == 'NUMBER'; if (toNumber) { - code = 'float(' + code + ')'; + code = 'parseFloat(' + code + ')'; } return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; +Blockly.Java['text_prompt'] = Blockly.Java['text_prompt_ext']; Blockly.Java['text_comment'] = function(block) { // Display comment @@ -384,17 +350,15 @@ Blockly.Java['text_code_insert'] = function(block) { var code = ''; if (type == 'Java') { - var comment = block.getFieldValue('CODE') || ''; - code = '//Arbitrary Java code insert block'; - if (comment != '') - { - code += '\n'; - code += comment +'\n'; - } - else - { - code += ' is empty\n'; - } + var comment = block.getFieldValue('CODE') || ''; + code = '//Arbitrary Java code insert block'; + if (comment != '') + { + code += '\n'; + code += comment +'\n'; + } else { + code += ' is empty\n'; + } } return code; }; diff --git a/java_compressed.js b/java_compressed.js index a694bc7ccac..7aad43fc529 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -12,7 +12,7 @@ Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Ja Blockly.Java.getClasses=function(){var a="",b;for(b in this.classes_)a+=this.classes_[b];a&&(a+="\n\n");return a};Blockly.Java.setExtraClass=function(a,b){this.classes_[a]=b.join("\n")+"\n"};Blockly.Java.workspaceToCode_=Blockly.Java.workspaceToCode;Blockly.Java.workspaceToCode=function(a,b){var c=this.workspaceToCode_(a,b),d="package "+this.getPackage()+";\n\n"+this.getImports()+"\n\npublic class "+this.getAppName(),e=this.getBaseclass();""!=e&&(d+=" extends "+e);return d+=" {\n\n"+c+"\n}\n\n"+this.getClasses()}; Blockly.Java.getValueType=function(a,b){var c=a.getInputTargetBlock(b);return c?c.outputConnection.check_:""}; Blockly.Java.provideVarClass=function(){this.INLINEVARCLASS?(Blockly.Java.addImport("java.text.DecimalFormat"),Blockly.Java.addImport("java.text.NumberFormat"),Blockly.Java.addImport("java.lang.Math"),Blockly.Java.addImport("java.util.Arrays"),Blockly.Java.addImport("java.util.Collections"),Blockly.Java.addImport("java.util.LinkedList"),Blockly.Java.addImport("java.util.List"),Blockly.Java.addImport("java.util.HashMap"),Blockly.Java.addImport("java.util.Map"),Blockly.Java.addImport("java.util.Objects"), -this.classes_.Var='/**\n *\n * @author bmoon\n */\nfinal class Var implements Comparable {\n\n public enum Type {\n\n STRING, INT, DOUBLE, LIST, NULL, UNKNOWN\n };\n\n private Type _type;\n private Object _object;\n private static final NumberFormat _formatter = new DecimalFormat("#.#####");\n\n /**\n * Construct a Var with an UNKNOWN type\n *\n */\n public Var() {\n _type = Type.UNKNOWN;\n } // end var\n\n /**\n * Construct a Var and assign its contained object to that specified.\n *\n * @param object The value to set this object to\n */\n public Var(Object object) {\n setObject(object);\n } // end var\n\n /**\n * Construct a Var from a given Var\n *\n * @param var var to construct this one from\n */\n public Var(Var var) {\n setObject(var.getObject());\n } // end var\n\n /**\n * Static constructor to make a var from some value.\n *\n * @param val some value to construct a var around\n * @return the Var object\n */\n public static Var valueOf(Object val) {\n return new Var(val);\n } // end valueOf\n\n /**\n * Get the type of the underlying object\n *\n * @return Will return the object\'s type as defined by Type\n */\n public Type getType() {\n return _type;\n } // end getType\n\n /**\n * Get the contained object\n *\n * @return the object\n */\n public Object getObject() {\n return _object;\n } // end getObject\n\n /**\n * Clone Object\n *\n * @return a new object equal to this one\n */\n public Object cloneObject() {\n Var tempVar = new Var(this);\n return tempVar.getObject();\n } // end cloneObject\n\n /**\n * Get object as an int. Does not make sense for a "LIST" type object\n *\n * @return an integer whose value equals this object\n */\n public int getObjectAsInt() {\n switch (getType()) {\n case STRING:\n return Integer.parseInt((String) getObject());\n case INT:\n return (int) getObject();\n case DOUBLE:\n return new Double((double) getObject()).intValue();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0;\n } // end getObjectAsInt\n\n /**\n * Get object as a double. Does not make sense for a "LIST" type object.\n *\n * @return a double whose value equals this object\n */\n public double getObjectAsDouble() {\n switch (getType()) {\n case STRING:\n return Double.parseDouble((String) getObject());\n case INT:\n return new Integer((int) getObject()).doubleValue();\n case DOUBLE:\n return (double) getObject();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0.0;\n } // end get object as double\n\n /**\n * Get object as a string.\n *\n * @return The string value of the object. Note that for lists, this is a\n * comma separated list of the form {x,y,z,...}\n */\n public String getObjectAsString() {\n return this.toString();\n } // end gotObjectAsString\n\n /**\n * Get the object as a list.\n *\n * @return a LinkedList whose elements are of type Var\n */\n public LinkedList getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n final Var other = Var.valueOf(obj);\n if (getType() == Var.Type.NULL || other.getType() == Var.Type.NULL) {\n return getType().equals(other.getType());\n }\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) > 0;\n case INT:\n return this.getObjectAsInt() > var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() > var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThan(var.get(index))) {\n return false;\n }\n } // end myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) >= 0;\n case INT:\n return this.getObjectAsInt() >= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() >= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.greaterThanOrEqual(var.get(index))) {\n return false;\n }\n } // end for myVar\n return true;\n default:\n return false;\n }// end switch\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n case NULL:\n return null;\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object == null) {\n _type = Type.NULL;\n } else if (_object instanceof Var) {\n Var oldObj = (Var)_object;\n _type = oldObj.getType();\n _object = oldObj.getObject();\n } else if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): +this.classes_.Var='/**\n *\n * @author bmoon\n */\nfinal class Var implements Comparable {\n\n public enum Type {\n\n STRING, INT, DOUBLE, LIST, NULL, UNKNOWN\n };\n\n private Type _type;\n private Object _object;\n private static final NumberFormat _formatter = new DecimalFormat("#.#####");\n\n /**\n * Construct a Var with an UNKNOWN type\n *\n */\n public Var() {\n _type = Type.UNKNOWN;\n } // end var\n\n /**\n * Construct a Var and assign its contained object to that specified.\n *\n * @param object The value to set this object to\n */\n public Var(Object object) {\n setObject(object);\n } // end var\n\n /**\n * Construct a Var from a given Var\n *\n * @param var var to construct this one from\n */\n public Var(Var var) {\n setObject(var.getObject());\n } // end var\n\n /**\n * Static constructor to make a var from some value.\n *\n * @param val some value to construct a var around\n * @return the Var object\n */\n public static Var valueOf(Object val) {\n return new Var(val);\n } // end valueOf\n\n /**\n * Get the type of the underlying object\n *\n * @return Will return the object\'s type as defined by Type\n */\n public Type getType() {\n return _type;\n } // end getType\n\n /**\n * Get the contained object\n *\n * @return the object\n */\n public Object getObject() {\n return _object;\n } // end getObject\n\n /**\n * Clone Object\n *\n * @return a new object equal to this one\n */\n public Object cloneObject() {\n Var tempVar = new Var(this);\n return tempVar.getObject();\n } // end cloneObject\n\n /**\n * Get object as an int. Does not make sense for a "LIST" type object\n *\n * @return an integer whose value equals this object\n */\n public int getObjectAsInt() {\n switch (getType()) {\n case STRING:\n return Integer.parseInt((String) getObject());\n case INT:\n return (int) getObject();\n case DOUBLE:\n return new Double((double) getObject()).intValue();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0;\n } // end getObjectAsInt\n\n /**\n * Get object as a double. Does not make sense for a "LIST" type object.\n *\n * @return a double whose value equals this object\n */\n public double getObjectAsDouble() {\n switch (getType()) {\n case STRING:\n return Double.parseDouble((String) getObject());\n case INT:\n return new Integer((int) getObject()).doubleValue();\n case DOUBLE:\n return (double) getObject();\n case LIST:\n // has no meaning\n break;\n default:\n // has no meaning\n break;\n }\n return 0.0;\n } // end get object as double\n\n /**\n * Get object as a string.\n *\n * @return The string value of the object. Note that for lists, this is a\n * comma separated list of the form {x,y,z,...}\n */\n public String getObjectAsString() {\n return this.toString();\n } // end gotObjectAsString\n\n /**\n * Get the object as a list.\n *\n * @return a LinkedList whose elements are of type Var\n */\n public LinkedList getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n final Var other = Var.valueOf(obj);\n if (getType() == Var.Type.NULL || other.getType() == Var.Type.NULL) {\n return getType().equals(other.getType());\n }\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n case NULL:\n return (var.getType() == Var.Type.NULL);\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n return var.lessThan(this);\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n return var.lessThanOrEqual(this);\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n case NULL:\n return null;\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object == null) {\n _type = Type.NULL;\n } else if (_object instanceof Var) {\n Var oldObj = (Var)_object;\n _type = oldObj.getType();\n _object = oldObj.getObject();\n } else if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): Blockly.Java.addImport("extreme.sdn.client.Var")}; Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.imports_=Object.create(null);this.classes_=Object.create(null);this.globals_=Object.create(null);for(var c=0;ce;e++)for(g=b[e].sort(),f=0;f Date: Wed, 9 Sep 2015 11:07:57 -0400 Subject: [PATCH 47/84] Fix lost merge with setSrc instead of setValue --- blockly_compressed.js | 2 +- core/field_image.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 3d27f38f4f5..950f4545b66 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1170,7 +1170,7 @@ goog.Timer.callOnce(this.block_.bumpNeighbours_,Blockly.BUMP_DELAY,this.block_)) Blockly.Warning.textToDom_=function(a){var b=Blockly.createSvgElement("text",{"class":"blocklyText blocklyBubbleText",y:Blockly.Bubble.BORDER_WIDTH},null);a=a.split("\n");for(var c=0;c Date: Thu, 10 Sep 2015 08:17:27 -0400 Subject: [PATCH 48/84] Recover lost fix for hidden icons showing on load --- blockly_compressed.js | 2 +- core/field_clickimage.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 950f4545b66..b6611ce7bfa 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1174,7 +1174,7 @@ Blockly.FieldImage.prototype.init=function(a){this.sourceBlock_||(this.sourceBlo this.imageElement_,a.tooltip=this.sourceBlock_,Blockly.Tooltip.bindMouseEvents(a))};Blockly.FieldImage.prototype.dispose=function(){goog.dom.removeNode(this.fieldGroup_);this.rectElement_=this.imageElement_=this.fieldGroup_=null};Blockly.FieldImage.prototype.setTooltip=function(a){(this.rectElement_||this.imageElement_).tooltip=a};Blockly.FieldImage.prototype.getSrc=function(){return this.src_}; Blockly.FieldImage.prototype.setSrc=function(a){null!==a&&(this.src_=a,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(a)?a:""))};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a)};Blockly.FieldImage.prototype.render_=function(){};Blockly.FieldClickImage=function(a,b,c,d,e){Blockly.FieldClickImage.superClass_.constructor.call(this,a,b,c,"");this.setChangeHandler(e)};goog.inherits(Blockly.FieldClickImage,Blockly.FieldImage);Blockly.FieldClickImage.prototype.EDITABLE=!0;Blockly.FieldLabel.prototype.SERIALIZABLE=!1;Blockly.FieldClickImage.prototype.CURSOR="default"; Blockly.FieldClickImage.prototype.updateEditable=function(){this.sourceBlock_.isInFlyout||!this.EDITABLE?Blockly.addClass_(this.fieldGroup_,"blocklyIconGroupReadonly"):Blockly.removeClass_(this.fieldGroup_,"blocklyIconGroupReadonly")}; -Blockly.FieldClickImage.prototype.init=function(a){this.sourceBlock_||(Blockly.FieldClickImage.superClass_.init.call(this,a),Blockly.addClass_(this.fieldGroup_,"blocklyIconGroup"),Blockly.addClass_(this.fieldGroup_,"blocklyIconFading"),this.updateEditable(),this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_())}; +Blockly.FieldClickImage.prototype.init=function(a){this.sourceBlock_||(Blockly.FieldClickImage.superClass_.init.call(this,a),Blockly.addClass_(this.fieldGroup_,"blocklyIconGroup"),Blockly.addClass_(this.fieldGroup_,"blocklyIconFading"),this.visible_||(this.visible_=!0,this.setVisible(!1)),this.updateEditable(),this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_())}; Blockly.FieldClickImage.prototype.showEditor_=function(){if(this.changeHandler_){var a=Blockly.dragMode_;Blockly.dragMode_=0;this.changeHandler_.call(this.sourceBlock_,this);Blockly.dragMode_=a}};Blockly.FieldDropdown=function(a,b){this.menuGenerator_=a;this.setChangeHandler(b);this.trimOptions_();var c=this.getOptions_()[0];this.value_=c[1];Blockly.FieldDropdown.superClass_.constructor.call(this,c[0])};goog.inherits(Blockly.FieldDropdown,Blockly.Field);Blockly.FieldDropdown.CHECKMARK_OVERHANG=25;Blockly.FieldDropdown.ARROW_CHAR=goog.userAgent.ANDROID?"\u25bc":"\u25be";Blockly.FieldDropdown.prototype.CURSOR="default"; Blockly.FieldDropdown.prototype.init=function(a){this.sourceBlock_||(this.arrow_=Blockly.createSvgElement("tspan",{},null),this.arrow_.appendChild(document.createTextNode(a.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR)),Blockly.FieldDropdown.superClass_.init.call(this,a),a=this.text_,this.text_=null,this.setText(a))}; Blockly.FieldDropdown.prototype.showEditor_=function(){Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,null);var a=this,b=new goog.ui.Menu;b.setRightToLeft(this.sourceBlock_.RTL);for(var c=this.getOptions_(),d=0;d Date: Wed, 16 Sep 2015 15:54:29 -0400 Subject: [PATCH 49/84] Add support for navigating blocks with arrow keys Left/Right arrows navigate by walking the block tree in Pre-order traversal Up goes to the previous sibling, down to the next sibling, defaulting to the Left/Right logic when at the end of the list When navigating to a block, the workspace is scrolled to show as much of the block as possible. --- blockly_compressed.js | 16 ++- core/blockly.js | 308 +++++++++++++++++++++++++++++++++++++++++- core/widgetdiv.js | 18 +++ core/workspace_svg.js | 50 +++++++ 4 files changed, 385 insertions(+), 7 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index df52971e987..eab68fc695e 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1485,7 +1485,7 @@ Blockly.Css.CONTENT=[".blocklySvg {"," background-color: #fff;"," outline: non "}",".blocklyWidgetDiv .goog-menuitem-accel {"," color: #999;"," direction: ltr;"," left: auto;"," padding: 0 6px;"," position: absolute;"," right: 0;"," text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {"," left: 0;"," right: auto;"," text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {"," text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {"," color: #999;"," font-size: 12px;"," padding-left: 4px;", "}",".blocklyWidgetDiv .goog-menuseparator {"," border-top: 1px solid #ccc;"," margin: 4px 0;"," padding: 0;","}",""];Blockly.WidgetDiv={};Blockly.WidgetDiv.DIV=null;Blockly.WidgetDiv.owner_=null;Blockly.WidgetDiv.dispose_=null;Blockly.WidgetDiv.createDom=function(){Blockly.WidgetDiv.DIV||(Blockly.WidgetDiv.DIV=goog.dom.createDom("div","blocklyWidgetDiv"),document.body.appendChild(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.show=function(a,b,c){Blockly.WidgetDiv.hide();Blockly.WidgetDiv.owner_=a;Blockly.WidgetDiv.dispose_=c;Blockly.WidgetDiv.DIV.style.direction=b?"rtl":"ltr";Blockly.WidgetDiv.DIV.style.display="block"}; Blockly.WidgetDiv.hide=function(){Blockly.WidgetDiv.owner_&&(Blockly.WidgetDiv.DIV.style.display="none",Blockly.WidgetDiv.DIV.style.left="",Blockly.WidgetDiv.DIV.style.top="",Blockly.WidgetDiv.dispose_&&Blockly.WidgetDiv.dispose_(),Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.dispose_=null,goog.dom.removeChildren(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.isVisible=function(){return!!Blockly.WidgetDiv.owner_};Blockly.WidgetDiv.hideIfOwner=function(a){Blockly.WidgetDiv.owner_==a&&Blockly.WidgetDiv.hide()}; -Blockly.WidgetDiv.position=function(a,b,c,d,e){bc.width+d.x&&(a=c.width+d.x):ac.width+d.x&&(a=c.width+d.x):a=g?(c=2,e=g,(g=d.join(""))&&b.push(g),d.length=0):(d.push("%",g),c=0):2==c&&("0"<=g&&"9">=g?e+=g:(b.push(parseInt(e,10)),f--,c=0))}(g=d.join(""))&&b.push(g);return b}; Blockly.getMsgString=function(a){var b=null;"object"===typeof MSG&&(b=MSG[a]);b||(b=Blockly.Msg[a]);b||(console.log("Missing message for "+a),b="\u226a"+a+"\u226b");return b};Blockly.getToolTipString=function(a){var b=null;"object"===typeof ToolTips&&(b=ToolTips[a]);b||(console.log("Missing tool tip for "+a),b="\u226a"+a+"\u226b");return b};Blockly.getUrlString=function(a){var b=null;"object"===typeof Urls&&(b=Urls[a]);b||(console.log("Missing URL for "+a),b="\u226a"+a+"\u226b");return b}; Blockly.getBlockHue=function(a){var b=null;"object"===typeof HUES&&(b=HUES[a]);b||(console.log("Missing hue for "+a),b=260);return b};Blockly.SVG_NS="http://www.w3.org/2000/svg";Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.makeColour=function(a){return goog.color.hsvToHex(a,Blockly.HSV_SATURATION,255*Blockly.HSV_VALUE)};Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1; -Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.selected=null;Blockly.highlightedConnection_=null;Blockly.localConnection_=null;Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750; -Blockly.mainWorkspace=null;Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.dragMode_=0;Blockly.onTouchUpWrapper_=null;Blockly.latestClick={x:0,y:0};Blockly.svgSize=function(a){return{width:a.cachedWidth_,height:a.cachedHeight_}};Blockly.scopeVariableList={Types:["String","Number","Boolean","Array","Map"]};Blockly.useMutators=!1; +Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.selected=null;Blockly.selectedField=null;Blockly.highlightedConnection_=null;Blockly.localConnection_=null;Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250; +Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.mainWorkspace=null;Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.dragMode_=0;Blockly.onTouchUpWrapper_=null;Blockly.latestClick={x:0,y:0};Blockly.svgSize=function(a){return{width:a.cachedWidth_,height:a.cachedHeight_}};Blockly.scopeVariableList={Types:["String","Number","Boolean","Array","Map"]};Blockly.useMutators=!1; Blockly.svgResize=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.options.svg,c=b.parentNode;if(c){var d=c.offsetWidth,c=c.offsetHeight;b.cachedWidth_!=d&&(b.setAttribute("width",d+"px"),b.cachedWidth_=d);b.cachedHeight_!=c&&(b.setAttribute("height",c+"px"),b.cachedHeight_=c);a.resize()}}; Blockly.onMouseUp_=function(a){a=Blockly.getMainWorkspace();Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN);a.isScrolling=!1;Blockly.onTouchUpWrapper_&&(Blockly.unbindEvent_(Blockly.onTouchUpWrapper_),Blockly.onTouchUpWrapper_=null);Blockly.onMouseMoveWrapper_&&(Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_),Blockly.onMouseMoveWrapper_=null)}; Blockly.onMouseMove_=function(a){if(!(a.touches&&2<=a.touches.length)){var b=Blockly.getMainWorkspace();if(b.isScrolling){Blockly.removeAllRanges();var c=a.clientX-b.startDragMouseX,d=a.clientY-b.startDragMouseY,e=b.startDragMetrics,f=b.startScrollX+c,g=b.startScrollY+d,f=Math.min(f,-e.contentLeft),g=Math.min(g,-e.contentTop),f=Math.max(f,e.viewWidth-e.contentLeft-e.contentWidth),g=Math.max(g,e.viewHeight-e.contentTop-e.contentHeight);b.scrollbar.set(-f-e.contentLeft,-g-e.contentTop);Math.sqrt(c* c+d*d)>Blockly.DRAG_RADIUS&&Blockly.longStop_();a.stopPropagation()}}}; -Blockly.onKeyDown_=function(a){if(!Blockly.isTargetInput_(a))if(a.keyCode==goog.events.KeyCodes.ESC)Blockly.hideChaff();else if(a.keyCode==goog.events.KeyCodes.BACKSPACE||a.keyCode==goog.events.KeyCodes.DELETE)try{Blockly.selected&&Blockly.selected.isDeletable()&&(Blockly.hideChaff(),Blockly.selected.dispose(!0,!0))}finally{a.preventDefault()}else if(a.altKey||a.ctrlKey||a.metaKey)Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(Blockly.hideChaff(),a.keyCode==goog.events.KeyCodes.C? -Blockly.copy_(Blockly.selected):a.keyCode==goog.events.KeyCodes.X&&(Blockly.copy_(Blockly.selected),Blockly.selected.dispose(!0,!0))),a.keyCode==goog.events.KeyCodes.V&&Blockly.clipboardXml_&&Blockly.clipboardSource_.paste(Blockly.clipboardXml_);else Blockly.TypeBlock.onKeyDown_(a)};Blockly.terminateDrag_=function(){Blockly.BlockSvg.terminateDrag_();Blockly.Flyout.terminateDrag_()};Blockly.longPid_=0; +Blockly.onKeyDown_=function(a){if(a.keyCode==goog.events.KeyCodes.TAB&&Blockly.WidgetDiv.isVisible())Blockly.WidgetDiv.hide();else if(Blockly.isTargetInput_(a))return;if(a.keyCode==goog.events.KeyCodes.ESC)Blockly.hideChaff(),Blockly.selectField(null);else if(a.keyCode==goog.events.KeyCodes.TAB)a.shiftKey?Blockly.selectPrevField():Blockly.selectNextField();else if(a.keyCode==goog.events.KeyCodes.BACKSPACE||a.keyCode==goog.events.KeyCodes.DELETE)try{Blockly.selected&&Blockly.selected.isDeletable()&& +(Blockly.hideChaff(),Blockly.selected.dispose(!0,!0))}finally{a.preventDefault()}else if(a.altKey||a.ctrlKey||a.metaKey)Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(Blockly.hideChaff(),a.keyCode==goog.events.KeyCodes.C?Blockly.copy_(Blockly.selected):a.keyCode==goog.events.KeyCodes.X&&(Blockly.copy_(Blockly.selected),Blockly.selected.dispose(!0,!0))),a.keyCode==goog.events.KeyCodes.V&&Blockly.clipboardXml_&&Blockly.clipboardSource_.paste(Blockly.clipboardXml_); +else if(Blockly.WidgetDiv.isVisible())Blockly.WidgetDiv.onKeyDown_(a);else if(Blockly.selected){var b=Blockly.selected;if(a.keyCode===(b.RTL?goog.events.KeyCodes.RIGHT:goog.events.KeyCodes.LEFT))Blockly.selectPrevBlock();else if(a.keyCode===(b.RTL?goog.events.KeyCodes.LEFT:goog.events.KeyCodes.RIGHT))Blockly.selectNextBlock();else if(a.keyCode===goog.events.KeyCodes.UP)Blockly.selectParentBlock();else if(a.keyCode===goog.events.KeyCodes.DOWN)Blockly.selectChildBlock();else if(a.keyCode===goog.events.KeyCodes.SPACE){var c= +goog.style.getBoundingClientRect_(b.svgGroup_),d=Blockly.SNAP_RADIUS*b.workspace.scale;a.clientX=b.RTL?c.right-d:c.left+d;a.clientY=c.top+d;Blockly.selected.showContextMenu_(a)}}else Blockly.TypeBlock.onKeyDown_(a)};Blockly.selectField=function(a){if(Blockly.selectedField=a)a.sourceBlock_.select(),a.showEditor_()};Blockly.selectNextField=function(){Blockly.selectField(null)};Blockly.selectPrevField=function(){Blockly.selectField(null)}; +Blockly.selectNextBlock=function(){var a=Blockly.findNextBlock(Blockly.selected);Blockly.selectField(null);null!==a&&a.select()};Blockly.findNextBlock=function(a){var b=null,c=a;for(a=null;null!=c&&null===b;){var d=c.getChildren(),e=0;0 0) { + spot = goog.array.indexOf(children, prevBlock)+1; + } + if (spot < children.length) { + newSelect = children[spot]; + } else { + // Nothing more on this block, so let's try for our parent (remembering + // which child we were + prevBlock = baseBlock; + baseBlock = baseBlock.getParent(); + } + } + // If we didn't get any blocks out of the current group, try for the next one + // at the top level. Note that prevBlock will point to the top level block + // in the current group. + if (newSelect === null) { + // Get all the top blocks in physical sorted order to look through. + var blocks = Blockly.getMainWorkspace().getTopBlocks(true); + if (blocks.length > 0) { + var spot = goog.array.indexOf(blocks, prevBlock)+1; + // Did we actually find anything to match us in the array? + if (spot > 0) { + // When we get to the end of the array, wrap back to the first one + if (spot === blocks.length) { + spot = 0; + } + newSelect = blocks[spot]; + } + } + } + return newSelect; +}; + +/* + * ← Left Arrow (→ Right arrow in RTL mode) + * If this block has a previous sibling, + * follow that block to the last sibling of any children recursively, + * otherwise select the parent block. + * The intent is that the Left arrow selects the block in reverse of what + * the right arrow did so that you traverse the blocks in the same + * forward/backwards order. + */ +Blockly.selectPrevBlock = function() { + var newSelect = Blockly.findPrevBlock(Blockly.selected); + Blockly.selectField(null); + Blockly.selectBlock(newSelect); +} + +/** + * Determine the previous block in order from this block. + * @param {Blockly.Block} block Block to navigate from. + * @return {Blockly.Block} block that is orevuiys in order from this block + */ +Blockly.findPrevBlock = function(block) { + /** @type {Blockly.Block} */ + var newSelect = null; // New block to be selected + /** @type {Blockly.Block} */ + var baseBlock = null; // Block being evaluated + /** @type {Blockly.Block} */ + var prevBlock = block; // Last block we had selected + if (prevBlock != null) { + baseBlock = prevBlock.getParent(); + // If we didn't get any blocks out of the current group, try for the previous + // one at the top level. Note that prevBlock will point to the top level + // block in the current group. + if (baseBlock === null) { + // Get all the top blocks in physical sorted order to look through. + var blocks = Blockly.getMainWorkspace().getTopBlocks(true); + if (blocks.length > 0) { + var spot = goog.array.indexOf(blocks, prevBlock); + // Did we actually find anything to match us in the array? + if (spot >= 0) { + // When we get to the start of the array, wrap back to the last one + if (spot === 0) { + spot = blocks.length; + } + baseBlock = blocks[spot-1]; + } + } + } + } + while ((baseBlock != null) && (newSelect === null)) { + // If this block has any children, we go to the last one of any children + // otherwise we go to the parent + var children = []; + if (!baseBlock.isCollapsed()) { + children = baseBlock.getChildren(); + } + if (children.length === 0) { + newSelect = baseBlock; + } else { + var spot = goog.array.indexOf(children, prevBlock); + if (spot === 0) { + newSelect = baseBlock; + } else { + if (spot === -1) { + spot = children.length; + } + prevBlock = null; + baseBlock = children[spot-1]; + } + } + } + return newSelect; +}; + +/* + * ↑ Up Arrow + * Previous sibling of current block if there is one, + * otherwise follow the logic for the left arrow key + * (right arrow when in RTL mode) + */ +Blockly.selectParentBlock = function() { + /** @type {Blockly.Block} */ + var newSelect = null; // New block to be selected + /** @type {Blockly.Block} */ + var baseBlock = null; // Block being evaluated + /** @type {Blockly.Block} */ + var prevBlock = Blockly.selected; // Last block we had selected + if (prevBlock != null) { + baseBlock = prevBlock.getParent(); + if (baseBlock != null) { + var children = []; + if (!baseBlock.isCollapsed()) { + children = baseBlock.getChildren(); + } + if (children.length >= 0) { + var spot = goog.array.indexOf(children, prevBlock); + if (spot > 0) { + newSelect = children[spot-1]; + } + } + } + } + if (newSelect === null) { + Blockly.selectPrevBlock(); + } else { + Blockly.selectField(null); + Blockly.selectBlock(newSelect); + } +}; + +/* + * ↓ Down Arrow + * Next Sibling of the current block if there is one, + * otherwise follow the logic for the right arrow key + * (left arrow when in RTL mode) + */ +Blockly.selectChildBlock = function() { + /** @type {Blockly.Block} */ + var newSelect = null; // New block to be selected + /** @type {Blockly.Block} */ + var baseBlock = null; // Block being evaluated + /** @type {Blockly.Block} */ + var prevBlock = Blockly.selected; // Last block we had selected + if (prevBlock != null) { + baseBlock = prevBlock.getParent(); + if (baseBlock != null) { + var children = []; + if (!baseBlock.isCollapsed()) { + children = baseBlock.getChildren(); + } + if (children.length >= 0) { + var spot = goog.array.indexOf(children, prevBlock); + if (spot > 0 && spot < (children.length-1)) { + newSelect = children[spot+1]; + } + } + } + } + if (newSelect === null) { + Blockly.selectNextBlock(); + } else { + Blockly.selectBlock(newSelect); } }; diff --git a/core/widgetdiv.js b/core/widgetdiv.js index 57aff08788e..6e9ab14a42a 100644 --- a/core/widgetdiv.js +++ b/core/widgetdiv.js @@ -143,3 +143,21 @@ Blockly.WidgetDiv.position = function(anchorX, anchorY, windowSize, Blockly.WidgetDiv.DIV.style.top = anchorY + 'px'; Blockly.WidgetDiv.DIV.style.height = windowSize.height - anchorY + 'px'; }; + +/** + * We keep a listener pointer in case of needing to unlisten to it. We only want + * one listener at a time, and a reload could create a second one, so we + * unlisten first and then listen back + * @private + */ +Blockly.WidgetDiv.onKeyDown_ = function(e){ + if (!Blockly.WidgetDiv.DIV) { + return; + } + if (e.altKey || e.ctrlKey || e.metaKey || + e.keycode === goog.events.KeyCodes.TAB) { + return; + } +//arrows, up and down on the menus. +//accelerators for other keys. + }; \ No newline at end of file diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 313980272af..d52a5389f19 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -908,6 +908,56 @@ Blockly.WorkspaceSvg.prototype.zoomCenter = function(type) { this.zoom(x, y, type); }; +/** + * Scroll the workspace to show the indicated block. + * @param {!Blockly.Block} block Block to be shown. + */ +Blockly.WorkspaceSvg.prototype.scrollToBlock = function(block) { + var metrics = this.getMetrics(); + var xy = block.getRelativeToSurfaceXY(); + var height = block.height; + var width = block.width; + + // Clip the suze of the block to the size of the view. + if (height >= metrics.viewHeight) { + height = metrics.viewHeight-1; + } + if (width >= metrics.viewWidth) { + width = metrics.viewWidth-1; + } + + // Figure out the boundary of the current block. + var top = xy.y; + var bottom = xy.y + height; + var left = xy.x; + var right = xy.x + width; + + var deltaY = 0; + var deltaX = 0; + + // Are we off the workspace in the vertical direction? + if (metrics.viewTop > top) { + deltaY = metrics.viewTop - top; + } else if (bottom > (metrics.viewTop + metrics.viewHeight)) { + deltaY = ((metrics.viewTop + metrics.viewHeight) - bottom); + } + + // Are we off the workspace in the horizontal direction? + if (metrics.viewLeft > left) { + deltaX = metrics.viewLeft - left; + } else if (right > (metrics.viewLeft + metrics.viewWidth)) { + deltaX = ((metrics.viewLeft + metrics.viewWidth) - right); + } + + // See if we have to actually scroll. + if (deltaX || deltaY) { + var currentScrollX = (metrics.viewLeft - metrics.contentLeft ); + var currentScrollY = (metrics.viewTop - metrics.contentTop ); + + this.scrollbar.set(currentScrollX - deltaX, currentScrollY - deltaY); + } +}; + /** * Reset zooming and dragging. */ From 489cc005638b283e44c88999425a9e7ddd85b557 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 18 Sep 2015 06:05:00 -0400 Subject: [PATCH 50/84] Add support for generating Java interfaces --- generators/java.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/generators/java.js b/generators/java.js index 83221fd7083..50a795d0aff 100644 --- a/generators/java.js +++ b/generators/java.js @@ -129,6 +129,10 @@ Blockly.Java.Baseclass_ = ''; * Processed by Blockly.Java.addImport */ Blockly.Java.needImports_ = []; +/** + * List of interfaces that this class implements + **/ +Blockly.Java.Interfaces_ = []; /** * List of libraries used by the caller's generated java code. These will * be processed by Blockly.Java.addImport @@ -205,6 +209,28 @@ Blockly.Java.getBaseclass = function() { return baseClass; } +/** + * Add an implementaiton (if any) for the generated Java code + * @param {string} iface Name of a interface that this class provides + */ +Blockly.Java.addInterface = function(iface) { + if (!goog.array.contains(this.Interfaces_, iface)) { + this.Interfaces_.push(iface); + } +} + +/** + * Get the interface list (if any) for the generated Java code + * @return {Array} baseclass Array of all interfaces that + * this class implements or null if no interfaces + */ +Blockly.Java.getInterfaces = function() { + if (this.Interfaces_.length === 0) { + return null; + } + return this.Interfaces_; +} + /** * Mark a variable as a global for the generated Java code * @param {block} block Block that the variable is contained in @@ -321,6 +347,14 @@ Blockly.Java.workspaceToCode = function(workspace, parms) { if (baseClass != '') { finalcode += ' extends ' + baseClass; } + var interfaces = this.getInterfaces(); + if (interfaces) { + var extra = ' implements '; + for(var iface = 0; iface < interfaces.length; iface++) { + finalcode += extra + interfaces[iface]; + extra = ', '; + } + } finalcode += ' {\n\n' + code + '\n' + '}\n\n' + From a0b67f37026b21959bb553a795b1e87cf315cf83 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 18 Sep 2015 08:02:46 -0400 Subject: [PATCH 51/84] Don't output description header for non-functions --- generators/java.js | 2 +- java_compressed.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generators/java.js b/generators/java.js index 50a795d0aff..94a81abdff0 100644 --- a/generators/java.js +++ b/generators/java.js @@ -1133,7 +1133,7 @@ Blockly.Java.finish = function(code) { // Figure out the header to put on the function var header = ''; var res1 = def.split("(", 2); - if (res1.length >= 2) { + if ((res1.length >= 2) && (res1[0].indexOf(";") ===-1)) { // Figure out the header to put on the function var header = '/**\n' + ' * Description goes here\n'; diff --git a/java_compressed.js b/java_compressed.js index db3cf616e3b..19ee2ce57f8 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -19,8 +19,8 @@ Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.funct d=!1;for(var e=0;ee;e++)for(g=b[e].sort(),f=0;fe;e++)for(g=b[e].sort(),f=0;f Date: Fri, 18 Sep 2015 15:14:46 -0400 Subject: [PATCH 52/84] Implemented tabbing to fields Updated scrollToArea function to support a 10 pixel margin on the main side when scrolling into view --- blockly_compressed.js | 16 ++-- core/block.js | 16 ++++ core/blockly.js | 175 +++++++++++++++++++++++++++++++++++---- core/field_clickimage.js | 2 +- core/workspace_svg.js | 52 +++++++----- 5 files changed, 214 insertions(+), 47 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 39c55e68cbe..27b37401520 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1155,8 +1155,8 @@ Blockly.WorkspaceSvg.prototype.updateToolbox=function(a){if(a=Blockly.parseToolb };Blockly.WorkspaceSvg.prototype.addChangeListener=function(a){a=Blockly.bindEvent_(this.getCanvas(),"blocklyWorkspaceChange",null,a);Array.prototype.push.apply(this.eventWrappers_,a);return a};Blockly.WorkspaceSvg.prototype.removeChangeListener=function(a){Blockly.unbindEvent_(a);a=this.eventWrappers_.indexOf(a);-1!=a&&this.eventWrappers_.splice(a,1)};Blockly.WorkspaceSvg.prototype.markFocused=function(){Blockly.mainWorkspace=this}; Blockly.WorkspaceSvg.prototype.zoom=function(a,b,c){var d=this.options.zoomOptions.scaleSpeed,e=this.getMetrics(),f=this.options.svg.createSVGPoint();f.x=a;f.y=b;f=f.matrixTransform(this.getCanvas().getCTM().inverse());a=f.x;b=f.y;f=this.getCanvas();c=1==c?d:1/d;d=this.scale*c;d>this.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale:d=b.viewHeight&&(d=b.viewHeight-1);e>=b.viewWidth&&(e=b.viewWidth-1);a=c.y;var d=c.y+d,f=c.x,c=c.x+e,g=e=0;b.viewTop>a?e=b.viewTop-a:d>b.viewTop+b.viewHeight&&(e=b.viewTop+b.viewHeight-d);b.viewLeft>f?g=b.viewLeft-f:c>b.viewLeft+b.viewWidth&&(g=b.viewLeft+b.viewWidth-c);(g||e)&&this.scrollbar.set(b.viewLeft-b.contentLeft-g,b.viewTop-b.contentTop-e)}; -Blockly.WorkspaceSvg.prototype.zoomReset=function(){this.scale=1;this.updateGridPattern_();var a=this.getMetrics();this.scrollbar.set((a.contentWidth-a.viewWidth)/2,(a.contentHeight-a.viewHeight)/2);Blockly.hideChaff(!1);this.flyout_&&this.flyout_.reflow()}; +Blockly.WorkspaceSvg.prototype.scrollToArea=function(a,b){var c=this.getMetrics(),d=a.bottom-a.top,e=a.right-a.left;d>=c.viewHeight-10&&(d=c.viewHeight-11);e>=c.viewWidth-10&&(e=c.viewWidth-11);a.top-=10;a.bottom=a.top+d;b?(a.right+=10,a.left=a.right-e):(a.left-=10,a.right=a.left+e);e=d=0;c.viewTop>a.top?d=c.viewTop-a.top:a.bottom>c.viewTop+c.viewHeight&&(d=c.viewTop+c.viewHeight-a.bottom);c.viewLeft>a.left?e=c.viewLeft-a.left:a.right>c.viewLeft+c.viewWidth&&(e=c.viewLeft+c.viewWidth-a.right);(e|| +d)&&this.scrollbar.set(c.viewLeft-c.contentLeft-e,c.viewTop-c.contentTop-d)};Blockly.WorkspaceSvg.prototype.zoomReset=function(){this.scale=1;this.updateGridPattern_();var a=this.getMetrics();this.scrollbar.set((a.contentWidth-a.viewWidth)/2,(a.contentHeight-a.viewHeight)/2);Blockly.hideChaff(!1);this.flyout_&&this.flyout_.reflow()}; Blockly.WorkspaceSvg.prototype.updateGridPattern_=function(){if(this.options.gridPattern){var a=this.options.gridOptions.spacing*this.scale||100;this.options.gridPattern.setAttribute("width",a);this.options.gridPattern.setAttribute("height",a);var a=Math.floor(this.options.gridOptions.spacing/2)+.5,b=a-this.options.gridOptions.length/2,c=a+this.options.gridOptions.length/2,d=this.options.gridPattern.firstChild,e=d&&d.nextSibling,a=a*this.scale,b=b*this.scale,c=c*this.scale;d&&(d.setAttribute("stroke-width", this.scale),d.setAttribute("x1",b),d.setAttribute("y1",a),d.setAttribute("x2",c),d.setAttribute("y2",a));e&&(e.setAttribute("stroke-width",this.scale),e.setAttribute("x1",a),e.setAttribute("y1",b),e.setAttribute("x2",a),e.setAttribute("y2",c))}};Blockly.WorkspaceSvg.prototype.setVisible=Blockly.WorkspaceSvg.prototype.setVisible;Blockly.WorkspaceSvg.prototype.addChangeListener=Blockly.WorkspaceSvg.prototype.addChangeListener;Blockly.WorkspaceSvg.prototype.removeChangeListener=Blockly.WorkspaceSvg.prototype.removeChangeListener;Blockly.Mutator=function(a){Blockly.Mutator.superClass_.constructor.call(this,null);this.quarkNames_=a};goog.inherits(Blockly.Mutator,Blockly.Icon);Blockly.Mutator.prototype.png_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAANyAAADcgBffIlqAAAAAd0SU1FB98DGhULOIajyb8AAAHMSURBVDjLnZS9SiRBFIXP/CQ9iIHgPoGBTo8vIAaivoKaKJr6DLuxYqKYKIqRgSCMrblmIxqsICgOmAriziIiRXWjYPdnUDvT2+PMsOyBoop7qk71vedWS5KAkrWsGUMjSYjpgSQhNoZGFLEKeGoKGMNttUpULkOhAFL3USiA70MQEBnDDeDJWtaqVaJeB7uNICAKQ1ZkDI1yufOm+XnY2YHl5c6874MxPClJiDulkMvBxYWrw/095POdU0sS4hxALqcWtreloSGpVJLGxtL49bX0+Ci9vUkzM2kcXGFbypUKxHHLBXZ3YW4ONjfh4yN1aGIiPQOQEenrg6MjR+zvZz99Y8PFT09hYCArktdfsFY6PHTr83NlUKu5+eREennJchmR/n5pYcGtJyezG6em3Dw7Kw0OZrlMOr6f1gTg4ACWlmBvz9WoifHxbDpf3Flfd+54njQ9ncYvL6WHB+n9XVpcbHOnW59IUKu5m+p11zftfLHo+qRorZ6Hh/Xt7k5fsLUl1evS1dWfG9swMiJZq9+KIlaD4P/eztkZNgz5LsAzhpvjY6JK5d9e8eioE3h95SdQbDrkhSErxvArjkl6/U/imMQYnsKQH02BT7vbZZfVOiWhAAAAAElFTkSuQmCC"; Blockly.Mutator.prototype.workspaceWidth_=0;Blockly.Mutator.prototype.workspaceHeight_=0;Blockly.Mutator.prototype.iconClick_=function(a){this.block_.isEditable()&&Blockly.Icon.prototype.iconClick_.call(this,a)}; @@ -1174,7 +1174,7 @@ Blockly.Warning.prototype.setVisible=function(a){if(a!=this.isVisible())if(a){a= this.body_=this.bubble_=null};Blockly.Warning.prototype.bodyFocus_=function(a){this.bubble_.promote_()};Blockly.Warning.prototype.setText=function(a,b){this.text_[b]!=a&&(a?this.text_[b]=a:delete this.text_[b],this.isVisible()&&(this.setVisible(!1),this.setVisible(!0)))};Blockly.Warning.prototype.getText=function(){var a=[],b;for(b in this.text_)a.push(this.text_[b]);return a.join("\n")};Blockly.Warning.prototype.dispose=function(){this.block_.warning=null;Blockly.Icon.prototype.dispose.call(this)};Blockly.FieldImage=function(a,b,c,d){this.sourceBlock_=null;this.height_=Number(c);this.width_=Number(b);this.size_=new goog.math.Size(this.width_,this.height_+2*Blockly.BlockSvg.INLINE_PADDING_Y);this.text_=d||"";this.setSrc(a)};goog.inherits(Blockly.FieldImage,Blockly.Field);Blockly.FieldImage.prototype.rectElement_=null;Blockly.FieldImage.prototype.EDITABLE=!1;Blockly.FieldImage.prototype.SERIALIZABLE=!1; Blockly.FieldImage.prototype.init=function(a){this.sourceBlock_||(this.sourceBlock_=a,this.fieldGroup_=Blockly.createSvgElement("g",{},null),this.imageElement_=Blockly.createSvgElement("image",{height:this.height_+"px",width:this.width_+"px"},this.fieldGroup_),this.setSrc(this.src_),goog.userAgent.GECKO&&(this.rectElement_=Blockly.createSvgElement("rect",{height:this.height_+"px",width:this.width_+"px","fill-opacity":0},this.fieldGroup_)),a.getSvgRoot().appendChild(this.fieldGroup_),a=this.rectElement_|| this.imageElement_,a.tooltip=this.sourceBlock_,Blockly.Tooltip.bindMouseEvents(a))};Blockly.FieldImage.prototype.dispose=function(){goog.dom.removeNode(this.fieldGroup_);this.rectElement_=this.imageElement_=this.fieldGroup_=null};Blockly.FieldImage.prototype.setTooltip=function(a){(this.rectElement_||this.imageElement_).tooltip=a};Blockly.FieldImage.prototype.getSrc=function(){return this.src_}; -Blockly.FieldImage.prototype.setSrc=function(a){null!==a&&(this.src_=a,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(a)?a:""))};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a)};Blockly.FieldImage.prototype.render_=function(){};Blockly.FieldClickImage=function(a,b,c,d,e){Blockly.FieldClickImage.superClass_.constructor.call(this,a,b,c,"");this.setChangeHandler(e)};goog.inherits(Blockly.FieldClickImage,Blockly.FieldImage);Blockly.FieldClickImage.prototype.EDITABLE=!0;Blockly.FieldLabel.prototype.SERIALIZABLE=!1;Blockly.FieldClickImage.prototype.CURSOR="default"; +Blockly.FieldImage.prototype.setSrc=function(a){null!==a&&(this.src_=a,this.imageElement_&&this.imageElement_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",goog.isString(a)?a:""))};Blockly.FieldImage.prototype.setText=function(a){null!==a&&(this.text_=a)};Blockly.FieldImage.prototype.render_=function(){};Blockly.FieldClickImage=function(a,b,c,d,e){Blockly.FieldClickImage.superClass_.constructor.call(this,a,b,c,"");this.setChangeHandler(e)};goog.inherits(Blockly.FieldClickImage,Blockly.FieldImage);Blockly.FieldClickImage.prototype.EDITABLE=!0;Blockly.FieldClickImage.prototype.SERIALIZABLE=!1;Blockly.FieldClickImage.prototype.CURSOR="default"; Blockly.FieldClickImage.prototype.updateEditable=function(){this.sourceBlock_.isInFlyout||!this.EDITABLE?Blockly.addClass_(this.fieldGroup_,"blocklyIconGroupReadonly"):Blockly.removeClass_(this.fieldGroup_,"blocklyIconGroupReadonly")}; Blockly.FieldClickImage.prototype.init=function(a){this.sourceBlock_||(Blockly.FieldClickImage.superClass_.init.call(this,a),Blockly.addClass_(this.fieldGroup_,"blocklyIconGroup"),Blockly.addClass_(this.fieldGroup_,"blocklyIconFading"),this.visible_||(this.visible_=!0,this.setVisible(!1)),this.updateEditable(),this.mouseUpWrapper_=Blockly.bindEvent_(this.fieldGroup_,"mouseup",this,this.onMouseUp_),this.updateTextNode_())}; Blockly.FieldClickImage.prototype.showEditor_=function(){if(this.changeHandler_){var a=Blockly.dragMode_;Blockly.dragMode_=0;this.changeHandler_.call(this.sourceBlock_,this);Blockly.dragMode_=a}};Blockly.FieldDropdown=function(a,b){this.menuGenerator_=a;this.setChangeHandler(b);this.trimOptions_();var c=this.getOptions_()[0];this.value_=c[1];Blockly.FieldDropdown.superClass_.constructor.call(this,c[0])};goog.inherits(Blockly.FieldDropdown,Blockly.Field);Blockly.FieldDropdown.CHECKMARK_OVERHANG=25;Blockly.FieldDropdown.ARROW_CHAR=goog.userAgent.ANDROID?"\u25bc":"\u25be";Blockly.FieldDropdown.prototype.CURSOR="default"; @@ -1211,8 +1211,8 @@ a)?a.childBlocks_.push(this):this.workspace.addTopBlock(this)};Blockly.Block.pro Blockly.Block.prototype.setMovable=function(a){this.movable_=a};Blockly.Block.prototype.isEditable=function(){return this.editable_&&!(this.workspace&&this.workspace.options.readOnly)};Blockly.Block.prototype.setEditable=function(a){this.editable_=a;a=0;for(var b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.updateEditable();if(this.rendered)for(b=this.getIcons(!0),a=0;aBlockly.DRAG_RADIUS&&Blockly.longStop_();a.stopPropagation()}}}; Blockly.onKeyDown_=function(a){if(a.keyCode==goog.events.KeyCodes.TAB&&Blockly.WidgetDiv.isVisible())Blockly.WidgetDiv.hide();else if(Blockly.isTargetInput_(a))return;if(a.keyCode==goog.events.KeyCodes.ESC)Blockly.hideChaff(),Blockly.selectField(null);else if(a.keyCode==goog.events.KeyCodes.TAB)a.shiftKey?Blockly.selectPrevField():Blockly.selectNextField();else if(a.keyCode==goog.events.KeyCodes.BACKSPACE||a.keyCode==goog.events.KeyCodes.DELETE)try{Blockly.selected&&Blockly.selected.isDeletable()&& (Blockly.hideChaff(),Blockly.selected.dispose(!0,!0))}finally{a.preventDefault()}else if(a.altKey||a.ctrlKey||a.metaKey)Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(Blockly.hideChaff(),a.keyCode==goog.events.KeyCodes.C?Blockly.copy_(Blockly.selected):a.keyCode==goog.events.KeyCodes.X&&(Blockly.copy_(Blockly.selected),Blockly.selected.dispose(!0,!0))),a.keyCode==goog.events.KeyCodes.V&&Blockly.clipboardXml_&&Blockly.clipboardSource_.paste(Blockly.clipboardXml_); else if(Blockly.WidgetDiv.isVisible())Blockly.WidgetDiv.onKeyDown_(a);else if(Blockly.selected){var b=Blockly.selected;if(a.keyCode===(b.RTL?goog.events.KeyCodes.RIGHT:goog.events.KeyCodes.LEFT))Blockly.selectPrevBlock();else if(a.keyCode===(b.RTL?goog.events.KeyCodes.LEFT:goog.events.KeyCodes.RIGHT))Blockly.selectNextBlock();else if(a.keyCode===goog.events.KeyCodes.UP)Blockly.selectParentBlock();else if(a.keyCode===goog.events.KeyCodes.DOWN)Blockly.selectChildBlock();else if(a.keyCode===goog.events.KeyCodes.SPACE){var c= -goog.style.getBoundingClientRect_(b.svgGroup_),d=Blockly.SNAP_RADIUS*b.workspace.scale;a.clientX=b.RTL?c.right-d:c.left+d;a.clientY=c.top+d;Blockly.selected.workspace.scrollToBlock(Blockly.selected);Blockly.selected.showContextMenu_(a)}}else Blockly.TypeBlock.onKeyDown_(a)};Blockly.selectBlock=function(a){a&&(a.select(),a.workspace.scrollToBlock(a))};Blockly.selectField=function(a){if(Blockly.selectedField=a)Blockly.selectBlock(a.sourceBlock_),a.showEditor_()};Blockly.selectNextField=function(){Blockly.selectField(null)}; -Blockly.selectPrevField=function(){Blockly.selectField(null)};Blockly.selectNextBlock=function(){var a=Blockly.findNextBlock(Blockly.selected);Blockly.selectField(null);Blockly.selectBlock(a)}; +goog.style.getBoundingClientRect_(b.svgGroup_),d=Blockly.SNAP_RADIUS*b.workspace.scale;a.clientX=b.RTL?c.right-d:c.left+d;a.clientY=c.top+d;Blockly.selectBlock(Blockly.selected);Blockly.selected.showContextMenu_(a)}}else Blockly.TypeBlock.onKeyDown_(a)};Blockly.selectBlock=function(a){if(a){a.select();var b=a.getRelativeToSurfaceXY(),c=a.width,d={top:b.y,bottom:b.y+a.height};a.RTL?(d.left=b.x-c,d.right=b.x):(d.left=b.x,d.right=b.x+c);a.workspace.scrollToArea(d,a.RTL)}}; +Blockly.selectField=function(a){if(Blockly.selectedField=a){var b=a.sourceBlock_;b.select();var c=b.getRelativeToSurfaceXY(),d=b.width,e={top:c.y,bottom:c.y+b.height};b.RTL?(e.left=c.x-d,e.right=c.x):(e.left=c.x,e.right=c.x+d);b.workspace.scrollToArea(e,b.RTL);if(e=a.getSvgRoot()){var f=Blockly.getRelativeXY_(e),e={top:c.y+f.y,bottom:c.y+b.height};b.RTL?(e.left=c.x-d,e.right=c.x-f.x):(e.left=c.x+f.x,e.right=c.x+d);b.workspace.scrollToArea(e,b.RTL)}a.showEditor_()}}; +Blockly.selectNextField=function(){for(var a=Blockly.selectedField,b=Blockly.selected,c=null;null===c;){b||(b=Blockly.findNextBlock(null),a=null);if(!b)break;var d=b.getEditableFields();if(d.length){var e=0;a&&(e=goog.array.indexOf(d,a)+1,e>=d.length&&(e=-1));-1!==e&&(c=d[e])}if(null===c&&(b=Blockly.findNextBlock(b),a=null,b==Blockly.selected))break}Blockly.selectField(c)}; +Blockly.selectPrevField=function(){for(var a=Blockly.selectedField,b=Blockly.selected,c=null;null===c;){b||(b=Blockly.findNextBlock(null),a=null);if(!b)break;var d=b.getEditableFields();if(d.length){var e=d.length-1;a&&(e=goog.array.indexOf(d,a)-1,0>e&&(e=-1));-1!==e&&(c=d[e])}if(null===c&&(b=Blockly.findPrevBlock(b),a=null,b==Blockly.selected))break}Blockly.selectField(c)};Blockly.selectNextBlock=function(){var a=Blockly.findNextBlock(Blockly.selected);Blockly.selectField(null);Blockly.selectBlock(a)}; Blockly.findNextBlock=function(a){var b=null,c=a;for(a=null;null!=c&&null===b;){var d=[];c.isCollapsed()||(d=c.getChildren());var e=0;0} Array of fields (which can be empty) + */ + Blockly.Block.prototype.getEditableFields = function() { + var fields = []; + for (var i = 0, input; input = this.inputList[i]; i++) { + for (var j = 0, field; field = input.fieldRow[j]; j++) { + if (field.EDITABLE && field.SERIALIZABLE) { + fields.push(field); + } + } + } + return fields; +} + /** * Returns the language-neutral value from the field of a block. * @param {string} name The name of the field. diff --git a/core/blockly.js b/core/blockly.js index 03ddb910608..e968ac2d221 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -433,7 +433,8 @@ Blockly.onKeyDown_ = function(e) { e.clientX = box.left + offset; } e.clientY = box.top + offset; - Blockly.selected.workspace.scrollToBlock(Blockly.selected); +// Blockly.selected.workspace.scrollToArea(Blockly.selected); + Blockly.selectBlock(Blockly.selected); Blockly.selected.showContextMenu_(e); } } @@ -446,7 +447,21 @@ Blockly.onKeyDown_ = function(e) { Blockly.selectBlock = function(block) { if (block) { block.select(); - block.workspace.scrollToBlock(block); + var xy = block.getRelativeToSurfaceXY(); + var height = block.height; + var width = block.width; + var rect = { + top: xy.y, + bottom: xy.y + block.height + }; + if (block.RTL) { + rect.left = xy.x-width; + rect.right = xy.x; + } else { + rect.left = xy.x; + rect.right = xy.x + width; + } + block.workspace.scrollToArea(rect, block.RTL); } }; @@ -457,31 +472,157 @@ Blockly.selectBlock = function(block) { Blockly.selectField = function(field) { Blockly.selectedField = field; if (field) { - Blockly.selectBlock(field.sourceBlock_); + var block = field.sourceBlock_; + // First we select the block and scroll so that it is visible in the view + // Generally this will also have the fields in view, but if the block is + // large enough and the field is far enough to the end of the block, it + // might be possible that the field is obscured, but we want to use the + // block as a basis to start with. + block.select(); + var xy = block.getRelativeToSurfaceXY(); + var height = block.height; + var width = block.width; + var rect = { + top: xy.y, + bottom: xy.y + block.height + }; + if (block.RTL) { + rect.left = xy.x-width; + rect.right = xy.x; + } else { + rect.left = xy.x; + rect.right = xy.x + width; + } + block.workspace.scrollToArea(rect, block.RTL); + + + var fieldElem = field.getSvgRoot(); + if (fieldElem) { + var elemXy = Blockly.getRelativeXY_(fieldElem); + rect = { + top: xy.y + elemXy.y, + bottom: xy.y + block.height + }; + if (block.RTL) { + rect.left = xy.x - width; + rect.right = xy.x - elemXy.x; + } else { + rect.left = xy.x + elemXy.x; + rect.right = xy.x + width; + } + block.workspace.scrollToArea(rect, block.RTL); + } + // Now we need to active the field for editing field.showEditor_(); } }; -// ↹ Tab: -// Activates the next editable following the logic of → Right arrow -// (→ Left arrow in RTL mode) to go past any fields -// which have no editable fields. -// Note that it does not ever leave the Blockly canvas to activate -// other UI elements of the browser. +/** + * ↹ Tab: + * Activates the next editable following the logic of → Right arrow + * (→ Left arrow in RTL mode) to go past any fields + * which have no editable fields. + * Note that it does not ever leave the Blockly canvas to activate + * other UI elements of the browser. + */ Blockly.selectNextField = function() { - Blockly.selectField(null); + var lastField = Blockly.selectedField; + var curBlock = Blockly.selected; + var selField = null; + // Find us a field to select + while(selField === null) { + // If we started out with no block selected, go to the first block + if (!curBlock) { + curBlock = Blockly.findNextBlock(null); + lastField = null; + } + // If we found no block (or there are no blocks) then we can just quit + if (!curBlock) { + break; + } + // See if the current block has any editable fields on it + var fields = curBlock.getEditableFields(); + if (fields.length) { + // It does have fields, see what field we should select in it + var spot = 0; + if (lastField) { + // if the currently selected field is one of them and look for any + // fields after it + spot = goog.array.indexOf(fields, lastField)+1; + if (spot >= fields.length) { + // it was the last field on the block so we want to skip to the next + spot = -1; + } + } + if (spot !== -1) { + selField = fields[spot]; + } + } + if (selField === null) { + // No fields so go to the next block + curBlock = Blockly.findNextBlock(curBlock); + lastField = null; + if (curBlock == Blockly.selected) { + break; + } + } + } + Blockly.selectField(selField); }; -// ⇧↹ Shift Tab -// Activates the previous editable field following the logic of -// → Left arrow (→ Right arrow in RTL mode) to go past any fields -// which have no editable fields. -// Note that it does not ever leave the Blockly canvas to activate -// other UI elements of the browser. +/** + * ⇧↹ Shift Tab + * Activates the previous editable field following the logic of + * → Left arrow (→ Right arrow in RTL mode) to go past any fields + * which have no editable fields. + * Note that it does not ever leave the Blockly canvas to activate + * other UI elements of the browser. + */ Blockly.selectPrevField = function() { - Blockly.selectField(null); + var lastField = Blockly.selectedField; + var curBlock = Blockly.selected; + var selField = null; + // Find us a field to select + while(selField === null) { + // If we started out with no block selected, go to the first block + if (!curBlock) { + curBlock = Blockly.findNextBlock(null); + lastField = null; + } + // If we found no block (or there are no blocks) then we can just quit + if (!curBlock) { + break; + } + // See if the current block has any editable fields on it + var fields = curBlock.getEditableFields(); + if (fields.length) { + // It does have fields, see what field we should select in it + var spot = fields.length-1; + if (lastField) { + // if the currently selected field is one of them and look for any + // fields after it + spot = goog.array.indexOf(fields, lastField)-1; + if (spot < 0) { + // it was the last field on the block so we want to skip to the next + spot = -1; + } + } + if (spot !== -1) { + selField = fields[spot]; + } + } + if (selField === null) { + // No fields so go to the next block + curBlock = Blockly.findPrevBlock(curBlock); + lastField = null; + if (curBlock == Blockly.selected) { + break; + } + } + } + Blockly.selectField(selField); }; /** diff --git a/core/field_clickimage.js b/core/field_clickimage.js index 788658fd8f9..6aac0437aa3 100644 --- a/core/field_clickimage.js +++ b/core/field_clickimage.js @@ -53,7 +53,7 @@ goog.inherits(Blockly.FieldClickImage, Blockly.FieldImage); * However we don't want to serialize it even if it is present */ Blockly.FieldClickImage.prototype.EDITABLE = true; -Blockly.FieldLabel.prototype.SERIALIZABLE = false; +Blockly.FieldClickImage.prototype.SERIALIZABLE = false; /** * Mouse cursor style when over the hotspot that initiates the editor. diff --git a/core/workspace_svg.js b/core/workspace_svg.js index d52a5389f19..124f56a442b 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -909,44 +909,52 @@ Blockly.WorkspaceSvg.prototype.zoomCenter = function(type) { }; /** - * Scroll the workspace to show the indicated block. - * @param {!Blockly.Block} block Block to be shown. + * Scroll the workspace to show the area. + * Note that we include a 10 pixel margin + * @param {Object} rect Rectangle of area to be scrolled to. + * @param {boolean=} rtl Indicator if the block is a RTL block. */ -Blockly.WorkspaceSvg.prototype.scrollToBlock = function(block) { +Blockly.WorkspaceSvg.prototype.scrollToArea = function(rect, rtl) { var metrics = this.getMetrics(); - var xy = block.getRelativeToSurfaceXY(); - var height = block.height; - var width = block.width; + + var height = rect.bottom-rect.top; + var width = rect.right-rect.left; + var margin = 10; // Clip the suze of the block to the size of the view. - if (height >= metrics.viewHeight) { - height = metrics.viewHeight-1; + if (height >= (metrics.viewHeight - margin)) { + height = metrics.viewHeight - (margin+1); } - if (width >= metrics.viewWidth) { - width = metrics.viewWidth-1; + if (width >= (metrics.viewWidth - margin)) { + width = metrics.viewWidth - (margin+1); } // Figure out the boundary of the current block. - var top = xy.y; - var bottom = xy.y + height; - var left = xy.x; - var right = xy.x + width; + rect.top -= margin; + rect.bottom = rect.top + height; + if (rtl) { + rect.right += margin; + rect.left = rect.right-width; + } else { + rect.left -= margin; + rect.right = rect.left+width; + } var deltaY = 0; var deltaX = 0; // Are we off the workspace in the vertical direction? - if (metrics.viewTop > top) { - deltaY = metrics.viewTop - top; - } else if (bottom > (metrics.viewTop + metrics.viewHeight)) { - deltaY = ((metrics.viewTop + metrics.viewHeight) - bottom); + if (metrics.viewTop > rect.top) { + deltaY = metrics.viewTop - rect.top; + } else if (rect.bottom > (metrics.viewTop + metrics.viewHeight)) { + deltaY = ((metrics.viewTop + metrics.viewHeight) - rect.bottom); } // Are we off the workspace in the horizontal direction? - if (metrics.viewLeft > left) { - deltaX = metrics.viewLeft - left; - } else if (right > (metrics.viewLeft + metrics.viewWidth)) { - deltaX = ((metrics.viewLeft + metrics.viewWidth) - right); + if (metrics.viewLeft > rect.left) { + deltaX = metrics.viewLeft - rect.left; + } else if (rect.right > (metrics.viewLeft + metrics.viewWidth)) { + deltaX = ((metrics.viewLeft + metrics.viewWidth) - rect.right); } // See if we have to actually scroll. From 7988d7f2356f6219d7d5f1390f08d6f1198753e7 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 21 Sep 2015 08:53:04 -0400 Subject: [PATCH 53/84] Improve up/down arrow navigation Take into account proper parent blocks. --- blockly_compressed.js | 9 +-- core/blockly.js | 143 ++++++++++++++++++++++++++---------------- 2 files changed, 94 insertions(+), 58 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 27b37401520..ac148fbf779 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1531,10 +1531,11 @@ goog.style.getBoundingClientRect_(b.svgGroup_),d=Blockly.SNAP_RADIUS*b.workspace Blockly.selectField=function(a){if(Blockly.selectedField=a){var b=a.sourceBlock_;b.select();var c=b.getRelativeToSurfaceXY(),d=b.width,e={top:c.y,bottom:c.y+b.height};b.RTL?(e.left=c.x-d,e.right=c.x):(e.left=c.x,e.right=c.x+d);b.workspace.scrollToArea(e,b.RTL);if(e=a.getSvgRoot()){var f=Blockly.getRelativeXY_(e),e={top:c.y+f.y,bottom:c.y+b.height};b.RTL?(e.left=c.x-d,e.right=c.x-f.x):(e.left=c.x+f.x,e.right=c.x+d);b.workspace.scrollToArea(e,b.RTL)}a.showEditor_()}}; Blockly.selectNextField=function(){for(var a=Blockly.selectedField,b=Blockly.selected,c=null;null===c;){b||(b=Blockly.findNextBlock(null),a=null);if(!b)break;var d=b.getEditableFields();if(d.length){var e=0;a&&(e=goog.array.indexOf(d,a)+1,e>=d.length&&(e=-1));-1!==e&&(c=d[e])}if(null===c&&(b=Blockly.findNextBlock(b),a=null,b==Blockly.selected))break}Blockly.selectField(c)}; Blockly.selectPrevField=function(){for(var a=Blockly.selectedField,b=Blockly.selected,c=null;null===c;){b||(b=Blockly.findNextBlock(null),a=null);if(!b)break;var d=b.getEditableFields();if(d.length){var e=d.length-1;a&&(e=goog.array.indexOf(d,a)-1,0>e&&(e=-1));-1!==e&&(c=d[e])}if(null===c&&(b=Blockly.findPrevBlock(b),a=null,b==Blockly.selected))break}Blockly.selectField(c)};Blockly.selectNextBlock=function(){var a=Blockly.findNextBlock(Blockly.selected);Blockly.selectField(null);Blockly.selectBlock(a)}; -Blockly.findNextBlock=function(a){var b=null,c=a;for(a=null;null!=c&&null===b;){var d=[];c.isCollapsed()||(d=c.getChildren());var e=0;0 0) { + var spot = goog.array.indexOf(blocks, block)+1; + // Did we actually find anything to match us in the array? + if (spot > 0) { + // When we get to the end of the array, wrap back to the first one + if (spot === blocks.length) { + spot = 0; + } + nextBlock = blocks[spot]; + } + } + return nextBlock; +}; + /** * Determine the next block in order from this block. * @param {Blockly.Block} block Block to navigate from. @@ -682,19 +705,7 @@ Blockly.findNextBlock = function(block) { // at the top level. Note that prevBlock will point to the top level block // in the current group. if (newSelect === null) { - // Get all the top blocks in physical sorted order to look through. - var blocks = Blockly.getMainWorkspace().getTopBlocks(true); - if (blocks.length > 0) { - var spot = goog.array.indexOf(blocks, prevBlock)+1; - // Did we actually find anything to match us in the array? - if (spot > 0) { - // When we get to the end of the array, wrap back to the first one - if (spot === blocks.length) { - spot = 0; - } - newSelect = blocks[spot]; - } - } + newSelect = Blockly.findNextTopBlock(prevBlock); } return newSelect; }; @@ -717,7 +728,30 @@ Blockly.selectPrevBlock = function() { /** * Determine the previous block in order from this block. * @param {Blockly.Block} block Block to navigate from. - * @return {Blockly.Block} block that is orevuiys in order from this block + * @return {Blockly.Block} block that is previous in order from this block + */ +Blockly.findPrevTopBlock = function(block) { + var prevBlock = null; + // Get all the top blocks in physical sorted order to look through. + var blocks = Blockly.getMainWorkspace().getTopBlocks(true); + if (blocks.length > 0) { + var spot = goog.array.indexOf(blocks, block); + // Did we actually find anything to match us in the array? + if (spot >= 0) { + // When we get to the start of the array, wrap back to the last one + if (spot === 0) { + spot = blocks.length; + } + prevBlock = blocks[spot-1]; + } + } + return prevBlock; +}; + +/** + * Determine the previous block in order from this block. + * @param {Blockly.Block} block Block to navigate from. + * @return {Blockly.Block} block that is previous in order from this block */ Blockly.findPrevBlock = function(block) { /** @type {Blockly.Block} */ @@ -732,19 +766,7 @@ Blockly.findPrevBlock = function(block) { // one at the top level. Note that prevBlock will point to the top level // block in the current group. if (baseBlock === null) { - // Get all the top blocks in physical sorted order to look through. - var blocks = Blockly.getMainWorkspace().getTopBlocks(true); - if (blocks.length > 0) { - var spot = goog.array.indexOf(blocks, prevBlock); - // Did we actually find anything to match us in the array? - if (spot >= 0) { - // When we get to the start of the array, wrap back to the last one - if (spot === 0) { - spot = blocks.length; - } - baseBlock = blocks[spot-1]; - } - } + baseBlock = Blockly.findPrevTopBlock(prevBlock); } } while ((baseBlock != null) && (newSelect === null)) { @@ -786,26 +808,33 @@ Blockly.selectParentBlock = function() { /** @type {Blockly.Block} */ var prevBlock = Blockly.selected; // Last block we had selected if (prevBlock != null) { - baseBlock = prevBlock.getParent(); - if (baseBlock != null) { - var children = []; - if (!baseBlock.isCollapsed()) { - children = baseBlock.getChildren(); - } - if (children.length >= 0) { - var spot = goog.array.indexOf(children, prevBlock); - if (spot > 0) { - newSelect = children[spot-1]; + if (prevBlock.previousConnection != null) { + newSelect = prevBlock.previousConnection.targetBlock(); + } + if (newSelect === null) { + baseBlock = prevBlock.getSurroundParent(); + if (baseBlock != null) { + var children = []; + if (!baseBlock.isCollapsed()) { + children = baseBlock.getChildren(); + } + if (children.length >= 0) { + var spot = goog.array.indexOf(children, prevBlock); + if (spot > 0) { + newSelect = children[spot-1]; + } + } + if (newSelect === null) { + newSelect = baseBlock; } } } } if (newSelect === null) { - Blockly.selectPrevBlock(); - } else { - Blockly.selectField(null); - Blockly.selectBlock(newSelect); + newSelect = Blockly.findPrevTopBlock(prevBlock); } + Blockly.selectField(null); + Blockly.selectBlock(newSelect); }; /* @@ -822,25 +851,31 @@ Blockly.selectChildBlock = function() { /** @type {Blockly.Block} */ var prevBlock = Blockly.selected; // Last block we had selected if (prevBlock != null) { - baseBlock = prevBlock.getParent(); - if (baseBlock != null) { - var children = []; - if (!baseBlock.isCollapsed()) { - children = baseBlock.getChildren(); - } - if (children.length >= 0) { - var spot = goog.array.indexOf(children, prevBlock); - if (spot > 0 && spot < (children.length-1)) { - newSelect = children[spot+1]; + newSelect = prevBlock.getNextBlock(); + if (newSelect === null) { + baseBlock = prevBlock.getSurroundParent(); + if (baseBlock != null) { + var children = []; + if (!baseBlock.isCollapsed()) { + children = baseBlock.getChildren(); + } + if (children.length >= 0) { + var spot = goog.array.indexOf(children, prevBlock); + if (spot >= 0 && spot < (children.length-1)) { + newSelect = children[spot+1]; + } + } + if (newSelect === null) { + newSelect = baseBlock; } } } } if (newSelect === null) { - Blockly.selectNextBlock(); - } else { - Blockly.selectBlock(newSelect); + newSelect = Blockly.findNextTopBlock(prevBlock); } + Blockly.selectField(null); + Blockly.selectBlock(newSelect); }; /** From 639c17e7c2b042645384db599f31cfac5b7e022f Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 21 Sep 2015 08:55:48 -0400 Subject: [PATCH 54/84] Recompile --- blockly_compressed.js | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index ac148fbf779..92052b45cb8 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1202,7 +1202,6 @@ Blockly.Block.prototype.fill=function(a,b){this.previousConnection=this.nextConn Blockly.Block.prototype.dispose=function(a,b,c){this.unplug(a,!1);this.workspace&&!c&&(this.workspace.removeTopBlock(this),this.workspace=null);Blockly.selected==this&&(Blockly.selected=null);for(a=this.childBlocks_.length-1;0<=a;a--)this.childBlocks_[a].dispose(!1);for(a=0;b=this.inputList[a];a++)b.dispose();this.inputList.length=0;b=this.getConnections_(!0);for(a=0;athis.workspace.remainingCapacity()&&(d.enabled=!1);c.push(d);this.isEditable()&&!this.collapsed_&&this.workspace.options.comments&&(d={enabled:!0},this.comment?(d.text=Blockly.Msg.REMOVE_COMMENT,d.callback= -function(){b.setCommentText(null)}):(d.text=Blockly.Msg.ADD_COMMENT,d.callback=function(){b.setCommentText("")}),c.push(d));if(!this.collapsed_)for(d=1;dthis.workspace.remainingCapacity()&&(d.enabled=!1);c.push(d);this.isEditable()&&!this.collapsed_&&this.workspace.options.comments&&(d={enabled:!0},this.comment?(d.text=Blockly.Msg.REMOVE_COMMENT, +d.callback=function(){b.setCommentText(null)}):(d.text=Blockly.Msg.ADD_COMMENT,d.callback=function(){b.setCommentText("")}),c.push(d));if(!this.collapsed_)for(d=1;d=a.clientX&&0==a.clientY&&0==a.button)){Blockly.removeAllRanges();var d=b.getRelativeToSurfaceXY(),e=c.moveDrag(a);1==Blockly.dragMode_&&goog.math.Coordinate.distance(d,e)*c.scale>Blockly.DRAG_RADIUS&&(Blockly.dragMode_=2,Blockly.longStop_(),b.setParent(null),b.setDragging_(!0),c.recordDeleteAreas());if(2==Blockly.dragMode_){var f=d.x-b.dragStartXY_.x,d=d.y-b.dragStartXY_.y; -b.getSvgRoot().setAttribute("transform","translate("+e.x+","+e.y+")");for(e=0;e=a.clientX&&0==a.clientY&&0==a.button)){Blockly.removeAllRanges();var d=b.getRelativeToSurfaceXY(),e=c.moveDrag(a),f=b.getSvgRoot();1==Blockly.dragMode_&&goog.math.Coordinate.distance(d,e)*c.scale>Blockly.DRAG_RADIUS&&(Blockly.dragMode_=2,Blockly.longStop_(),f.translate_="",f.skew_="",b.parentBlock_&&(b.setParent(null),1<=c.scale&&b.disconnectUiEffect()),b.setDragging_(!0), +c.recordDeleteAreas());if(2==Blockly.dragMode_){var g=d.x-b.dragStartXY_.x,d=d.y-b.dragStartXY_.y;f.translate_="translate("+e.x+","+e.y+")";f.setAttribute("transform",f.translate_+f.skew_);for(e=0;e(b.RTL?a.viewWidth:a.viewWidth+e))for(var g=c.getTopBlocks(!1),h=0,k;k=g[h];h++){var l=k.getRelativeToSurfaceXY(),p=k.getHeightWidth(),m=f+25-p.height-l.y;0m&&k.moveBy(0,m);m=25+e-l.x-(b.RTL?0:p.width);0m&&k.moveBy(m,0)}}});Blockly.svgResize(c);Blockly.WidgetDiv.createDom();Blockly.Tooltip.createDom();return c}; Blockly.init_=function(a){var b=a.options;Blockly.bindEvent_(a.options.svg,"contextmenu",null,function(a){Blockly.isTargetInput_(a)||a.preventDefault()});Blockly.bindEvent_(window,"resize",null,function(){Blockly.svgResize(a)});Blockly.documentEventsBound_||(Blockly.bindEvent_(document,"keydown",null,Blockly.onKeyDown_),Blockly.bindEvent_(document,"touchend",null,Blockly.longStop_),Blockly.bindEvent_(document,"touchcancel",null,Blockly.longStop_),document.addEventListener("mouseup",Blockly.onMouseUp_, !1),goog.userAgent.IPAD&&Blockly.bindEvent_(window,"orientationchange",document,function(){Blockly.fireUiEvent(window,"resize")}),Blockly.documentEventsBound_=!0);if(b.languageTree)if(a.toolbox_)a.toolbox_.init(a);else if(a.flyout_){a.flyout_.init(a);a.flyout_.show(b.languageTree.childNodes);a.scrollX=a.flyout_.width_;b.RTL&&(a.scrollX*=-1);var c="translate("+a.scrollX+",0)";a.getCanvas().setAttribute("transform",c);a.getBubbleCanvas().setAttribute("transform",c)}b.hasScrollbars&&(a.scrollbar=new Blockly.ScrollbarPair(a), -a.scrollbar.resize());if(b.hasSounds){a.loadAudio_([b.pathToMedia+"click.mp3",b.pathToMedia+"click.wav",b.pathToMedia+"click.ogg"],"click");a.loadAudio_([b.pathToMedia+"delete.mp3",b.pathToMedia+"delete.ogg",b.pathToMedia+"delete.wav"],"delete");var d=[],b=function(){for(;d.length;)Blockly.unbindEvent_(d.pop());a.preloadAudio_()};d.push(Blockly.bindEvent_(document,"mousemove",null,b));d.push(Blockly.bindEvent_(document,"touchstart",null,b))}}; -Blockly.updateToolbox=function(a){console.warn("Deprecated call to Blockly.updateToolbox, use workspace.updateToolbox instead.");Blockly.getMainWorkspace().updateToolbox(a)};Blockly.utils={};Blockly.addClass_=function(a,b){var c=a.getAttribute("class")||"";-1==(" "+c+" ").indexOf(" "+b+" ")&&(c&&(c+=" "),a.setAttribute("class",c+b))};Blockly.removeClass_=function(a,b){var c=a.getAttribute("class");if(-1!=(" "+c+" ").indexOf(" "+b+" ")){for(var c=c.split(/\s+/),d=0;d Date: Mon, 21 Sep 2015 09:24:33 -0400 Subject: [PATCH 55/84] Take into account zooming when navigating to a block for field --- blockly_compressed.js | 4 ++-- core/workspace_svg.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 92052b45cb8..f3537b2c94b 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1155,8 +1155,8 @@ Blockly.WorkspaceSvg.prototype.updateToolbox=function(a){if(a=Blockly.parseToolb };Blockly.WorkspaceSvg.prototype.addChangeListener=function(a){a=Blockly.bindEvent_(this.getCanvas(),"blocklyWorkspaceChange",null,a);Array.prototype.push.apply(this.eventWrappers_,a);return a};Blockly.WorkspaceSvg.prototype.removeChangeListener=function(a){Blockly.unbindEvent_(a);a=this.eventWrappers_.indexOf(a);-1!=a&&this.eventWrappers_.splice(a,1)};Blockly.WorkspaceSvg.prototype.markFocused=function(){Blockly.mainWorkspace=this}; Blockly.WorkspaceSvg.prototype.zoom=function(a,b,c){var d=this.options.zoomOptions.scaleSpeed,e=this.getMetrics(),f=this.options.svg.createSVGPoint();f.x=a;f.y=b;f=f.matrixTransform(this.getCanvas().getCTM().inverse());a=f.x;b=f.y;f=this.getCanvas();c=1==c?d:1/d;d=this.scale*c;d>this.options.zoomOptions.maxScale?c=this.options.zoomOptions.maxScale/this.scale:d=c.viewHeight-10&&(d=c.viewHeight-11);e>=c.viewWidth-10&&(e=c.viewWidth-11);a.top-=10;a.bottom=a.top+d;b?(a.right+=10,a.left=a.right-e):(a.left-=10,a.right=a.left+e);e=d=0;c.viewTop>a.top?d=c.viewTop-a.top:a.bottom>c.viewTop+c.viewHeight&&(d=c.viewTop+c.viewHeight-a.bottom);c.viewLeft>a.left?e=c.viewLeft-a.left:a.right>c.viewLeft+c.viewWidth&&(e=c.viewLeft+c.viewWidth-a.right);(e|| -d)&&this.scrollbar.set(c.viewLeft-c.contentLeft-e,c.viewTop-c.contentTop-d)};Blockly.WorkspaceSvg.prototype.zoomReset=function(){this.scale=1;this.updateGridPattern_();var a=this.getMetrics();this.scrollbar.set((a.contentWidth-a.viewWidth)/2,(a.contentHeight-a.viewHeight)/2);Blockly.hideChaff(!1);this.flyout_&&this.flyout_.reflow()}; +Blockly.WorkspaceSvg.prototype.scrollToArea=function(a,b){var c=this.getMetrics();a.top*=this.scale;a.bottom*=this.scale;a.left*=this.scale;a.right*=this.scale;var d=a.bottom-a.top,e=a.right-a.left;d>=c.viewHeight-10&&(d=c.viewHeight-11);e>=c.viewWidth-10&&(e=c.viewWidth-11);a.top-=10;a.bottom=a.top+d;b?(a.right+=10,a.left=a.right-e):(a.left-=10,a.right=a.left+e);e=d=0;c.viewTop>a.top?d=c.viewTop-a.top:a.bottom>c.viewTop+c.viewHeight&&(d=c.viewTop+c.viewHeight-a.bottom);c.viewLeft>a.left?e=c.viewLeft- +a.left:a.right>c.viewLeft+c.viewWidth&&(e=c.viewLeft+c.viewWidth-a.right);(e||d)&&this.scrollbar.set(c.viewLeft-c.contentLeft-e,c.viewTop-c.contentTop-d)};Blockly.WorkspaceSvg.prototype.zoomReset=function(){this.scale=1;this.updateGridPattern_();var a=this.getMetrics();this.scrollbar.set((a.contentWidth-a.viewWidth)/2,(a.contentHeight-a.viewHeight)/2);Blockly.hideChaff(!1);this.flyout_&&this.flyout_.reflow()}; Blockly.WorkspaceSvg.prototype.updateGridPattern_=function(){if(this.options.gridPattern){var a=this.options.gridOptions.spacing*this.scale||100;this.options.gridPattern.setAttribute("width",a);this.options.gridPattern.setAttribute("height",a);var a=Math.floor(this.options.gridOptions.spacing/2)+.5,b=a-this.options.gridOptions.length/2,c=a+this.options.gridOptions.length/2,d=this.options.gridPattern.firstChild,e=d&&d.nextSibling,a=a*this.scale,b=b*this.scale,c=c*this.scale;d&&(d.setAttribute("stroke-width", this.scale),d.setAttribute("x1",b),d.setAttribute("y1",a),d.setAttribute("x2",c),d.setAttribute("y2",a));e&&(e.setAttribute("stroke-width",this.scale),e.setAttribute("x1",a),e.setAttribute("y1",b),e.setAttribute("x2",a),e.setAttribute("y2",c))}};Blockly.WorkspaceSvg.prototype.setVisible=Blockly.WorkspaceSvg.prototype.setVisible;Blockly.WorkspaceSvg.prototype.addChangeListener=Blockly.WorkspaceSvg.prototype.addChangeListener;Blockly.WorkspaceSvg.prototype.removeChangeListener=Blockly.WorkspaceSvg.prototype.removeChangeListener;Blockly.Mutator=function(a){Blockly.Mutator.superClass_.constructor.call(this,null);this.quarkNames_=a};goog.inherits(Blockly.Mutator,Blockly.Icon);Blockly.Mutator.prototype.png_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAANyAAADcgBffIlqAAAAAd0SU1FB98DGhULOIajyb8AAAHMSURBVDjLnZS9SiRBFIXP/CQ9iIHgPoGBTo8vIAaivoKaKJr6DLuxYqKYKIqRgSCMrblmIxqsICgOmAriziIiRXWjYPdnUDvT2+PMsOyBoop7qk71vedWS5KAkrWsGUMjSYjpgSQhNoZGFLEKeGoKGMNttUpULkOhAFL3USiA70MQEBnDDeDJWtaqVaJeB7uNICAKQ1ZkDI1yufOm+XnY2YHl5c6874MxPClJiDulkMvBxYWrw/095POdU0sS4hxALqcWtreloSGpVJLGxtL49bX0+Ci9vUkzM2kcXGFbypUKxHHLBXZ3YW4ONjfh4yN1aGIiPQOQEenrg6MjR+zvZz99Y8PFT09hYCArktdfsFY6PHTr83NlUKu5+eREennJchmR/n5pYcGtJyezG6em3Dw7Kw0OZrlMOr6f1gTg4ACWlmBvz9WoifHxbDpf3Flfd+54njQ9ncYvL6WHB+n9XVpcbHOnW59IUKu5m+p11zftfLHo+qRorZ6Hh/Xt7k5fsLUl1evS1dWfG9swMiJZq9+KIlaD4P/eztkZNgz5LsAzhpvjY6JK5d9e8eioE3h95SdQbDrkhSErxvArjkl6/U/imMQYnsKQH02BT7vbZZfVOiWhAAAAAElFTkSuQmCC"; Blockly.Mutator.prototype.workspaceWidth_=0;Blockly.Mutator.prototype.workspaceHeight_=0;Blockly.Mutator.prototype.iconClick_=function(a){this.block_.isEditable()&&Blockly.Icon.prototype.iconClick_.call(this,a)}; diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 124f56a442b..42b4954455b 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -917,6 +917,11 @@ Blockly.WorkspaceSvg.prototype.zoomCenter = function(type) { Blockly.WorkspaceSvg.prototype.scrollToArea = function(rect, rtl) { var metrics = this.getMetrics(); + // First scale the rectangle + rect.top *= this.scale; + rect.bottom *= this.scale; + rect.left *= this.scale; + rect.right *= this.scale; var height = rect.bottom-rect.top; var width = rect.right-rect.left; var margin = 10; From eaae1d76469b8e415e0fcd75a5b5ca61d49db822 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 21 Sep 2015 13:57:51 -0400 Subject: [PATCH 56/84] Make useMutators and disconnect disable options Make Mutators and disconnect options part of the workspace options block instead of global Blockly variables Eliminated the isTopLevel for those blocks which were mutators in order to make code more common with core blockly code --- blockly_compressed.js | 10 +++---- blocks/lists.js | 5 ++-- blocks/logic.js | 13 ++++----- blocks/maps.js | 5 ++-- blocks/procedures.js | 9 +++--- blocks/text.js | 5 ++-- blocks_compressed.js | 55 ++++++++++++++++++------------------ core/block.js | 3 ++ core/blockly.js | 5 ---- core/inject.js | 12 ++++++++ demos/blockfactory/blocks.js | 1 - tests/generators/unittest.js | 1 - 12 files changed, 64 insertions(+), 60 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index f3537b2c94b..5c74aa0d98b 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1217,7 +1217,7 @@ this.rendered&&(this.render(),this.bumpNeighbours_())};Blockly.Block.prototype.s Blockly.Block.prototype.setOutput=function(a,b){this.outputConnection&&(goog.asserts.assert(!this.outputConnection.targetConnection,"Must disconnect output value before removing connection."),this.outputConnection.dispose(),this.outputConnection=null);a&&(goog.asserts.assert(!this.previousConnection,"Remove previous connection prior to adding output connection."),void 0===b&&(b=null),this.outputConnection=new Blockly.Connection(this,Blockly.OUTPUT_VALUE),this.outputConnection.setCheck(b));this.rendered&& (this.render(),this.bumpNeighbours_())};Blockly.Block.prototype.setInputsInline=function(a){this.inputsInline=a;this.rendered&&(this.render(),this.bumpNeighbours_(),this.workspace.fireChangeEvent())}; Blockly.Block.prototype.getInputsInline=function(){if(void 0!=this.inputsInline)return this.inputsInline;for(var a=1;ac.width+d.x&&(a=c.width+d.x):alist Blockly.Blocks.lists_split={init:function(){var a=this,b=new Blockly.FieldDropdown([[Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]],function(b){a.updateType_(b)});this.setHelpUrl(Blockly.Msg.LISTS_SPLIT_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("INPUT").setCheck("String").appendField(b,"MODE");this.appendValueInput("DELIM").setCheck("String").appendField(Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER);this.setInputsInline(!0); this.setOutput(!0,"Array");this.setTooltip(function(){var b=a.getFieldValue("MODE");if("SPLIT"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if("JOIN"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw"Unknown mode: "+b;})},updateType_:function(a){"SPLIT"==a?(this.outputConnection.setCheck("Array"),this.getInput("INPUT").setCheck("String")):(this.outputConnection.setCheck("String"),this.getInput("INPUT").setCheck("Array"))},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("mode", this.getFieldValue("MODE"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("mode"))},typeblock:[{entry:Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}},{entry:Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}}]};Blockly.Blocks.logic={};Blockly.Blocks.logic.HUE=210; -Blockly.Blocks.controls_if={init:function(){if(!Blockly.useMutators){var a=new Blockly.FieldClickImage(this.addPng,17,17,Blockly.Msg.CONTROLS_IF_ADD_TOOLTIP);a.setChangeHandler(this.doAddField)}this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);var b=this.appendValueInput("IF0").setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_IF);Blockly.useMutators||b.appendField(a,"IF_ADD");this.appendStatementInput("DO0").appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN);this.setPreviousStatement(!0); -this.setNextStatement(!0);Blockly.useMutators&&this.setMutator(new Blockly.Mutator(["controls_if_elseif","controls_if_else"]));var c=this;this.setTooltip(function(){if(c.elseifCount_||c.elseCount_){if(!c.elseifCount_&&c.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_2;if(c.elseifCount_&&!c.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_3;if(c.elseifCount_&&c.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_4}else return Blockly.Msg.CONTROLS_IF_TOOLTIP_1;return""});this.elseCount_=this.elseifCount_= -0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=document.createElement("mutation");this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_);this.elseCount_&&a.setAttribute("else",1);return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elseif"),10);this.elseCount_=parseInt(a.getAttribute("else"),10);this.updateAddSubShape()},doAddField:function(a){this.elseCount_?this.elseifCount_++:this.elseCount_=1;this.updateAddSubShape()},doRemoveElseifField:function(a){var b= -a.getPrivate().pos;a=this.elseifCount_+1;0","LT"],["\u2265","LTE"],["<","GT"],["\u2264","GTE"]]:[["=","EQ"],["\u2260","NEQ"],["<","LT"],["\u2264","LTE"],[">","GT"],["\u2265","GTE"]];this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.setOutput(!0,"Boolean");this.appendValueInput("A");this.appendValueInput("B").appendField(new Blockly.FieldDropdown(a),"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a= @@ -73,11 +74,11 @@ Blockly.Blocks.controls_forEach={init:function(){this.jsonInit({message0:Blockly a.getFieldValue("VAR"))})},isLoop:!0,getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Object"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}; Blockly.Blocks.controls_flow_statements={init:function(){var a=[[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"FLOW");this.setPreviousStatement(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("FLOW");return{BREAK:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK, CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){var a=!1,b=this;do{if(b.isLoop){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)},typeblock:[{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK,fields:{FLOW:"BREAK"}},{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK,fields:{FLOW:"CONTINUE"}}]};Blockly.Blocks.maps={};Blockly.Blocks.maps.HUE=345;Blockly.Blocks.maps_create_empty={init:function(){this.jsonInit({id:"maps_create_empty",message0:Blockly.Msg.MAPS_CREATE_EMPTY_TITLE,args0:[],inputsInline:!0,output:"Map",colour:Blockly.Blocks.maps.HUE,tooltip:Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP,helpUrl:Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL})},typeblock:Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK}; -Blockly.Blocks.maps_create_with={init:function(){this.setHelpUrl(Blockly.Msg.MAPS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.maps.HUE);Blockly.useMutators?this.setMutator(new Blockly.Mutator(["maps_create_with_item"])):this.appendAddSubGroup(Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH,"items",null,Blockly.Msg.MAPS_CREATE_EMPTY_TITLE);this.itemCount_=1;this.updateShape_();this.setOutput(!0,"Map");this.setTooltip(Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP)},getAddSubName:function(a,b){return"ADD"+b}, -mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("items",this.itemCount_);return a},domToMutation:function(a){this.itemCount_=parseInt(a.getAttribute("items"),10);this.updateShape_()},decompose:function(a){var b=Blockly.Block.obtain(a,"maps_create_with_container");b.initSvg();for(var c=b.getInput("STACK").connection,d=0;d Date: Tue, 22 Sep 2015 09:31:28 -0400 Subject: [PATCH 57/84] Add support for keyboard accelerators on menu items. Enabled meta/ when a block is selected to execute code from the corresponding menu item Split showContextMenu_ into separate buildContextMenu_ to be used elsewhere --- blockly_compressed.js | 20 +++++++++++--------- core/block_svg.js | 19 ++++++++++++++++--- core/blockly.js | 14 ++++++++++++++ core/contextmenu.js | 3 +++ 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 5c74aa0d98b..ed4962cb6c4 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1245,8 +1245,8 @@ this.getAddSubName(b,c),f=this.getInput(f);if(null==f&&(f=this.appendAddSubInput Blockly.Block.prototype.mutationToDomAddSub=function(){var a=document.createElement("mutation"),b=this.getItemCount(),c;for(c in b)b.hasOwnProperty(c)&&a.setAttribute(c,b[c]);return a}; Blockly.Block.prototype.appendAddSubGroup=function(a,b,c,d){this.domToMutation=this.domToMutationAddSub;this.mutationToDom=this.mutationToDomAddSub;this.updateShape_=this.updateAddSubShape;"undefined"===typeof this.titles_&&(this.checks_={},this.titles_={});d&&(this.titles_[b]={normal:a,empty:d});this.setItemCount(b,1);this.checks_[b]=c;this.appendAddSubInput(b,0,a)};Blockly.Block.prototype.getMultiItemCount=function(){return this.itemCount_}; Blockly.Block.prototype.setMultiItemCount=function(a,b){this.itemCount_[a]=b};Blockly.Block.prototype.appendAddSubMulti=function(a,b,c,d){"undefined"===typeof this.itemCount_&&(this.itemCount_={});this.getItemCount=this.getMultiItemCount;this.setItemCount=this.setMultiItemCount;this.appendAddSubGroup(a,b,c,d)};Blockly.ContextMenu={};Blockly.ContextMenu.currentBlock=null; -Blockly.ContextMenu.show=function(a,b,c){Blockly.WidgetDiv.show(Blockly.ContextMenu,c,null);if(b.length){var d=new goog.ui.Menu;d.setRightToLeft(c);for(var e=0,f;f=b[e];e++){var g=new goog.ui.MenuItem(f.text);g.setRightToLeft(c);d.addChild(g,!0);g.setEnabled(f.enabled);f.enabled&&goog.events.listen(g,goog.ui.Component.EventType.ACTION,function(a){return function(){Blockly.doCommand(a)}}(f.callback))}goog.events.listen(d,goog.ui.Component.EventType.ACTION,Blockly.ContextMenu.hide);b=goog.dom.getViewportSize(); -f=goog.style.getViewportPageOffset(document);d.render(Blockly.WidgetDiv.DIV);var h=d.getElement();Blockly.addClass_(h,"blocklyContextMenu");var g=goog.style.getSize(h),e=a.clientX+f.x,k=a.clientY+f.y;a.clientY+g.height>=b.height&&(k-=g.height);c?g.width>=a.clientX&&(e+=g.width):a.clientX+g.width>=b.width&&(e-=g.width);Blockly.WidgetDiv.position(e,k,b,f,c);d.setAllowAutoFocus(!0);setTimeout(function(){h.focus()},1);Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()}; +Blockly.ContextMenu.show=function(a,b,c){Blockly.WidgetDiv.show(Blockly.ContextMenu,c,null);if(b.length){var d=new goog.ui.Menu;d.setRightToLeft(c);for(var e=0,f;f=b[e];e++){var g=new goog.ui.MenuItem(f.text);g.setRightToLeft(c);f.accel&&g.setMnemonic(f.accel);d.addChild(g,!0);g.setEnabled(f.enabled);f.enabled&&goog.events.listen(g,goog.ui.Component.EventType.ACTION,function(a){return function(){Blockly.doCommand(a)}}(f.callback))}goog.events.listen(d,goog.ui.Component.EventType.ACTION,Blockly.ContextMenu.hide); +b=goog.dom.getViewportSize();f=goog.style.getViewportPageOffset(document);d.render(Blockly.WidgetDiv.DIV);var h=d.getElement();Blockly.addClass_(h,"blocklyContextMenu");var g=goog.style.getSize(h),e=a.clientX+f.x,k=a.clientY+f.y;a.clientY+g.height>=b.height&&(k-=g.height);c?g.width>=a.clientX&&(e+=g.width):a.clientX+g.width>=b.width&&(e-=g.width);Blockly.WidgetDiv.position(e,k,b,f,c);d.setAllowAutoFocus(!0);setTimeout(function(){h.focus()},1);Blockly.ContextMenu.currentBlock=null}else Blockly.ContextMenu.hide()}; Blockly.ContextMenu.hide=function(){Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu);Blockly.ContextMenu.currentBlock=null};Blockly.ContextMenu.callbackFactory=function(a,b){return function(){var c=Blockly.Xml.domToBlock(a.workspace,b),d=a.getRelativeToSurfaceXY();d.x=a.RTL?d.x-Blockly.SNAP_RADIUS:d.x+Blockly.SNAP_RADIUS;d.y+=2*Blockly.SNAP_RADIUS;c.moveBy(d.x,d.y);c.select()}};Blockly.BlockSvg=function(){this.svgGroup_=Blockly.createSvgElement("g",{},null);this.svgPathDark_=Blockly.createSvgElement("path",{"class":"blocklyPathDark",transform:"translate(1,1)"},this.svgGroup_);this.svgPath_=Blockly.createSvgElement("path",{"class":"blocklyPath"},this.svgGroup_);this.svgPathLight_=Blockly.createSvgElement("path",{"class":"blocklyPathLight"},this.svgGroup_);this.svgPath_.tooltip=this;Blockly.Tooltip.bindMouseEvents(this.svgPath_)};goog.inherits(Blockly.BlockSvg,Blockly.Block); Blockly.BlockSvg.prototype.height=0;Blockly.BlockSvg.prototype.width=0;Blockly.BlockSvg.prototype.dragStartXY_=null;Blockly.BlockSvg.INLINE=-1; Blockly.BlockSvg.prototype.initSvg=function(){goog.asserts.assert(this.workspace.rendered,"Workspace is headless.");for(var a=0,b;b=this.inputList[a];a++)b.init();this.mutator&&this.mutator.createIcon();this.updateColour();this.updateMovable();if(!this.workspace.options.readOnly&&!this.eventsInit_){Blockly.bindEvent_(this.getSvgRoot(),"mousedown",this,this.onMouseDown_);var c=this;Blockly.bindEvent_(this.getSvgRoot(),"touchstart",null,function(a){Blockly.longStart_(a,c)})}goog.isFunction(this.onchange)&& @@ -1265,10 +1265,11 @@ Blockly.BlockSvg.prototype.onMouseDown_=function(a){if(!this.isInFlyout){Blockly "mouseup",this,this.onMouseUp_);Blockly.BlockSvg.onMouseMoveWrapper_=Blockly.bindEvent_(document,"mousemove",this,this.onMouseMove_);this.draggedBubbles_=[];for(var b=this.getDescendants(),c=0,d;d=b[c];c++){d=d.getIcons(!0);for(var e=0;ethis.workspace.remainingCapacity()&&(d.enabled=!1);c.push(d);this.isEditable()&&!this.collapsed_&&this.workspace.options.comments&&(d={enabled:!0},this.comment?(d.text=Blockly.Msg.REMOVE_COMMENT, -d.callback=function(){b.setCommentText(null)}):(d.text=Blockly.Msg.ADD_COMMENT,d.callback=function(){b.setCommentText("")}),c.push(d));if(!this.collapsed_)for(d=1;dthis.workspace.remainingCapacity()&&(c.enabled=!1);b.push(c);this.isEditable()&&!this.collapsed_&&this.workspace.options.comments&&(c={enabled:!0},this.comment?(c.text=Blockly.Msg.REMOVE_COMMENT, +c.accel=goog.events.KeyCodes.SLASH,c.callback=function(){a.setCommentText(null)}):(c.text=Blockly.Msg.ADD_COMMENT,c.accel=goog.events.KeyCodes.SLASH,c.callback=function(){a.setCommentText("")}),b.push(c));if(!this.collapsed_)for(c=1;c=a.clientX&&0==a.clientY&&0==a.button)){Blockly.removeAllRanges();var d=b.getRelativeToSurfaceXY(),e=c.moveDrag(a),f=b.getSvgRoot();1==Blockly.dragMode_&&goog.math.Coordinate.distance(d,e)*c.scale>Blockly.DRAG_RADIUS&&(Blockly.dragMode_=2,Blockly.longStop_(),f.translate_="",f.skew_="",b.parentBlock_&&(b.setParent(null),1<=c.scale&&b.disconnectUiEffect()),b.setDragging_(!0), c.recordDeleteAreas());if(2==Blockly.dragMode_){var g=d.x-b.dragStartXY_.x,d=d.y-b.dragStartXY_.y;f.translate_="translate("+e.x+","+e.y+")";f.setAttribute("transform",f.translate_+f.skew_);for(e=0;eBlockly.DRAG_RADIUS&&Blockly.longStop_();a.stopPropagation()}}}; Blockly.onKeyDown_=function(a){if(a.keyCode==goog.events.KeyCodes.TAB&&Blockly.WidgetDiv.isVisible())Blockly.WidgetDiv.hide();else if(Blockly.isTargetInput_(a))return;if(a.keyCode==goog.events.KeyCodes.ESC)Blockly.hideChaff(),Blockly.selectField(null);else if(a.keyCode==goog.events.KeyCodes.TAB)a.shiftKey?Blockly.selectPrevField():Blockly.selectNextField();else if(a.keyCode==goog.events.KeyCodes.BACKSPACE||a.keyCode==goog.events.KeyCodes.DELETE)try{Blockly.selected&&Blockly.selected.isDeletable()&& -(Blockly.hideChaff(),Blockly.selected.dispose(!0,!0))}finally{a.preventDefault()}else if(a.altKey||a.ctrlKey||a.metaKey)Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(Blockly.hideChaff(),a.keyCode==goog.events.KeyCodes.C?Blockly.copy_(Blockly.selected):a.keyCode==goog.events.KeyCodes.X&&(Blockly.copy_(Blockly.selected),Blockly.selected.dispose(!0,!0))),a.keyCode==goog.events.KeyCodes.V&&Blockly.clipboardXml_&&Blockly.clipboardSource_.paste(Blockly.clipboardXml_); -else if(Blockly.WidgetDiv.isVisible())Blockly.WidgetDiv.onKeyDown_(a);else if(Blockly.selected){var b=Blockly.selected;if(a.keyCode===(b.RTL?goog.events.KeyCodes.RIGHT:goog.events.KeyCodes.LEFT))Blockly.selectPrevBlock();else if(a.keyCode===(b.RTL?goog.events.KeyCodes.LEFT:goog.events.KeyCodes.RIGHT))Blockly.selectNextBlock();else if(a.keyCode===goog.events.KeyCodes.UP)Blockly.selectParentBlock();else if(a.keyCode===goog.events.KeyCodes.DOWN)Blockly.selectChildBlock();else if(a.keyCode===goog.events.KeyCodes.SPACE){var c= -goog.style.getBoundingClientRect_(b.svgGroup_),d=Blockly.SNAP_RADIUS*b.workspace.scale;a.clientX=b.RTL?c.right-d:c.left+d;a.clientY=c.top+d;Blockly.selectBlock(Blockly.selected);Blockly.selected.showContextMenu_(a)}}else Blockly.TypeBlock.onKeyDown_(a)};Blockly.selectBlock=function(a){if(a){a.select();var b=a.getRelativeToSurfaceXY(),c=a.width,d={top:b.y,bottom:b.y+a.height};a.RTL?(d.left=b.x-c,d.right=b.x):(d.left=b.x,d.right=b.x+c);a.workspace.scrollToArea(d,a.RTL)}}; +(Blockly.hideChaff(),Blockly.selected.dispose(!0,!0))}finally{a.preventDefault()}else if(a.altKey||a.ctrlKey||a.metaKey){var b=!1;Blockly.selected&&Blockly.selected.isDeletable()&&Blockly.selected.isMovable()&&(Blockly.hideChaff(),a.keyCode==goog.events.KeyCodes.C?(Blockly.copy_(Blockly.selected),b=!0):a.keyCode==goog.events.KeyCodes.X&&(Blockly.copy_(Blockly.selected),Blockly.selected.dispose(!0,!0),b=!0));a.keyCode==goog.events.KeyCodes.V&&Blockly.clipboardXml_&&(Blockly.clipboardSource_.paste(Blockly.clipboardXml_), +b=!0);if(!b&&a.metaKey&&a.keyCode&&Blockly.selected&&Blockly.selected.contextMenu)for(var b=Blockly.selected.buildContextMenu_(),c=0;c=d.length&&(e=-1));-1!==e&&(c=d[e])}if(null===c&&(b=Blockly.findNextBlock(b),a=null,b==Blockly.selected))break}Blockly.selectField(c)}; Blockly.selectPrevField=function(){for(var a=Blockly.selectedField,b=Blockly.selected,c=null;null===c;){b||(b=Blockly.findNextBlock(null),a=null);if(!b)break;var d=b.getEditableFields();if(d.length){var e=d.length-1;a&&(e=goog.array.indexOf(d,a)-1,0>e&&(e=-1));-1!==e&&(c=d[e])}if(null===c&&(b=Blockly.findPrevBlock(b),a=null,b==Blockly.selected))break}Blockly.selectField(c)};Blockly.selectNextBlock=function(){var a=Blockly.findNextBlock(Blockly.selected);Blockly.selectField(null);Blockly.selectBlock(a)}; diff --git a/core/block_svg.js b/core/block_svg.js index 43d9cf4d148..bdc2bf5b390 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -499,10 +499,23 @@ Blockly.BlockSvg.prototype.showContextMenu_ = function(e) { if (this.workspace.options.readOnly || !this.contextMenu) { return; } + var options = this.buildContextMenu_(); + Blockly.ContextMenu.show(e, options, this.RTL); + Blockly.ContextMenu.currentBlock = this; +} + +/** + * Build the context menu for this block. + * @private + */ +Blockly.BlockSvg.prototype.buildContextMenu_ = function() { // Save the current block in a variable for use in closures. var block = this; var options = []; + if (this.workspace.options.readOnly || !this.contextMenu) { + return options; + } if (this.isDeletable() && this.isMovable() && !block.isInFlyout) { // Option to duplicate this block. var duplicateOption = { @@ -523,11 +536,13 @@ Blockly.BlockSvg.prototype.showContextMenu_ = function(e) { var commentOption = {enabled: true}; if (this.comment) { commentOption.text = Blockly.Msg.REMOVE_COMMENT; + commentOption.accel = goog.events.KeyCodes.SLASH; commentOption.callback = function() { block.setCommentText(null); }; } else { commentOption.text = Blockly.Msg.ADD_COMMENT; + commentOption.accel = goog.events.KeyCodes.SLASH; commentOption.callback = function() { block.setCommentText(''); }; @@ -619,9 +634,7 @@ Blockly.BlockSvg.prototype.showContextMenu_ = function(e) { if (this.customContextMenu && !block.isInFlyout) { this.customContextMenu(options); } - - Blockly.ContextMenu.show(e, options, this.RTL); - Blockly.ContextMenu.currentBlock = this; + return options; }; /** diff --git a/core/blockly.js b/core/blockly.js index 7565d26c056..25a798d7917 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -385,22 +385,36 @@ Blockly.onKeyDown_ = function(e) { e.preventDefault(); } } else if (e.altKey || e.ctrlKey || e.metaKey) { + var handled = false; if (Blockly.selected && Blockly.selected.isDeletable() && Blockly.selected.isMovable()) { Blockly.hideChaff(); if (e.keyCode == goog.events.KeyCodes.C) { // 'c' for copy. Blockly.copy_(Blockly.selected); + handled = true; } else if (e.keyCode ==goog.events.KeyCodes.X) { // 'x' for cut. Blockly.copy_(Blockly.selected); Blockly.selected.dispose(true, true); + handled = true; } } if (e.keyCode == goog.events.KeyCodes.V) { // 'v' for paste. if (Blockly.clipboardXml_) { Blockly.clipboardSource_.paste(Blockly.clipboardXml_); + handled = true; + } + } + if (!handled && e.metaKey && e.keyCode && + Blockly.selected && Blockly.selected.contextMenu) { + var options = Blockly.selected.buildContextMenu_(); + for (var opt = 0; opt < options.length; opt++) { + if (options[opt].enabled && options[opt].accel == e.keyCode) { + Blockly.doCommand(options[opt].callback); + break; + } } } } else if (Blockly.WidgetDiv.isVisible()) { diff --git a/core/contextmenu.js b/core/contextmenu.js index 55a41be81af..266584a084b 100644 --- a/core/contextmenu.js +++ b/core/contextmenu.js @@ -61,6 +61,9 @@ Blockly.ContextMenu.show = function(e, options, rtl) { for (var x = 0, option; option = options[x]; x++) { var menuItem = new goog.ui.MenuItem(option.text); menuItem.setRightToLeft(rtl); + if (option.accel) { + menuItem.setMnemonic(option.accel); + } menu.addChild(menuItem, true); menuItem.setEnabled(option.enabled); if (option.enabled) { From 26619388b4a716521b87fbf8f6e3476265147b22 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Thu, 24 Sep 2015 07:39:40 -0400 Subject: [PATCH 58/84] Reenable type blocking when a block is selected Recover lost capability from when the code was restructured for navigation --- core/blockly.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core/blockly.js b/core/blockly.js index ec01833d603..feebfd079c1 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -428,21 +428,19 @@ Blockly.onKeyDown_ = function(e) { } } else if (Blockly.WidgetDiv.isVisible()) { Blockly.WidgetDiv.onKeyDown_(e); - } else if (!Blockly.selected) { - Blockly.TypeBlock.onKeyDown_(e); } else { var block = Blockly.selected; - if (e.keyCode === (block.RTL ? goog.events.KeyCodes.RIGHT - : goog.events.KeyCodes.LEFT)) { + if (block && e.keyCode === (block.RTL ? goog.events.KeyCodes.RIGHT + : goog.events.KeyCodes.LEFT)) { Blockly.selectPrevBlock(); - } else if (e.keyCode === (block.RTL ? goog.events.KeyCodes.LEFT - : goog.events.KeyCodes.RIGHT)) { + } else if (block && e.keyCode === (block.RTL ? goog.events.KeyCodes.LEFT + : goog.events.KeyCodes.RIGHT)) { Blockly.selectNextBlock(); - } else if (e.keyCode === goog.events.KeyCodes.UP) { + } else if (block && e.keyCode === goog.events.KeyCodes.UP) { Blockly.selectParentBlock(); - } else if (e.keyCode === goog.events.KeyCodes.DOWN) { + } else if (block && e.keyCode === goog.events.KeyCodes.DOWN) { Blockly.selectChildBlock(); - } else if (e.keyCode === goog.events.KeyCodes.SPACE) { + } else if (block && e.keyCode === goog.events.KeyCodes.SPACE) { var box = goog.style.getBoundingClientRect_(block.svgGroup_); var offset = Blockly.SNAP_RADIUS * block.workspace.scale; if (block.RTL) { @@ -454,6 +452,8 @@ Blockly.onKeyDown_ = function(e) { // Blockly.selected.workspace.scrollToArea(Blockly.selected); Blockly.selectBlock(Blockly.selected); Blockly.selected.showContextMenu_(e); + } else { + Blockly.TypeBlock.onKeyDown_(e); } } if (deleteBlock) { From a87bd5142d12e08ed9f3a16172990572137d6cbb Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 25 Sep 2015 06:51:20 -0400 Subject: [PATCH 59/84] Added automatic BSD 2 clause license on generated code Eliminated generating return type in header for class constructor methods --- generators/java.js | 35 ++++++++++++++++++++++++++++++++--- java_compressed.js | 16 ++++++++-------- 2 files changed, 40 insertions(+), 11 deletions(-) diff --git a/generators/java.js b/generators/java.js index 94a81abdff0..7798958ee48 100644 --- a/generators/java.js +++ b/generators/java.js @@ -150,7 +150,35 @@ Blockly.Java.classes_ = []; * List of global variables to be generated. */ Blockly.Java.globals_ = {}; - +/** + * + */ +Blockly.Java.fileHeader = +'/*\n'+ +' * Copyright (c) 2015, <>\n'+ +' * All rights reserved.\n'+ +' *\n'+ +' * Redistribution and use in source and binary forms, with or without\n'+ +' * modification, are permitted provided that the following conditions are met:\n'+ +' *\n'+ +' * * Redistributions of source code must retain the above copyright notice, this\n'+ +' * list of conditions and the following disclaimer.\n'+ +' * * Redistributions in binary form must reproduce the above copyright notice,\n'+ +' * this list of conditions and the following disclaimer in the documentation\n'+ +' * and/or other materials provided with the distribution.\n'+ +' *\n'+ +' * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\n'+ +' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n'+ +' * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n'+ +' * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n'+ +' * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n'+ +' * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n'+ +' * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n'+ +' * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n'+ +' * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n'+ +' * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n'+ +' * POSSIBILITY OF SUCH DAMAGE.\n'+ +' */\n'; /** * Set the application name for generated classes * @param {string} name Name for the application for any generated code @@ -340,7 +368,8 @@ Blockly.Java.workspaceToCode_ = Blockly.Java.workspaceToCode; Blockly.Java.workspaceToCode = function(workspace, parms) { // Generate the code first to get all of the required imports calculated. var code = this.workspaceToCode_(workspace,parms); - var finalcode = 'package ' + this.getPackage() + ';\n\n' + + var finalcode = this.fileHeader + + 'package ' + this.getPackage() + ';\n\n' + this.getImports() + '\n\n' + 'public class ' + this.getAppName(); var baseClass = this.getBaseclass(); @@ -1152,7 +1181,7 @@ Blockly.Java.finish = function(code) { extra = ''; } } - if (rettype !== 'void') { + if (rettype !== 'void' && rettype !== 'public') { header += extra + ' * @return ' + rettype + '\n'; extra = ''; } diff --git a/java_compressed.js b/java_compressed.js index 19ee2ce57f8..03d3f2543ac 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -6,12 +6,12 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstract,assert,boolean,break,case,catch,class,const,continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import,instanceof,int,interface,long,native,new,package,private,protected,public,return,short,static,strictfp,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while,false,null,true,abs,divmod,input,open,staticmethod,all,enumerate,int,ord,str,any,eval,isinstance,pow,sum,basestring,execfile,issubclass,print,super,bin,file,iter,property,tuple,bool,filter,len,range,type,bytearray,float,list,raw_input,unichr,callable,format,locals,reduce,unicode,chr,frozenset,long,reload,vars,classmethod,getattr,map,repr,xrange,cmp,globals,max,reversed,zip,compile,hasattr,memoryview,round,__import__,complex,hash,min,set,apply,delattr,help,next,setattr,buffer,dict,hex,object,slice,coerce,dir,id,oct,sorted,intern,equal"); Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.INDENT=" ";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_=""; -Blockly.Java.needImports_=[];Blockly.Java.Interfaces_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.INLINEVARCLASS=!0;Blockly.Java.classes_=[];Blockly.Java.globals_={};Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return Blockly.Java.variableDB_.getName(this.AppName_,"CLASS")};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_}; -Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){var a=this.Baseclass_;""!=a&&(a=Blockly.Java.variableDB_.getName(a,"CLASS"));return a};Blockly.Java.addInterface=function(a){goog.array.contains(this.Interfaces_,a)||this.Interfaces_.push(a)};Blockly.Java.getInterfaces=function(){return 0===this.Interfaces_.length?null:this.Interfaces_}; -Blockly.Java.setGlobalVar=function(a,b,c){null!=Blockly.Variables.getLocalContext(a,b)||"undefined"!==typeof this.globals_[b]&&null!==this.globals_[b]||(this.globals_[b]=c)};Blockly.Java.GetVariableType=function(a){a=this.variableTypes_[a];a||(a="Var",Blockly.Java.provideVarClass());return a};Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a}; -Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'; +Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return Blockly.Java.variableDB_.getName(this.AppName_,"CLASS")};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){var a=this.Baseclass_;""!=a&&(a=Blockly.Java.variableDB_.getName(a,"CLASS"));return a}; +Blockly.Java.addInterface=function(a){goog.array.contains(this.Interfaces_,a)||this.Interfaces_.push(a)};Blockly.Java.getInterfaces=function(){return 0===this.Interfaces_.length?null:this.Interfaces_};Blockly.Java.setGlobalVar=function(a,b,c){null!=Blockly.Variables.getLocalContext(a,b)||"undefined"!==typeof this.globals_[b]&&null!==this.globals_[b]||(this.globals_[b]=c)};Blockly.Java.GetVariableType=function(a){a=this.variableTypes_[a];a||(a="Var",Blockly.Java.provideVarClass());return a}; +Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n final Var other = Var.valueOf(obj);\n if (getType() == Var.Type.NULL || other.getType() == Var.Type.NULL) {\n return getType().equals(other.getType());\n }\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n case NULL:\n return (var.getType() == Var.Type.NULL);\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n return var.lessThan(this);\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n return var.lessThanOrEqual(this);\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n case NULL:\n return null;\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object == null) {\n _type = Type.NULL;\n } else if (_object instanceof Var) {\n Var oldObj = (Var)_object;\n _type = oldObj.getType();\n _object = oldObj.getObject();\n } else if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): Blockly.Java.addImport("extreme.sdn.client.Var")}; @@ -19,8 +19,8 @@ Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.funct d=!1;for(var e=0;ee;e++)for(g=b[e].sort(),f=0;fe;e++)for(g=b[e].sort(),f=0;f Date: Tue, 29 Sep 2015 11:27:48 -0400 Subject: [PATCH 60/84] Update Java Code generator to allow for equivalence object classes Added forceUpdate function to ensure that all onchange methods have been called on blocks before generating code. --- blockly_compressed.js | 5 +++-- blocks/loops.js | 2 +- blocks/variables.js | 2 +- blocks_compressed.js | 6 +++--- core/blockly.js | 10 ++++++++-- core/variables.js | 23 ++++++++++++++++++++++- generators/java.js | 29 ++++++++++++++++++++++++++--- generators/java/procedures.js | 4 ++-- generators/java/variables.js | 34 +++++++++++++++++----------------- java_compressed.js | 25 +++++++++++++------------ 10 files changed, 96 insertions(+), 44 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 569eccd638c..03419b1fede 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1357,7 +1357,8 @@ Blockly.FieldTextArea.prototype.onHtmlInputChange_=function(a){Blockly.FieldText Blockly.FieldTextArea.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.fieldGroup_.getBBox();a.style.width=b.width+"px";a.style.height=b.height+"px";b=this.getAbsoluteXY_();if(this.RTL){var c=this.borderRect_.getBBox();b.x+=c.width;b.x-=a.offsetWidth}b.y+=1;goog.userAgent.WEBKIT&&(b.y-=3);a.style.left=b.x+"px";a.style.top=b.y+"px"};Blockly.Variables={};Blockly.Variables.NAME_TYPE="VARIABLE";Blockly.Variables.allVariables=function(a){var b;if(a.getDescendants)b=a.getDescendants();else if(a.getAllBlocks)b=a.getAllBlocks();else throw"Not Block or Workspace: "+a;a=Object.create(null);for(var c=0;cBlockly.DRAG_RADIUS&&Blockly.longStop_();a.stopPropagation()}}}; diff --git a/blocks/loops.js b/blocks/loops.js index e05868b634b..c020959e838 100644 --- a/blocks/loops.js +++ b/blocks/loops.js @@ -284,7 +284,7 @@ Blockly.Blocks['controls_forEach'] = { */ getVarsTypes: function() { var vartypes = {}; - vartypes[this.getFieldValue('VAR')] = ['Object']; + vartypes[this.getFieldValue('VAR')] = ['Array','Map','Object']; return vartypes; }, /** diff --git a/blocks/variables.js b/blocks/variables.js index 401f5231e57..0719be61381 100644 --- a/blocks/variables.js +++ b/blocks/variables.js @@ -209,7 +209,7 @@ Blockly.Blocks['hash_variables_get'] = { */ getVarsTypes: function() { var vartypes = {}; - vartypes[this.getFieldValue('VAR')] = ['Object']; + vartypes[this.procedurePrefix_+this.getFieldValue('VAR')] = ['Map','Object']; return vartypes; }, diff --git a/blocks_compressed.js b/blocks_compressed.js index 3102e4e22c7..3571bc72cf8 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -71,7 +71,7 @@ Blockly.Blocks.controls_for={init:function(){this.jsonInit({message0:Blockly.Msg var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOR_TOOLTIP.replace("%1",a.getFieldValue("VAR"))})},isLoop:!0,getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Number"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:function(a){if(!this.isCollapsed()){var b={enabled:!0},c=this.getFieldValue("VAR");b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1", c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR");c=goog.dom.createDom("block",null,c);c.setAttribute("type","variables_get");b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b)}},typeblock:[{entry:Blockly.Msg.CONTROLS_FOR_TYPEBLOCK,values:{FROM:1,TO:10,BY:1}}]}; Blockly.Blocks.controls_forEach={init:function(){this.jsonInit({message0:Blockly.Msg.CONTROLS_FOREACH_TITLE,args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"LIST",check:"Array"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.loops.HUE,helpUrl:Blockly.Msg.CONTROLS_FOREACH_HELPURL});this.appendStatementInput("DO").appendField(Blockly.Msg.CONTROLS_FOREACH_INPUT_DO);var a=this;this.setTooltip(function(){return Blockly.Msg.CONTROLS_FOREACH_TOOLTIP.replace("%1", -a.getFieldValue("VAR"))})},isLoop:!0,getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Object"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}; +a.getFieldValue("VAR"))})},isLoop:!0,getVars:function(){return[this.getFieldValue("VAR")]},getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Array","Map","Object"];return a},renameVar:function(a,b){Blockly.Names.equals(a,this.getFieldValue("VAR"))&&this.setFieldValue(b,"VAR")},customContextMenu:Blockly.Blocks.controls_for.customContextMenu,typeblock:Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK}; Blockly.Blocks.controls_flow_statements={init:function(){var a=[[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK,"BREAK"],[Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE,"CONTINUE"]];this.setHelpUrl(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL);this.setColour(Blockly.Blocks.loops.HUE);this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"FLOW");this.setPreviousStatement(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("FLOW");return{BREAK:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK, CONTINUE:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE}[a]})},onchange:function(){var a=!1,b=this;do{if(b.isLoop){a=!0;break}b=b.getSurroundParent()}while(b);a?this.setWarningText(null):this.setWarningText(Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING)},typeblock:[{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK,fields:{FLOW:"BREAK"}},{entry:Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK,fields:{FLOW:"CONTINUE"}}]};Blockly.Blocks.maps={};Blockly.Blocks.maps.HUE=345;Blockly.Blocks.maps_create_empty={init:function(){this.jsonInit({id:"maps_create_empty",message0:Blockly.Msg.MAPS_CREATE_EMPTY_TITLE,args0:[],inputsInline:!0,output:"Map",colour:Blockly.Blocks.maps.HUE,tooltip:Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP,helpUrl:Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL})},typeblock:Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK}; Blockly.Blocks.maps_create_with={init:function(){this.setHelpUrl(Blockly.Msg.MAPS_CREATE_WITH_HELPURL);this.setColour(Blockly.Blocks.maps.HUE);this.workspace.options.useMutators?this.setMutator(new Blockly.Mutator(["maps_create_with_item"])):this.appendAddSubGroup(Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH,"items",null,Blockly.Msg.MAPS_CREATE_EMPTY_TITLE);this.itemCount_=1;this.updateShape_();this.setOutput(!0,"Map");this.setTooltip(Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP)},getAddSubName:function(a,b){return"ADD"+ @@ -201,8 +201,8 @@ a);b!=this.getColour()&&this.setColour(b)},contextMenuType_:"variables_set",cust Blockly.Blocks.variables_set={init:function(){this.jsonInit({message0:Blockly.Msg.VARIABLES_SET,args0:[{type:"field_variable",name:"VAR",variable:Blockly.Msg.VARIABLES_DEFAULT_NAME},{type:"input_value",name:"VALUE"}],previousStatement:null,nextStatement:null,colour:Blockly.Blocks.variables.HUE,tooltip:Blockly.Msg.VARIABLES_SET_TOOLTIP,helpUrl:Blockly.Msg.VARIABLES_SET_HELPURL});this.procedurePrefix_="";this.contextMenuMsg_=Blockly.Msg.VARIABLES_SET_CREATE_GET},onchange:Blockly.Blocks.variables_get.onchange, getVars:Blockly.Blocks.variables_get.getVars,renameVar:Blockly.Blocks.variables_get.renameVar,contextMenuType_:"variables_get",customContextMenu:Blockly.Blocks.variables_get.customContextMenu,getVarsTypes:function(){var a={},b=this.getInput("VALUE");b&&b.connection&&b.connection.targetConnection&&b.connection.targetConnection.check_&&(a[this.procedurePrefix_+this.getFieldValue("VAR")]=b.connection.targetConnection.check_);return a},typeblock:Blockly.getMsgString("variables_set_typeblock")}; Blockly.Blocks.hash_variables_get={init:function(){this.setColour(Blockly.getBlockHue("blockhue_variables"));this.appendDummyInput().appendField(Blockly.Msg.VARIABLES_GET_TITLE).appendField(new Blockly.FieldVariable(Blockly.Msg.VARIABLES_GET_ITEM),"VAR").appendField(".").appendField(new Blockly.FieldScopeVariable("HASHKEY"),"HASHKEY").appendField(Blockly.Msg.VARIABLES_GET_TAIL);this.setOutput(!0);this.contextMenuMsg_=Blockly.Msg.VARIABLES_GET_CREATE_SET;this.procedurePrefix_="";this.contextMenuType_= -"hash_variables_set"},onchange:Blockly.Blocks.variables_get.onchange,getVars:Blockly.Blocks.variables_get.getVars,renameVar:Blockly.Blocks.variables_get.renameVar,getVarsTypes:function(){var a={};a[this.getFieldValue("VAR")]=["Object"];return a},getScopeVars:function(a){var b=[];"HASHKEY"===a&&b.push(this.getFieldValue("HASHKEY"));return b},renameScopeVar:function(a,b,c){"HASHKEY"===c&&Blockly.Names.equals(a,this.getFieldValue("HASHKEY"))&&this.setFieldValue(b,"HASHKEY")},customContextMenu:function(a){var b= -{enabled:!0},c=this.getFieldValue("VAR"),d=this.getFieldValue("HASHKEY");b.text=this.contextMenuMsg_.replace("%1",c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR");c=goog.dom.createDom("field",null,d);c.setAttribute("name","HASHKEY");d=goog.dom.createDom("block",null,c);d.setAttribute("type",this.contextMenuType_);b.callback=Blockly.ContextMenu.callbackFactory(this,d);a.push(b)},helpUrl:Blockly.getUrlString("variables_hash_get_url"),tooltip:Blockly.getToolTipString("variables_hash_get_tooltip"), +"hash_variables_set"},onchange:Blockly.Blocks.variables_get.onchange,getVars:Blockly.Blocks.variables_get.getVars,renameVar:Blockly.Blocks.variables_get.renameVar,getVarsTypes:function(){var a={};a[this.procedurePrefix_+this.getFieldValue("VAR")]=["Map","Object"];return a},getScopeVars:function(a){var b=[];"HASHKEY"===a&&b.push(this.getFieldValue("HASHKEY"));return b},renameScopeVar:function(a,b,c){"HASHKEY"===c&&Blockly.Names.equals(a,this.getFieldValue("HASHKEY"))&&this.setFieldValue(b,"HASHKEY")}, +customContextMenu:function(a){var b={enabled:!0},c=this.getFieldValue("VAR"),d=this.getFieldValue("HASHKEY");b.text=this.contextMenuMsg_.replace("%1",c);c=goog.dom.createDom("field",null,c);c.setAttribute("name","VAR");c=goog.dom.createDom("field",null,d);c.setAttribute("name","HASHKEY");d=goog.dom.createDom("block",null,c);d.setAttribute("type",this.contextMenuType_);b.callback=Blockly.ContextMenu.callbackFactory(this,d);a.push(b)},helpUrl:Blockly.getUrlString("variables_hash_get_url"),tooltip:Blockly.getToolTipString("variables_hash_get_tooltip"), typeblock:Blockly.getMsgString("variables_hash_get_typeblock")}; Blockly.Blocks.hash_parmvariables_get={init:function(){this.setColour(Blockly.getBlockHue("blockhue_variables"));this.appendValueInput("VAR").appendField(Blockly.Msg.VARIABLES_GET_TITLE);this.appendDummyInput().appendField(".").appendField(new Blockly.FieldScopeVariable("HASHKEY"),"HASHKEY").appendField(Blockly.Msg.VARIABLES_GET_TAIL);this.setOutput(!0);this.setInputsInline(!0);this.contextMenuMsg_=Blockly.Msg.VARIABLES_GET_CREATE_SET;this.contextMenuType_="hash_variables_set"},getScopeVars:Blockly.Blocks.hash_variables_get.getScopeVars, renameScopeVar:Blockly.Blocks.hash_variables_get.renameScopeVar,helpUrl:Blockly.getUrlString("variables_hash_param_get_url"),tooltip:Blockly.getToolTipString("variables_hash_param_get_tooltip"),typeblock:Blockly.getMsgString("variables_hash_param_get_typeblock")}; diff --git a/core/blockly.js b/core/blockly.js index feebfd079c1..43bb1a76d8d 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -265,12 +265,18 @@ Blockly.svgSize = function(svg) { }; /** - * Defines list of variables for varius scopes - * @type {Array.} + * Defines list of variables for various scopes. + * @type {Object.} */ Blockly.scopeVariableList = { Types: ['String','Number','Boolean','Array','Map'] }; +/** + * Defines list of variable type equivalences. + * @type {Object.} + */ + Blockly.VariableTypeEquivalence = { + }; /** * Size the SVG image to completely fill its container. diff --git a/core/variables.js b/core/variables.js index 1c0cc60c32b..c365d7fe8fb 100644 --- a/core/variables.js +++ b/core/variables.js @@ -123,7 +123,28 @@ Blockly.Variables.allVariablesTypes = function(root) { var intersect = Blockly.Variables.Intersection( variableHash[key], blockVariablesTypes[key]); if (goog.array.isEmpty(intersect)) { - intersect = ['Var']; + var varkey = null; + if (variableHash[key].length === 1) { + varkey = variableHash[key][0]; + } + if (Blockly.VariableTypeEquivalence[varkey]) { + var intersectTest = Blockly.Variables.Intersection( + Blockly.VariableTypeEquivalence[varkey], + blockVariablesTypes[key]); + if (goog.array.isEmpty(intersectTest)) { + console.log("No match"); + } + } + + if (variableHash[key].length === 1 && + Blockly.VariableTypeEquivalence[variableHash[key][0]] && + !goog.array.isEmpty(Blockly.Variables.Intersection( + Blockly.VariableTypeEquivalence[variableHash[key][0]], + blockVariablesTypes[key]))) { + intersect = variableHash[key]; + } else { + intersect = ['Var']; + } } console.log('Block:'+ blocks[x].type + '.'+blocks[x].id+ ' For: '+key+' was:'+variableHash[key]+' got:'+ diff --git a/generators/java.js b/generators/java.js index 7798958ee48..e7bb08ce8a4 100644 --- a/generators/java.js +++ b/generators/java.js @@ -209,13 +209,33 @@ Blockly.Java.setPackage = function(javaPackage) { this.Package_ = javaPackage; } + +Blockly.Java.forceUpdate = function(root) { + var blocks; + if (root.getDescendants) { + // Root is Block. + blocks = root.getDescendants(); + } else if (root.getAllBlocks) { + // Root is Workspace. + blocks = root.getAllBlocks(); + } else { + throw 'Not Block or Workspace: ' + root; + } + // Iterate through every block and call the onchange function. + for (var x = 0; x < blocks.length; x++) { + if (blocks[x].onchange) { + blocks[x].onchange(); + } + } +}; + /** * Get the package for this generated Java code * @return {string} package Name of the package this is derived from */ Blockly.Java.getPackage = function() { return this.Package_; -} +}; /** * Set the base class (if any) for the generated Java code @@ -223,7 +243,7 @@ Blockly.Java.getPackage = function() { */ Blockly.Java.setBaseclass = function(baseclass) { this.Baseclass_ = baseclass; -} +}; /** * Get the base class (if any) for the generated Java code @@ -367,6 +387,7 @@ Blockly.Java.workspaceToCode_ = Blockly.Java.workspaceToCode; */ Blockly.Java.workspaceToCode = function(workspace, parms) { // Generate the code first to get all of the required imports calculated. + this.forceUpdate(workspace); var code = this.workspaceToCode_(workspace,parms); var finalcode = this.fileHeader + 'package ' + this.getPackage() + ';\n\n' + @@ -1022,7 +1043,7 @@ Blockly.Java.provideVarClass = function() { ]; this.classes_['Var'] = VarCode.join('\n')+'\n'; } else { - Blockly.Java.addImport('extreme.sdn.client.Var'); + Blockly.Java.addImport('com.extreme.platform.application.Var'); } } /** @@ -1084,6 +1105,8 @@ Blockly.Java.init = function(workspace, imports) { } else if (typeof type !== 'undefined' && type !== '') { if (Blockly.Blocks[type] && Blockly.Blocks[type].GBPClass ) { type = Blockly.Blocks[type].GBPClass; + } else if (Blockly.VariableTypeEquivalence[type]) { + // We can use the type as is. } else { console.log('Unknown type for '+key+' using Var for '+type); type = 'Var'; diff --git a/generators/java/procedures.js b/generators/java/procedures.js index 9c187654743..f7502d86caa 100644 --- a/generators/java/procedures.js +++ b/generators/java/procedures.js @@ -91,7 +91,7 @@ Blockly.Java['procedures_callreturn'] = function(block) { args[x] = Blockly.Java.valueToCode(block, 'ARG' + x, Blockly.Java.ORDER_NONE) || 'null'; } - var code = 'this.' + funcName + '(' + args.join(', ') + ')'; + var code = funcName + '(' + args.join(', ') + ')'; return [code, Blockly.Java.ORDER_FUNCTION_CALL]; }; @@ -104,7 +104,7 @@ Blockly.Java['procedures_callnoreturn'] = function(block) { args[x] = Blockly.Java.valueToCode(block, 'ARG' + x, Blockly.Java.ORDER_NONE) || 'null'; } - var code = 'this.' + funcName + '(' + args.join(', ') + ');\n'; + var code = funcName + '(' + args.join(', ') + ');\n'; return code; }; diff --git a/generators/java/variables.js b/generators/java/variables.js index 979a0c3efa9..f8a3f014eb5 100644 --- a/generators/java/variables.js +++ b/generators/java/variables.js @@ -74,33 +74,33 @@ Blockly.Java['variables_set'] = function(block) { Blockly.Java['hash_variables_get'] = function(block) { // Remember if this is a global variable to be initialized - Blockly.Java.setGlobalVar(block,block.getFieldValue('VAR'), null); - // Variable getter. - var getter = 'getString'; + var varName = block.getFieldValue('VAR'); + Blockly.Java.setGlobalVar(block,varName, null); + var vartype = Blockly.Java.GetVariableType(this.procedurePrefix_ + varName); + var code = Blockly.Java.variableDB_.getName(varName, + Blockly.Variables.NAME_TYPE); + if (Blockly.VariableTypeEquivalence[vartype]) { + code += '.' + block.getFieldValue('HASHKEY'); + } else { + code += '.get(' + block.getFieldValue('HASHKEY') + ')'; + } + + // See if the parent has a type that it wants var parent = block.getParent(); // Look at our parents to see if we know the type that we are assigning to if (parent) { var func = parent.getVars; if (func) { var blockVariables = func.call(parent); - for (var y = 0; y < blockVariables.length; y++) { - var varName = blockVariables[y]; - // Variable name may be null if the block is only half-built. - if (varName) { - var vartype = Blockly.Java.GetVariableType(this.procedurePrefix_+ - varName); - if (vartype === 'Array') { - getter = 'get'; - } else if (vartype === 'Object') { - getter = 'get'; - } + if (blockVariables && blockVariables.length) { + if (goog.array.contains(blockVariables, 'String')) { + code += '.getObjectAsString()'; + } else if (goog.array.contains(blockVariables, 'List')) { + code += '.getObjectAsList()'; } } } } - var code = Blockly.Java.variableDB_.getName(block.getFieldValue('VAR'), - Blockly.Variables.NAME_TYPE) + '.' + getter + '('+ - Blockly.Java.quote_(block.getFieldValue('HASHKEY')) + ')' ; return [code, Blockly.Java.ORDER_ATOMIC]; }; diff --git a/java_compressed.js b/java_compressed.js index 03d3f2543ac..2ad6bc0c35a 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -7,17 +7,18 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstra Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.INDENT=" ";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_=""; Blockly.Java.needImports_=[];Blockly.Java.Interfaces_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.INLINEVARCLASS=!0;Blockly.Java.classes_=[];Blockly.Java.globals_={};Blockly.Java.fileHeader='/*\n * Copyright (c) 2015, <>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'; -Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return Blockly.Java.variableDB_.getName(this.AppName_,"CLASS")};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.getPackage=function(){return this.Package_};Blockly.Java.setBaseclass=function(a){this.Baseclass_=a};Blockly.Java.getBaseclass=function(){var a=this.Baseclass_;""!=a&&(a=Blockly.Java.variableDB_.getName(a,"CLASS"));return a}; -Blockly.Java.addInterface=function(a){goog.array.contains(this.Interfaces_,a)||this.Interfaces_.push(a)};Blockly.Java.getInterfaces=function(){return 0===this.Interfaces_.length?null:this.Interfaces_};Blockly.Java.setGlobalVar=function(a,b,c){null!=Blockly.Variables.getLocalContext(a,b)||"undefined"!==typeof this.globals_[b]&&null!==this.globals_[b]||(this.globals_[b]=c)};Blockly.Java.GetVariableType=function(a){a=this.variableTypes_[a];a||(a="Var",Blockly.Java.provideVarClass());return a}; -Blockly.Java.GetBlocklyType=function(a){return this.blocklyTypes_[a]};Blockly.Java.addImport=function(a){a="import "+a+";";this.imports_[a]=a};Blockly.Java.getImports=function(){if(this.ExtraImports_)for(var a=0;a getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n final Var other = Var.valueOf(obj);\n if (getType() == Var.Type.NULL || other.getType() == Var.Type.NULL) {\n return getType().equals(other.getType());\n }\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n case NULL:\n return (var.getType() == Var.Type.NULL);\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n return var.lessThan(this);\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n return var.lessThanOrEqual(this);\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n case NULL:\n return null;\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object == null) {\n _type = Type.NULL;\n } else if (_object instanceof Var) {\n Var oldObj = (Var)_object;\n _type = oldObj.getType();\n _object = oldObj.getObject();\n } else if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): -Blockly.Java.addImport("extreme.sdn.client.Var")}; +Blockly.Java.addImport("com.extreme.platform.application.Var")}; Blockly.Java.init=function(a,b){this.definitions_=Object.create(null);this.functionNames_=Object.create(null);this.imports_=Object.create(null);this.classes_=Object.create(null);this.globals_=Object.create(null);for(var c=0;ce;e++)for(g=b[e].sort(),f=0;f Date: Wed, 30 Sep 2015 06:56:47 -0400 Subject: [PATCH 61/84] Merge remote-tracking branch 'google/master' Conflicts: blockly_compressed.js --- blockly_compressed.js | 13 +++---------- blockly_uncompressed.js | 3 +-- core/blockly.js | 3 --- core/blocks.js | 9 ++------- core/css.js | 25 +++++++++---------------- core/msg.js | 1 + 6 files changed, 16 insertions(+), 38 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 23a03e7a659..ab394f0a67b 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -983,14 +983,7 @@ goog.ui.ac.Renderer.prototype.getTokenRegExp_=function(a){var b="";if(!a)return goog.ui.ac.Renderer.prototype.renderRowHtml=function(a,b){var c=this.dom_.createDom(goog.dom.TagName.DIV,{className:this.rowClassName,id:goog.ui.IdGenerator.getInstance().getNextUniqueId()});goog.a11y.aria.setRole(c,goog.a11y.aria.Role.OPTION);this.customRenderer_&&this.customRenderer_.renderRow?this.customRenderer_.renderRow(a,b,c):this.renderRowContents_(a,b,c);b&&this.useStandardHighlighting_&&this.startHiliteMatchingText_(c,b);goog.dom.classlist.add(c,this.rowClassName);this.rowDivs_.push(c); return c};goog.ui.ac.Renderer.prototype.getRowFromEventTarget_=function(a){for(;a&&a!=this.element_&&!goog.dom.classlist.contains(a,this.rowClassName);)a=a.parentNode;return a?goog.array.indexOf(this.rowDivs_,a):-1};goog.ui.ac.Renderer.prototype.handleClick_=function(a){var b=this.getRowFromEventTarget_(a.target);0<=b&&this.dispatchEvent({type:goog.ui.ac.AutoComplete.EventType.SELECT,row:this.rows_[b].id});a.stopPropagation()}; goog.ui.ac.Renderer.prototype.handleMouseDown_=function(a){a.stopPropagation();a.preventDefault()};goog.ui.ac.Renderer.prototype.handleMouseOver_=function(a){a=this.getRowFromEventTarget_(a.target);0<=a&&!(goog.now()-this.startRenderingRows_c||void 0==c)c=goog.cssom.getCssRulesFromStyleSheet(a).length;if(a.insertRule)a.insertRule(b,c);else if(b=/^([^\{]+)\{([^\{]+)\}/.exec(b),3==b.length)a.addRule(b[1],b[2],c);else throw Error("Your CSSRule appears to be ill-formatted.");};goog.cssom.removeCssRule=function(a,b){a.deleteRule?a.deleteRule(b):a.removeRule(b)}; -goog.cssom.addCssText=function(a,b){var c=b?b.getDocument():goog.dom.getDocument(),d=c.createElement(goog.dom.TagName.STYLE);d.type="text/css";c.getElementsByTagName(goog.dom.TagName.HEAD)[0].appendChild(d);d.styleSheet?d.styleSheet.cssText=a:(c=c.createTextNode(a),d.appendChild(c));return d};goog.cssom.getFileNameFromStyleSheet=function(a){return(a=a.href)?/([^\/\?]+)[^\/]*$/.exec(a)[1]:null}; -goog.cssom.getAllCss_=function(a,b){for(var c=[],d=goog.cssom.getAllCssStyleSheets(a),e=0;a=d[e];e++){var f=goog.cssom.getCssRulesFromStyleSheet(a);if(f&&f.length){if(!b)var g=0;for(var h=0,k=f.length,l;h>>/g,Blockly.Css.mediaPath_);Blockly.Css.styleSheet_=goog.cssom.addCssText(c).sheet;Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)}}; -Blockly.Css.setCursor=function(a){if(Blockly.Css.currentCursor_!=a){Blockly.Css.currentCursor_=a;var b="url("+Blockly.Css.mediaPath_+"/"+a+".cur) "+(a==Blockly.Css.Cursor.OPEN?"8 5":"7 3")+", auto";goog.cssom.replaceCssRule("",".blocklyDraggable {\n cursor: "+b+";\n}\n",Blockly.Css.styleSheet_,0);for(var c=document.getElementsByClassName("blocklyToolboxDiv"),d=0,e;e=c[d];d++)e.style.cursor=a==Blockly.Css.Cursor.DELETE?b:"";document.body.parentNode.style.cursor=a==Blockly.Css.Cursor.OPEN?"":b}}; +Blockly.Css.inject=function(a,b){if(!Blockly.Css.styleSheet_){var c=".blocklyDraggable {}\n";a&&(c+=Blockly.Css.CONTENT.join("\n"),Blockly.FieldDate&&(c+=Blockly.FieldDate.CSS.join("\n")));Blockly.Css.mediaPath_=b.replace(/[\\\/]$/,"");var c=c.replace(/<<>>/g,Blockly.Css.mediaPath_),d=document.createElement("style");document.head.appendChild(d);c=document.createTextNode(c);d.appendChild(c);Blockly.Css.styleSheet_=d.sheet;Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)}}; +Blockly.Css.setCursor=function(a){if(Blockly.Css.currentCursor_!=a){Blockly.Css.currentCursor_=a;var b="url("+Blockly.Css.mediaPath_+"/"+a+".cur), auto",c=".blocklyDraggable {\n cursor: "+b+";\n}\n";Blockly.Css.styleSheet_.deleteRule(0);Blockly.Css.styleSheet_.insertRule(c,0);for(var c=document.getElementsByClassName("blocklyToolboxDiv"),d=0,e;e=c[d];d++)e.style.cursor=a==Blockly.Css.Cursor.DELETE?b:"";document.body.parentNode.style.cursor=a==Blockly.Css.Cursor.OPEN?"":b}}; Blockly.Css.CONTENT=[".blocklySvg {"," background-color: #fff;"," outline: none;"," overflow: hidden;","}",".blocklyWidgetDiv {"," display: none;"," position: absolute;"," z-index: 999;","}",".blocklyTooltipDiv {"," background-color: #ffffc7;"," border: 1px solid #ddc;"," box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);"," color: #000;"," display: none;"," font-family: sans-serif;"," font-size: 9pt;"," opacity: 0.9;"," padding: 2px;"," position: absolute;"," z-index: 1000;","}",".blocklyResizeSE {", " cursor: se-resize;"," fill: #aaa;","}",".blocklyResizeSW {"," cursor: sw-resize;"," fill: #aaa;","}",".blocklyResizeLine {"," stroke: #888;"," stroke-width: 1;","}",".blocklyHighlightedConnectionPath {"," fill: none;"," stroke: #fc3;"," stroke-width: 4px;","}",".blocklyPathLight {"," fill: none;"," stroke-linecap: round;"," stroke-width: 1;","}",".blocklySelected>.blocklyPath {"," stroke: #fc3;"," stroke-width: 3px;","}",".blocklySelected>.blocklyPathLight {"," display: none;","}", ".blocklyDragging>.blocklyPath,",".blocklyDragging>.blocklyPathLight {"," fill-opacity: .8;"," stroke-opacity: .8;","}",".blocklyDragging>.blocklyPathDark {"," display: none;","}",".blocklyDisabled>.blocklyPath {"," fill-opacity: .5;"," stroke-opacity: .5;","}",".blocklyDisabled>.blocklyPathLight,",".blocklyDisabled>.blocklyPathDark {"," display: none;","}",".blocklyText {"," cursor: default;"," fill: #fff;"," font-family: sans-serif;"," font-size: 11pt;","}",".blocklyNonEditableText>text {", diff --git a/blockly_uncompressed.js b/blockly_uncompressed.js index 8fd60b3aab3..5df88eed92f 100644 --- a/blockly_uncompressed.js +++ b/blockly_uncompressed.js @@ -33,7 +33,7 @@ goog.addDependency("../../../" + dir + "/core/bubble.js", ['Blockly.Bubble'], [' goog.addDependency("../../../" + dir + "/core/comment.js", ['Blockly.Comment'], ['Blockly.Bubble', 'Blockly.Icon', 'goog.userAgent']); goog.addDependency("../../../" + dir + "/core/connection.js", ['Blockly.Connection', 'Blockly.ConnectionDB'], ['goog.dom']); goog.addDependency("../../../" + dir + "/core/contextmenu.js", ['Blockly.ContextMenu'], ['goog.dom', 'goog.events', 'goog.style', 'goog.ui.Menu', 'goog.ui.MenuItem']); -goog.addDependency("../../../" + dir + "/core/css.js", ['Blockly.Css'], ['goog.cssom']); +goog.addDependency("../../../" + dir + "/core/css.js", ['Blockly.Css'], []); goog.addDependency("../../../" + dir + "/core/field.js", ['Blockly.Field'], ['goog.asserts', 'goog.dom', 'goog.math.Size', 'goog.style', 'goog.userAgent']); goog.addDependency("../../../" + dir + "/core/field_angle.js", ['Blockly.FieldAngle'], ['Blockly.FieldTextInput', 'goog.math', 'goog.userAgent']); goog.addDependency("../../../" + dir + "/core/field_checkbox.js", ['Blockly.FieldCheckbox'], ['Blockly.Field']); @@ -84,7 +84,6 @@ goog.addDependency("async/run.js", ['goog.async.run'], ['goog.async.WorkQueue', goog.addDependency("async/workqueue.js", ['goog.async.WorkItem', 'goog.async.WorkQueue'], ['goog.asserts', 'goog.async.FreeList']); goog.addDependency("color/color.js", ['goog.color', 'goog.color.Hsl', 'goog.color.Hsv', 'goog.color.Rgb'], ['goog.color.names', 'goog.math']); goog.addDependency("color/names.js", ['goog.color.names'], []); -goog.addDependency("cssom/cssom.js", ['goog.cssom', 'goog.cssom.CssRuleType'], ['goog.array', 'goog.dom', 'goog.dom.TagName']); goog.addDependency("debug/debug.js", ['goog.debug'], ['goog.array', 'goog.html.SafeHtml', 'goog.html.SafeUrl', 'goog.html.uncheckedconversions', 'goog.string.Const', 'goog.structs.Set', 'goog.userAgent']); goog.addDependency("debug/entrypointregistry.js", ['goog.debug.EntryPointMonitor', 'goog.debug.entryPointRegistry'], ['goog.asserts']); goog.addDependency("debug/error.js", ['goog.debug.Error'], []); diff --git a/core/blockly.js b/core/blockly.js index 43bb1a76d8d..ee11af426e6 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -27,7 +27,6 @@ // Top level object for Blockly. goog.provide('Blockly'); -// Blockly core dependencies. goog.require('Blockly.BlockSvg'); goog.require('Blockly.FieldAngle'); goog.require('Blockly.FieldCheckbox'); @@ -56,8 +55,6 @@ goog.require('Blockly.WidgetDiv'); goog.require('Blockly.WorkspaceSvg'); goog.require('Blockly.inject'); goog.require('Blockly.utils'); - -// Closure dependencies. goog.require('goog.color'); goog.require('goog.events.KeyCodes'); goog.require('goog.userAgent'); diff --git a/core/blocks.js b/core/blocks.js index d6afbadd7c6..26e1eaa2d06 100644 --- a/core/blocks.js +++ b/core/blocks.js @@ -19,19 +19,14 @@ */ /** - * @fileoverview Flexible templating system for defining blocks. + * @fileoverview Name space for the Blocks singleton. * @author spertus@google.com (Ellen Spertus) */ 'use strict'; - -/** - * Name space for the Blocks singleton. - * Blocks gets populated in the blocks files, possibly through calls to - * Blocks.addTemplate(). - */ goog.provide('Blockly.Blocks'); + /** * Unique ID counter for created blocks. * @private diff --git a/core/css.js b/core/css.js index b5dff3dd4dd..06cea0e63c4 100644 --- a/core/css.js +++ b/core/css.js @@ -26,8 +26,6 @@ goog.provide('Blockly.Css'); -goog.require('goog.cssom'); - /** * List of cursors. @@ -86,7 +84,12 @@ Blockly.Css.inject = function(hasCss, pathToMedia) { // Strip off any trailing slash (either Unix or Windows). Blockly.Css.mediaPath_ = pathToMedia.replace(/[\\\/]$/, ''); text = text.replace(/<<>>/g, Blockly.Css.mediaPath_); - Blockly.Css.styleSheet_ = goog.cssom.addCssText(text).sheet; + // Inject CSS tag. + var cssNode = document.createElement('style'); + document.head.appendChild(cssNode); + var cssTextNode = document.createTextNode(text); + cssNode.appendChild(cssTextNode); + Blockly.Css.styleSheet_ = cssNode.sheet; Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN); }; @@ -99,22 +102,12 @@ Blockly.Css.setCursor = function(cursor) { return; } Blockly.Css.currentCursor_ = cursor; - /* - Hotspot coordinates are baked into the CUR file, but they are still - required in the CSS due to a Chrome bug. - https://code.google.com/p/chromium/issues/detail?id=1446 - */ - if (cursor == Blockly.Css.Cursor.OPEN) { - var xy = '8 5'; - } else { - var xy = '7 3'; - } - var url = 'url(' + Blockly.Css.mediaPath_ + '/' + cursor + - '.cur) ' + xy + ', auto'; + var url = 'url(' + Blockly.Css.mediaPath_ + '/' + cursor + '.cur), auto'; // There are potentially hundreds of draggable objects. Changing their style // properties individually is too slow, so change the CSS rule instead. var rule = '.blocklyDraggable {\n cursor: ' + url + ';\n}\n'; - goog.cssom.replaceCssRule('', rule, Blockly.Css.styleSheet_, 0); + Blockly.Css.styleSheet_.deleteRule(0); + Blockly.Css.styleSheet_.insertRule(rule, 0); // There is probably only one toolbox, so just change its style property. var toolboxen = document.getElementsByClassName('blocklyToolboxDiv'); for (var i = 0, toolbox; toolbox = toolboxen[i]; i++) { diff --git a/core/msg.js b/core/msg.js index 9056885f749..7bea1f6cc59 100644 --- a/core/msg.js +++ b/core/msg.js @@ -30,6 +30,7 @@ */ goog.provide('Blockly.Msg'); + /** * Back up original getMsg function. * @type {!Function} From 332c4f733b316b5e9d5da277196e1a48a21d253a Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 2 Oct 2015 16:05:03 -0400 Subject: [PATCH 62/84] Fix oder of navigation with the arrows Add getOrderedChildren to return list of blocks in the correct order. Add getAppTitle to be able to get the application name unmanaged by the variables Output the Var class when only a string comparison is used. --- blockly_compressed.js | 16 +++++++++------- core/block.js | 33 +++++++++++++++++++++++++++++---- core/blockly.js | 12 ++++++------ generators/java.js | 7 +++++++ generators/java/logic.js | 1 + java_compressed.js | 6 +++--- 6 files changed, 55 insertions(+), 20 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index b5d5e4e8e98..b37b5172c95 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1201,12 +1201,13 @@ Blockly.Block.prototype.unplug=function(a,b){b=b&&!!this.getParent();if(this.out Blockly.Block.prototype.getConnections_=function(a){var b=[];if(a||this.rendered)if(this.outputConnection&&b.push(this.outputConnection),this.previousConnection&&b.push(this.previousConnection),this.nextConnection&&b.push(this.nextConnection),a||!this.collapsed_){a=0;for(var c;c=this.inputList[a];a++)c.connection&&b.push(c.connection)}return b}; Blockly.Block.prototype.bumpNeighbours_=function(){if(this.workspace&&0==Blockly.dragMode_){var a=this.getRootBlock();if(!a.isInFlyout)for(var b=this.getConnections_(!1),c=0,d;d=b[c];c++){d.targetConnection&&d.isSuperior()&&d.targetBlock().bumpNeighbours_();for(var e=d.neighbours_(Blockly.SNAP_RADIUS),f=0,g;g=e[f];f++)d.targetConnection&&g.targetConnection||g.sourceBlock_.getRootBlock()!=a&&(d.isSuperior()?g.bumpAwayFrom_(d):d.bumpAwayFrom_(g))}}};Blockly.Block.prototype.getParent=function(){return this.parentBlock_}; Blockly.Block.prototype.getSurroundParent=function(){for(var a=this;;){do{var b=a,a=a.getParent();if(!a)return null}while(a.getNextBlock()==b);return a}};Blockly.Block.prototype.getNextBlock=function(){return this.nextConnection&&this.nextConnection.targetBlock()};Blockly.Block.prototype.getRootBlock=function(){var a,b=this;do a=b,b=a.parentBlock_;while(b);return a};Blockly.Block.prototype.getChildren=function(){return this.childBlocks_}; +Blockly.Block.prototype.getOrderedChildren=function(){for(var a=this.getChildren(),b=[],c=0,d;d=this.inputList[c];c++)if(d&&d.connection&&(d=d.connection.targetBlock())){var e=goog.array.indexOf(a,d);goog.asserts.assert(0<=e,"Input not in children list.");b.push(d)}return b}; Blockly.Block.prototype.setParent=function(a){if(this.parentBlock_){for(var b=this.parentBlock_.childBlocks_,c,d=0;c=b[d];d++)if(c==this){b.splice(d,1);break}this.parentBlock_=null;this.previousConnection&&this.previousConnection.targetConnection&&this.previousConnection.disconnect();this.outputConnection&&this.outputConnection.targetConnection&&this.outputConnection.disconnect()}else goog.array.contains(this.workspace.getTopBlocks(!1),this)&&this.workspace.removeTopBlock(this);(this.parentBlock_= a)?a.childBlocks_.push(this):this.workspace.addTopBlock(this)};Blockly.Block.prototype.getDescendants=function(){for(var a=[this],b,c=0;b=this.childBlocks_[c];c++)a.push.apply(a,b.getDescendants());return a};Blockly.Block.prototype.isDeletable=function(){return this.deletable_&&!(this.workspace&&this.workspace.options.readOnly)};Blockly.Block.prototype.setDeletable=function(a){this.deletable_=a};Blockly.Block.prototype.isMovable=function(){return this.movable_&&!(this.workspace&&this.workspace.options.readOnly)}; Blockly.Block.prototype.setMovable=function(a){this.movable_=a};Blockly.Block.prototype.isEditable=function(){return this.editable_&&!(this.workspace&&this.workspace.options.readOnly)};Blockly.Block.prototype.setEditable=function(a){this.editable_=a;a=0;for(var b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.updateEditable();if(this.rendered)for(b=this.getIcons(!0),a=0;a=d.length&&(e=-1));-1!==e&&(c=d[e])}if(null===c&&(b=Blockly.findNextBlock(b),a=null,b==Blockly.selected))break}Blockly.selectField(c)}; Blockly.selectPrevField=function(){for(var a=Blockly.selectedField,b=Blockly.selected,c=null;null===c;){b||(b=Blockly.findNextBlock(null),a=null);if(!b)break;var d=b.getEditableFields();if(d.length){var e=d.length-1;a&&(e=goog.array.indexOf(d,a)-1,0>e&&(e=-1));-1!==e&&(c=d[e])}if(null===c&&(b=Blockly.findPrevBlock(b),a=null,b==Blockly.selected))break}Blockly.selectField(c)};Blockly.selectNextBlock=function(){var a=Blockly.findNextBlock(Blockly.selected);Blockly.selectField(null);Blockly.selectBlock(a)}; -Blockly.findNextTopBlock=function(a){var b=null,c=Blockly.getMainWorkspace().getTopBlocks(!0);0} Array of blocks. + */ +Blockly.Block.prototype.getOrderedChildren = function() { + var children = this.getChildren(); + var result = []; + for (var i = 0, input; input = this.inputList[i]; i++) { + if (input && input.connection) { + var block = input.connection.targetBlock(); + if (block) { + var spot = goog.array.indexOf(children, block); + goog.asserts.assert(spot >= 0, 'Input not in children list.'); + result.push(block); + } + } + } + + return result; +}; + /** * Set parent of this block to be a new block or null. * @param {Blockly.Block} newParent New parent block. @@ -624,10 +647,12 @@ Blockly.Block.prototype.getField = function(name) { */ Blockly.Block.prototype.getEditableFields = function() { var fields = []; - for (var i = 0, input; input = this.inputList[i]; i++) { - for (var j = 0, field; field = input.fieldRow[j]; j++) { - if (field.EDITABLE && field.SERIALIZABLE) { - fields.push(field); + if (!this.isCollapsed()) { + for (var i = 0, input; input = this.inputList[i]; i++) { + for (var j = 0, field; field = input.fieldRow[j]; j++) { + if (field.EDITABLE && field.SERIALIZABLE) { + fields.push(field); + } } } } diff --git a/core/blockly.js b/core/blockly.js index ee11af426e6..c8c98c83ad3 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -717,7 +717,7 @@ Blockly.findNextBlock = function(block) { // If so, then we will take it. var children = []; if (!baseBlock.isCollapsed()) { - children = baseBlock.getChildren(); + children = baseBlock.getOrderedChildren(); } var spot = 0; if (children.length > 0) { @@ -805,7 +805,7 @@ Blockly.findPrevBlock = function(block) { // otherwise we go to the parent var children = []; if (!baseBlock.isCollapsed()) { - children = baseBlock.getChildren(); + children = baseBlock.getOrderedChildren(); } if (children.length === 0) { newSelect = baseBlock; @@ -846,8 +846,8 @@ Blockly.selectParentBlock = function() { baseBlock = prevBlock.getSurroundParent(); if (baseBlock != null) { var children = []; - if (!baseBlock.isCollapsed()) { - children = baseBlock.getChildren(); + if (!baseBlock.isCollapsed() && !baseBlock.getInputsInline()) { + children = baseBlock.getOrderedChildren(); } if (children.length >= 0) { var spot = goog.array.indexOf(children, prevBlock); @@ -887,8 +887,8 @@ Blockly.selectChildBlock = function() { baseBlock = prevBlock.getSurroundParent(); if (baseBlock != null) { var children = []; - if (!baseBlock.isCollapsed()) { - children = baseBlock.getChildren(); + if (!baseBlock.isCollapsed() && !baseBlock.getInputsInline()) { + children = baseBlock.getOrderedChildren(); } if (children.length >= 0) { var spot = goog.array.indexOf(children, prevBlock); diff --git a/generators/java.js b/generators/java.js index e7bb08ce8a4..e5f27f347db 100644 --- a/generators/java.js +++ b/generators/java.js @@ -197,6 +197,13 @@ Blockly.Java.setAppName = function(name) { Blockly.Java.getAppName = function() { return Blockly.Java.variableDB_.getName(this.AppName_,'CLASS'); } +/** + * Get the application name for visual presentation + * @return {string} name Name for the application for visual usage + */ +Blockly.Java.getAppTitle = function() { + return this.AppName_; +} /** * Set the package for this generated Java code diff --git a/generators/java/logic.js b/generators/java/logic.js index 25347fa7ccc..9e568d9183d 100644 --- a/generators/java/logic.js +++ b/generators/java/logic.js @@ -94,6 +94,7 @@ Blockly.Java['logic_compare'] = function(block) { argument0 = '""'; } else { argument0 = 'Var.valueOf(' + argument0 + ')'; + Blockly.Java.provideVarClass(); } if (!argument1) { argument1 = '""'; diff --git a/java_compressed.js b/java_compressed.js index 2ad6bc0c35a..aa19ce86af5 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -7,8 +7,8 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstra Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.INDENT=" ";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_=""; Blockly.Java.needImports_=[];Blockly.Java.Interfaces_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.INLINEVARCLASS=!0;Blockly.Java.classes_=[];Blockly.Java.globals_={};Blockly.Java.fileHeader='/*\n * Copyright (c) 2015, <>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'; -Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return Blockly.Java.variableDB_.getName(this.AppName_,"CLASS")};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.forceUpdate=function(a){if(a.getDescendants)a=a.getDescendants();else if(a.getAllBlocks)a=a.getAllBlocks();else throw"Not Block or Workspace: "+a;for(var b=0;b","<=":">=",">":"<",">=":"<="},c={EQ:"",NEQ:"!",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")];Blockly.Java.getValueType(a,"A");Blockly.Java.getValueType(a,"B");var d=Blockly.Java.valueToCode(a,"A",Blockly.Java.ORDER_RELATIONAL);a=Blockly.Java.valueToCode(a,"B",Blockly.Java.ORDER_RELATIONAL);".cloneObject()"===d.slice(-14)?(d=d.slice(0,-14),".cloneObject()"===a.slice(-14)&&(a=a.slice(0,-14))):".cloneObject()"===a.slice(-14)&& -(c=b[c],b=d,d=a.slice(0,-14),a=b);d=d?"Var.valueOf("+d+")":'""';a||(a='""');return[""===c||"!"===c?c+d+".equals("+a+")":d+".compareTo("+a+") "+c+" 0",Blockly.Java.ORDER_RELATIONAL]}; +(c=b[c],b=d,d=a.slice(0,-14),a=b);d?(d="Var.valueOf("+d+")",Blockly.Java.provideVarClass()):d='""';a||(a='""');return[""===c||"!"===c?c+d+".equals("+a+")":d+".compareTo("+a+") "+c+" 0",Blockly.Java.ORDER_RELATIONAL]}; Blockly.Java.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?" && ":" || ",c="and"==b?Blockly.Java.ORDER_LOGICAL_AND:Blockly.Java.ORDER_LOGICAL_OR,d=Blockly.Java.valueToCode(a,"A",c);a=Blockly.Java.valueToCode(a,"B",c);if(d||a){var e=" && "==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+b+a,c]};Blockly.Java.logic_negate=function(a){return["!("+(Blockly.Java.valueToCode(a,"BOOL",Blockly.Java.ORDER_LOGICAL_NOT)||"true")+")",Blockly.Java.ORDER_LOGICAL_NOT]}; Blockly.Java.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_null=function(a){return["null",Blockly.Java.ORDER_ATOMIC]};Blockly.Java.logic_ternary=function(a){var b=Blockly.Java.valueToCode(a,"IF",Blockly.Java.ORDER_CONDITIONAL)||"false",c=Blockly.Java.valueToCode(a,"THEN",Blockly.Java.ORDER_CONDITIONAL)||"null";a=Blockly.Java.valueToCode(a,"ELSE",Blockly.Java.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Java.ORDER_CONDITIONAL]};Blockly.Java.loops={}; Blockly.Java.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.Java.valueToCode(a,"TIMES",Blockly.Java.ORDER_ASSIGNMENT)||"0",c=Blockly.Java.statementToCode(a,"DO"),c=Blockly.Java.addLoopTrap(c,a.id);a="";var d=Blockly.Java.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE),e=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(e=Blockly.Java.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),a+="int "+e+" = int("+b+");\n"); From ecdf22d1a7b33a43e908541ef670b3e7f3e03104 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 9 Oct 2015 08:08:59 -0400 Subject: [PATCH 63/84] Update to latest type indicator from Hendrik Diel --- core/typeIndicator.js | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/core/typeIndicator.js b/core/typeIndicator.js index c6934e14b56..14eed238540 100644 --- a/core/typeIndicator.js +++ b/core/typeIndicator.js @@ -1,28 +1,23 @@ /** @license Copyright 2015 Hendrik Diel - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - @fileoverview This file adds a indicator to all connections that shows if a dragging block is type compatible - @author diel.hendrik@gmail.com (Hendrik Diel) */ (function() { - + "use strict"; // keep in mind if we are dragging right now var draggingWorkspace = null; @@ -34,7 +29,7 @@ // Store google's terminateDrag in a variable so we can expand it. var oldTerminateDrag_ = Blockly.BlockSvg.terminateDrag_; Blockly.BlockSvg.terminateDrag_ = function() { - // Only if the user was + // Only if the user was dragging if (draggingWorkspace) { // Go through all the blocks var allBlocks = draggingWorkspace.getAllBlocks(); @@ -59,14 +54,14 @@ /** * Creates the indicators on the first mouse move of an drag since all the - * blocks have moved then we dont need to worry about moving the indicators + * blocks have moved we dont need to worry about moving the indicators * along with the blocks. * @type {undefined} */ //save old onMouseMove_() for later call var oldOnMouseMove_ = Blockly.BlockSvg.prototype.onMouseMove_; Blockly.BlockSvg.prototype.onMouseMove_ = function(e) { - var this_ = this; // we need to dave the this context so the command beeing created can access it + var this_ = this; // we need to save the this context so the command beeing created can access it Blockly.doCommand(function() { if (Blockly.dragMode_ == 2 && !draggingWorkspace) { // Only on first drag move draggingWorkspace = this_.workspace; @@ -75,17 +70,22 @@ // or a block without relevant conenctions at all. var typ = "dummy"; var outCon = null; + var inCon = null; if (this_.outputConnection) { outCon = this_.outputConnection; - typ = "input"; - } else if (this_.previousConnection) { + typ = "input"; + }if (this_.previousConnection) { outCon = this_.previousConnection; typ = "statement"; - } + }if(this_.nextConnection){ + inCon = this_.nextConnection; + typ = "statement"; + } if (outCon) { // To get all potential connections by looking up the opposite type // and geting all connections of that type from the workspace var oppositeType = Blockly.OPPOSITE_TYPE[outCon.type]; + var cons = draggingWorkspace.connectionDBList[oppositeType]; cons.forEach(function(otherConn) { @@ -101,6 +101,23 @@ } }); } + if(inCon){ + var oppositeInType = Blockly.OPPOSITE_TYPE[inCon.type]; + var consIn = draggingWorkspace.connectionDBList[oppositeInType]; + consIn.forEach(function(otherConn) { + if (outCon.checkType_(otherConn) && // type must match + !otherConn.typeHighlightSvgPath && // only highlight if not already highlighted + !this_.isParentOf(otherConn.sourceBlock_) // don't highlight childblocks + ) { + // Add the highlight and save the node so we can remove it later + if (((typ == "statement") || (typ == "input") && !(otherConn.targetConnection))) + otherConn.typeHighlightSvgPath = otherConn.typeHighlight(); + else + otherConn.typeHighlightSvgPath = otherConn.typeHighlight('blocklyOccupiedTypeHighlightedConnectionPath'); + } + }); + + } } }); // Call googles onMouseMove_() so it can do the rest From 764b96442b46a5da115ae61d09e0e247fc6d4fe3 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 9 Oct 2015 08:09:32 -0400 Subject: [PATCH 64/84] Position the initial typeblock menu in the workspace --- core/typeblock.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/typeblock.js b/core/typeblock.js index 62bf901eac7..6f9bcbd5db0 100644 --- a/core/typeblock.js +++ b/core/typeblock.js @@ -159,6 +159,16 @@ Blockly.TypeBlock.show = function(){ var x = Blockly.latestClick.x - svgPosition.x; var y = Blockly.latestClick.y - svgPosition.y; + /* + * If there have not been any clicks yet, set (x,y) explicitly. + */ + if (x <= 0) { + x = 300; + } + if (y <= 0) { + y = 150; + } + goog.style.setPosition(Blockly.TypeBlock.typeBlockDiv_, x, y); goog.style.showElement(Blockly.TypeBlock.typeBlockDiv_, true); Blockly.TypeBlock.inputText_.value = ''; From b7d12ed996b732c591506638a597251c981a58bc Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 9 Oct 2015 08:10:08 -0400 Subject: [PATCH 65/84] Implement required types for connections Disallow promiscuous connections if the connection type requires a type. --- blockly_compressed.js | 22 +++++++++++----------- core/block.js | 22 ++++++++++++++-------- core/connection.js | 9 +++++++-- 3 files changed, 32 insertions(+), 21 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 19a4a5323a8..28b46f16a77 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1039,8 +1039,8 @@ Blockly.Connection.prototype.highlight=function(){var a;this.type==Blockly.INPUT Blockly.Connection.prototype.tighten_=function(){var a=Math.round(this.targetConnection.x_-this.x_),b=Math.round(this.targetConnection.y_-this.y_);if(0!=a||0!=b){var c=this.targetBlock(),d=c.getSvgRoot();if(!d)throw"block is not rendered.";d=Blockly.getRelativeXY_(d);c.getSvgRoot().setAttribute("transform","translate("+(d.x-a)+","+(d.y-b)+")");c.moveConnections_(-a,-b)}}; Blockly.Connection.prototype.closest=function(a,b,c){function d(b){b=e[b];if((b.type==Blockly.OUTPUT_VALUE||b.type==Blockly.PREVIOUS_STATEMENT)&&b.targetConnection||b.type==Blockly.INPUT_VALUE&&b.targetConnection&&!b.targetBlock().isMovable()||!p.checkType_(b))return!0;var c=b.sourceBlock_;do{if(l==c)return!0;c=c.getParent()}while(c);var d=f-b.x_,c=g-b.y_,d=Math.sqrt(d*d+c*c);d<=a&&(k=b,a=d);return Math.abs(c)e&&(d[a]--,this.setItemCount(a,d[a]));0==d[a]&&this.removeInput(this.getAddSubName(a,0),!0);(d=this.getInput(this.getAddSubName(a,c)))&&d.connection&&d.connection.targetConnection&&d.connection.targetConnection.sourceBlock_.unplug(!0,!0);for(c+=1;c=b&&(b=300);0>=c&&(c=150);goog.style.setPosition(Blockly.TypeBlock.typeBlockDiv_,b,c);goog.style.showElement(Blockly.TypeBlock.typeBlockDiv_,!0);Blockly.TypeBlock.inputText_.value="";Blockly.TypeBlock.inputText_.focus(); +a.processFocus(Blockly.TypeBlock.inputText_);Blockly.TypeBlock.visible=!0}};Blockly.TypeBlock.needsReload={components:!0};Blockly.TypeBlock.lazyLoadOfOptions_=function(){this.needsReload.components&&(Blockly.TypeBlock.generateOptions(),this.needsReload.components=null);Blockly.TypeBlock.loadGlobalVariables_();Blockly.TypeBlock.loadProcedures_();this.reloadOptionsAfterChanges_()}; Blockly.TypeBlock.generateOptions=function(){Blockly.TypeBlock.TBOptions_=function(){function a(a,c){a&&goog.array.forEach(a,function(a){var d={},e={},f={};a.fields&&(d=a.fields);a.values&&(f=a.values);a.mutatorAttributes&&(e=a.mutatorAttributes);b[a.entry]={canonicName:c,mutatorAttributes:e,fields:d,values:f}})}var b={},c,d;for(d in Blockly.Blocks){var e=Blockly.Blocks[d];e.typeblock&&(c=e.typeblock,"function"==typeof e.typeblock?c=e.typeblock():"string"===typeof e.typeblock&&(c=[{entry:e.typeblock}]), a(c,d))}return b}()};Blockly.TypeBlock.reloadOptionsAfterChanges_=function(){Blockly.TypeBlock.TBOptionsNames_=goog.object.getKeys(Blockly.TypeBlock.TBOptions_);goog.array.sort(Blockly.TypeBlock.TBOptionsNames_);Blockly.TypeBlock.ac_.matcher_.setRows(Blockly.TypeBlock.TBOptionsNames_)}; Blockly.TypeBlock.loadProcedures_=function(){Blockly.TypeBlock.TBOptions_=goog.object.filter(Blockly.TypeBlock.TBOptions_,function(a){return!a.isProcedure});var a=Blockly.Procedures.allProcedures(Blockly.mainWorkspace);goog.array.forEach(a[0],function(a){var c=goog.string.trim(Blockly.Msg.PROCEDURES_CALLNORETURN_CALL+" ")+a[0];Blockly.TypeBlock.TBOptions_[c]={canonicName:"procedures_callnoreturn",fields:{NAME:a[0]},isProcedure:!0}});goog.array.forEach(a[1],function(a){var c=goog.string.trim(Blockly.Msg.PROCEDURES_CALLRETURN_CALL+ diff --git a/core/block.js b/core/block.js index 668dc9f9014..257c9c651d5 100644 --- a/core/block.js +++ b/core/block.js @@ -704,8 +704,10 @@ Blockly.Block.prototype.setTitleValue = function(newValue, name) { * @param {boolean} newBoolean True if there can be a previous statement. * @param {string|Array.|null|undefined} opt_check Statement type or * list of statement types. Null/undefined if any type could be connected. + * @param {boolean} requireType true if null blocks can't match. */ -Blockly.Block.prototype.setPreviousStatement = function(newBoolean, opt_check) { +Blockly.Block.prototype.setPreviousStatement = function(newBoolean, opt_check, + requireType) { if (this.previousConnection) { goog.asserts.assert(!this.previousConnection.targetConnection, 'Must disconnect previous statement before removing connection.'); @@ -720,7 +722,7 @@ Blockly.Block.prototype.setPreviousStatement = function(newBoolean, opt_check) { } this.previousConnection = new Blockly.Connection(this, Blockly.PREVIOUS_STATEMENT); - this.previousConnection.setCheck(opt_check); + this.previousConnection.setCheck(opt_check,requireType); } if (this.rendered) { this.render(); @@ -733,8 +735,10 @@ Blockly.Block.prototype.setPreviousStatement = function(newBoolean, opt_check) { * @param {boolean} newBoolean True if there can be a next statement. * @param {string|Array.|null|undefined} opt_check Statement type or * list of statement types. Null/undefined if any type could be connected. + * @param {boolean} requireType true if null blocks can't match. */ -Blockly.Block.prototype.setNextStatement = function(newBoolean, opt_check) { +Blockly.Block.prototype.setNextStatement = function(newBoolean, opt_check, + requireType) { if (this.nextConnection) { goog.asserts.assert(!this.nextConnection.targetConnection, 'Must disconnect next statement before removing connection.'); @@ -747,7 +751,7 @@ Blockly.Block.prototype.setNextStatement = function(newBoolean, opt_check) { } this.nextConnection = new Blockly.Connection(this, Blockly.NEXT_STATEMENT); - this.nextConnection.setCheck(opt_check); + this.nextConnection.setCheck(opt_check,requireType); } if (this.rendered) { this.render(); @@ -761,8 +765,10 @@ Blockly.Block.prototype.setNextStatement = function(newBoolean, opt_check) { * @param {string|Array.|null|undefined} opt_check Returned type or list * of returned types. Null or undefined if any type could be returned * (e.g. variable get). + * @param {boolean} requireType true if null blocks can't match. */ -Blockly.Block.prototype.setOutput = function(newBoolean, opt_check) { +Blockly.Block.prototype.setOutput = function(newBoolean, opt_check, + requireType) { if (this.outputConnection) { goog.asserts.assert(!this.outputConnection.targetConnection, 'Must disconnect output value before removing connection.'); @@ -777,7 +783,7 @@ Blockly.Block.prototype.setOutput = function(newBoolean, opt_check) { } this.outputConnection = new Blockly.Connection(this, Blockly.OUTPUT_VALUE); - this.outputConnection.setCheck(opt_check); + this.outputConnection.setCheck(opt_check,requireType); } if (this.rendered) { this.render(); @@ -1117,7 +1123,7 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) { fieldStack.push([field, element['name']]); } else if (input) { if (element['check']) { - input.setCheck(element['check']); + input.setCheck(element['check'], element['requireType']); } if (element['align']) { input.setAlign(alignmentLookup[element['align']]); @@ -1477,7 +1483,7 @@ Blockly.Block.prototype.appendAddSubInput = function(name,pos,title) { if (itemCount[name]) { inputItem = this.appendValueInput(newName) - .setCheck(this.checks_[name]) + .setCheck(this.checks_[name],!!this.checks_[name]) .setAlign(Blockly.ALIGN_RIGHT); if (title) { inputItem.appendField(title); diff --git a/core/connection.js b/core/connection.js index c1ed2188717..06b75fdc245 100644 --- a/core/connection.js +++ b/core/connection.js @@ -558,9 +558,12 @@ Blockly.Connection.prototype.checkType_ = function(otherConnection) { !otherConnection.sourceBlock_.isMovable()) { return false; } + if (!this.check_ || !otherConnection.check_) { // One or both sides are promiscuous enough that anything will fit. - return true; + // Make sure the other side allows that type of connection. + return ((!this.check_ && !otherConnection.requireType_) || + (!otherConnection.check_ && !this.requireType_)); } // Find any intersection in the check lists. for (var i = 0; i < this.check_.length; i++) { @@ -576,16 +579,18 @@ Blockly.Connection.prototype.checkType_ = function(otherConnection) { * Change a connection's compatibility. * @param {*} check Compatible value type or list of value types. * Null if all types are compatible. + * @param {boolean} requireType true if null blocks can't match. * @return {!Blockly.Connection} The connection being modified * (to allow chaining). */ -Blockly.Connection.prototype.setCheck = function(check) { +Blockly.Connection.prototype.setCheck = function(check,requireType) { if (check) { // Ensure that check is in an array. if (!goog.isArray(check)) { check = [check]; } this.check_ = check; + this.requireType_ = !!requireType; // The new value type may not be compatible with the existing connection. if (this.targetConnection && !this.checkType_(this.targetConnection)) { if (this.isSuperior()) { From 40c6c09c955da54fe7242dc3df11d3d8954844de Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 9 Oct 2015 09:10:23 -0400 Subject: [PATCH 66/84] Update to use shadow blocks in type blocked entries --- blocks/lists.js | 20 ++++++++++---------- core/typeblock.js | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/blocks/lists.js b/blocks/lists.js index 6fc748a7697..94d5bccf87f 100644 --- a/blocks/lists.js +++ b/blocks/lists.js @@ -466,8 +466,8 @@ Blockly.Blocks['lists_getIndex'] = { var where = whereOptions[whereSlot]; result.push({ entry: Blockly.Msg['LISTS_GET_INDEX_'+ mode + '_' + where +'_TYPEBLOCK'], - values: { 'VALUE': ''+ - 'list' }, + values: { 'VALUE': ''+ + 'list' }, fields: { 'MODE': mode, 'WHERE': where }}); } } @@ -585,8 +585,8 @@ Blockly.Blocks['lists_setIndex'] = { var where = whereOptions[whereSlot]; result.push({ entry: Blockly.Msg['LISTS_SET_INDEX_'+ mode + '_' + where +'_TYPEBLOCK'], - values: { 'LIST': ''+ - 'list'}, + values: { 'LIST': ''+ + 'list'}, fields: { 'MODE': mode, 'WHERE': where }}); } } @@ -698,8 +698,8 @@ Blockly.Blocks['lists_getSublist'] = { } }, typeblock: [{ entry: Blockly.Msg.LISTS_GET_SUBLIST_TYPEBLOCK, - values: { 'LIST': ''+ - 'list' }}] + values: { 'LIST': ''+ + 'list' }}] }; Blockly.Blocks['lists_split'] = { @@ -770,11 +770,11 @@ Blockly.Blocks['lists_split'] = { this.updateType_(xmlElement.getAttribute('mode')); }, typeblock: [{ entry: Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK, - values: { 'DELIM': ''+ - ',' }, + values: { 'DELIM': ''+ + ',' }, fields: { 'MODE': 'SPLIT' }}, { entry: Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK, - values: { 'DELIM': ''+ - ',' }, + values: { 'DELIM': ''+ + ',' }, fields: { 'MODE': 'SPLIT' }}] }; diff --git a/core/typeblock.js b/core/typeblock.js index 6f9bcbd5db0..ece9f61760f 100644 --- a/core/typeblock.js +++ b/core/typeblock.js @@ -381,8 +381,8 @@ Blockly.TypeBlock.sectionToXMLString = function(section,attributes) { var val = attributes[key]; // Handle short cut for number values. if (section === 'value' && goog.isNumber(val)) { - val = ''+ - '' + val + ''; + val = ''+ + '' + val + ''; } xmlString += '<' + section + ' name="' + key + '">' + val + ''; From 04731b9ad19e3fd08a2ef3ca838b80a86ec1e5f7 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 9 Oct 2015 09:31:10 -0400 Subject: [PATCH 67/84] Fix missing requireType on Input.setCheck --- core/input.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/input.js b/core/input.js index 4968c969649..a9055c77034 100644 --- a/core/input.js +++ b/core/input.js @@ -188,13 +188,14 @@ Blockly.Input.prototype.setVisible = function(visible) { * Change a connection's compatibility. * @param {string|Array.|null} check Compatible value type or * list of value types. Null if all types are compatible. + * @param {boolean} requireType true if null blocks can't match. * @return {!Blockly.Input} The input being modified (to allow chaining). */ -Blockly.Input.prototype.setCheck = function(check) { +Blockly.Input.prototype.setCheck = function(check,requireType) { if (!this.connection) { throw 'This input does not have a connection.'; } - this.connection.setCheck(check); + this.connection.setCheck(check,requireType); return this; }; From e09d8f712369681dc1a010ab7aa8a8d71ba1f193 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Fri, 9 Oct 2015 09:31:19 -0400 Subject: [PATCH 68/84] Basic Recompile --- blockly_compressed.js | 4 ++-- blocks_compressed.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index de56e3fa26a..30ef8c8f7ec 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1072,7 +1072,7 @@ Blockly.FieldLabel.prototype.init=function(a){this.sourceBlock_||(this.sourceBlo Blockly.FieldLabel.prototype.dispose=function(){goog.dom.removeNode(this.textElement_);this.textElement_=null};Blockly.FieldLabel.prototype.getSvgRoot=function(){return this.textElement_};Blockly.FieldLabel.prototype.setTooltip=function(a){this.textElement_.tooltip=a};Blockly.Input=function(a,b,c,d){this.type=a;this.name=b;this.sourceBlock_=c;this.connection=d;this.fieldRow=[]};Blockly.Input.prototype.align=Blockly.ALIGN_LEFT;Blockly.Input.prototype.visible_=!0; Blockly.Input.prototype.appendField=function(a,b){if(!a&&!b)return this;goog.isString(a)&&(a=new Blockly.FieldLabel(a));this.sourceBlock_.rendered&&a.init(this.sourceBlock_);a.name=b;a.prefixField&&this.appendField(a.prefixField);this.fieldRow.push(a);a.suffixField&&this.appendField(a.suffixField);this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_());return this}; Blockly.Input.prototype.appendTitle=function(a,b){console.warn("Deprecated call to appendTitle, use appendField instead.");return this.appendField(a,b)};Blockly.Input.prototype.removeField=function(a){for(var b=0,c;c=this.fieldRow[b];b++)if(c.name===a){c.dispose();this.fieldRow.splice(b,1);this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_());return}goog.asserts.fail('Field "%s" not found.',a)};Blockly.Input.prototype.isVisible=function(){return this.visible_}; -Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)return b;for(var c=(this.visible_=a)?"block":"none",d=0,e;e=this.fieldRow[d];d++)e.setVisible(a);this.connection&&(a?b=this.connection.unhideAll():this.connection.hideAll(),d=this.connection.targetBlock())&&(d.getSvgRoot().style.display=c,a||(d.rendered=!1));return b};Blockly.Input.prototype.setCheck=function(a){if(!this.connection)throw"This input does not have a connection.";this.connection.setCheck(a);return this}; +Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)return b;for(var c=(this.visible_=a)?"block":"none",d=0,e;e=this.fieldRow[d];d++)e.setVisible(a);this.connection&&(a?b=this.connection.unhideAll():this.connection.hideAll(),d=this.connection.targetBlock())&&(d.getSvgRoot().style.display=c,a||(d.rendered=!1));return b};Blockly.Input.prototype.setCheck=function(a,b){if(!this.connection)throw"This input does not have a connection.";this.connection.setCheck(a,b);return this}; Blockly.Input.prototype.setAlign=function(a){this.align=a;this.sourceBlock_.rendered&&this.sourceBlock_.render();return this};Blockly.Input.prototype.init=function(){if(this.sourceBlock_.workspace.rendered)for(var a=0;a'+e+"");c+="<"+a+' name="'+d+'">'+e+""}return c}; +Blockly.TypeBlock.mutatorToXMLString=function(a){var b="";if("object"===typeof a&&!goog.object.isEmpty(a)){var c="'+e+"");c+="<"+a+' name="'+d+'">'+e+""}return c}; Blockly.TypeBlock.autoCompleteSelected=function(){var a=Blockly.TypeBlock.inputText_.value,b=goog.object.get(Blockly.TypeBlock.TBOptions_,a);if(!b){var b=RegExp("^-?[0-9]\\d*(.\\d+)?$","g").exec(a),c=RegExp("^[\"|']+","g").exec(a);if(b&&0'+Blockly.TypeBlock.mutatorToXMLString(b.mutatorAttributes)+Blockly.TypeBlock.sectionToXMLString("field", b.fields)+Blockly.TypeBlock.sectionToXMLString("value",b.values)+"";a=Blockly.Xml.textToDom(a).firstChild;a=Blockly.Xml.domToBlock(Blockly.mainWorkspace,a);a.render();(b=Blockly.selected)?(b.getRelativeToSurfaceXY(),Blockly.TypeBlock.connectIfPossible(b,a),a.parentBlock_||a.moveBy(Blockly.selected.getRelativeToSurfaceXY().x+110,Blockly.selected.getRelativeToSurfaceXY().y+50)):(b=Blockly.getMainWorkspace().options.svg,b=goog.style.getPageOffset(b),c=Blockly.getMainWorkspace().toolbox_.width, c=Blockly.mainWorkspace.getMetrics().viewLeft+Blockly.latestClick.x-b.x-c,b=Blockly.mainWorkspace.getMetrics().viewTop+Blockly.latestClick.y-b.y,a.moveBy(c,b));a.select();Blockly.TypeBlock.hide()}; diff --git a/blocks_compressed.js b/blocks_compressed.js index 3571bc72cf8..48861aa81a6 100644 --- a/blocks_compressed.js +++ b/blocks_compressed.js @@ -25,20 +25,20 @@ this.setColour(Blockly.Blocks.lists.HUE);a=new Blockly.FieldDropdown(a,function( var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE")+"_"+b.getFieldValue("WHERE");return Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_"+a]})},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("statement",!this.outputConnection);var b=this.getInput("AT").type==Blockly.INPUT_VALUE;a.setAttribute("at",b);return a},domToMutation:function(a){var b="true"==a.getAttribute("statement");this.updateStatement_(b);a="false"!=a.getAttribute("at");this.updateAt_(a)},updateStatement_:function(a){a!= !this.outputConnection&&(this.unplug(!0,!0),a?(this.setOutput(!1),this.setPreviousStatement(!0),this.setNextStatement(!0)):(this.setPreviousStatement(!1),this.setNextStatement(!1),this.setOutput(!0)))},updateAt_:function(a){this.removeInput("AT");this.removeInput("ORDINAL",!0);a?(this.appendValueInput("AT").setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var b=new Blockly.FieldDropdown(this.WHERE_OPTIONS, function(b){var d="FROM_START"==b||"FROM_END"==b;if(d!=a){var e=this.sourceBlock_;e.updateAt_(d);e.setFieldValue(b,"WHERE");return null}});this.getInput("AT").appendField(b,"WHERE");Blockly.Msg.LISTS_GET_INDEX_TAIL&&this.moveInputBefore("TAIL",null)},typeblock:function(){for(var a=[],b=["GET","GET_REMOVE","REMOVE"],c=["FROM_START","FROM_END","FIRST","LAST","RANDOM"],d=0;dlist'},fields:{MODE:e,WHERE:g}})}return a}}; +values:{VALUE:'list'},fields:{MODE:e,WHERE:g}})}return a}}; Blockly.Blocks.lists_setIndex={init:function(){var a=[[Blockly.Msg.LISTS_SET_INDEX_SET,"SET"],[Blockly.Msg.LISTS_SET_INDEX_INSERT,"INSERT"]];this.WHERE_OPTIONS=[[Blockly.Msg.LISTS_GET_INDEX_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_INDEX_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_INDEX_FIRST,"FIRST"],[Blockly.Msg.LISTS_GET_INDEX_LAST,"LAST"],[Blockly.Msg.LISTS_GET_INDEX_RANDOM,"RANDOM"]];this.setHelpUrl(Blockly.Msg.LISTS_SET_INDEX_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("LIST").setCheck("Array").appendField(Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST); this.appendDummyInput().appendField(new Blockly.FieldDropdown(a),"MODE").appendField("","SPACE");this.appendDummyInput("AT");this.appendValueInput("TO").appendField(Blockly.Msg.LISTS_SET_INDEX_INPUT_TO);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.LISTS_SET_INDEX_TOOLTIP);this.updateAt_(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("MODE")+"_"+b.getFieldValue("WHERE");return Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_"+a]})}, mutationToDom:function(){var a=document.createElement("mutation"),b=this.getInput("AT").type==Blockly.INPUT_VALUE;a.setAttribute("at",b);return a},domToMutation:function(a){a="false"!=a.getAttribute("at");this.updateAt_(a)},updateAt_:function(a){this.removeInput("AT");this.removeInput("ORDINAL",!0);a?(this.appendValueInput("AT").setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL").appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)):this.appendDummyInput("AT");var b=new Blockly.FieldDropdown(this.WHERE_OPTIONS, function(b){var d="FROM_START"==b||"FROM_END"==b;if(d!=a){var e=this.sourceBlock_;e.updateAt_(d);e.setFieldValue(b,"WHERE");return null}});this.moveInputBefore("AT","TO");this.getInput("ORDINAL")&&this.moveInputBefore("ORDINAL","TO");this.getInput("AT").appendField(b,"WHERE")},typeblock:function(){for(var a=[],b=["SET","INSERT"],c=["FROM_START","FROM_END","FIRST","LAST","RANDOM"],d=0;dlist'},fields:{MODE:e,WHERE:g}})}return a}}; +"_TYPEBLOCK"],values:{LIST:'list'},fields:{MODE:e,WHERE:g}})}return a}}; Blockly.Blocks.lists_getSublist={init:function(){this.WHERE_OPTIONS_1=[[Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST,"FIRST"]];this.WHERE_OPTIONS_2=[[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START,"FROM_START"],[Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END,"FROM_END"],[Blockly.Msg.LISTS_GET_SUBLIST_END_LAST,"LAST"]];this.setHelpUrl(Blockly.Msg.LISTS_GET_SUBLIST_HELPURL);this.setColour(Blockly.Blocks.lists.HUE); this.appendValueInput("LIST").setCheck("Array").appendField(Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST);this.appendDummyInput("AT1");this.appendDummyInput("AT2");Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.appendDummyInput("TAIL").appendField(Blockly.Msg.LISTS_GET_SUBLIST_TAIL);this.setInputsInline(!0);this.setOutput(!0,"Array");this.updateAt_(1,!0);this.updateAt_(2,!0);this.setTooltip(Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP)},mutationToDom:function(){var a=document.createElement("mutation"),b=this.getInput("AT1").type== Blockly.INPUT_VALUE;a.setAttribute("at1",b);b=this.getInput("AT2").type==Blockly.INPUT_VALUE;a.setAttribute("at2",b);return a},domToMutation:function(a){var b="true"==a.getAttribute("at1");a="true"==a.getAttribute("at2");this.updateAt_(1,b);this.updateAt_(2,a)},updateAt_:function(a,b){this.removeInput("AT"+a);this.removeInput("ORDINAL"+a,!0);b?(this.appendValueInput("AT"+a).setCheck("Number"),Blockly.Msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+a).appendField(Blockly.Msg.ORDINAL_NUMBER_SUFFIX)): this.appendDummyInput("AT"+a);var c=new Blockly.FieldDropdown(this["WHERE_OPTIONS_"+a],function(c){var e="FROM_START"==c||"FROM_END"==c;if(e!=b){var f=this.sourceBlock_;f.updateAt_(a,e);f.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&(this.moveInputBefore("AT1","AT2"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","AT2"));Blockly.Msg.LISTS_GET_SUBLIST_TAIL&&this.moveInputBefore("TAIL",null)},typeblock:[{entry:Blockly.Msg.LISTS_GET_SUBLIST_TYPEBLOCK, -values:{LIST:'list'}}]}; +values:{LIST:'list'}}]}; Blockly.Blocks.lists_split={init:function(){var a=this,b=new Blockly.FieldDropdown([[Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT,"SPLIT"],[Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST,"JOIN"]],function(b){a.updateType_(b)});this.setHelpUrl(Blockly.Msg.LISTS_SPLIT_HELPURL);this.setColour(Blockly.Blocks.lists.HUE);this.appendValueInput("INPUT").setCheck("String").appendField(b,"MODE");this.appendValueInput("DELIM").setCheck("String").appendField(Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER);this.setInputsInline(!0); this.setOutput(!0,"Array");this.setTooltip(function(){var b=a.getFieldValue("MODE");if("SPLIT"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT;if("JOIN"==b)return Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN;throw"Unknown mode: "+b;})},updateType_:function(a){"SPLIT"==a?(this.outputConnection.setCheck("Array"),this.getInput("INPUT").setCheck("String")):(this.outputConnection.setCheck("String"),this.getInput("INPUT").setCheck("Array"))},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("mode", -this.getFieldValue("MODE"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("mode"))},typeblock:[{entry:Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}},{entry:Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}}]};Blockly.Blocks.logic={};Blockly.Blocks.logic.HUE=210; +this.getFieldValue("MODE"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("mode"))},typeblock:[{entry:Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}},{entry:Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK,values:{DELIM:','},fields:{MODE:"SPLIT"}}]};Blockly.Blocks.logic={};Blockly.Blocks.logic.HUE=210; Blockly.Blocks.controls_if={init:function(){if(!this.workspace.options.useMutators){var a=new Blockly.FieldClickImage(this.addPng,17,17,Blockly.Msg.CONTROLS_IF_ADD_TOOLTIP);a.setChangeHandler(this.doAddField)}this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);var b=this.appendValueInput("IF0").setCheck("Boolean").appendField(Blockly.Msg.CONTROLS_IF_MSG_IF);this.workspace.options.useMutators||b.appendField(a,"IF_ADD");this.appendStatementInput("DO0").appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN); this.setPreviousStatement(!0);this.setNextStatement(!0);this.workspace.options.useMutators&&this.setMutator(new Blockly.Mutator(["controls_if_elseif","controls_if_else"]));var c=this;this.setTooltip(function(){if(c.elseifCount_||c.elseCount_){if(!c.elseifCount_&&c.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_2;if(c.elseifCount_&&!c.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_3;if(c.elseifCount_&&c.elseCount_)return Blockly.Msg.CONTROLS_IF_TOOLTIP_4}else return Blockly.Msg.CONTROLS_IF_TOOLTIP_1; return""});this.elseCount_=this.elseifCount_=0},mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=document.createElement("mutation");this.elseifCount_&&a.setAttribute("elseif",this.elseifCount_);this.elseCount_&&a.setAttribute("else",1);return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elseif"),10);this.elseCount_=parseInt(a.getAttribute("else"),10);this.updateAddSubShape()},doAddField:function(a){this.elseCount_?this.elseifCount_++:this.elseCount_= From 631a2866df66b4728dcda1447ec66236caf9a7ed Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 12 Oct 2015 13:26:43 -0400 Subject: [PATCH 69/84] Add appTitle as a workspace option Allow code generators to have access to the appTitle --- blockly_compressed.js | 8 ++++---- core/inject.js | 6 ++++++ generators/java.js | 32 ++++++++++---------------------- java_compressed.js | 7 ++++--- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 30ef8c8f7ec..6b1c9ec308c 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1304,7 +1304,7 @@ Blockly.BlockSvg.prototype.render=function(a){Blockly.Field.startCache();this.re Blockly.BlockSvg.prototype.renderFields_=function(a,b,c){c+=Blockly.BlockSvg.INLINE_PADDING_Y;this.RTL&&(b=-b);for(var d=0,e;e=a[d];d++){var f=e.getSvgRoot();f&&(this.RTL?(b-=e.renderSep+e.renderWidth,f.setAttribute("transform","translate("+b+","+c+")"),e.renderWidth&&(b-=Blockly.BlockSvg.SEP_SPACE_X)):(f.setAttribute("transform","translate("+(b+e.renderSep)+","+c+")"),e.renderWidth&&(b+=e.renderSep+e.renderWidth+Blockly.BlockSvg.SEP_SPACE_X)))}return this.RTL?-b:b}; Blockly.BlockSvg.prototype.renderCompute_=function(a){var b=this.inputList,c=[];c.rightEdge=a+2*Blockly.BlockSvg.SEP_SPACE_X;if(this.previousConnection||this.nextConnection)c.rightEdge=Math.max(c.rightEdge,Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.SEP_SPACE_X);for(var d=0,e=0,f=!1,g=!1,h=!1,k=void 0,l=this.getInputsInline()&&!this.isCollapsed(),n=0,m;m=b[n];n++)if(m.isVisible()){var q;l&&k&&k!=Blockly.NEXT_STATEMENT&&m.type!=Blockly.NEXT_STATEMENT?q=c[c.length-1]:(k=m.type,q=[],q.type=l&&m.type!= Blockly.NEXT_STATEMENT?Blockly.BlockSvg.INLINE:m.type,q.height=0,c.push(q));q.push(m);m.renderHeight=Blockly.BlockSvg.MIN_BLOCK_Y;m.renderWidth=l&&m.type==Blockly.INPUT_VALUE?Blockly.BlockSvg.TAB_WIDTH+1.25*Blockly.BlockSvg.SEP_SPACE_X:0;if(m.connection&&m.connection.targetConnection){var p=m.connection.targetBlock().getHeightWidth();m.renderHeight=Math.max(m.renderHeight,p.height);m.renderWidth=Math.max(m.renderWidth,p.width)}l||n!=b.length-1?!l&&m.type==Blockly.INPUT_VALUE&&b[n+1]&&b[n+1].type== -Blockly.NEXT_STATEMENT&&m.renderHeight--:m.renderHeight--;q.height=Math.max(q.height,m.renderHeight);m.fieldWidth=0;1==c.length&&(m.fieldWidth+=this.RTL?-a:a);for(var p=!1,r=0,t;t=m.fieldRow[r];r++){0!=r&&(m.fieldWidth+=Blockly.BlockSvg.SEP_SPACE_X);var u=t.getSize();t.renderWidth=u.width;t.renderSep=p&&t.EDITABLE?Blockly.BlockSvg.SEP_SPACE_X:0;m.fieldWidth+=t.renderWidth+t.renderSep;q.height=Math.max(q.height,u.height);p=t.EDITABLE}q.type!=Blockly.BlockSvg.INLINE&&(q.type==Blockly.NEXT_STATEMENT? +Blockly.NEXT_STATEMENT&&m.renderHeight--:m.renderHeight--;q.height=Math.max(q.height,m.renderHeight);m.fieldWidth=0;1==c.length&&(m.fieldWidth+=this.RTL?-a:a);for(var p=!1,r=0,u;u=m.fieldRow[r];r++){0!=r&&(m.fieldWidth+=Blockly.BlockSvg.SEP_SPACE_X);var t=u.getSize();u.renderWidth=t.width;u.renderSep=p&&u.EDITABLE?Blockly.BlockSvg.SEP_SPACE_X:0;m.fieldWidth+=u.renderWidth+u.renderSep;q.height=Math.max(q.height,t.height);p=u.EDITABLE}q.type!=Blockly.BlockSvg.INLINE&&(q.type==Blockly.NEXT_STATEMENT? (g=!0,e=Math.max(e,m.fieldWidth)):(q.type==Blockly.INPUT_VALUE?f=!0:q.type==Blockly.DUMMY_INPUT&&(h=!0),d=Math.max(d,m.fieldWidth)))}for(a=0;q=c[a];a++)if(q.thicker=!1,q.type==Blockly.BlockSvg.INLINE)for(b=0;m=q[b];b++)if(m.type==Blockly.INPUT_VALUE){q.height+=2*Blockly.BlockSvg.INLINE_PADDING_Y;q.thicker=!0;break}c.statementEdge=2*Blockly.BlockSvg.SEP_SPACE_X+e;g&&(c.rightEdge=Math.max(c.rightEdge,c.statementEdge+Blockly.BlockSvg.NOTCH_WIDTH));f?c.rightEdge=Math.max(c.rightEdge,d+2*Blockly.BlockSvg.SEP_SPACE_X+ Blockly.BlockSvg.TAB_WIDTH):h&&(c.rightEdge=Math.max(c.rightEdge,d+2*Blockly.BlockSvg.SEP_SPACE_X));c.hasValue=f;c.hasStatement=g;c.hasDummy=h;return c}; Blockly.BlockSvg.prototype.renderDraw_=function(a,b){this.startHat_=!1;if(this.outputConnection)this.squareBottomLeftCorner_=this.squareTopLeftCorner_=!0;else{this.squareBottomLeftCorner_=this.squareTopLeftCorner_=!1;if(this.previousConnection){var c=this.previousConnection.targetBlock();c&&c.getNextBlock()==this&&(this.squareTopLeftCorner_=!0)}else Blockly.BlockSvg.START_HAT&&(this.startHat_=this.squareTopLeftCorner_=!0,b.rightEdge=Math.max(b.rightEdge,100));this.getNextBlock()&&(this.squareBottomLeftCorner_= @@ -1463,9 +1463,9 @@ Blockly.WidgetDiv.show=function(a,b,c){Blockly.WidgetDiv.hide();Blockly.WidgetDi Blockly.WidgetDiv.hide=function(){Blockly.WidgetDiv.owner_&&(Blockly.WidgetDiv.DIV.style.display="none",Blockly.WidgetDiv.DIV.style.left="",Blockly.WidgetDiv.DIV.style.top="",Blockly.WidgetDiv.DIV.style.height="",Blockly.WidgetDiv.dispose_&&Blockly.WidgetDiv.dispose_(),Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.dispose_=null,goog.dom.removeChildren(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.isVisible=function(){return!!Blockly.WidgetDiv.owner_}; Blockly.WidgetDiv.hideIfOwner=function(a){Blockly.WidgetDiv.owner_==a&&Blockly.WidgetDiv.hide()};Blockly.WidgetDiv.position=function(a,b,c,d,e){bc.width+d.x&&(a=c.width+d.x):a} baseclass Array of all interfaces that @@ -284,8 +271,7 @@ Blockly.Java.getInterfaces = function() { return null; } return this.Interfaces_; -} - +}; /** * Mark a variable as a global for the generated Java code * @param {block} block Block that the variable is contained in @@ -356,7 +342,7 @@ Blockly.Java.getImports = function() { */ Blockly.Java.setExtraImports = function(extraImports) { this.ExtraImports_ = extraImports; -} +}; /** * Specify whether to inline the Var class or reference it externally * @param {string} inlineclass Generate the Var class inline @@ -393,6 +379,8 @@ Blockly.Java.workspaceToCode_ = Blockly.Java.workspaceToCode; * @return {string} Generated code. */ Blockly.Java.workspaceToCode = function(workspace, parms) { + this.setAppName(workspace.options.appTitle); + // Generate the code first to get all of the required imports calculated. this.forceUpdate(workspace); var code = this.workspaceToCode_(workspace,parms); @@ -1052,7 +1040,7 @@ Blockly.Java.provideVarClass = function() { } else { Blockly.Java.addImport('com.extreme.platform.application.Var'); } -} +}; /** * Initialise the database of variable names. * @param {!Blockly.Workspace} workspace Workspace to generate code from. diff --git a/java_compressed.js b/java_compressed.js index aa19ce86af5..92e4f0f9c1c 100644 --- a/java_compressed.js +++ b/java_compressed.js @@ -7,12 +7,13 @@ Blockly.Java=new Blockly.Generator("Java");Blockly.Java.addReservedWords("abstra Blockly.Java.ORDER_ATOMIC=0;Blockly.Java.ORDER_COLLECTION=1;Blockly.Java.ORDER_STRING_CONVERSION=1;Blockly.Java.ORDER_MEMBER=2;Blockly.Java.ORDER_FUNCTION_CALL=2;Blockly.Java.ORDER_POSTFIX=3;Blockly.Java.ORDER_EXPONENTIATION=3;Blockly.Java.ORDER_LOGICAL_NOT=3;Blockly.Java.ORDER_UNARY_SIGN=4;Blockly.Java.ORDER_MULTIPLICATIVE=5;Blockly.Java.ORDER_ADDITIVE=6;Blockly.Java.ORDER_BITWISE_SHIFT=7;Blockly.Java.ORDER_RELATIONAL=8;Blockly.Java.ORDER_EQUALITY=9;Blockly.Java.ORDER_BITWISE_AND=10; Blockly.Java.ORDER_BITWISE_XOR=11;Blockly.Java.ORDER_BITWISE_OR=12;Blockly.Java.ORDER_LOGICAL_AND=13;Blockly.Java.ORDER_LOGICAL_OR=14;Blockly.Java.ORDER_CONDITIONAL=15;Blockly.Java.ORDER_ASSIGNMENT=16;Blockly.Java.ORDER_NONE=99;Blockly.Java.PASS=" {}\n";Blockly.Java.POSTFIX="";Blockly.Java.INDENT=" ";Blockly.Java.EXTRAINDENT="";Blockly.Java.variableTypes_={};Blockly.Java.blocklyTypes_={};Blockly.Java.AppName_="myApp";Blockly.Java.Package_="demo";Blockly.Java.Baseclass_=""; Blockly.Java.needImports_=[];Blockly.Java.Interfaces_=[];Blockly.Java.ExtraImports_=null;Blockly.Java.INLINEVARCLASS=!0;Blockly.Java.classes_=[];Blockly.Java.globals_={};Blockly.Java.fileHeader='/*\n * Copyright (c) 2015, <>\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'; -Blockly.Java.setAppName=function(a){a&&""!==a||(a="MyApp");this.AppName_=a};Blockly.Java.getAppName=function(){return Blockly.Java.variableDB_.getName(this.AppName_,"CLASS")};Blockly.Java.getAppTitle=function(){return this.AppName_};Blockly.Java.setPackage=function(a){a&&""!==a||(a="demo");this.Package_=a};Blockly.Java.forceUpdate=function(a){if(a.getDescendants)a=a.getDescendants();else if(a.getAllBlocks)a=a.getAllBlocks();else throw"Not Block or Workspace: "+a;for(var b=0;b getObjectAsList() {\n return (LinkedList) getObject();\n } // end getObjectAsList\n\n /**\n * If this object is a linked list, then calling this method will return the\n * Var at the index indicated\n *\n * @param index the index of the Var to read (0 based)\n * @return the Var at that index\n */\n public Var get(int index) {\n return ((LinkedList) getObject()).get(index);\n } // end get\n\n /**\n * If this object is a linked list, then calling this method will return the\n * size of the linked list.\n *\n * @return size of list\n */\n public int size() {\n return ((LinkedList) getObject()).size();\n } // end size\n\n /**\n * Set the value of of a list at the index specified. Note that this is only\n * value if this object is a list and also note that index must be in\n * bounds.\n *\n * @param index the index into which the Var will be inserted\n * @param var the var to insert\n */\n public void set(int index, Var var) {\n ((LinkedList) getObject()).add(index, var);\n } // end set\n\n /**\n * Add all values from one List to another. Both lists are Var objects that\n * contain linked lists.\n *\n * @param var The list to add\n */\n public void addAll(Var var) {\n ((LinkedList) getObject()).addAll(var.getObjectAsList());\n } // end addAll\n\n /**\n * Set the value of the underlying object. Note that the type of Var will be\n * determined when setObject is called.\n *\n * @param val the value to set this Var to\n */\n public void setObject(Object val) {\n this._object = val;\n inferType();\n // make sure each element of List is Var if type is list\n if (_type.equals(Var.Type.LIST)) {\n LinkedList myList = new LinkedList<>();\n for (Object obj : this.getObjectAsList()) {\n myList.add(new Var(obj));\n }\n this._object = myList;\n }\n } // end setObject\n\n /**\n * Add a new member to a Var that contains a list. If the Var current is not\n * of type "LIST", then this Var will be converted to a list, its current\n * value will then be stored as the first member and this new member added\n * to it.\n *\n * @param member The new member to add to the list\n */\n public void add(Var member) {\n if (_type.equals(Var.Type.LIST)) {\n // already a list\n ((LinkedList) _object).add(member);\n } else {\n // not current a list, change it\n LinkedList temp = new LinkedList<>();\n temp.add(new Var(member));\n setObject(temp);\n }\n } // end add\n\n /**\n * Increment Object by some value.\n *\n * @param inc The value to increment by\n */\n public void incrementObject(double inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((double) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n } // end switch\n } // end incrementObject\n\n /**\n * Increment Object by some value\n *\n * @param inc The value to increment by\n */\n public void incrementObject(int inc) {\n switch (getType()) {\n case STRING:\n // has no meaning\n break;\n case INT:\n this.setObject((int) (this.getObjectAsInt() + inc));\n break;\n case DOUBLE:\n this.setObject((double) (this.getObjectAsDouble() + inc));\n break;\n case LIST:\n for (Var myVar : this.getObjectAsList()) {\n myVar.incrementObject(inc);\n }\n break;\n default:\n // has no meaning\n break;\n }// end switch\n } // end incrementObject\n\n @Override\n public int hashCode() {\n int hash = 5;\n hash = 43 * hash + Objects.hashCode(this._type);\n hash = 43 * hash + Objects.hashCode(this._object);\n return hash;\n }\n\n /**\n * Test to see if this object equals another one. This is done by converting\n * both objects to strings and then doing a string compare.\n *\n * @param obj\n * @return\n */\n @Override\n public boolean equals(Object obj) {\n final Var other = Var.valueOf(obj);\n if (getType() == Var.Type.NULL || other.getType() == Var.Type.NULL) {\n return getType().equals(other.getType());\n }\n return this.toString().equals(other.toString());\n } // end equals\n\n /**\n * Check to see if this Var is less than some other var.\n *\n * @param var the var to compare to\n * @return true if it is less than\n */\n public boolean lessThan(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) < 0;\n case INT:\n return this.getObjectAsInt() < var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() < var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThan(var.get(index))) {\n return false;\n }\n }\n return true;\n default:\n return false;\n }// end switch\n } // end less than\n\n /**\n * Check to see if this var is less than or equal to some other var\n *\n * @param var the var to compare to\n * @return true if this is less than or equal to var\n */\n public boolean lessThanOrEqual(Var var) {\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString()) <= 0;\n case INT:\n return this.getObjectAsInt() <= var.getObjectAsDouble();\n case DOUBLE:\n return this.getObjectAsDouble() <= var.getObjectAsDouble();\n case LIST:\n if (size() != var.size()) {\n return false;\n }\n if (!var.getType().equals(Var.Type.LIST)) {\n return false;\n }\n int index = 0;\n for (Var myVar : this.getObjectAsList()) {\n if (!myVar.lessThanOrEqual(var.get(index))) {\n return false;\n }\n }\n return true;\n case NULL:\n return (var.getType() == Var.Type.NULL);\n default:\n return false;\n }// end switch\n } // end lessThanOrEqual\n\n /**\n * Check to see if this var is greater than a given var.\n *\n * @param var the var to compare to.\n * @return true if this object is grater than the given var\n */\n public boolean greaterThan(Var var) {\n return var.lessThan(this);\n } // end greaterThan\n\n /**\n * Check to see if this var is greater than or equal to a given var\n *\n * @param var the var to compare to\n * @return true if this var is greater than or equal to the given var\n */\n public boolean greaterThanOrEqual(Var var) {\n return var.lessThanOrEqual(this);\n } // end greaterThanOrEqual\n\n /**\n * Compare this object\'s value to another\n *\n * @param val the object to compare to\n * @return the value 0 if this is equal to the argument; a value less than 0\n * if this is numerically less than the argument; and a value greater than 0\n * if this is numerically greater than the argument (signed comparison).\n */\n @Override\n public int compareTo(Object val) {\n // only instantiate if val is not instance of Var\n Var var;\n if (val instanceof Var) {\n var = (Var) val;\n } else {\n var = new Var(val);\n }\n switch (getType()) {\n case STRING:\n return this.getObjectAsString().compareTo(var.getObjectAsString());\n case INT:\n if (var.getType().equals(Var.Type.INT)) {\n return ((Integer) this.getObjectAsInt()).compareTo(var.getObjectAsInt());\n } else {\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n }\n case DOUBLE:\n return ((Double) this.getObjectAsDouble()).compareTo(var.getObjectAsDouble());\n case LIST:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n default:\n // doesn\'t make sense\n return Integer.MAX_VALUE;\n }// end switch\n } // end compareTo\n\n /**\n * Convert this Var to a string format.\n *\n * @return the string format of this var\n */\n @Override\n public String toString() {\n switch (getType()) {\n case STRING:\n return getObject().toString();\n case INT:\n Integer i = (int) getObject();\n return i.toString();\n case DOUBLE:\n Double d = (double) _object;\n return _formatter.format(d);\n case LIST:\n LinkedList ll = (LinkedList) getObject();\n StringBuilder sb = new StringBuilder();\n boolean first = true;\n for (Var v : ll) {\n if (first) {\n first = false;\n sb.append("{");\n } else {\n sb.append(", ");\n }\n sb.append(v.toString());\n } // end for each Var\n sb.append("}");\n return sb.toString();\n case NULL:\n return null;\n default:\n return getObject().toString();\n }// end switch\n } // end toString\n\n /**\n * Internal method for inferring the "object type" of this object. When it\n * is done, it sets the private member value of _type. This will be\n * referenced later on when various method calls are made on this object.\n */\n private void inferType() {\n if (_object == null) {\n _type = Type.NULL;\n } else if (_object instanceof Var) {\n Var oldObj = (Var)_object;\n _type = oldObj.getType();\n _object = oldObj.getObject();\n } else if (_object instanceof String) {\n _type = Type.STRING;\n } else {\n // must be a number or a list\n // try to see if its a double\n try {\n Double d = (double) _object;\n // it was a double, so keep going\n _type = Type.DOUBLE;\n } catch (Exception ex) {\n // not a double, see if it is an integer\n try {\n Integer i = (int) _object;\n // it was an integer\n _type = Type.INT;\n } catch (Exception ex2) {\n // not a double or integer, might be an array\n if (_object instanceof LinkedList) {\n _type = Type.LIST;\n } else if (_object instanceof List) {\n _type = Type.LIST;\n _object = new LinkedList<>((List) _object);\n } else {\n _type = Type.UNKNOWN;\n }\n } // end not an integer\n } // end not a double\n } // end else not a string\n } // end inferType\n\n static double math_sum(Var myList) {\n double sum = 0;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n sum += var.getObjectAsDouble();\n }\n return sum;\n }\n\n static double math_min(Var myList) {\n double min = Double.MAX_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d < min) {\n min = d;\n }\n }\n return min;\n }\n\n static double math_max(Var myList) {\n double max = Double.MIN_VALUE;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n if (d > max) {\n max = d;\n }\n }\n return max;\n }\n\n static double math_mean(Var myList) {\n return Var.math_sum(myList) / myList.size();\n }\n\n static double math_median(Var myList) {\n LinkedList ll = myList.getObjectAsList();\n Collections.sort(ll);\n int length = myList.size();\n int middle = length / 2;\n if (length % 2 == 1) {\n return ll.get(middle).getObjectAsDouble();\n } else {\n double d1 = ll.get(middle - 1).getObjectAsDouble();\n double d2 = ll.get(middle).getObjectAsDouble();\n return (d1 + d2) / 2.0;\n }\n }\n\n static Var math_modes(Var myList) {\n final Var modes = new Var();\n final Map countMap = new HashMap();\n double max = -1;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n double count = 0;\n if (countMap.containsKey(d)) {\n count = countMap.get(d) + 1;\n } else {\n count = 1;\n }\n countMap.put(d, count);\n if (count > max) {\n max = count;\n }\n }\n for (final Map.Entry tuple : countMap.entrySet()) {\n if (tuple.getValue() == max) {\n modes.add(Var.valueOf(tuple.getKey().doubleValue()));\n }\n }\n return modes;\n }\n\n static double math_standard_deviation(Var myList) {\n double mean = math_mean(myList);\n double size = myList.size();\n double temp = 0;\n double d;\n LinkedList ll = myList.getObjectAsList();\n for (Var var : ll) {\n d = var.getObjectAsDouble();\n temp += (mean - d) * (mean - d);\n }\n double variance = temp / size;\n return Math.sqrt(variance);\n }\n\n}\n'): Blockly.Java.addImport("com.extreme.platform.application.Var")}; From 03af03b178e42729cf894a2080234f41c5388ffb Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Wed, 14 Oct 2015 09:29:06 -0400 Subject: [PATCH 70/84] Recompile --- msg/js/be-tarask.js | 2 +- msg/js/cs.js | 2 +- msg/js/da.js | 2 +- msg/js/de.js | 2 +- msg/js/fr.js | 2 +- msg/js/it.js | 2 +- msg/js/pl.js | 2 +- msg/js/ro.js | 4 +- msg/js/sv.js | 2 +- msg/js/tcy.js | 605 ++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 615 insertions(+), 10 deletions(-) create mode 100644 msg/js/tcy.js diff --git a/msg/js/be-tarask.js b/msg/js/be-tarask.js index 26a429b5fd2..0007e77b712 100644 --- a/msg/js/be-tarask.js +++ b/msg/js/be-tarask.js @@ -162,7 +162,7 @@ Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; / Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "знайсьці апошняе ўваходжаньне элемэнту"; Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Вяртае індэкс першага/апошняга ўваходжаньня элемэнту ў сьпісе. Вяртае 0, калі тэкст ня знойдзены."; +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Вяртае індэкс першага/апошняга ўваходжаньня элемэнту ў сьпіс. Вяртае 0, калі элемэнт ня знойдзены."; Blockly.Msg.LISTS_INLIST = "у сьпісе"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 пусты"; diff --git a/msg/js/cs.js b/msg/js/cs.js index d218de29b2c..bd64fc7d722 100644 --- a/msg/js/cs.js +++ b/msg/js/cs.js @@ -569,7 +569,7 @@ Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated -Blockly.Msg.TODAY = "Today"; // untranslated +Blockly.Msg.TODAY = "Dnes"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "položka"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Vytvořit \"nastavit %1\""; Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated diff --git a/msg/js/da.js b/msg/js/da.js index 3b3da5bf263..bb039df74c1 100644 --- a/msg/js/da.js +++ b/msg/js/da.js @@ -162,7 +162,7 @@ Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; / Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "find sidste forekomst af elementet"; Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returnerer indeks for første/sidste forekomst af elementet i listen. Returnerer 0, hvis teksten ikke er fundet."; +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returnerer indeks for første/sidste forekomst af elementet i listen. Returnerer 0, hvis elementet ikke kan findes."; Blockly.Msg.LISTS_INLIST = "i listen"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 er tom"; diff --git a/msg/js/de.js b/msg/js/de.js index 6999cf090db..3d07fa4eb41 100644 --- a/msg/js/de.js +++ b/msg/js/de.js @@ -162,7 +162,7 @@ Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; / Blockly.Msg.LISTS_INDEX_OF_HELPURL = "http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm"; Blockly.Msg.LISTS_INDEX_OF_LAST = "suche letztes Auftreten von"; Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Sucht die Position (index) eines Elementes in der Liste. Gibt 0 zurück wenn nichts gefunden wurde."; +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Sucht die Position (index) eines Elementes in der Liste. Gibt 0 zurück, falls kein Element gefunden wurde."; Blockly.Msg.LISTS_INLIST = "von der Liste"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 ist leer?"; diff --git a/msg/js/fr.js b/msg/js/fr.js index 279e4f41fe4..a16e8e410a8 100644 --- a/msg/js/fr.js +++ b/msg/js/fr.js @@ -162,7 +162,7 @@ Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; / Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "trouver la dernière occurrence de l’élément"; Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Renvoie l’index de la première/dernière occurrence de l’élément dans la liste. Renvoie 0 si le texte n’est pas trouvé."; +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Renvoie l’index de la première/dernière occurrence de l’élément dans la liste. Renvoie 0 si l'élément n'est pas trouvé."; Blockly.Msg.LISTS_INLIST = "dans la liste"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 est vide"; diff --git a/msg/js/it.js b/msg/js/it.js index e8fe2afb40d..49632b13d97 100644 --- a/msg/js/it.js +++ b/msg/js/it.js @@ -162,7 +162,7 @@ Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; / Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "trova l'ultima occorrenza dell'elemento"; Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Restituisce l'indice della prima/ultima occorrenza dell'elemento nella lista. Restituisce 0 se il testo non viene trovato."; +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Restituisce l'indice della prima/ultima occorrenza dell'elemento nella lista. Restituisce 0 se l'elemento non viene trovato."; Blockly.Msg.LISTS_INLIST = "nella lista"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 è vuota"; diff --git a/msg/js/pl.js b/msg/js/pl.js index b44ad7b96c6..da1f7bcda14 100644 --- a/msg/js/pl.js +++ b/msg/js/pl.js @@ -162,7 +162,7 @@ Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; / Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "znajduje ostatanie wystąpienie elementu"; Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Zwraca indeks pierwszego/ostatniego wystąpienia elementu na liście. Zwraca wartość 0, jeśli tekst nie zostanie znaleziony."; +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Zwraca indeks pierwszego/ostatniego wystąpienia elementu na liście. Zwraca wartość 0, jeśli tekst nie zostanie znaleziony."; Blockly.Msg.LISTS_INLIST = "na liście"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 jest pusty"; diff --git a/msg/js/ro.js b/msg/js/ro.js index 87fabd297f6..4629cb7357a 100644 --- a/msg/js/ro.js +++ b/msg/js/ro.js @@ -162,7 +162,7 @@ Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; / Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "găseşte ultima apariţie a elementului"; Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returneaza indexul de la prima/ultima aparitie a elementuli din lista. Returneaza 0 daca textul nu este gasit."; +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Revine la indexul de la prima/ultima apariție a elementului din listă. Returnează 0 dacă elementul nu este găsit."; Blockly.Msg.LISTS_INLIST = "în listă"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 este gol"; @@ -569,7 +569,7 @@ Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated -Blockly.Msg.TODAY = "Today"; // untranslated +Blockly.Msg.TODAY = "Astăzi"; Blockly.Msg.VARIABLES_DEFAULT_NAME = "element"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Crează 'set %1'"; Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated diff --git a/msg/js/sv.js b/msg/js/sv.js index 27afd8ae654..f8164465567 100644 --- a/msg/js/sv.js +++ b/msg/js/sv.js @@ -162,7 +162,7 @@ Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; / Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "hitta sista förekomsten av objektet"; Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated -Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Ger tillbaka den första/sista förekomsten av objektet i listan. Ger tillbaka 0 om texten inte hittas."; +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Ger tillbaka den första/sista förekomsten av objektet i listan. Ger tillbaka 0 om objektet inte hittas."; Blockly.Msg.LISTS_INLIST = "i listan"; Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 är tom"; diff --git a/msg/js/tcy.js b/msg/js/tcy.js new file mode 100644 index 00000000000..e9af78b6372 --- /dev/null +++ b/msg/js/tcy.js @@ -0,0 +1,605 @@ +// This file was automatically generated. Do not modify. + +'use strict'; + +goog.provide('Blockly.Msg.tcy'); + +goog.require('Blockly.Msg'); + +Blockly.Msg.ADD_COMMENT = "ಟಿಪ್ಪಣಿ ಸೇರ್ಸಲೆ"; +Blockly.Msg.AUTH = "ಈರೆನ ಕೆಲಸೊನು ಒರಿಪಾಯರೆ ಬುಕ್ಕೊ ಈರೆನಟ್ಟುಗು ಪಟ್ಟೊನುಯರೆ ಅವಕಾಸೊ."; +Blockly.Msg.CHANGE_VALUE_TITLE = "ಮೌಲ್ಯೊದ ಬದಲಾವಣೆ"; +Blockly.Msg.CHAT = "ನಿಕ್ಲೆನ ಸಹಬೋಗಿನೊಟ್ಟುಗೆ ಈ ಪೆಟ್ಟಿಗೆಡ್ ಚಾಟಿಂಗ್‍ ನಮೂದು ಮಲ್ಪುಲೆ"; +Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated +Blockly.Msg.CLICK_ADD_TOOLTIP = "Add an element"; // untranslated +Blockly.Msg.CLICK_REMOVE_TOOLTIP = "Remove this element"; // untranslated +Blockly.Msg.COLLAPSE_ALL = "ಕುಗ್ಗಿಸಾದ್ ನಿರ್ಬಂಧಿಸಾಪುನೆ"; +Blockly.Msg.COLLAPSE_BLOCK = "ಕುಗ್ಗಿಸಾದ್ ತಡೆಪತ್ತುನೆ"; +Blockly.Msg.COLOUR_BLEND_COLOUR1 = "ಬಣ್ಣೊ ೧(ಒಂಜಿ)"; +Blockly.Msg.COLOUR_BLEND_COLOUR2 = "ಬಣ್ಣೊ ೨(ರಡ್ಡ್)"; +Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated +Blockly.Msg.COLOUR_BLEND_RATIO = "ಅನುಪಾತೊ"; +Blockly.Msg.COLOUR_BLEND_TITLE = "ಮಿಸ್ರನೊ"; +Blockly.Msg.COLOUR_BLEND_TOOLTIP = "ಕೊರ್‍ನ ಅನುಪಾತೊದ ಒಟ್ಟುಗೆ (0.0- 1.0 ) ರಡ್ಡ್ ಬಣ್ಣೊಲೆನ್ ಜೊತೆಟ್ ಒಂಜಿ ಮಲ್ಪುಂಡು."; +Blockly.Msg.COLOUR_BLEND_TYPEBLOCK = "Blend Colour"; // untranslated +Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/ಬಣ್ಣೊ"; +Blockly.Msg.COLOUR_PICKER_TOOLTIP = " ವರ್ಣಫಲಕೊದ ಒಂಜಿ ಬಣ್ಣೊದ ಆಯ್ಕೆ."; +Blockly.Msg.COLOUR_PICKER_TYPEBLOCK = "Choose Colour"; // untranslated +Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated +Blockly.Msg.COLOUR_RANDOM_TITLE = "ಯಾದೃಚ್ಛಿಕೊ ಬಣ್ಣೊ"; +Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "ಯಾದೃಚ್ಛಿಕವಾಯಿನ ಬಣ್ಣೊದ ಆಯ್ಕೆ."; +Blockly.Msg.COLOUR_RANDOM_TYPEBLOCK = "Random Colour"; // untranslated +Blockly.Msg.COLOUR_RGB_BLUE = "ನೀಲಿ"; +Blockly.Msg.COLOUR_RGB_GREEN = "ಪಚ್ಚೆ"; +Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated +Blockly.Msg.COLOUR_RGB_RED = "ಕೆಂಪು ಬಣ್ಣೊ"; +Blockly.Msg.COLOUR_RGB_TITLE = "ಬಣ್ಣೊದೊಟ್ಟುಗೆ"; +Blockly.Msg.COLOUR_RGB_TOOLTIP = "ತೋಜಿಪಾಯಿನ ಕೆಂಪು, ಪಚ್ಚೆ ಬುಕ್ಕೊ ನೀಲಿ ಬಣ್ಣೊದ ಪ್ರಮಾಣೊನು ರಚಿಸಲೆ. ಮಾಂತ ಮೌಲ್ಯೊಲು 0 ಬುಕ್ಕೊ 100 ನಡುಟೆ ಇಪ್ಪೊಡು."; +Blockly.Msg.COLOUR_RGB_TYPEBLOCK = "Colour with"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_BREAK_TYPEBLOCK = "Break Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_CONTINUE_TYPEBLOCK = "Continue Loop"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "ಕುಣಿಕೆದ ಪಿದಯಿ ತುಂಡಾಪುಂಡು"; +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "ದುಂಬುದ ಆದೇಸೊಡೆ ಪುನರಾವರ್ತನೆ ದುಂಬರಿಪ್ಪುಂಡು"; +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "ಬಳಕೆಡುಪ್ಪುನ ಕೊಲಿಕೆಡ್ದ್ ಪಿದಯಿ ಪಾಡ್‍ಲೆ"; +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "ದುಂಬುದ ಆವೃತಿಡ್ ಉಪ್ಪುನಂಚನೆ ಮಾಂತ ಕೊಲಿಕೆಲೆನ್ ದೆತ್ಪುಲೆ ಬುಕ್ಕೊ ದುಂಬರಿಲೆ"; +Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "ಎಚ್ಚರೊ: ಈ ನಿರ್ಬಂದೊನು ಕೇವಲ ಒಂಜಿ ಕೊಲಿಕೆದಾಕಾರೊದ ಮುಕ್ತಮಾರ್ಗೊದ ಪರಿಮಿತಿದುಲಯಿಡ್ ಬಳಸೊಲಿ"; +Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TITLE = "for each key %1 in map %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_KEY_TYPEBLOCK = "For Each Key In Map"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_TITLE = "for each item %1 in list %2"; // untranslated +Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "ಒಂಜಿ ಪಟ್ಟಿಡ್ ಪ್ರತಿ ವಸ್ತುಗು, ಜೋಡಾಯಿನ ವಸ್ತು ಬದಲಾಪುನಂಚ '% 1', ಬುಕ್ಕೊ ಒಂತೆ ಹೇಳಿಕೆಲೆನ್ ಮಲ್ಲಪುಲೆ."; +Blockly.Msg.CONTROLS_FOREACH_TYPEBLOCK = "For Each Item In List"; // untranslated +Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated +Blockly.Msg.CONTROLS_FOR_TITLE = "count with %1 from %2 to %3 by %4"; // untranslated +Blockly.Msg.CONTROLS_FOR_TOOLTIP = "ಸುರೂತ ನಂಬ್ರೊಡ್ದು ಅಕೇರಿದ ನಂಬ್ರೊಗು ಬಿಲೆಟ್ ಮಸ್ತ್ ಹೆಚ್ಚ್‌ಕಮ್ಮಿ ಇತ್ತ್ಂಡಲಾ %1 ದೆತೊಂದ್, ನಿರ್ದಿಸ್ಟೊ ಮಧ್ಯಂತರೊದ ಮೂಲಕೊ ಲೆಕ್ಕೊದೆತೊಂದು ಬುಕ್ಕೊ ನಿಗಂಟ್ ಮಲ್ತ್‌ನ ಬ್ಲಾಕ್‍ಲೆನ್ ಲೆಕ್ಕೊ ಮಲ್ಪುಲ."; +Blockly.Msg.CONTROLS_FOR_TYPEBLOCK = "Count With From To By"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "ಒಂಜಿ ವೇಲೆ ಒಂಜಿ ತಡೆಕ್ ಈ ಪರಿಸ್ಥಿತಿನ್ ಸೇರಲೆ"; +Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "ಒಂಜಿ ವೇಲೆ ಮಾಂತೆನ್ಲಾ ದೀಡೊಂದು ಅಕೇರಿದ ಪರಿಸ್ಥಿಡ್ ಸೇರಲೆ"; +Blockly.Msg.CONTROLS_IF_ELSE_TYPEBLOCK = "If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_ELSE_TYPEBLOCK = "If Else If Else"; // untranslated +Blockly.Msg.CONTROLS_IF_ELSIF_TYPEBLOCK = "If Else If"; // untranslated +Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated +Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "ಸೇರಲ, ದೆತ್ತ್‌ ಪಾಡ್‌ಲ, ಅತ್ತಂಡ ಒಂಜಿ ವೇಲೆ ಈ ರಚನೆನ್ ತಡೆದ್, ಇಂದೆತ ಇಬಾಗೊಲೆನ್ ಬೇತೆ ಕ್ರಮೊಟು ಮಲ್ಪುಲೆ"; +Blockly.Msg.CONTROLS_IF_MSG_ELSE = "ಬೇತೆ"; +Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "ಬೇತೆ ಸಮಯೊ"; +Blockly.Msg.CONTROLS_IF_MSG_IF = "ಒಂಜಿ ವೇಲೆ"; +Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "ಇಂದೆತ ಮೌಲ್ಯೊ ನಿಜವಾದಿತ್ತ್‌ಂಡ, ಬುಕ್ಕೊ ಒಂತೆ ನಿರೂಪಣೆಲೆನ್ ಮಲ್ಪುಲೆ"; +Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "ಇಂದೆತ ಮೌಲ್ಯೊ ನಿಜವಾದಿತ್ತ್‌ಂಡ, ಬುಕ್ಕೊದ ನಿರೂಪಣೆಲೆನ್ ಸುರೂಕು ಮಲ್ಪುಲೆ. ಅತ್ತಂಡ ರಡ್ಡನೆದ ನಿರೂಪಣೆನ್ ತಡೆ ಪತ್ತುನಂಚನೆ ಮಲ್ಲಪುಲೆ"; +Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "ಸುರೂತ ಮೌಲ್ಯೊ ನಿಜವಾದಿತ್ತ್‌ಂಡ, ಬುಕ್ಕೊದ ನಿರೂಪಣೆಲೆನ್ ಸುರೂಕು ತಡೆ ಮಲ್ಪುಲೆ. ಅತ್ತಂಡ ರಡ್ಡನೆದ ನಿರೂಪಣೆನ್ ನಿಜವಾದಿತ್ತ್‌ಂಡ ಬುಕ್ಕೊ ಒಂತೆ ನಿರೂಪಣೆಲೆನ್ ಮಲ್ಪುಲೆ"; +Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "ಸುರೂತ ಮೌಲ್ಯೊ ನಿಜವಾದಿತ್ತ್‌ಂಡ, ಸುರೂತ ನಿರೂಪಣೆನ್ ತಡೆ ಮಲ್ಪುಲೆ. ರಡ್ಡನೆದ ನಿರೂಪಣೆ ನಿಜವಾದಿತ್ತ್ಂಡ, ರಡ್ಡನೆದ ನಿರೂಪಣೆನ್ ತಡೆ ಮಲ್ಪುಲೆ. ಉಂದು ಒವ್ವೇ ಮೌಲ್ಯೊ ನಿಜವಾದಿದ್ಯಂಡ, ಅಕೇರಿದ ನಿರೂಪಣೆನ್ ತಡೆ ಮಲ್ಪುಲೆ."; +Blockly.Msg.CONTROLS_IF_TYPEBLOCK = "If"; // untranslated +Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; +Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "ಮಲ್ಪು / ಅಂಚನೆ"; +Blockly.Msg.CONTROLS_REPEAT_TITLE = "ನಾನೊರೊ %1 ಸಮಯೊಗು"; +Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "repeat"; // untranslated +Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "times"; // untranslated +Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "ಕೆಲವು ಹೇಳಿಕೆಲೆನ್ ಮಸ್ತ್ ಸಮಯೊ ಮಲ್ಪೊಡು"; +Blockly.Msg.CONTROLS_REPEAT_TYPEBLOCK = "Repeat Times"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "ಬುಕ್ಕೊ ಮುಟ್ಟೊ"; +Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "ಬುಕ್ಕೊ ಅಂಚನೇ"; +Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "ಈ ತಿರ್ತ್‍ದ ತಪ್ಪಾದುಂಡು, ಬುಕ್ಕೊದ ಕೆಲವು ಹೇಳಿಕೆಲೆನ್ ಮಲ್ಪಪುಲ"; +Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "ಈ ತಿರ್ತ್‌ದ ಸರಿ ಇತ್ತ್ಂಡಲಾ, ಬುಕ್ಕೊದ ಕೆಲವು ಹೇಳಿಕೆಲೆನ್ ಮಲ್ಪುಲ"; +Blockly.Msg.CONTROLS_WHILEUNTIL_UNTIL_TYPEBLOCK = "Repeat Unitl"; // untranslated +Blockly.Msg.CONTROLS_WHILEUNTIL_WHILE_TYPEBLOCK = "Repeat While"; // untranslated +Blockly.Msg.DELETE_BLOCK = "ಮಾಜಯರ ತಡೆಯಾತ್ಂಡ್"; +Blockly.Msg.DELETE_X_BLOCKS = "ಮಾಜಯರ ಶೇಕಡಾ ೧ ತಡೆಯಾತ್ಂಡ್"; +Blockly.Msg.DISABLE_BLOCK = "ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಾದ್ ತಡೆಪತ್ತುನೆ"; +Blockly.Msg.DUPLICATE_BLOCK = "ನಕಲ್"; +Blockly.Msg.ENABLE_BLOCK = "ಸಕ್ರಿಯಗೊಳಿಸಾದ್ ತಡೆಪತ್ತುನೆ"; +Blockly.Msg.EXPAND_ALL = "ವಿಸ್ತರಿಸಾದ್ ನಿರ್ಬಂದಿಸಾಪುನೆ"; +Blockly.Msg.EXPAND_BLOCK = "ವಿಸ್ತರಿಸಾದ್ ತಡೆಪತ್ತುನೆ"; +Blockly.Msg.EXTERNAL_INPUTS = "ಬಾಹ್ಯೊ ಪರಿಕರೊ"; +Blockly.Msg.HELP = "ಸಹಾಯೊ"; +Blockly.Msg.INITIALIZE_GLOBAL_VARIABLE = "Initialize global"; // untranslated +Blockly.Msg.INITIALIZE_LOCAL_VARIABLE = "Initialize local"; // untranslated +Blockly.Msg.INITIALIZE_VARIABLE = "Initialize %1 as %2 with %3"; // untranslated +Blockly.Msg.INLINE_INPUTS = "ಉಳಸಾಲ್‍ದ ಉಳಪರಿಪು"; +Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated +Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "create empty list"; // untranslated +Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated +Blockly.Msg.LISTS_CREATE_EMPTY_TYPEBLOCK = "Create Empty List"; // untranslated +Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "list"; // untranslated +Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this list block."; // untranslated +Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated +Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "create list with"; // untranslated +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the list."; // untranslated +Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Create a list with any number of items."; // untranslated +Blockly.Msg.LISTS_CREATE_WITH_TYPEBLOCK = "Create List With"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_FIRST_TYPEBLOCK = "Get First Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_FROM_END_TYPEBLOCK = "Get Item From End of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_FROM_START_TYPEBLOCK = "Get Item From Start of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_LAST_TYPEBLOCK = "Get Last Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_RANDOM_TYPEBLOCK = "Get Random Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE_FIRST_TYPEBLOCK = "Get and Remove First Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE_FROM_END_TYPEBLOCK = "Get and Remove Item From End of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE_FROM_START_TYPEBLOCK = "Get and Remove Item From Start of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE_LAST_TYPEBLOCK = "Get and Remove Last Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE_RANDOM_TYPEBLOCK = "Get and Remove Random Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_RANDOM = "random"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_REMOVE_FIRST_TYPEBLOCK = "Remove First Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_REMOVE_FROM_END_TYPEBLOCK = "Remove Item From End of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_REMOVE_FROM_START_TYPEBLOCK = "Remove Item From Start of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_REMOVE_LAST_TYPEBLOCK = "Remove Last Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_REMOVE_RANDOM_TYPEBLOCK = "Remove Random Item of List"; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Returns the first item in a list."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "Returns the item at the specified position in a list. #1 is the last item."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "Returns the item at the specified position in a list. #1 is the first item."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Returns the last item in a list."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Returns a random item in a list."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Removes and returns the first item in a list."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "Removes and returns the item at the specified position in a list. #1 is the last item."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "Removes and returns the item at the specified position in a list. #1 is the first item."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Removes and returns the last item in a list."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Removes and returns a random item in a list."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Removes the first item in a list."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "Removes the item at the specified position in a list. #1 is the last item."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "Removes the item at the specified position in a list. #1 is the first item."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Removes the last item in a list."; // untranslated +Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Removes a random item in a list."; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "to # from end"; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "to #"; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "to last"; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "get sub-list from first"; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "get sub-list from # from end"; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "get sub-list from #"; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ""; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Creates a copy of the specified portion of a list."; // untranslated +Blockly.Msg.LISTS_GET_SUBLIST_TYPEBLOCK = "Get Sub-List"; // untranslated +Blockly.Msg.LISTS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.LISTS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated +Blockly.Msg.LISTS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.LISTS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the list. Returns 0 if item is not found."; // untranslated +Blockly.Msg.LISTS_INLIST = "in list"; // untranslated +Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated +Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Returns true if the list is empty."; // untranslated +Blockly.Msg.LISTS_ISEMPTY_TYPEBLOCK = "Is List Empty?"; // untranslated +Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated +Blockly.Msg.LISTS_LENGTH_TITLE = "length of %1"; // untranslated +Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Returns the length of a list."; // untranslated +Blockly.Msg.LISTS_LENGTH_TYPEBLOCK = "Length Of List"; // untranslated +Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated +Blockly.Msg.LISTS_REPEAT_TITLE = "create list with item %1 repeated %2 times"; // untranslated +Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Creates a list consisting of the given value repeated the specified number of times."; // untranslated +Blockly.Msg.LISTS_REPEAT_TYPEBLOCK = "Create List With Repeated Item"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_INSERT_FIRST_TYPEBLOCK = "Insert at Start of List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_INSERT_FROM_END_TYPEBLOCK = "Insert at Position from End of List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_INSERT_FROM_START_TYPEBLOCK = "Inserts at Position in List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_INSERT_LAST_TYPEBLOCK = "Append to End of List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_INSERT_RANDOM_TYPEBLOCK = "Insert At Random Location in List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_SET_FIRST_TYPEBLOCK = "Set First Item in List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_SET_FROM_END_TYPEBLOCK = "Set Item at Position from End of List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_SET_FROM_START_TYPEBLOCK = "Set Item at Position in List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_SET_LAST_TYPEBLOCK = "Set Last Item in List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_SET_RANDOM_TYPEBLOCK = "Set a Random Item in List"; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Inserts the item at the start of a list."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "Inserts the item at the specified position in a list. #1 is the last item."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "Inserts the item at the specified position in a list. #1 is the first item."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Append the item to the end of a list."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Inserts the item randomly in a list."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specified position in a list. #1 is the last item."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated +Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated +Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated +Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated +Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT_TYPEBLOCK = "Make List From Text"; // untranslated +Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated +Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST_TYPEBLOCK = "Make Text From List"; // untranslated +Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter."; // untranslated +Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated +Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated +Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ಸುಲ್ಲು"; +Blockly.Msg.LOGIC_BOOLEAN_FALSE_TYPEBLOCK = "False"; // untranslated +Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated +Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returns either true or false."; // untranslated +Blockly.Msg.LOGIC_BOOLEAN_TRUE = "ಸತ್ಯೊ"; +Blockly.Msg.LOGIC_BOOLEAN_TRUE_TYPEBLOCK = "True"; // untranslated +Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated +Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Return true if both inputs equal each other."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Return true if the first input is greater than the second input."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Return true if the first input is greater than or equal to the second input."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Return true if the first input is smaller than the second input."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Return true if the first input is smaller than or equal to the second input."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Return true if both inputs are not equal to each other."; // untranslated +Blockly.Msg.LOGIC_COMPARE_TYPEBLOCK = "Logic Equal"; // untranslated +Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated +Blockly.Msg.LOGIC_NEGATE_TITLE = "not %1"; // untranslated +Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated +Blockly.Msg.LOGIC_NEGATE_TYPEBLOCK = "not"; // untranslated +Blockly.Msg.LOGIC_NULL = "ಸೊನ್ನೆ"; +Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated +Blockly.Msg.LOGIC_NULL_TOOLTIP = "ಸೊನ್ನೆನ್ ಪರಿಕೊರ್ಪುಂಡು"; +Blockly.Msg.LOGIC_NULL_TYPEBLOCK = "Null"; // untranslated +Blockly.Msg.LOGIC_OPERATION_AND = "ಬುಕ್ಕೊ"; +Blockly.Msg.LOGIC_OPERATION_AND_TYPEBLOCK = "and"; // untranslated +Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated +Blockly.Msg.LOGIC_OPERATION_OR = "ಅತ್ತಂಡ"; +Blockly.Msg.LOGIC_OPERATION_OR_TYPEBLOCK = "or"; // untranslated +Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Return true if both inputs are true."; // untranslated +Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated +Blockly.Msg.LOGIC_TERNARY_CONDITION = "ಪರೀಕ್ಷೆ"; +Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated +Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ಒಂಜಿ ವೇಲೆ ಸುಳ್ಳು"; +Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ಒಂಜಿ ವೇಲೆ ಸತ್ಯೊ"; +Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated +Blockly.Msg.LOGIC_TERNARY_TYPEBLOCK = "Test"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TITLE = "create empty map"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_EMPTY_TYPEBLOCK = "Create Empty Map"; // untranslated +Blockly.Msg.MAPS_CREATE_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-empty-Map"; // untranslated +Blockly.Msg.MAPS_CREATE_TITLE = "map key %1 as %2"; // untranslated +Blockly.Msg.MAPS_CREATE_TOOLTIP = "Returns a Map, of length 0, containing no data records"; // untranslated +Blockly.Msg.MAPS_CREATE_TYPEBLOCK = "Map Key"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TITLE_ADD = "Map"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this Map block."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Maps#create-Map-with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_INPUT_WITH = "create map with"; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the Map."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TOOLTIP = "Create a Map with any number of items."; // untranslated +Blockly.Msg.MAPS_CREATE_WITH_TYPEBLOCK = "Create Map With"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FIRST = "first"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_END = "# from end"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_FROM_START = "#"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET = "get"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_REMOVE_TYPEBLOCK = "Get and Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_GET_TYPEBLOCK = "Get Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_LAST = "last"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE = "remove"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_REMOVE_TYPEBLOCK = "Remove Item From a Map"; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TAIL = ""; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET = "Returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_GET_REMOVE = "Removes and returns the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_GET_INDEX_TOOLTIP_REMOVE = "Removes the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_FIRST_TYPEBLOCK = "Find First Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Maps#getting-items-from-a-Map"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_LAST_TYPEBLOCK = "Find Last Occurrence Of Item"; // untranslated +Blockly.Msg.MAPS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the Map. Returns 0 if text is not found."; // untranslated +Blockly.Msg.MAPS_INMAP = "in map"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Maps#is-empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TITLE = "%1 is empty"; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TOOLTIP = "Returns true if the Map is empty."; // untranslated +Blockly.Msg.MAPS_ISEMPTY_TYPEBLOCK = "Is Map Empty?"; // untranslated +Blockly.Msg.MAPS_KEYS_TITLE = "get keys of %1"; // untranslated +Blockly.Msg.MAPS_KEYS_TYPEBLOCK = "Get Keys of Map"; // untranslated +Blockly.Msg.MAPS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Maps#length-of"; // untranslated +Blockly.Msg.MAPS_LENGTH_TITLE = "size of %1"; // untranslated +Blockly.Msg.MAPS_LENGTH_TOOLTIP = "Returns the number of entries in a Map."; // untranslated +Blockly.Msg.MAPS_LENGTH_TYPEBLOCK = "Size Of Map"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Maps#in-Map--set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INPUT_TO = "as"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_INSERT = "insert at"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_SET = "set"; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TOOLTIP = "Sets the item at the specified position in a Map."; // untranslated +Blockly.Msg.MAPS_SET_INDEX_TYPEBLOCK = "Set Item at Position in Map"; // untranslated +Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_ADD_TYPEBLOCK = "+"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_DIVIDE_TYPEBLOCK = "/"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MINUS_TYPEBLOCK = "-"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_MULTIPLY_TYPEBLOCK = "*"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_POWER_TYPEBLOCK = "^"; // untranslated +Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated +Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated +Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated +Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Return the product of the two numbers."; // untranslated +Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to the power of the second number."; // untranslated +Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated +Blockly.Msg.MATH_CHANGE_TITLE = "change %1 by %2"; // untranslated +Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated +Blockly.Msg.MATH_CHANGE_TYPEBLOCK = "Change Variable By Amount"; // untranslated +Blockly.Msg.MATH_CONSTANT_E_TYPEBLOCK = "Constant E"; // untranslated +Blockly.Msg.MATH_CONSTANT_GOLDEN_RATIO_TYPEBLOCK = "Constant Golden Ratio (φ)"; // untranslated +Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated +Blockly.Msg.MATH_CONSTANT_INFINITY_TYPEBLOCK = "Constant Infinity (∞)"; // untranslated +Blockly.Msg.MATH_CONSTANT_PI_TYPEBLOCK = "Constant PI"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT1_2_TYPEBLOCK = "Constant √ 1/2"; // untranslated +Blockly.Msg.MATH_CONSTANT_SQRT2_TYPEBLOCK = "Constant √ 2"; // untranslated +Blockly.Msg.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)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated +Blockly.Msg.MATH_CONSTRAIN_TYPEBLOCK = "Constrain Number Low High"; // untranslated +Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TITLE = "format as decimal number %1 places %2"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TOOLTIP = "Format this number"; // untranslated +Blockly.Msg.MATH_FORMAT_AS_DECIMAL_TYPEBLOCK = "Format as Decimal"; // untranslated +Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by"; // untranslated +Blockly.Msg.MATH_IS_DIVISIBLE_BY_TYPEBLOCK = "Number Is Divisible By"; // untranslated +Blockly.Msg.MATH_IS_EVEN = "ಸಮೊ ಆತ್ಂಡ್"; +Blockly.Msg.MATH_IS_EVEN_TYPEBLOCK = "Number Is Even"; // untranslated +Blockly.Msg.MATH_IS_NEGATIVE = "ರುನೊ ಆತ್ಂಡ್"; +Blockly.Msg.MATH_IS_NEGATIVE_TYPEBLOCK = "Number Is Negative"; // untranslated +Blockly.Msg.MATH_IS_ODD = "ಬೆಸೊ ಆತ್ಂಡ್"; +Blockly.Msg.MATH_IS_ODD_TYPEBLOCK = "Number Is Odd"; // untranslated +Blockly.Msg.MATH_IS_POSITIVE = "ಗುನೊ ಆತ್ಂಡ್"; +Blockly.Msg.MATH_IS_POSITIVE_TYPEBLOCK = "Number Is Positive"; // untranslated +Blockly.Msg.MATH_IS_PRIME = "ಎಡ್ಡೆ ಆತ್ಂಡ್"; +Blockly.Msg.MATH_IS_PRIME_TYPEBLOCK = "Number Is Prime"; // untranslated +Blockly.Msg.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."; // untranslated +Blockly.Msg.MATH_IS_WHOLE = "ಮಾಂತ ಆತ್ಂಡ್"; +Blockly.Msg.MATH_IS_WHOLE_TYPEBLOCK = "Number Is Whole"; // untranslated +Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated +Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; // untranslated +Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated +Blockly.Msg.MATH_MODULO_TYPEBLOCK = "Remainder of"; // untranslated +Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated +Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated +Blockly.Msg.MATH_NUMBER_TOOLTIP = "ಅ ನಂಬ್ರೊ"; +Blockly.Msg.MATH_ONLIST_AVERAGE_TYPEBLOCK = "Average of List"; // untranslated +Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated +Blockly.Msg.MATH_ONLIST_MAX_TYPEBLOCK = "Max of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MEDIAN_TYPEBLOCK = "Median of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MIN_TYPEBLOCK = "Min of List"; // untranslated +Blockly.Msg.MATH_ONLIST_MODE_TYPEBLOCK = "Mode of List"; // untranslated +Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "ಸರಾಸರಿ ಪಟ್ಟಿ"; +Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "max of list"; // untranslated +Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; // untranslated +Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "ಕನಿಸ್ಟ ಪಟ್ಟಿ"; +Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "ಪಟ್ಟಿದ ಇದಾನೊಲು"; +Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "ಗೊತ್ತುಗುರಿ ದಾಂತಿನ ಅಂಸೊದ ಪಟ್ಟಿ"; +Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "ಕಬರ್ ಪಟ್ಟಿದ ಪ್ರಮಾನೊ"; +Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "ಮೊತ್ತದ ಪಟ್ಟಿ"; +Blockly.Msg.MATH_ONLIST_RANDOM_TYPEBLOCK = "Random Item of List"; // untranslated +Blockly.Msg.MATH_ONLIST_STD_DEV_TYPEBLOCK = "Standard Deviation of List"; // untranslated +Blockly.Msg.MATH_ONLIST_SUM_TYPEBLOCK = "Sum of List"; // untranslated +Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "ಮದ್ಯಮೊ ಪಟ್ಟಿ"; +Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated +Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated +Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Return the smallest number in the list."; // untranslated +Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Return a list of the most common item(s) in the list."; // untranslated +Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Return a random element from the list."; // untranslated +Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Return the standard deviation of the list."; // untranslated +Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "ಗರಿಸ್ಟೊ ಪಟ್ಟಿ"; +Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "ಗೊತ್ತುಗುರಿ ದಾಂತಿನ ಬಾಗೊ"; +Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated +Blockly.Msg.MATH_RANDOM_FLOAT_TYPEBLOCK = "Random Fraction"; // untranslated +Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated +Blockly.Msg.MATH_RANDOM_INT_TYPEBLOCK = "Random Integer"; // untranslated +Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated +Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "ಸುತ್ತು"; +Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ಸುತ್ತು ಕಡಮೆ"; +Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "ಮುಗಿಪುನ ಸಮಯೊ"; +Blockly.Msg.MATH_ROUND_ROUNDDOWN_TYPEBLOCK = "Round Down"; // untranslated +Blockly.Msg.MATH_ROUND_ROUNDUP_TYPEBLOCK = "Round Up"; // untranslated +Blockly.Msg.MATH_ROUND_ROUND_TYPEBLOCK = "Round"; // untranslated +Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated +Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "ಸಂಪೂರ್ನೊ"; +Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE_TYPEBLOCK = "Absolute Value"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_NEG_TYPEBLOCK = "Negation"; // untranslated +Blockly.Msg.MATH_SINGLE_OP_ROOT = "ವರ್ಗಮೂಲೊ"; +Blockly.Msg.MATH_SINGLE_OP_ROOT_TYPEBLOCK = "Square Root"; // untranslated +Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated +Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated +Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated +Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Return the base 10 logarithm of a number."; // untranslated +Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Return the negation of a number."; // untranslated +Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; // untranslated +Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated +Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated +Blockly.Msg.MATH_TRIG_ACOS_TYPEBLOCK = "ACOS"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated +Blockly.Msg.MATH_TRIG_ASIN_TYPEBLOCK = "ASIN"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated +Blockly.Msg.MATH_TRIG_ATAN_TYPEBLOCK = "ATAN"; // untranslated +Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated +Blockly.Msg.MATH_TRIG_COS_TYPEBLOCK = "COS"; // untranslated +Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated +Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated +Blockly.Msg.MATH_TRIG_SIN_TYPEBLOCK = "SIN"; // untranslated +Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated +Blockly.Msg.MATH_TRIG_TAN_TYPEBLOCK = "TAN"; // untranslated +Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated +Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated +Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated +Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Return the cosine of a degree (not radian)."; // untranslated +Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Return the sine of a degree (not radian)."; // untranslated +Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Return the tangent of a degree (not radian)."; // untranslated +Blockly.Msg.ME = "ಯಾನ್"; +Blockly.Msg.NEW_SCOPE_VARIABLE = "New Key..."; // untranslated +Blockly.Msg.NEW_SCOPE_VARIABLE_TITLE = "New Key name:"; // untranslated +Blockly.Msg.NEW_VARIABLE = "ಪೊಸ ಬದಲಾವಣೆ"; +Blockly.Msg.NEW_VARIABLE_TITLE = "ಪುದರ್‍ದ ಪೊಸ ಬದಲಾವಣೆ:"; +Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated +Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "allow statements"; // untranslated +Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "with:"; // untranslated +Blockly.Msg.PROCEDURES_CALLNORETURN_CALL = ""; // untranslated +Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated +Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Run the user-defined function '%1'."; // untranslated +Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated +Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Run the user-defined function '%1' and use its output."; // untranslated +Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "with:"; // untranslated +Blockly.Msg.PROCEDURES_CREATE_DO = "Create '%1'"; // untranslated +Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated +Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated +Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "do something"; // untranslated +Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "to"; // untranslated +Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Creates a function with no output."; // untranslated +Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated +Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "return"; // untranslated +Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Creates a function with an output."; // untranslated +Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Warning: This function has duplicate parameters."; // untranslated +Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Highlight function definition"; // untranslated +Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "If a value is true, then return a second value."; // untranslated +Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Warning: This block may be used only within a function definition."; // untranslated +Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "input name:"; // untranslated +Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated +Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; // untranslated +Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated +Blockly.Msg.PROCEDURES_NEWTYPE = "New Type..."; // untranslated +Blockly.Msg.PROCEDURES_NEWTYPETITLE = "New Type name:"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_NOTYPE = "with %1 %2%3"; // untranslated +Blockly.Msg.PROCEDURES_PARAM_WITH_TYPE = "with %1 as %2%3%4"; // untranslated +Blockly.Msg.REMOVE_COMMENT = "ಟಿಪ್ಪಣಿನ್ ದೆತ್ತ್‌ಪಾಡ್ಲೆ"; +Blockly.Msg.RENAME_SCOPE_VARIABLE = "Rename Key..."; // untranslated +Blockly.Msg.RENAME_SCOPE_VARIABLE_TITLE = "Rename all '%1' Keys to:"; // untranslated +Blockly.Msg.RENAME_VARIABLE = "ಬದಲಾವಣೆ ಆಯಿನ ಪುದರ್‍ನ್ ನಾನೊರೊ ಪನ್ಲೆ"; +Blockly.Msg.RENAME_VARIABLE_TITLE = "ನಾನೊರೊ ಪುದರ್ ಬದಲಾವಣೆ ಆಯಿನ ಮಾಂತ '% 1':"; +Blockly.Msg.SCOPE_VARIABLES_SET = "set %1 : %2 to %3"; // untranslated +Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ಪಟ್ಯೊನು ಸೇರವೆ"; +Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated +Blockly.Msg.TEXT_APPEND_TO = "ಇಂದೆಕ್"; +Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated +Blockly.Msg.TEXT_APPEND_TYPEBLOCK = "Append Text"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_LOWERCASE_TYPBLOCK = "Text to lower case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_TITLECASE_TYPBLOCK = "Text to Title Case"; // untranslated +Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated +Blockly.Msg.TEXT_CHANGECASE_UPPERCASE_TYPBLOCK = "Text to UPPER CASE"; // untranslated +Blockly.Msg.TEXT_CHARAT_FIRST = "In Text Get First Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_END = "In Text Get Letter # From End"; // untranslated +Blockly.Msg.TEXT_CHARAT_FROM_START = "ಅಕ್ಸರೊನು ದೆತೊನುಲೆ#"; +Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated +Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "ಪಟ್ಯೊಡು"; +Blockly.Msg.TEXT_CHARAT_LAST = "In Text Get Last Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_RANDOM = "In Text Get Random Letter"; // untranslated +Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated +Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated +Blockly.Msg.TEXT_COMMENT_TEXT = "Comment:"; // untranslated +Blockly.Msg.TEXT_COMMENT_TYPEBLOCK = "Comment"; // untranslated +Blockly.Msg.TEXT_CONTAINS_HELPURL = "http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains"; // untranslated +Blockly.Msg.TEXT_CONTAINS_INPUT = "contains text %1 piece %2"; // untranslated +Blockly.Msg.TEXT_CONTAINS_TOOLTIP = "Tests whether the piece is contained in the text."; // untranslated +Blockly.Msg.TEXT_CONTAINS_TYPEBLOCK = "Text Contains"; // untranslated +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "ಪಟ್ಯೊಡು ಅಂಸೊಲೆನ್ ಸೇರಲೆ"; +Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "ಸೇರೊಲಿ"; +Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END_TYPEBLOCK = " To Letter # From End"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START_TYPEBLOCK = " To Letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST_TYPEBLOCK = " To Last Letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST_TYPEBLOCK = "Get Substring From First Letter"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END_TYPEBLOCK = "Get Substring From Letter # From End"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START_TYPEBLOCK = "Get Substring From Letter #"; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated +Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated +Blockly.Msg.TEXT_INDEXOF_FIRST_TYPEBLOCK = "Find First Occurrence of Text"; // untranslated +Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated +Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "ಪಟ್ಯೊಡು"; +Blockly.Msg.TEXT_INDEXOF_LAST_TYPEBLOCK = "Find Last Occurrence of Text"; // untranslated +Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated +Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "ದುಂಬು ಕರಿನ ಪಟ್ಯೊನು ನಾಡ್‍ಲೆ"; +Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated +Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurrence of the first text in the second text. Returns 0 if text is not found."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 ಕಾಲಿ"; +Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated +Blockly.Msg.TEXT_ISEMPTY_TYPEBLOCK = "Text is Empty"; // untranslated +Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated +Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ಪಟ್ಯೊನು ರಚನೆ ಮಲ್ಪು"; +Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated +Blockly.Msg.TEXT_JOIN_TYPEBLOCK = "Create Text With"; // untranslated +Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated +Blockly.Msg.TEXT_LENGTH_TITLE = "೧% ಉದ್ದೊ"; +Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated +Blockly.Msg.TEXT_LENGTH_TYPEBLOCK = "Length of Text"; // untranslated +Blockly.Msg.TEXT_PRINTF_CREATEWITH = "create text with"; // untranslated +Blockly.Msg.TEXT_PRINTF_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated +Blockly.Msg.TEXT_PRINTF_TITLE = "printf format %1"; // untranslated +Blockly.Msg.TEXT_PRINTF_TOOLTIP = "Printf the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINTF_TYPEBLOCK = "Printf Text"; // untranslated +Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated +Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; // untranslated +Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_PRINT_TYPEBLOCK = "Print Text"; // untranslated +Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated +Blockly.Msg.TEXT_PROMPT_NUMBER_TYPEBLOCK = "Prompt For Number With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TEXT_TYPEBLOCK = "Prompt For Text With Message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated +Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated +Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated +Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "prompt for text with message"; // untranslated +Blockly.Msg.TEXT_SPRINTF_CREATEWITH = "create text with"; // untranslated +Blockly.Msg.TEXT_SPRINTF_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated +Blockly.Msg.TEXT_SPRINTF_TITLE = "sprintf format %1"; // untranslated +Blockly.Msg.TEXT_SPRINTF_TOOLTIP = "Sprintf the specified text, number or other value."; // untranslated +Blockly.Msg.TEXT_SPRINTF_TYPEBLOCK = "Sprintf Text"; // untranslated +Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated +Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated +Blockly.Msg.TEXT_TOOLTIP_TYPE_JAVA = "Insert arbitrary Java code"; // untranslated +Blockly.Msg.TEXT_TOOLTIP_TYPE_PYTHON = "Insert arbitrary Python code"; // untranslated +Blockly.Msg.TEXT_TRIM_BOTH_TYPEBLOCK = "Trim Spaces From Both Sides Of Text"; // untranslated +Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated +Blockly.Msg.TEXT_TRIM_LEFT_TYPEBLOCK = "Trim Spaces From Left Side Of Text"; // untranslated +Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated +Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated +Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated +Blockly.Msg.TEXT_TRIM_RIGHT_TYPEBLOCK = "Trim Spaces From Right Side Of Text"; // untranslated +Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_JAVA_TYPEBLOCK = "insert java code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON = "insert python code"; // untranslated +Blockly.Msg.TEXT_TYPE_PYTHON_TYPEBLOCK = "insert python code"; // untranslated +Blockly.Msg.TODAY = "ಇನಿ"; +Blockly.Msg.VARIABLES_DEFAULT_NAME = "ವಸ್ತು"; +Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated +Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated +Blockly.Msg.VARIABLES_GET_TOOLTIP = "Returns the value of this variable."; // untranslated +Blockly.Msg.VARIABLES_SET = "set %1 to %2"; // untranslated +Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated +Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated +Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated +Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; +Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.MAPS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; +Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE; +Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; +Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_GET_INDEX_HELPURL = Blockly.Msg.MAPS_INDEX_OF_HELPURL; +Blockly.Msg.MAPS_SET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; +Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; +Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; +Blockly.Msg.MAPS_GET_INDEX_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; +Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.MAPS_INDEX_OF_INPUT_IN_MAP = Blockly.Msg.MAPS_INMAP; +Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; +Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; +Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; \ No newline at end of file From be2b909a5cf00e917478cb4238c81ddf48b6d65d Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Wed, 14 Oct 2015 09:46:22 -0400 Subject: [PATCH 71/84] Fix problem with attempting to connect a non-output block to another block --- blockly_compressed.js | 4 ++-- core/typeblock.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 5a89061dbd8..1e212d750b0 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1439,8 +1439,8 @@ b.fields)+Blockly.TypeBlock.sectionToXMLString("value",b.values)+" c=Blockly.mainWorkspace.getMetrics().viewLeft+Blockly.latestClick.x-b.x-c,b=Blockly.mainWorkspace.getMetrics().viewTop+Blockly.latestClick.y-b.y,a.moveBy(c,b));a.select();Blockly.TypeBlock.hide()}; Blockly.TypeBlock.createAutoComplete_=function(){Blockly.TypeBlock.TBOptionsNames_=goog.object.getKeys(Blockly.TypeBlock.TBOptions_);goog.array.sort(Blockly.TypeBlock.TBOptionsNames_);goog.events.unlistenByKey(Blockly.TypeBlock.currentListener_);Blockly.TypeBlock.ac_&&Blockly.TypeBlock.ac_.dispose();var a=new Blockly.TypeBlock.ac.AIArrayMatcher(Blockly.TypeBlock.TBOptionsNames_,!1),b=new goog.ui.ac.Renderer,c=new goog.ui.ac.InputHandler(null,null,!1);Blockly.TypeBlock.ac_=new goog.ui.ac.AutoComplete(a, b,c);Blockly.TypeBlock.ac_.setMaxMatches(100);c.attachAutoComplete(Blockly.TypeBlock.ac_);c.attachInputs(Blockly.TypeBlock.inputText_);Blockly.TypeBlock.currentListener_=goog.events.listen(Blockly.TypeBlock.ac_,goog.ui.ac.AutoComplete.EventType.UPDATE,Blockly.TypeBlock.autoCompleteSelected);goog.events.listen(Blockly.TypeBlock.ac_,goog.ui.ac.AutoComplete.EventType.DISMISS,Blockly.TypeBlock.hide)}; -Blockly.TypeBlock.connectIfPossible=function(a,b){for(var c=0,d=a.inputList,e=d.length,c=0;c>>/g,Blockly.Css.mediaPath_),d=document.createElement("style");document.head.appendChild(d);c=document.createTextNode(c);d.appendChild(c);Blockly.Css.styleSheet_=d.sheet;Blockly.Css.setCursor(Blockly.Css.Cursor.OPEN)}}; Blockly.Css.setCursor=function(a){if(Blockly.Css.currentCursor_!=a){Blockly.Css.currentCursor_=a;var b="url("+Blockly.Css.mediaPath_+"/"+a+".cur), auto",c=".blocklyDraggable {\n cursor: "+b+";\n}\n";Blockly.Css.styleSheet_.deleteRule(0);Blockly.Css.styleSheet_.insertRule(c,0);for(var c=document.getElementsByClassName("blocklyToolboxDiv"),d=0,e;e=c[d];d++)e.style.cursor=a==Blockly.Css.Cursor.DELETE?b:"";document.body.parentNode.style.cursor=a==Blockly.Css.Cursor.OPEN?"":b}}; diff --git a/core/typeblock.js b/core/typeblock.js index ece9f61760f..7256047fb43 100644 --- a/core/typeblock.js +++ b/core/typeblock.js @@ -537,7 +537,9 @@ Blockly.TypeBlock.connectIfPossible = function(blockSelected, createdBlock) { // Are both blocks statement blocks? // If so, connect created block below the selected block - if (blockSelected.outputConnection == null && + if (createdBlock.previousConnection && + blockSelected.nextConnection && + blockSelected.outputConnection == null && createdBlock.outputConnection == null) { createdBlock.previousConnection.connect(blockSelected.nextConnection); return; From 33061836382fe31d4f6e219013c3fa3d01cd108f Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Thu, 15 Oct 2015 11:31:12 -0400 Subject: [PATCH 72/84] Comment out Google tab code in favor of upper level code which handles tabs --- core/field_textinput.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/field_textinput.js b/core/field_textinput.js index 349dd601abc..8867f91b1ad 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -176,10 +176,10 @@ Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_ = function(e) { } else if (e.keyCode == goog.events.KeyCodes.ESC) { this.setText(htmlInput.defaultValue); Blockly.WidgetDiv.hide(); - } else if (e.keyCode == goog.events.KeyCodes.TAB) { - Blockly.WidgetDiv.hide(); - this.sourceBlock_.tab(this, !e.shiftKey); - e.preventDefault(); +// } else if (e.keyCode == goog.events.KeyCodes.TAB) { +// Blockly.WidgetDiv.hide(); +// this.sourceBlock_.tab(this, !e.shiftKey); +// e.preventDefault(); } }; From d63673cc164c1db451e2d4759385a359a1289111 Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Thu, 15 Oct 2015 11:32:07 -0400 Subject: [PATCH 73/84] Recompile --- blockly_compressed.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 227f3c02a3d..e2484fbb6d2 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -1331,8 +1331,7 @@ Blockly.BlockSvg.prototype.renderDrawLeft_=function(a,b,c,d){this.outputConnecti Blockly.FieldTextInput.prototype.setText=function(a){if(null!==a){if(this.sourceBlock_&&this.changeHandler_){var b=this.changeHandler_(a);null!==b&&void 0!==b&&(a=b)}Blockly.Field.prototype.setText.call(this,a)}};Blockly.FieldTextInput.prototype.setSpellcheck=function(a){this.spellcheck_=a}; Blockly.FieldTextInput.prototype.showEditor_=function(a){var b=a||!1;if(!b&&(goog.userAgent.MOBILE||goog.userAgent.ANDROID||goog.userAgent.IPAD))a=window.prompt(Blockly.Msg.CHANGE_VALUE_TITLE,this.text_),this.sourceBlock_&&this.changeHandler_&&(b=this.changeHandler_(a),void 0!==b&&(a=b)),null!==a&&this.setText(a);else{Blockly.WidgetDiv.show(this,this.sourceBlock_.RTL,this.widgetDispose_());var c=Blockly.WidgetDiv.DIV;a=goog.dom.createDom("input","blocklyHtmlInput");a.setAttribute("spellcheck",this.spellcheck_); var d=Blockly.FieldTextInput.FONTSIZE*this.sourceBlock_.workspace.scale+"pt";c.style.fontSize=d;a.style.fontSize=d;Blockly.FieldTextInput.htmlInput_=a;c.appendChild(a);a.value=a.defaultValue=this.text_;a.oldValue_=null;this.validate_();this.resizeEditor_();b||(a.focus(),a.select());a.onKeyDownWrapper_=Blockly.bindEvent_(a,"keydown",this,this.onHtmlInputKeyDown_);a.onKeyUpWrapper_=Blockly.bindEvent_(a,"keyup",this,this.onHtmlInputChange_);a.onKeyPressWrapper_=Blockly.bindEvent_(a,"keypress",this,this.onHtmlInputChange_); -b=this.sourceBlock_.workspace.getCanvas();a.onWorkspaceChangeWrapper_=Blockly.bindEvent_(b,"blocklyWorkspaceChange",this,this.resizeEditor_)}}; -Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_=function(a){var b=Blockly.FieldTextInput.htmlInput_;a.keyCode==goog.events.KeyCodes.ENTER?Blockly.WidgetDiv.hide():a.keyCode==goog.events.KeyCodes.ESC?(this.setText(b.defaultValue),Blockly.WidgetDiv.hide()):a.keyCode==goog.events.KeyCodes.TAB&&(Blockly.WidgetDiv.hide(),this.sourceBlock_.tab(this,!a.shiftKey),a.preventDefault())}; +b=this.sourceBlock_.workspace.getCanvas();a.onWorkspaceChangeWrapper_=Blockly.bindEvent_(b,"blocklyWorkspaceChange",this,this.resizeEditor_)}};Blockly.FieldTextInput.prototype.onHtmlInputKeyDown_=function(a){var b=Blockly.FieldTextInput.htmlInput_;a.keyCode==goog.events.KeyCodes.ENTER?Blockly.WidgetDiv.hide():a.keyCode==goog.events.KeyCodes.ESC&&(this.setText(b.defaultValue),Blockly.WidgetDiv.hide())}; Blockly.FieldTextInput.prototype.onHtmlInputChange_=function(a){var b=Blockly.FieldTextInput.htmlInput_;a.keyCode!=goog.events.KeyCodes.ESC&&(a=b.value,a!==b.oldValue_?(this.sourceBlock_.setShadow(!1),b.oldValue_=a,this.setText(a),this.validate_()):goog.userAgent.WEBKIT&&this.sourceBlock_.render())}; Blockly.FieldTextInput.prototype.validate_=function(){var a=!0;goog.asserts.assertObject(Blockly.FieldTextInput.htmlInput_);var b=Blockly.FieldTextInput.htmlInput_;this.sourceBlock_&&this.changeHandler_&&(a=this.changeHandler_(b.value));null===a?Blockly.addClass_(b,"blocklyInvalidInput"):Blockly.removeClass_(b,"blocklyInvalidInput")}; Blockly.FieldTextInput.prototype.resizeEditor_=function(){var a=Blockly.WidgetDiv.DIV,b=this.fieldGroup_.getBBox();a.style.width=b.width*this.sourceBlock_.workspace.scale+"px";a.style.height=b.height*this.sourceBlock_.workspace.scale+"px";b=this.getAbsoluteXY_();if(this.sourceBlock_.RTL){var c=this.getScaledBBox_();b.x+=c.width;b.x-=a.offsetWidth}b.y+=1;goog.userAgent.GECKO&&Blockly.WidgetDiv.DIV.style.top&&(--b.x,--b.y);goog.userAgent.WEBKIT&&(b.y-=3);a.style.left=b.x+"px";a.style.top=b.y+"px"}; From 10440aff2506aff4d4d0a8978c1dddabdceb2f4e Mon Sep 17 00:00:00 2001 From: toebes-extreme Date: Mon, 19 Oct 2015 13:14:08 -0400 Subject: [PATCH 74/84] Add first stage of Jar import, Keyboard moving of blocks --- blockly_compressed.js | 116 ++++++++++++++++++++++-------------------- core/block.js | 43 +++++++++++++++- core/block_svg.js | 81 +++++++++++++++++++++++++++++ core/blockly.js | 16 +++++- core/typeblock.js | 5 ++ msg/js/ar.js | 5 ++ msg/js/az.js | 5 ++ msg/js/bcc.js | 5 ++ msg/js/be-tarask.js | 5 ++ msg/js/bg.js | 5 ++ msg/js/bn.js | 5 ++ msg/js/br.js | 5 ++ msg/js/ca.js | 5 ++ msg/js/cs.js | 5 ++ msg/js/da.js | 5 ++ msg/js/de.js | 5 ++ msg/js/el.js | 5 ++ msg/js/en.js | 5 ++ msg/js/es.js | 5 ++ msg/js/fa.js | 5 ++ msg/js/fi.js | 5 ++ msg/js/fr.js | 5 ++ msg/js/he.js | 5 ++ msg/js/hi.js | 5 ++ msg/js/hrx.js | 5 ++ msg/js/hu.js | 5 ++ msg/js/ia.js | 5 ++ msg/js/id.js | 5 ++ msg/js/is.js | 5 ++ msg/js/it.js | 5 ++ msg/js/ja.js | 5 ++ msg/js/ko.js | 5 ++ msg/js/lb.js | 5 ++ msg/js/lrc.js | 5 ++ msg/js/lt.js | 5 ++ msg/js/mk.js | 5 ++ msg/js/ms.js | 5 ++ msg/js/nb.js | 5 ++ msg/js/nl.js | 5 ++ msg/js/oc.js | 5 ++ msg/js/pl.js | 5 ++ msg/js/pms.js | 5 ++ msg/js/pt-br.js | 5 ++ msg/js/pt.js | 5 ++ msg/js/ro.js | 5 ++ msg/js/ru.js | 5 ++ msg/js/sc.js | 5 ++ msg/js/shn.js | 5 ++ msg/js/sk.js | 5 ++ msg/js/sq.js | 5 ++ msg/js/sr.js | 5 ++ msg/js/sv.js | 5 ++ msg/js/ta.js | 5 ++ msg/js/tcy.js | 5 ++ msg/js/th.js | 5 ++ msg/js/tl.js | 5 ++ msg/js/tlh.js | 5 ++ msg/js/tr.js | 5 ++ msg/js/uk.js | 5 ++ msg/js/vi.js | 5 ++ msg/js/zh-hans.js | 5 ++ msg/js/zh-hant.js | 5 ++ msg/json/en.json | 9 +++- msg/json/qqq.json | 14 +++-- msg/messages.js | 13 +++++ 65 files changed, 514 insertions(+), 68 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index e2484fbb6d2..cb4c81f37e8 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -11,16 +11,17 @@ goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error goog.getObjectByName=function(a,b){for(var c=a.split("."),d=b||goog.global,e;e=c.shift();)if(goog.isDefAndNotNull(d[e]))d=d[e];else return null;return d};goog.globalize=function(a,b){var c=b||goog.global,d;for(d in a)c[d]=a[d]};goog.addDependency=function(a,b,c,d){if(goog.DEPENDENCIES_ENABLED){var e;a=a.replace(/\\/g,"/");for(var f=goog.dependencies_,g=0;e=b[g];g++)f.nameToPath[e]=a,f.pathIsModule[a]=!!d;for(d=0;b=c[d];d++)a in f.requires||(f.requires[a]={}),f.requires[a][b]=!0}}; goog.ENABLE_DEBUG_LOADER=!0;goog.logToConsole_=function(a){goog.global.console&&goog.global.console.error(a)};goog.require=function(a){if(!COMPILED){goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(a);if(goog.isProvided_(a))return goog.isInModuleLoader_()?goog.module.getInternal_(a):null;if(goog.ENABLE_DEBUG_LOADER){var b=goog.getPathFromDeps_(a);if(b)return goog.writeScripts_(b),null}a="goog.require could not find: "+a;goog.logToConsole_(a);throw Error(a);}}; goog.basePath="";goog.nullFunction=function(){};goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.LOAD_MODULE_USING_EVAL=!0;goog.SEAL_MODULE_EXPORTS=goog.DEBUG;goog.loadedModules_={};goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER; -goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return"undefined"!=typeof a&&"write"in a},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("SCRIPT"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?"),d=-1== -d?c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}},goog.importScript_=function(a,b){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(a,b)&&(goog.dependencies_.written[a]=!0)},goog.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.importModule_=function(a){goog.importScript_("",'goog.retrieveAndExecModule_("'+a+'");')&&(goog.dependencies_.written[a]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(a,b){return goog.LOAD_MODULE_USING_EVAL&& +goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return null!=a&&"write"in a},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("SCRIPT"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?"),d=-1==d?c.length: +d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}},goog.importScript_=function(a,b){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(a,b)&&(goog.dependencies_.written[a]=!0)},goog.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.importModule_=function(a){goog.importScript_("",'goog.retrieveAndExecModule_("'+a+'");')&&(goog.dependencies_.written[a]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(a,b){return goog.LOAD_MODULE_USING_EVAL&& goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(b+"\n//# sourceURL="+a+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+b+"\n;return exports});\n//# sourceURL="+a+"\n"},goog.loadQueuedModules_=function(){var a=goog.queuedModules_.length;if(0\x3c/script>')},goog.appendScriptSrcNode_=function(a){var b=goog.global.document,c=b.createElement("script");c.type="text/javascript";c.src=a;c.defer=!1;c.async=!1;b.head.appendChild(c)},goog.writeScriptTag_= -function(a,b){if(goog.inHtmlDocument_()){var c=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==c.readyState){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load');}var d=goog.IS_OLD_IE_;void 0===b?d?(d=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",c.write(' - + + + + + + + + + +