mirror of
https://github.com/google/blockly.git
synced 2026-06-16 16:15:14 +02:00
Dragging changes, rebased on develop (#1078)
* Add block drag surface translateSurfaceBy * Add dragged connection manager * Add gesture.js * Add GestureHandler * Implemented gesture skeleton * Most basic workspace dragging * Add dragged connection manager * cleanup * doc * more cleanup * Add gesture handler * Add translateSurfaceInternal * core/block_dragger.js * cleanup * Pull in changes to dragged connection manager * Pull in changes to dragged connection manager * comments * more annotations * Add workspace dragger * Add coordinate annotations * Start on block dragging * Limit number of concurrent gestures * Add some TODOs * start using dragged connection manager * Set origin correctly for dragging blocks * Connect or delete at the end of a block drag. * cleanup * handle field clicks and block + workspace right-clicks * move code into BlockDragger class, but still reach into Gesture internals a lot * Clean up block dragger * Call blockDragger constructor with correct arguments * Enable block dragging in a mutator workspace * Add workspace dragger * click todos * Drag flyout with background * more dragging from flyout * nit * fix dragging from flyouts * Remove unused code and rename gestureHandler to gestureDB * Rename gesture handler * Added some jsdoc in gesture.js * Update some docs * Move some code to block_svg and clean up code * Lots of coordinate annotations * Fix block dragging when zoomed. * Remove built files from branch * More dragging work (#1026) -- Drag bubbles while dragging blocks -- Use bindEventWithChecks to work in touch on Android. Not tested anywhere else yet. -- Handle dragging blocks while zoomed -- Handle dragging blocks in mutators -- Handle right-clicks (I hope) -- Removed lots of unused code * More dragging work (#1048) - Removed gestureDB - Removing uses of terminateDrag - Cleaned up disposal code * Dragging bugfixes (#1058) - Get rid of flyout.dragMode_ and blockly.dragMode_ - Make drags from the flyout start from the top block in the group - Block tooltips from being scheduled or shown during gestures - Don't resize mutator bubbles mid-drag * Fix events in new dragging (#1060) * rebuild for testing * unbuild * Fix events * rebuild * Fix up cursors * Use language files from develop * Remove handled TODOS * attempt to fix IE rerendering bug, and recalculate workspace positions on scroll * Rebuild all the things * Comment cleanup; annotations; delete unused variables.
This commit is contained in:
+295
-285
File diff suppressed because it is too large
Load Diff
+40
-6
@@ -40,8 +40,17 @@ window.BLOCKLY_BOOT = function() {
|
||||
}
|
||||
goog.addDependency("../../../" + dir + "/core/rendered_connection.js", ['Blockly.RenderedConnection'], ['Blockly.Connection']);
|
||||
goog.addDependency("../../../" + dir + "/core/warning.js", ['Blockly.Warning'], ['Blockly.Bubble', 'Blockly.Icon']);
|
||||
goog.addDependency("../../../" + dir + "/core/field.js", ['Blockly.Field'], ['goog.asserts', 'goog.dom', 'goog.math.Size', 'goog.style', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/toolbox.js", ['Blockly.Toolbox'], ['Blockly.Flyout', 'Blockly.Touch', 'goog.dom', 'goog.dom.TagName', 'goog.events', 'goog.events.BrowserFeature', 'goog.html.SafeHtml', 'goog.html.SafeStyle', 'goog.math.Rect', 'goog.style', 'goog.ui.tree.TreeControl', 'goog.ui.tree.TreeNode']);
|
||||
goog.addDependency("../../../" + dir + "/core/field.js", ['Blockly.Field'], ['Blockly.Gesture', 'goog.asserts', 'goog.dom', 'goog.math.Size', 'goog.style', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/scrollbar.js", ['Blockly.Scrollbar', 'Blockly.ScrollbarPair'], ['goog.dom', 'goog.events']);
|
||||
goog.addDependency("../../../" + dir + "/core/extensions.js", ['Blockly.Extensions'], []);
|
||||
goog.addDependency("../../../" + dir + "/core/comment.js", ['Blockly.Comment'], ['Blockly.Bubble', 'Blockly.Icon', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/events.js", ['Blockly.Events'], ['goog.array', 'goog.math.Coordinate']);
|
||||
goog.addDependency("../../../" + dir + "/core/trashcan.js", ['Blockly.Trashcan'], ['goog.Timer', 'goog.dom', 'goog.math', 'goog.math.Rect']);
|
||||
goog.addDependency("../../../" + dir + "/core/connection.js", ['Blockly.Connection'], ['goog.asserts', 'goog.dom']);
|
||||
goog.addDependency("../../../" + dir + "/core/block_drag_surface.js", ['Blockly.BlockDragSurfaceSvg'], ['Blockly.utils', 'goog.asserts', 'goog.math.Coordinate']);
|
||||
goog.addDependency("../../../" + dir + "/core/widgetdiv.js", ['Blockly.WidgetDiv'], ['Blockly.Css', 'goog.dom', 'goog.dom.TagName', 'goog.style']);
|
||||
goog.addDependency("../../../" + dir + "/core/blockly.js", ['Blockly'], ['Blockly.BlockSvg.render', 'Blockly.Events', 'Blockly.FieldAngle', 'Blockly.FieldCheckbox', 'Blockly.FieldColour', 'Blockly.FieldDropdown', 'Blockly.FieldImage', 'Blockly.FieldTextInput', 'Blockly.FieldNumber', 'Blockly.FieldVariable', 'Blockly.Generator', 'Blockly.Msg', 'Blockly.Procedures', 'Blockly.Toolbox', 'Blockly.Touch', 'Blockly.WidgetDiv', 'Blockly.WorkspaceSvg', 'Blockly.constants', 'Blockly.inject', 'Blockly.utils', 'goog.color', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/flyout_button.js", ['Blockly.FlyoutButton'], ['goog.dom', 'goog.math.Coordinate']);
|
||||
goog.addDependency("../../../" + dir + "/core/block_render_svg.js", ['Blockly.BlockSvg.render'], ['Blockly.BlockSvg', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/variable_map.js", ['Blockly.VariableMap'], []);
|
||||
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']);
|
||||
@@ -50,10 +59,17 @@ goog.addDependency("../../../" + dir + "/core/inject.js", ['Blockly.inject'], ['
|
||||
goog.addDependency("../../../" + dir + "/core/utils.js", ['Blockly.utils'], ['Blockly.Touch', 'goog.dom', 'goog.events.BrowserFeature', 'goog.math.Coordinate', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/names.js", ['Blockly.Names'], []);
|
||||
goog.addDependency("../../../" + dir + "/core/contextmenu.js", ['Blockly.ContextMenu'], ['goog.dom', 'goog.events', 'goog.style', 'goog.ui.Menu', 'goog.ui.MenuItem']);
|
||||
goog.addDependency("../../../" + dir + "/core/bubble.js", ['Blockly.Bubble'], ['Blockly.Touch', 'Blockly.Workspace', 'goog.dom', 'goog.math', 'goog.math.Coordinate', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/block_dragger.js", ['Blockly.BlockDragger'], ['Blockly.DraggedConnectionManager', 'goog.math.Coordinate', 'goog.asserts']);
|
||||
goog.addDependency("../../../" + dir + "/core/workspace_dragger.js", ['Blockly.WorkspaceDragger'], ['goog.math.Coordinate', 'goog.asserts']);
|
||||
goog.addDependency("../../../" + dir + "/core/icon.js", ['Blockly.Icon'], ['goog.dom', 'goog.math.Coordinate']);
|
||||
goog.addDependency("../../../" + dir + "/core/flyout_button.js", ['Blockly.FlyoutButton'], ['goog.dom', 'goog.math.Coordinate']);
|
||||
goog.addDependency("../../../" + dir + "/core/block_drag_surface.js", ['Blockly.BlockDragSurfaceSvg'], ['Blockly.utils', 'goog.asserts', 'goog.math.Coordinate']);
|
||||
goog.addDependency("../../../" + dir + "/core/field_textinput.js", ['Blockly.FieldTextInput'], ['Blockly.Field', 'Blockly.Msg', 'goog.asserts', 'goog.dom', 'goog.dom.TagName', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/toolbox.js", ['Blockly.Toolbox'], ['Blockly.Flyout', 'Blockly.Touch', 'goog.dom', 'goog.dom.TagName', 'goog.events', 'goog.events.BrowserFeature', 'goog.html.SafeHtml', 'goog.html.SafeStyle', 'goog.math.Rect', 'goog.style', 'goog.ui.tree.TreeControl', 'goog.ui.tree.TreeNode']);
|
||||
goog.addDependency("../../../" + dir + "/core/options.js", ['Blockly.Options'], []);
|
||||
goog.addDependency("../../../" + dir + "/core/block.js", ['Blockly.Block'], ['Blockly.Blocks', 'Blockly.Comment', 'Blockly.Connection', 'Blockly.Extensions', 'Blockly.Input', 'Blockly.Mutator', 'Blockly.Warning', 'Blockly.Workspace', 'Blockly.Xml', 'goog.array', 'goog.asserts', 'goog.math.Coordinate', 'goog.string']);
|
||||
goog.addDependency("../../../" + dir + "/core/block_svg.js", ['Blockly.BlockSvg'], ['Blockly.Block', 'Blockly.ContextMenu', 'Blockly.RenderedConnection', 'Blockly.Touch', 'Blockly.utils', 'goog.Timer', 'goog.asserts', 'goog.dom', 'goog.math.Coordinate', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/flyout_dragger.js", ['Blockly.FlyoutDragger'], ['Blockly.WorkspaceDragger', 'goog.asserts', 'goog.math.Coordinate']);
|
||||
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/gesture.js", ['Blockly.Gesture'], ['Blockly.BlockDragger', 'Blockly.constants', 'Blockly.FlyoutDragger', 'Blockly.Tooltip', 'Blockly.Touch', 'Blockly.WorkspaceDragger', 'goog.asserts', 'goog.math.Coordinate'])
|
||||
goog.addDependency("../../../" + dir + "/core/css.js", ['Blockly.Css'], []);
|
||||
goog.addDependency("../../../" + dir + "/core/input.js", ['Blockly.Input'], ['Blockly.Connection', 'Blockly.FieldLabel', 'goog.asserts']);
|
||||
goog.addDependency("../../../" + dir + "/core/trashcan.js", ['Blockly.Trashcan'], ['goog.Timer', 'goog.dom', 'goog.math', 'goog.math.Rect']);
|
||||
@@ -89,9 +105,22 @@ goog.addDependency("../../../" + dir + "/core/workspace_drag_surface_svg.js", ['
|
||||
goog.addDependency("../../../" + dir + "/core/field_variable.js", ['Blockly.FieldVariable'], ['Blockly.FieldDropdown', 'Blockly.Msg', 'Blockly.Variables', 'goog.asserts', 'goog.string']);
|
||||
goog.addDependency("../../../" + dir + "/core/block.js", ['Blockly.Block'], ['Blockly.Blocks', 'Blockly.Comment', 'Blockly.Connection', 'Blockly.Extensions', 'Blockly.Input', 'Blockly.Mutator', 'Blockly.Warning', 'Blockly.Workspace', 'Blockly.Xml', 'goog.array', 'goog.asserts', 'goog.math.Coordinate', 'goog.string']);
|
||||
goog.addDependency("../../../" + dir + "/core/variables.js", ['Blockly.Variables'], ['Blockly.Blocks', 'Blockly.constants', 'Blockly.Workspace', 'goog.string']);
|
||||
goog.addDependency("../../../" + dir + "/core/workspace_svg.js", ['Blockly.WorkspaceSvg'], ['Blockly.ConnectionDB', 'Blockly.constants', 'Blockly.Gesture', 'Blockly.Options', 'Blockly.ScrollbarPair', 'Blockly.Touch', 'Blockly.Trashcan', 'Blockly.Workspace', 'Blockly.WorkspaceDragSurfaceSvg', 'Blockly.Xml', 'Blockly.ZoomControls', 'goog.array', 'goog.dom', 'goog.math.Coordinate', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/bubble.js", ['Blockly.Bubble'], ['Blockly.Touch', 'Blockly.Workspace', 'goog.dom', 'goog.math', 'goog.math.Coordinate', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/procedures.js", ['Blockly.Procedures'], ['Blockly.Blocks', 'Blockly.constants', 'Blockly.Field', 'Blockly.Names', 'Blockly.Workspace']);
|
||||
goog.addDependency("../../../" + dir + "/core/flyout.js", ['Blockly.Flyout'], ['Blockly.Block', 'Blockly.Comment', 'Blockly.Events', 'Blockly.FlyoutButton', 'Blockly.Gesture', 'Blockly.Touch', 'Blockly.WorkspaceSvg', 'goog.dom', 'goog.events', 'goog.math.Rect', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/xml.js", ['Blockly.Xml'], ['goog.asserts', 'goog.dom']);
|
||||
goog.addDependency("../../../" + dir + "/core/blocks.js", ['Blockly.Blocks'], []);
|
||||
goog.addDependency("../../../" + dir + "/core/connection.js", ['Blockly.Connection'], ['goog.asserts', 'goog.dom']);
|
||||
goog.addDependency("../../../" + dir + "/core/dragged_connection_manager.js", ['Blockly.DraggedConnectionManager'], ['Blockly.RenderedConnection', 'goog.math.Coordinate']);
|
||||
goog.addDependency("../../../" + dir + "/core/tooltip.js", ['Blockly.Tooltip'], ['goog.dom', 'goog.dom.TagName']);
|
||||
goog.addDependency("../../../" + dir + "/core/field_angle.js", ['Blockly.FieldAngle'], ['Blockly.FieldTextInput', 'goog.math', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/zoom_controls.js", ['Blockly.ZoomControls'], ['Blockly.Touch', 'goog.dom']);
|
||||
goog.addDependency("../../../" + dir + "/core/workspace.js", ['Blockly.Workspace'], ['goog.array', 'goog.math']);
|
||||
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/touch.js", ['Blockly.Touch'], ['goog.events', 'goog.events.BrowserFeature', 'goog.string']);
|
||||
goog.addDependency("../../../" + dir + "/core/generator.js", ['Blockly.Generator'], ['Blockly.Block', 'goog.asserts']);
|
||||
goog.addDependency("../../../" + dir + "/core/inject.js", ['Blockly.inject'], ['Blockly.BlockDragSurfaceSvg', 'Blockly.Css', 'Blockly.Options', 'Blockly.WorkspaceSvg', 'Blockly.WorkspaceDragSurfaceSvg', 'goog.dom', 'goog.ui.Component', 'goog.userAgent']);
|
||||
goog.addDependency("../../../" + dir + "/core/connection_db.js", ['Blockly.ConnectionDB'], ['Blockly.Connection']);
|
||||
goog.addDependency("../../browser_capabilities.js", [], []);
|
||||
goog.addDependency("../../alltests.js", [], []);
|
||||
goog.addDependency("../../protractor.conf.js", [], []);
|
||||
@@ -1659,6 +1688,7 @@ goog.addDependency("proto2/objectserializer_test.js", ['goog.proto2.ObjectSerial
|
||||
goog.require('Blockly');
|
||||
goog.require('Blockly.Block');
|
||||
goog.require('Blockly.BlockDragSurfaceSvg');
|
||||
goog.require('Blockly.BlockDragger');
|
||||
goog.require('Blockly.BlockSvg');
|
||||
goog.require('Blockly.BlockSvg.render');
|
||||
goog.require('Blockly.Blocks');
|
||||
@@ -1668,6 +1698,7 @@ goog.require('Blockly.Connection');
|
||||
goog.require('Blockly.ConnectionDB');
|
||||
goog.require('Blockly.ContextMenu');
|
||||
goog.require('Blockly.Css');
|
||||
goog.require('Blockly.DraggedConnectionManager');
|
||||
goog.require('Blockly.Events');
|
||||
goog.require('Blockly.Extensions');
|
||||
goog.require('Blockly.Field');
|
||||
@@ -1683,7 +1714,9 @@ goog.require('Blockly.FieldTextInput');
|
||||
goog.require('Blockly.FieldVariable');
|
||||
goog.require('Blockly.Flyout');
|
||||
goog.require('Blockly.FlyoutButton');
|
||||
goog.require('Blockly.FlyoutDragger');
|
||||
goog.require('Blockly.Generator');
|
||||
goog.require('Blockly.Gesture');
|
||||
goog.require('Blockly.Icon');
|
||||
goog.require('Blockly.Input');
|
||||
goog.require('Blockly.Msg');
|
||||
@@ -1705,6 +1738,7 @@ goog.require('Blockly.Warning');
|
||||
goog.require('Blockly.WidgetDiv');
|
||||
goog.require('Blockly.Workspace');
|
||||
goog.require('Blockly.WorkspaceDragSurfaceSvg');
|
||||
goog.require('Blockly.WorkspaceDragger');
|
||||
goog.require('Blockly.WorkspaceSvg');
|
||||
goog.require('Blockly.Xml');
|
||||
goog.require('Blockly.ZoomControls');
|
||||
|
||||
@@ -31,7 +31,7 @@ this.removeInput("ORDINAL",!0);a?(this.appendValueInput("AT").setCheck("Number")
|
||||
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 d=this.sourceBlock_;d.updateAt_(a,e);d.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)}};
|
||||
this.appendDummyInput("AT"+a);var c=new Blockly.FieldDropdown(this["WHERE_OPTIONS_"+a],function(c){var d="FROM_START"==c||"FROM_END"==c;if(d!=b){var f=this.sourceBlock_;f.updateAt_(a,d);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)}};
|
||||
Blockly.Blocks.lists_sort={init:function(){this.jsonInit({message0:Blockly.Msg.LISTS_SORT_TITLE,args0:[{type:"field_dropdown",name:"TYPE",options:[[Blockly.Msg.LISTS_SORT_TYPE_NUMERIC,"NUMERIC"],[Blockly.Msg.LISTS_SORT_TYPE_TEXT,"TEXT"],[Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE,"IGNORE_CASE"]]},{type:"field_dropdown",name:"DIRECTION",options:[[Blockly.Msg.LISTS_SORT_ORDER_ASCENDING,"1"],[Blockly.Msg.LISTS_SORT_ORDER_DESCENDING,"-1"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Array",colour:Blockly.Blocks.lists.HUE,
|
||||
tooltip:Blockly.Msg.LISTS_SORT_TOOLTIP,helpUrl:Blockly.Msg.LISTS_SORT_HELPURL})}};
|
||||
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);
|
||||
@@ -56,7 +56,7 @@ Blockly.Extensions.register("math_change_tooltip",Blockly.Extensions.buildToolti
|
||||
Blockly.Constants.Math.LIST_MODES_MUTATOR_EXTENSION=function(){this.getField("OP").setValidator(function(a){this.updateType_(a)}.bind(this))};Blockly.Extensions.registerMutator("math_modes_of_list_mutator",Blockly.Constants.Math.LIST_MODES_MUTATOR_MIXIN,Blockly.Constants.Math.LIST_MODES_MUTATOR_EXTENSION);Blockly.Blocks.variables={};Blockly.Constants.Variables={};Blockly.Constants.Variables.HUE=330;Blockly.Blocks.variables.HUE=Blockly.Constants.Variables.HUE;
|
||||
Blockly.defineBlocksWithJsonArray([{type:"variables_get",message0:"%1",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"}],output:null,colour:"%{BKY_VARIABLES_HUE}",helpUrl:"%{BKY_VARIABLES_GET_HELPURL}",tooltip:"%{BKY_VARIABLES_GET_TOOLTIP}",extensions:["contextMenu_variableSetterGetter"]},{type:"variables_set",message0:"%{BKY_VARIABLES_SET}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_VARIABLES_DEFAULT_NAME}"},{type:"input_value",name:"VALUE"}],previousStatement:null,
|
||||
nextStatement:null,colour:"%{BKY_VARIABLES_HUE}",tooltip:"%{BKY_VARIABLES_SET_TOOLTIP}",helpUrl:"%{BKY_VARIABLES_SET_HELPURL}",extensions:["contextMenu_variableSetterGetter"]}]);
|
||||
Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN={customContextMenu:function(a){if("variables_get"==this.type)var b="variables_set",c=Blockly.Msg.VARIABLES_GET_CREATE_SET;else b="variables_get",c=Blockly.Msg.VARIABLES_SET_CREATE_GET;var d={enabled:0<this.workspace.remainingCapacity()},e=this.getFieldValue("VAR");d.text=c.replace("%1",e);c=goog.dom.createDom("field",null,e);c.setAttribute("name","VAR");c=goog.dom.createDom("block",null,c);c.setAttribute("type",b);d.callback=
|
||||
Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN={customContextMenu:function(a){if("variables_get"==this.type){var b="variables_set";var c=Blockly.Msg.VARIABLES_GET_CREATE_SET}else b="variables_get",c=Blockly.Msg.VARIABLES_SET_CREATE_GET;var d={enabled:0<this.workspace.remainingCapacity()},e=this.getFieldValue("VAR");d.text=c.replace("%1",e);c=goog.dom.createDom("field",null,e);c.setAttribute("name","VAR");c=goog.dom.createDom("block",null,c);c.setAttribute("type",b);d.callback=
|
||||
Blockly.ContextMenu.callbackFactory(this,c);a.push(d)}};Blockly.Extensions.registerMixin("contextMenu_variableSetterGetter",Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN);Blockly.Blocks.colour={};Blockly.Constants.Colour={};Blockly.Constants.Colour.HUE=20;Blockly.Blocks.colour.HUE=Blockly.Constants.Colour.HUE;
|
||||
Blockly.defineBlocksWithJsonArray([{type:"colour_picker",message0:"%1",args0:[{type:"field_colour",name:"COLOUR",colour:"#ff0000"}],output:"Colour",colour:"%{BKY_COLOUR_HUE}",helpUrl:"%{BKY_COLOUR_PICKER_HELPURL}",tooltip:"%{BKY_COLOUR_PICKER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"colour_random",message0:"%{BKY_COLOUR_RANDOM_TITLE}",output:"Colour",colour:"%{BKY_COLOUR_HUE}",helpUrl:"%{BKY_COLOUR_RANDOM_HELPURL}",tooltip:"%{BKY_COLOUR_RANDOM_TOOLTIP}"},{type:"colour_rgb",message0:"%{BKY_COLOUR_RGB_TITLE} %{BKY_COLOUR_RGB_RED} %1 %{BKY_COLOUR_RGB_GREEN} %2 %{BKY_COLOUR_RGB_BLUE} %3",
|
||||
args0:[{type:"input_value",name:"RED",check:"Number",align:"RIGHT"},{type:"input_value",name:"GREEN",check:"Number",align:"RIGHT"},{type:"input_value",name:"BLUE",check:"Number",align:"RIGHT"}],output:"Colour",colour:"%{BKY_COLOUR_HUE}",helpUrl:"%{BKY_COLOUR_RGB_HELPURL}",tooltip:"%{BKY_COLOUR_RGB_TOOLTIP}"},{type:"colour_blend",message0:"%{BKY_COLOUR_BLEND_TITLE} %{BKY_COLOUR_BLEND_COLOUR1} %1 %{BKY_COLOUR_BLEND_COLOUR2} %2 %{BKY_COLOUR_BLEND_RATIO} %3",args0:[{type:"input_value",name:"COLOUR1",
|
||||
@@ -68,7 +68,7 @@ mutationToDom:function(a){var b=document.createElement("mutation");a&&b.setAttri
|
||||
this.arguments_.push(c.getAttribute("name"));this.updateParams_();Blockly.Procedures.mutateCallers(this);this.setStatements_("false"!==a.getAttribute("statements"))},decompose:function(a){var b=a.newBlock("procedures_mutatorcontainer");b.initSvg();this.getInput("RETURN")?b.setFieldValue(this.hasStatements_?"TRUE":"FALSE","STATEMENTS"):b.getInput("STATEMENT_INPUT").setVisible(!1);for(var c=b.getInput("STACK").connection,d=0;d<this.arguments_.length;d++){var e=a.newBlock("procedures_mutatorarg");e.initSvg();
|
||||
e.setFieldValue(this.arguments_[d],"NAME");e.oldLocation=d;c.connect(e.previousConnection);c=e.nextConnection}Blockly.Procedures.mutateCallers(this);return b},compose:function(a){this.arguments_=[];this.paramIds_=[];for(var b=a.getInputTargetBlock("STACK");b;)this.arguments_.push(b.getFieldValue("NAME")),this.paramIds_.push(b.id),b=b.nextConnection&&b.nextConnection.targetBlock();this.updateParams_();Blockly.Procedures.mutateCallers(this);a=a.getFieldValue("STATEMENTS");if(null!==a&&(a="TRUE"==a,
|
||||
this.hasStatements_!=a))if(a)this.setStatements_(!0),Blockly.Mutator.reconnect(this.statementConnection_,this,"STACK"),this.statementConnection_=null;else{a=this.getInput("STACK").connection;if(this.statementConnection_=a.targetConnection)a=a.targetBlock(),a.unplug(),a.bumpNeighbours_();this.setStatements_(!1)}},getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!1]},getVars:function(){return this.arguments_},renameVar:function(a,b){for(var c=!1,d=0;d<this.arguments_.length;d++)Blockly.Names.equals(a,
|
||||
this.arguments_[d])&&(this.arguments_[d]=b,c=!0);if(c&&(this.updateParams_(),this.mutator.isVisible()))for(var c=this.mutator.workspace_.getAllBlocks(),d=0,e;e=c[d];d++)"procedures_mutatorarg"==e.type&&Blockly.Names.equals(a,e.getFieldValue("NAME"))&&e.setFieldValue(b,"NAME")},customContextMenu:function(a){var b={enabled:!0},c=this.getFieldValue("NAME");b.text=Blockly.Msg.PROCEDURES_CREATE_DO.replace("%1",c);var d=goog.dom.createDom("mutation");d.setAttribute("name",c);for(var e=0;e<this.arguments_.length;e++)c=
|
||||
this.arguments_[d])&&(this.arguments_[d]=b,c=!0);if(c&&(this.updateParams_(),this.mutator.isVisible()))for(var c=this.mutator.workspace_.getAllBlocks(),d=0,e;e=c[d];d++)"procedures_mutatorarg"==e.type&&Blockly.Names.equals(a,e.getFieldValue("NAME"))&&e.setFieldValue(b,"NAME")},customContextMenu:function(a){var b={enabled:!0};var c=this.getFieldValue("NAME");b.text=Blockly.Msg.PROCEDURES_CREATE_DO.replace("%1",c);var d=goog.dom.createDom("mutation");d.setAttribute("name",c);for(var e=0;e<this.arguments_.length;e++)c=
|
||||
goog.dom.createDom("arg"),c.setAttribute("name",this.arguments_[e]),d.appendChild(c);d=goog.dom.createDom("block",null,d);d.setAttribute("type",this.callType_);b.callback=Blockly.ContextMenu.callbackFactory(this,d);a.push(b);if(!this.isCollapsed())for(e=0;e<this.arguments_.length;e++)b={enabled:!0},c=this.arguments_[e],b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",c),d=goog.dom.createDom("field",null,c),d.setAttribute("name","VAR"),d=goog.dom.createDom("block",null,d),d.setAttribute("type",
|
||||
"variables_get"),b.callback=Blockly.ContextMenu.callbackFactory(this,d),a.push(b)},callType_:"procedures_callnoreturn"};
|
||||
Blockly.Blocks.procedures_defreturn={init:function(){var a=new Blockly.FieldTextInput("",Blockly.Procedures.rename);a.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFRETURN_TITLE).appendField(a,"NAME").appendField("","PARAMS");this.appendValueInput("RETURN").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"]));(this.workspace.options.comments||this.workspace.options.parentWorkspace&&
|
||||
@@ -78,12 +78,12 @@ callType_:"procedures_callreturn"};Blockly.Blocks.procedures_mutatorcontainer={i
|
||||
Blockly.Blocks.procedures_mutatorarg={init:function(){var a=new Blockly.FieldTextInput("x",this.validator_);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_MUTATORARG_TITLE).appendField(a,"NAME");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setColour(Blockly.Blocks.procedures.HUE);this.setTooltip(Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP);this.contextMenu=!1;a.onFinishEditing_=this.createNewVar_;a.onFinishEditing_("x")},validator_:function(a){return(a=a.replace(/[\s\xa0]+/g,
|
||||
" ").replace(/^ | $/g,""))||null},createNewVar_:function(a){var b=this.sourceBlock_;b&&b.workspace&&b.workspace.options&&b.workspace.options.parentWorkspace&&b.workspace.options.parentWorkspace.createVariable(a)}};
|
||||
Blockly.Blocks.procedures_callnoreturn={init:function(){this.appendDummyInput("TOPROW").appendField(this.id,"NAME");this.setPreviousStatement(!0);this.setNextStatement(!0);this.setColour(Blockly.Blocks.procedures.HUE);this.setHelpUrl(Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL);this.arguments_=[];this.quarkConnections_={};this.quarkIds_=null},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,b){var c=Blockly.Procedures.getDefinition(this.getProcedureCall(),this.workspace),d=c&&c.mutator&&c.mutator.isVisible();d||(this.quarkConnections_={},this.quarkIds_=null);if(b)if(goog.array.equals(this.arguments_,a))this.quarkIds_=b;else{if(b.length!=a.length)throw"Error: paramNames and paramIds must be the same length.";
|
||||
this.setCollapsed(!1);this.quarkIds_||(this.quarkConnections_={},a.join("\n")==this.arguments_.join("\n")?this.quarkIds_=b:this.quarkIds_=[]);c=this.rendered;this.rendered=!1;for(var e=0;e<this.arguments_.length;e++){var f=this.getInput("ARG"+e);f&&(f=f.connection.targetConnection,this.quarkConnections_[this.quarkIds_[e]]=f,d&&f&&-1==b.indexOf(this.quarkIds_[e])&&(f.disconnect(),f.getSourceBlock().bumpNeighbours_()))}this.arguments_=[].concat(a);this.updateShape_();if(this.quarkIds_=b)for(e=0;e<this.arguments_.length;e++)d=
|
||||
this.quarkIds_[e],d in this.quarkConnections_&&(f=this.quarkConnections_[d],Blockly.Mutator.reconnect(f,this,"ARG"+e)||delete this.quarkConnections_[d]);(this.rendered=c)&&this.render()}},updateShape_:function(){for(var a=0;a<this.arguments_.length;a++){var b=this.getField("ARGNAME"+a);if(b){Blockly.Events.disable();try{b.setValue(this.arguments_[a])}finally{Blockly.Events.enable()}}else b=new Blockly.FieldLabel(this.arguments_[a]),this.appendValueInput("ARG"+a).setAlign(Blockly.ALIGN_RIGHT).appendField(b,
|
||||
"NAME"),this.setTooltip((this.outputConnection?Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP:Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP).replace("%1",b)))},setProcedureParameters_:function(a,b){var c,d=Blockly.Procedures.getDefinition(this.getProcedureCall(),this.workspace);var e=d&&d.mutator&&d.mutator.isVisible();e||(this.quarkConnections_={},this.quarkIds_=null);if(b)if(goog.array.equals(this.arguments_,a))this.quarkIds_=b;else{if(b.length!=a.length)throw"Error: paramNames and paramIds must be the same length.";
|
||||
this.setCollapsed(!1);this.quarkIds_||(this.quarkConnections_={},a.join("\n")==this.arguments_.join("\n")?this.quarkIds_=b:this.quarkIds_=[]);d=this.rendered;this.rendered=!1;for(var f=0;f<this.arguments_.length;f++)if(c=this.getInput("ARG"+f))c=c.connection.targetConnection,this.quarkConnections_[this.quarkIds_[f]]=c,e&&c&&-1==b.indexOf(this.quarkIds_[f])&&(c.disconnect(),c.getSourceBlock().bumpNeighbours_());this.arguments_=[].concat(a);this.updateShape_();if(this.quarkIds_=b)for(f=0;f<this.arguments_.length;f++)e=
|
||||
this.quarkIds_[f],e in this.quarkConnections_&&(c=this.quarkConnections_[e],Blockly.Mutator.reconnect(c,this,"ARG"+f)||delete this.quarkConnections_[e]);(this.rendered=d)&&this.render()}},updateShape_:function(){for(var a=0;a<this.arguments_.length;a++){var b=this.getField("ARGNAME"+a);if(b){Blockly.Events.disable();try{b.setValue(this.arguments_[a])}finally{Blockly.Events.enable()}}else b=new Blockly.FieldLabel(this.arguments_[a]),this.appendValueInput("ARG"+a).setAlign(Blockly.ALIGN_RIGHT).appendField(b,
|
||||
"ARGNAME"+a).init()}for(;this.getInput("ARG"+a);)this.removeInput("ARG"+a),a++;if(a=this.getInput("TOPROW"))this.arguments_.length?this.getField("WITH")||(a.appendField(Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS,"WITH"),a.init()):this.getField("WITH")&&a.removeField("WITH")},mutationToDom:function(){var a=document.createElement("mutation");a.setAttribute("name",this.getProcedureCall());for(var b=0;b<this.arguments_.length;b++){var c=document.createElement("arg");c.setAttribute("name",this.arguments_[b]);
|
||||
a.appendChild(c)}return a},domToMutation:function(a){var b=a.getAttribute("name");this.renameProcedure(this.getProcedureCall(),b);for(var b=[],c=[],d=0,e;e=a.childNodes[d];d++)"arg"==e.nodeName.toLowerCase()&&(b.push(e.getAttribute("name")),c.push(e.getAttribute("paramId")));this.setProcedureParameters_(b,c)},renameVar:function(a,b){for(var c=0;c<this.arguments_.length;c++)Blockly.Names.equals(a,this.arguments_[c])&&(this.arguments_[c]=b,this.getField("ARGNAME"+c).setValue(b))},onchange:function(a){if(this.workspace&&
|
||||
!this.workspace.isFlyout)if(a.type==Blockly.Events.CREATE&&-1!=a.ids.indexOf(this.id)){var b=this.getProcedureCall(),b=Blockly.Procedures.getDefinition(b,this.workspace);!b||b.type==this.defType_&&JSON.stringify(b.arguments_)==JSON.stringify(this.arguments_)||(b=null);if(!b){Blockly.Events.setGroup(a.group);a=goog.dom.createDom("xml");b=goog.dom.createDom("block");b.setAttribute("type",this.defType_);var c=this.getRelativeToSurfaceXY(),d=c.y+2*Blockly.SNAP_RADIUS;b.setAttribute("x",c.x+Blockly.SNAP_RADIUS*
|
||||
!this.workspace.isFlyout)if(a.type==Blockly.Events.CREATE&&-1!=a.ids.indexOf(this.id)){var b=this.getProcedureCall();b=Blockly.Procedures.getDefinition(b,this.workspace);!b||b.type==this.defType_&&JSON.stringify(b.arguments_)==JSON.stringify(this.arguments_)||(b=null);if(!b){Blockly.Events.setGroup(a.group);a=goog.dom.createDom("xml");b=goog.dom.createDom("block");b.setAttribute("type",this.defType_);var c=this.getRelativeToSurfaceXY(),d=c.y+2*Blockly.SNAP_RADIUS;b.setAttribute("x",c.x+Blockly.SNAP_RADIUS*
|
||||
(this.RTL?-1:1));b.setAttribute("y",d);c=this.mutationToDom();b.appendChild(c);c=goog.dom.createDom("field");c.setAttribute("name","NAME");c.appendChild(document.createTextNode(this.getProcedureCall()));b.appendChild(c);a.appendChild(b);Blockly.Xml.domToWorkspace(a,this.workspace);Blockly.Events.setGroup(!1)}}else a.type==Blockly.Events.DELETE&&(b=this.getProcedureCall(),b=Blockly.Procedures.getDefinition(b,this.workspace),b||(Blockly.Events.setGroup(a.group),this.dispose(!0,!1),Blockly.Events.setGroup(!1)))},
|
||||
customContextMenu:function(a){var b={enabled:!0};b.text=Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF;var c=this.getProcedureCall(),d=this.workspace;b.callback=function(){var a=Blockly.Procedures.getDefinition(c,d);a&&a.select()};a.push(b)},defType_:"procedures_defnoreturn"};
|
||||
Blockly.Blocks.procedures_callreturn={init:function(){this.appendDummyInput("TOPROW").appendField("","NAME");this.setOutput(!0);this.setColour(Blockly.Blocks.procedures.HUE);this.setHelpUrl(Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL);this.arguments_=[];this.quarkConnections_={};this.quarkIds_=null},getProcedureCall:Blockly.Blocks.procedures_callnoreturn.getProcedureCall,renameProcedure:Blockly.Blocks.procedures_callnoreturn.renameProcedure,setProcedureParameters_:Blockly.Blocks.procedures_callnoreturn.setProcedureParameters_,
|
||||
@@ -111,7 +111,7 @@ function(b){var c="FROM_START"==b||"FROM_END"==b;if(c!=a){var e=this.sourceBlock
|
||||
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 d=this.sourceBlock_;d.updateAt_(a,e);d.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&this.moveInputBefore("AT1","AT2")}};
|
||||
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 d="FROM_START"==c||"FROM_END"==c;if(d!=b){var f=this.sourceBlock_;f.updateAt_(a,d);f.setFieldValue(c,"WHERE"+a);return null}});this.getInput("AT"+a).appendField(c,"WHERE"+a);1==a&&this.moveInputBefore("AT1","AT2")}};
|
||||
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)}};
|
||||
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)}};
|
||||
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})}};
|
||||
|
||||
+1
-1
@@ -311,7 +311,7 @@ Blockly.Block.prototype.getConnections_ = function() {
|
||||
/**
|
||||
* Walks down a stack of blocks and finds the last next connection on the stack.
|
||||
* @return {Blockly.Connection} The last next connection on the stack, or null.
|
||||
* @private
|
||||
* @package
|
||||
*/
|
||||
Blockly.Block.prototype.lastConnectionInStack_ = function() {
|
||||
var nextConnection = this.nextConnection;
|
||||
|
||||
+42
-13
@@ -80,6 +80,15 @@ Blockly.BlockDragSurfaceSvg.prototype.container_ = null;
|
||||
*/
|
||||
Blockly.BlockDragSurfaceSvg.prototype.scale_ = 1;
|
||||
|
||||
/**
|
||||
* Cached value for the translation of the drag surface.
|
||||
* This translation is in pixel units, because the scale is applied to the
|
||||
* drag group rather than the top-level SVG.
|
||||
* @type {goog.math.Coordinate}
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockDragSurfaceSvg.prototype.surfaceXY_ = null;
|
||||
|
||||
/**
|
||||
* Create the drag surface and inject it into the container.
|
||||
*/
|
||||
@@ -109,6 +118,7 @@ Blockly.BlockDragSurfaceSvg.prototype.setBlocksAndShow = function(blocks) {
|
||||
// appendChild removes the blocks from the previous parent
|
||||
this.dragGroup_.appendChild(blocks);
|
||||
this.SVG_.style.display = 'block';
|
||||
this.surfaceXY_ = new goog.math.Coordinate(0, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -128,6 +138,23 @@ Blockly.BlockDragSurfaceSvg.prototype.translateAndScaleGroup = function(x, y, sc
|
||||
' scale(' + scale + ')');
|
||||
};
|
||||
|
||||
/**
|
||||
* Translate the drag surface's SVG based on its internal state.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockDragSurfaceSvg.prototype.translateSurfaceInternal_ = function() {
|
||||
var x = this.surfaceXY_.x;
|
||||
var y = this.surfaceXY_.y;
|
||||
// This is a work-around to prevent a the blocks from rendering
|
||||
// fuzzy while they are being dragged on the drag surface.
|
||||
x = x.toFixed(0);
|
||||
y = y.toFixed(0);
|
||||
this.SVG_.style.display = 'block';
|
||||
|
||||
Blockly.utils.setCssTransform(this.SVG_,
|
||||
'translate3d(' + x + 'px, ' + y + 'px, 0px)');
|
||||
};
|
||||
|
||||
/**
|
||||
* Translate the entire drag surface during a drag.
|
||||
* We translate the drag surface instead of the blocks inside the surface
|
||||
@@ -137,15 +164,8 @@ Blockly.BlockDragSurfaceSvg.prototype.translateAndScaleGroup = function(x, y, sc
|
||||
* @param {number} y Y translation for the entire surface.
|
||||
*/
|
||||
Blockly.BlockDragSurfaceSvg.prototype.translateSurface = function(x, y) {
|
||||
x *= this.scale_;
|
||||
y *= this.scale_;
|
||||
// This is a work-around to prevent a the blocks from rendering
|
||||
// fuzzy while they are being dragged on the drag surface.
|
||||
x = x.toFixed(0);
|
||||
y = y.toFixed(0);
|
||||
this.SVG_.style.display = 'block';
|
||||
Blockly.utils.setCssTransform(this.SVG_,
|
||||
'translate3d(' + x + 'px, ' + y + 'px, 0px)');
|
||||
this.surfaceXY_ = new goog.math.Coordinate(x * this.scale_, y * this.scale_);
|
||||
this.translateSurfaceInternal_();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -180,12 +200,21 @@ Blockly.BlockDragSurfaceSvg.prototype.getCurrentBlock = function() {
|
||||
/**
|
||||
* Clear the group and hide the surface; move the blocks off onto the provided
|
||||
* element.
|
||||
* @param {!Element} newSurface Surface the dragging blocks should be moved to.
|
||||
* If the block is being deleted it doesn't need to go back to the original
|
||||
* surface, since it would be removed immediately during dispose.
|
||||
* @param {Element} opt_newSurface Surface the dragging blocks should be moved
|
||||
* to, or null if the blocks should be removed from this surface without
|
||||
* being moved to a different surface.
|
||||
*/
|
||||
Blockly.BlockDragSurfaceSvg.prototype.clearAndHide = function(newSurface) {
|
||||
// appendChild removes the node from this.dragGroup_
|
||||
newSurface.appendChild(this.getCurrentBlock());
|
||||
Blockly.BlockDragSurfaceSvg.prototype.clearAndHide = function(opt_newSurface) {
|
||||
if (opt_newSurface) {
|
||||
// appendChild removes the node from this.dragGroup_
|
||||
opt_newSurface.appendChild(this.getCurrentBlock());
|
||||
} else {
|
||||
this.dragGroup_.removeChild(this.getCurrentBlock());
|
||||
}
|
||||
this.SVG_.style.display = 'none';
|
||||
goog.asserts.assert(this.dragGroup_.childNodes.length == 0,
|
||||
'Drag group was not cleared.');
|
||||
this.surfaceXY_ = null;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,324 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Editor
|
||||
*
|
||||
* Copyright 2017 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 Methods for dragging a block visually.
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.BlockDragger');
|
||||
|
||||
goog.require('Blockly.DraggedConnectionManager');
|
||||
|
||||
goog.require('goog.math.Coordinate');
|
||||
goog.require('goog.asserts');
|
||||
|
||||
|
||||
/**
|
||||
* Class for a block dragger. It moves blocks around the workspace when they
|
||||
* are being dragged by a mouse or touch.
|
||||
* @param {!Blockly.Block} block The block to drag.
|
||||
* @param {!Blockly.WorkspaceSvg} workspace The workspace to drag on.
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.BlockDragger = function(block, workspace) {
|
||||
/**
|
||||
* The top block in the stack that is being dragged.
|
||||
* @type {!Blockly.BlockSvg}
|
||||
* @private
|
||||
*/
|
||||
this.draggingBlock_ = block;
|
||||
|
||||
/**
|
||||
* The workspace on which the block is being dragged.
|
||||
* @type {!Blockly.WorkspaceSvg}
|
||||
* @private
|
||||
*/
|
||||
this.workspace_ = workspace;
|
||||
|
||||
/**
|
||||
* Object that keeps track of connections on dragged blocks.
|
||||
* @type {!Blockly.DraggedConnectionManager}
|
||||
* @private
|
||||
*/
|
||||
this.draggedConnectionManager_ = new Blockly.DraggedConnectionManager(
|
||||
this.draggingBlock_);
|
||||
|
||||
/**
|
||||
* Which delete area the mouse pointer is over, if any.
|
||||
* One of {@link Blockly.DELETE_AREA_TRASH},
|
||||
* {@link Blockly.DELETE_AREA_TOOLBOX}, or {@link Blockly.DELETE_AREA_NONE}.
|
||||
* @type {?number}
|
||||
* @private
|
||||
*/
|
||||
this.deleteArea_ = null;
|
||||
|
||||
/**
|
||||
* Whether the block would be deleted if dropped immediately.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.wouldDeleteBlock_ = false;
|
||||
|
||||
/**
|
||||
* The location of the top left corner of the dragging block at the beginning
|
||||
* of the drag in workspace coordinates.
|
||||
* @type {!goog.math.Coordinate}
|
||||
* @private
|
||||
*/
|
||||
this.startXY_ = this.draggingBlock_.getRelativeToSurfaceXY();
|
||||
|
||||
/**
|
||||
* A list of all of the icons (comment, warning, and mutator) that are
|
||||
* on this block and its descendants. Moving an icon moves the bubble that
|
||||
* extends from it if that bubble is open.
|
||||
* @type {Array.<!Object>}
|
||||
* @private
|
||||
*/
|
||||
this.dragIconData_ = Blockly.BlockDragger.initIconData_(block);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sever all links from this object.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.dispose = function() {
|
||||
this.draggingBlock_ = null;
|
||||
this.workspace_ = null;
|
||||
this.startWorkspace_ = null;
|
||||
this.dragIconData_.length = 0;
|
||||
|
||||
if (this.draggedConnectionManager_) {
|
||||
this.draggedConnectionManager_.dispose();
|
||||
this.draggedConnectionManager_ = null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Make a list of all of the icons (comment, warning, and mutator) that are
|
||||
* on this block and its descendants. Moving an icon moves the bubble that
|
||||
* extends from it if that bubble is open.
|
||||
* @param {!Blockly.BlockSvg} block The root block that is being dragged.
|
||||
* @return {!Array.<!Object>} The list of all icons and their locations.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockDragger.initIconData_ = function(block) {
|
||||
// Build a list of icons that need to be moved and where they started.
|
||||
var dragIconData = [];
|
||||
var descendants = block.getDescendants();
|
||||
for (var i = 0, descendant; descendant = descendants[i]; i++) {
|
||||
var icons = descendant.getIcons();
|
||||
for (var j = 0; j < icons.length; j++) {
|
||||
var data = {
|
||||
// goog.math.Coordinate with x and y properties (workspace coordinates).
|
||||
location: icons[j].getIconLocation(),
|
||||
// Blockly.Icon
|
||||
icon: icons[j]
|
||||
};
|
||||
dragIconData.push(data);
|
||||
}
|
||||
}
|
||||
return dragIconData;
|
||||
};
|
||||
|
||||
/**
|
||||
* Start dragging a block. This includes moving it to the drag surface.
|
||||
* @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has
|
||||
* moved from the position at mouse down, in pixel units.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.startBlockDrag = function(currentDragDeltaXY) {
|
||||
if (!Blockly.Events.getGroup()) {
|
||||
Blockly.Events.setGroup(true);
|
||||
}
|
||||
|
||||
this.workspace_.setResizesEnabled(false);
|
||||
Blockly.BlockSvg.disconnectUiStop_();
|
||||
|
||||
if (this.draggingBlock_.getParent()) {
|
||||
this.draggingBlock_.unplug();
|
||||
var delta = this.pixelsToWorkspaceUnits_(currentDragDeltaXY);
|
||||
var newLoc = goog.math.Coordinate.sum(this.startXY_, delta);
|
||||
|
||||
this.draggingBlock_.translate(newLoc.x, newLoc.y);
|
||||
this.draggingBlock_.disconnectUiEffect();
|
||||
}
|
||||
this.draggingBlock_.setDragging(true);
|
||||
// For future consideration: we may be able to put moveToDragSurface inside
|
||||
// the block dragger, which would also let the block not track the block drag
|
||||
// surface.
|
||||
this.draggingBlock_.moveToDragSurface_();
|
||||
|
||||
if (this.workspace_.toolbox_) {
|
||||
this.workspace_.toolbox_.addDeleteStyle();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Execute a step of block dragging, based on the given event. Update the
|
||||
* display accordingly.
|
||||
* @param {!Event} e The most recent move event.
|
||||
* @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has
|
||||
* moved from the position at the start of the drag, in pixel units.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.dragBlock = function(e, currentDragDeltaXY) {
|
||||
var delta = this.pixelsToWorkspaceUnits_(currentDragDeltaXY);
|
||||
var newLoc = goog.math.Coordinate.sum(this.startXY_, delta);
|
||||
|
||||
this.draggingBlock_.moveDuringDrag(newLoc);
|
||||
this.dragIcons_(delta);
|
||||
|
||||
this.deleteArea_ = this.workspace_.isDeleteArea(e);
|
||||
this.draggedConnectionManager_.update(delta, this.deleteArea_);
|
||||
|
||||
this.updateCursorDuringBlockDrag_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Finish a block drag and put the block back on the workspace.
|
||||
* @param {!Event} e The mouseup/touchend event.
|
||||
* @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has
|
||||
* moved from the position at the start of the drag, in pixel units.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.endBlockDrag = function(e, currentDragDeltaXY) {
|
||||
// Make sure internal state is fresh.
|
||||
this.dragBlock(e, currentDragDeltaXY);
|
||||
this.dragIconData_ = [];
|
||||
|
||||
Blockly.BlockSvg.disconnectUiStop_();
|
||||
|
||||
var delta = this.pixelsToWorkspaceUnits_(currentDragDeltaXY);
|
||||
var newLoc = goog.math.Coordinate.sum(this.startXY_, delta);
|
||||
this.draggingBlock_.moveOffDragSurface_(newLoc);
|
||||
|
||||
var deleted = this.maybeDeleteBlock_();
|
||||
if (!deleted) {
|
||||
// These are expensive and don't need to be done if we're deleting.
|
||||
this.draggingBlock_.moveConnections_(delta.x, delta.y);
|
||||
this.draggingBlock_.setDragging(false);
|
||||
this.draggedConnectionManager_.applyConnections();
|
||||
this.draggingBlock_.render();
|
||||
this.fireMoveEvent_();
|
||||
this.draggingBlock_.scheduleSnapAndBump();
|
||||
}
|
||||
this.workspace_.setResizesEnabled(true);
|
||||
|
||||
if (this.workspace_.toolbox_) {
|
||||
this.workspace_.toolbox_.removeDeleteStyle();
|
||||
}
|
||||
Blockly.Events.setGroup(false);
|
||||
};
|
||||
|
||||
/**
|
||||
* Fire a move event at the end of a block drag.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.fireMoveEvent_ = function() {
|
||||
var event = new Blockly.Events.Move(this.draggingBlock_);
|
||||
event.oldCoordinate = this.startXY_;
|
||||
event.recordNew();
|
||||
Blockly.Events.fire(event);
|
||||
};
|
||||
|
||||
/**
|
||||
* Shut the trash can and, if necessary, delete the dragging block.
|
||||
* Should be called at the end of a block drag.
|
||||
* @return {boolean} whether the block was deleted.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.maybeDeleteBlock_ = function() {
|
||||
var trashcan = this.workspace_.trashcan;
|
||||
|
||||
if (this.wouldDeleteBlock_) {
|
||||
if (trashcan) {
|
||||
goog.Timer.callOnce(trashcan.close, 100, trashcan);
|
||||
}
|
||||
// Fire a move event, so we know where to go back to for an undo.
|
||||
this.fireMoveEvent_();
|
||||
this.draggingBlock_.dispose(false, true);
|
||||
} else if (trashcan) {
|
||||
// Make sure the trash can is closed.
|
||||
trashcan.close();
|
||||
}
|
||||
return this.wouldDeleteBlock_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Update the cursor (and possibly the trash can lid) to reflect whether the
|
||||
* dragging block would be deleted if released immediately.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.updateCursorDuringBlockDrag_ = function() {
|
||||
this.wouldDeleteBlock_ = this.draggedConnectionManager_.wouldDeleteBlock();
|
||||
var trashcan = this.workspace_.trashcan;
|
||||
if (this.wouldDeleteBlock_) {
|
||||
this.draggingBlock_.setDeleteStyle(true);
|
||||
if (this.deleteArea_ == Blockly.DELETE_AREA_TRASH && trashcan) {
|
||||
trashcan.setOpen_(true);
|
||||
}
|
||||
} else {
|
||||
this.draggingBlock_.setDeleteStyle(false);
|
||||
if (trashcan) {
|
||||
trashcan.setOpen_(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert a coordinate object from pixels to workspace units, including a
|
||||
* correction for mutator workspaces.
|
||||
* This function does not consider differing origins. It simply scales the
|
||||
* input's x and y values.
|
||||
* @param {!goog.math.Coordinate} pixelCoord A coordinate with x and y values
|
||||
* in css pixel units.
|
||||
* @return {!goog.math.Coordinate} The input coordinate divided by the workspace
|
||||
* scale.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.pixelsToWorkspaceUnits_ = function(pixelCoord) {
|
||||
var result = new goog.math.Coordinate(pixelCoord.x / this.workspace_.scale,
|
||||
pixelCoord.y / this.workspace_.scale);
|
||||
if (this.workspace_.isMutator) {
|
||||
// If we're in a mutator, its scale is always 1, purely because of some
|
||||
// oddities in our rendering optimizations. The actual scale is the same as
|
||||
// the scale on the parent workspace.
|
||||
// Fix that for dragging.
|
||||
var mainScale = this.workspace_.options.parentWorkspace.scale;
|
||||
result = result.scale(1 / mainScale);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Move all of the icons connected to this drag.
|
||||
* @param {!goog.math.Coordinate} dxy How far to move the icons from their
|
||||
* original positions, in workspace units.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockDragger.prototype.dragIcons_ = function(dxy) {
|
||||
// Moving icons moves their associated bubbles.
|
||||
for (var i = 0; i < this.dragIconData_.length; i++) {
|
||||
var data = this.dragIconData_[i];
|
||||
data.icon.setIconLocation(goog.math.Coordinate.sum(data.location, dxy));
|
||||
}
|
||||
};
|
||||
+80
-360
@@ -56,6 +56,7 @@ Blockly.BlockSvg = function(workspace, prototypeName, opt_id) {
|
||||
* @private
|
||||
*/
|
||||
this.svgGroup_ = Blockly.utils.createSvgElement('g', {}, null);
|
||||
this.svgGroup_.translate_ = '';
|
||||
|
||||
/**
|
||||
* @type {SVGElement}
|
||||
@@ -140,9 +141,6 @@ Blockly.BlockSvg.prototype.initSvg = function() {
|
||||
if (!this.workspace.options.readOnly && !this.eventsInit_) {
|
||||
Blockly.bindEventWithChecks_(this.getSvgRoot(), 'mousedown', this,
|
||||
this.onMouseDown_);
|
||||
var thisBlock = this;
|
||||
Blockly.bindEvent_(this.getSvgRoot(), 'touchstart', null,
|
||||
function(e) {Blockly.longStart_(e, thisBlock);});
|
||||
}
|
||||
this.eventsInit_ = true;
|
||||
|
||||
@@ -231,69 +229,6 @@ Blockly.BlockSvg.prototype.getIcons = function() {
|
||||
return icons;
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrapper function called when a mouseUp occurs during a drag operation.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.onMouseUpWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Wrapper function called when a mouseMove occurs during a drag operation.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.onMouseMoveWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Stop binding to the global mouseup and mousemove events.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockSvg.terminateDrag = function() {
|
||||
Blockly.BlockSvg.disconnectUiStop_();
|
||||
if (Blockly.BlockSvg.onMouseUpWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.BlockSvg.onMouseUpWrapper_);
|
||||
Blockly.BlockSvg.onMouseUpWrapper_ = null;
|
||||
}
|
||||
if (Blockly.BlockSvg.onMouseMoveWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.BlockSvg.onMouseMoveWrapper_);
|
||||
Blockly.BlockSvg.onMouseMoveWrapper_ = null;
|
||||
}
|
||||
var selected = Blockly.selected;
|
||||
if (Blockly.dragMode_ == Blockly.DRAG_FREE) {
|
||||
// Terminate a drag operation.
|
||||
if (selected) {
|
||||
// Update the connection locations.
|
||||
var xy = selected.getRelativeToSurfaceXY();
|
||||
var dxy = goog.math.Coordinate.difference(xy, selected.dragStartXY_);
|
||||
var event = new Blockly.Events.Move(selected);
|
||||
event.oldCoordinate = selected.dragStartXY_;
|
||||
event.recordNew();
|
||||
Blockly.Events.fire(event);
|
||||
|
||||
selected.moveConnections_(dxy.x, dxy.y);
|
||||
delete selected.draggedBubbles_;
|
||||
selected.setDragging_(false);
|
||||
selected.moveOffDragSurface_();
|
||||
selected.render();
|
||||
selected.workspace.setResizesEnabled(true);
|
||||
// Ensure that any snap and bump are part of this move's event group.
|
||||
var group = Blockly.Events.getGroup();
|
||||
setTimeout(function() {
|
||||
Blockly.Events.setGroup(group);
|
||||
selected.snapToGrid();
|
||||
Blockly.Events.setGroup(false);
|
||||
}, Blockly.BUMP_DELAY / 2);
|
||||
setTimeout(function() {
|
||||
Blockly.Events.setGroup(group);
|
||||
selected.bumpNeighbours_();
|
||||
Blockly.Events.setGroup(false);
|
||||
}, Blockly.BUMP_DELAY);
|
||||
}
|
||||
}
|
||||
Blockly.dragMode_ = Blockly.DRAG_NONE;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set parent of this block to be a new block or null.
|
||||
* @param {Blockly.BlockSvg} newParent New parent block.
|
||||
@@ -326,6 +261,8 @@ Blockly.BlockSvg.prototype.setParent = function(newParent) {
|
||||
/**
|
||||
* Return the coordinates of the top-left corner of this block relative to the
|
||||
* drawing surface's origin (0,0), in workspace units.
|
||||
* If the block is on the workspace, (0, 0) is the origin of the workspace
|
||||
* coordinate system.
|
||||
* This does not change with workspace scale.
|
||||
* @return {!goog.math.Coordinate} Object with .x and .y properties in
|
||||
* workspace coordinates.
|
||||
@@ -399,6 +336,7 @@ Blockly.BlockSvg.prototype.moveToDragSurface_ = function() {
|
||||
// The translation for drag surface blocks,
|
||||
// is equal to the current relative-to-surface position,
|
||||
// to keep the position in sync as it move on/off the surface.
|
||||
// This is in workspace coordinates.
|
||||
var xy = this.getRelativeToSurfaceXY();
|
||||
this.clearTransformAttributes_();
|
||||
this.workspace.blockDragSurface_.translateSurface(xy.x, xy.y);
|
||||
@@ -410,19 +348,37 @@ Blockly.BlockSvg.prototype.moveToDragSurface_ = function() {
|
||||
* Move this block back to the workspace block canvas.
|
||||
* Generally should be called at the same time as setDragging_(false).
|
||||
* Does nothing if useDragSurface_ is false.
|
||||
* @param {!goog.math.Coordinate} newXY The position the block should take on
|
||||
* on the workspace canvas, in workspace coordinates.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.moveOffDragSurface_ = function() {
|
||||
Blockly.BlockSvg.prototype.moveOffDragSurface_ = function(newXY) {
|
||||
if (!this.useDragSurface_) {
|
||||
return;
|
||||
}
|
||||
// Translate to current position, turning off 3d.
|
||||
var xy = this.getRelativeToSurfaceXY();
|
||||
this.clearTransformAttributes_();
|
||||
this.translate(xy.x, xy.y);
|
||||
this.translate(newXY.x, newXY.y);
|
||||
this.workspace.blockDragSurface_.clearAndHide(this.workspace.getCanvas());
|
||||
};
|
||||
|
||||
/**
|
||||
* Move this block during a drag, taking into account whether we are using a
|
||||
* drag surface to translate blocks.
|
||||
* This block must be a top-level block.
|
||||
* @param {!goog.math.Coordinate} newLoc The location to translate to, in
|
||||
* workspace coordinates.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.moveDuringDrag = function(newLoc) {
|
||||
if (this.useDragSurface_) {
|
||||
this.workspace.blockDragSurface_.translateSurface(newLoc.x, newLoc.y);
|
||||
} else {
|
||||
this.svgGroup_.translate_ = 'translate(' + newLoc.x + ',' + newLoc.y + ')';
|
||||
this.svgGroup_.setAttribute('transform',
|
||||
this.svgGroup_.translate_ + this.svgGroup_.skew_);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear the block of transform="..." attributes.
|
||||
* Used when the block is switching from 3d to 2d transform or vice versa.
|
||||
@@ -439,7 +395,7 @@ Blockly.BlockSvg.prototype.snapToGrid = function() {
|
||||
if (!this.workspace) {
|
||||
return; // Deleted block.
|
||||
}
|
||||
if (Blockly.dragMode_ != Blockly.DRAG_NONE) {
|
||||
if (this.workspace.isDragging()) {
|
||||
return; // Don't bump blocks during a drag.
|
||||
}
|
||||
if (this.getParent()) {
|
||||
@@ -468,7 +424,7 @@ Blockly.BlockSvg.prototype.snapToGrid = function() {
|
||||
* Returns a bounding box describing the dimensions of this block
|
||||
* and any blocks stacked below it.
|
||||
* @return {!{height: number, width: number}} Object with height and width
|
||||
* properties.
|
||||
* properties in workspace units.
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.getHeightWidth = function() {
|
||||
var height = this.height;
|
||||
@@ -489,6 +445,7 @@ Blockly.BlockSvg.prototype.getHeightWidth = function() {
|
||||
/**
|
||||
* Returns the coordinates of a bounding box describing the dimensions of this
|
||||
* block and any blocks stacked below it.
|
||||
* Coordinate system: workspace coordinates.
|
||||
* @return {!{topLeft: goog.math.Coordinate, bottomRight: goog.math.Coordinate}}
|
||||
* Object with top left and bottom right coordinates of the bounding box.
|
||||
*/
|
||||
@@ -609,132 +566,9 @@ Blockly.BlockSvg.prototype.tab = function(start, forward) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.onMouseDown_ = function(e) {
|
||||
if (this.workspace.options.readOnly) {
|
||||
return;
|
||||
}
|
||||
if (this.isInFlyout) {
|
||||
// longStart's simulation of right-clicks for longpresses on touch devices
|
||||
// calls the onMouseDown_ function defined on the prototype of the object
|
||||
// the was longpressed (in this case, a Blockly.BlockSvg). In this case
|
||||
// that behaviour is wrong, because Blockly.Flyout.prototype.blockMouseDown
|
||||
// should be called for a mousedown on a block in the flyout, which blocks
|
||||
// execution of the block's onMouseDown_ function.
|
||||
if (e.type == 'touchstart' && Blockly.utils.isRightButton(e)) {
|
||||
Blockly.Flyout.blockRightClick_(e, this);
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (this.isInMutator) {
|
||||
// Mutator's coordinate system could be out of date because the bubble was
|
||||
// dragged, the block was moved, the parent workspace zoomed, etc.
|
||||
this.workspace.resize();
|
||||
}
|
||||
|
||||
this.workspace.updateScreenCalculationsIfScrolled();
|
||||
this.workspace.markFocused();
|
||||
Blockly.terminateDrag_();
|
||||
this.select();
|
||||
Blockly.hideChaff();
|
||||
if (Blockly.utils.isRightButton(e)) {
|
||||
// Right-click.
|
||||
this.showContextMenu_(e);
|
||||
// Click, not drag, so stop waiting for other touches from this identifier.
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
} else if (!this.isMovable()) {
|
||||
// Allow immovable blocks to be selected and context menued, but not
|
||||
// dragged. Let this event bubble up to document, so the workspace may be
|
||||
// dragged instead.
|
||||
return;
|
||||
} else {
|
||||
if (!Blockly.Events.getGroup()) {
|
||||
Blockly.Events.setGroup(true);
|
||||
}
|
||||
// Left-click (or middle click)
|
||||
this.dragStartXY_ = this.getRelativeToSurfaceXY();
|
||||
this.workspace.startDrag(e, this.dragStartXY_);
|
||||
|
||||
Blockly.dragMode_ = Blockly.DRAG_STICKY;
|
||||
Blockly.BlockSvg.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document,
|
||||
'mouseup', this, this.onMouseUp_);
|
||||
Blockly.BlockSvg.onMouseMoveWrapper_ = Blockly.bindEventWithChecks_(
|
||||
document, 'mousemove', this, this.onMouseMove_);
|
||||
// Build a list of bubbles that need to be moved and where they started.
|
||||
this.draggedBubbles_ = [];
|
||||
var descendants = this.getDescendants();
|
||||
for (var i = 0, descendant; descendant = descendants[i]; i++) {
|
||||
var icons = descendant.getIcons();
|
||||
for (var j = 0; j < icons.length; j++) {
|
||||
var data = icons[j].getIconLocation();
|
||||
data.bubble = icons[j];
|
||||
this.draggedBubbles_.push(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
// This event has been handled. No need to bubble up to the document.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mouse-up anywhere in the SVG pane. Is only registered when a
|
||||
* block is clicked. We can't use mouseUp on the block since a fast-moving
|
||||
* cursor can briefly escape the block before it catches up.
|
||||
* @param {!Event} e Mouse up event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.onMouseUp_ = function(e) {
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
if (Blockly.dragMode_ != Blockly.DRAG_FREE &&
|
||||
!Blockly.WidgetDiv.isVisible()) {
|
||||
// Move the block in front of the others. Do this at the end of a click
|
||||
// instead of rearranging the dom on mousedown. This helps with
|
||||
// performance and makes it easier to use psuedo element :active
|
||||
// to set the cursor.
|
||||
this.bringToFront_();
|
||||
Blockly.Events.fire(
|
||||
new Blockly.Events.Ui(this, 'click', undefined, undefined));
|
||||
}
|
||||
Blockly.terminateDrag_();
|
||||
|
||||
var deleteArea = this.workspace.isDeleteArea(e);
|
||||
|
||||
// Connect to a nearby block, but not if it's over the toolbox.
|
||||
if (Blockly.selected && Blockly.highlightedConnection_ &&
|
||||
deleteArea != Blockly.DELETE_AREA_TOOLBOX) {
|
||||
// Connect two blocks together.
|
||||
Blockly.localConnection_.connect(Blockly.highlightedConnection_);
|
||||
if (this.rendered) {
|
||||
// Trigger a connection animation.
|
||||
// Determine which connection is inferior (lower in the source stack).
|
||||
var inferiorConnection = Blockly.localConnection_.isSuperior() ?
|
||||
Blockly.highlightedConnection_ : Blockly.localConnection_;
|
||||
inferiorConnection.getSourceBlock().connectionUiEffect();
|
||||
}
|
||||
if (this.workspace.trashcan) {
|
||||
// Don't throw an object in the trash can if it just got connected.
|
||||
this.workspace.trashcan.close();
|
||||
}
|
||||
} else if (deleteArea && !this.getParent() && Blockly.selected.isDeletable()) {
|
||||
// We didn't connect the block, and it was over the trash can or the
|
||||
// toolbox. Delete it.
|
||||
var trashcan = this.workspace.trashcan;
|
||||
if (trashcan) {
|
||||
goog.Timer.callOnce(trashcan.close, 100, trashcan);
|
||||
}
|
||||
if (this.workspace.toolbox_) {
|
||||
this.workspace.toolbox_.removeDeleteStyle();
|
||||
}
|
||||
|
||||
Blockly.selected.dispose(false, true);
|
||||
}
|
||||
if (Blockly.highlightedConnection_) {
|
||||
Blockly.highlightedConnection_.unhighlight();
|
||||
Blockly.highlightedConnection_ = null;
|
||||
}
|
||||
if (!Blockly.WidgetDiv.isVisible()) {
|
||||
Blockly.Events.setGroup(false);
|
||||
var gesture = this.workspace.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.handleBlockStart(e, this);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -918,9 +752,9 @@ Blockly.BlockSvg.prototype.moveConnections_ = function(dx, dy) {
|
||||
/**
|
||||
* Recursively adds or removes the dragging class to this node and its children.
|
||||
* @param {boolean} adding True if adding, false if removing.
|
||||
* @private
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.setDragging_ = function(adding) {
|
||||
Blockly.BlockSvg.prototype.setDragging = function(adding) {
|
||||
if (adding) {
|
||||
var group = this.getSvgRoot();
|
||||
group.translate_ = '';
|
||||
@@ -936,161 +770,7 @@ Blockly.BlockSvg.prototype.setDragging_ = function(adding) {
|
||||
}
|
||||
// Recurse through all blocks attached under this one.
|
||||
for (var i = 0; i < this.childBlocks_.length; i++) {
|
||||
this.childBlocks_[i].setDragging_(adding);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Drag this block to follow the mouse.
|
||||
* @param {!Event} e Mouse move event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.onMouseMove_ = function(e) {
|
||||
if (e.type == 'mousemove' && e.clientX <= 1 && e.clientY == 0 &&
|
||||
e.button == 0) {
|
||||
/* HACK:
|
||||
Safari Mobile 6.0 and Chrome for Android 18.0 fire rogue mousemove
|
||||
events on certain touch actions. Ignore events with these signatures.
|
||||
This may result in a one-pixel blind spot in other browsers,
|
||||
but this shouldn't be noticeable. */
|
||||
e.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
var oldXY = this.getRelativeToSurfaceXY();
|
||||
var newXY = this.workspace.moveDrag(e);
|
||||
|
||||
if (Blockly.dragMode_ == Blockly.DRAG_STICKY) {
|
||||
// Still dragging within the sticky DRAG_RADIUS.
|
||||
var dr = goog.math.Coordinate.distance(oldXY, newXY) * this.workspace.scale;
|
||||
if (dr > Blockly.DRAG_RADIUS) {
|
||||
// Switch to unrestricted dragging.
|
||||
Blockly.dragMode_ = Blockly.DRAG_FREE;
|
||||
Blockly.longStop_();
|
||||
this.workspace.setResizesEnabled(false);
|
||||
|
||||
var disconnectEffect = !!this.parentBlock_;
|
||||
// If in a stack, either split the stack, or pull out single block.
|
||||
var healStack = !Blockly.DRAG_STACK;
|
||||
if (e.altKey || e.ctrlKey || e.metaKey) {
|
||||
healStack = !healStack;
|
||||
}
|
||||
// Push this block to the very top of the stack.
|
||||
this.unplug(healStack);
|
||||
if (disconnectEffect) {
|
||||
var group = this.getSvgRoot();
|
||||
group.translate_ = 'translate(' + newXY.x + ',' + newXY.y + ')';
|
||||
this.disconnectUiEffect();
|
||||
}
|
||||
this.setDragging_(true);
|
||||
this.moveToDragSurface_();
|
||||
}
|
||||
}
|
||||
if (Blockly.dragMode_ == Blockly.DRAG_FREE) {
|
||||
// Unrestricted dragging.
|
||||
var dxy = goog.math.Coordinate.difference(oldXY, this.dragStartXY_);
|
||||
var group = this.getSvgRoot();
|
||||
if (this.useDragSurface_) {
|
||||
this.workspace.blockDragSurface_.translateSurface(newXY.x, newXY.y);
|
||||
} else {
|
||||
group.translate_ = 'translate(' + newXY.x + ',' + newXY.y + ')';
|
||||
group.setAttribute('transform', group.translate_ + group.skew_);
|
||||
}
|
||||
// Drag all the nested bubbles.
|
||||
for (var i = 0; i < this.draggedBubbles_.length; i++) {
|
||||
var commentData = this.draggedBubbles_[i];
|
||||
commentData.bubble.setIconLocation(
|
||||
goog.math.Coordinate.sum(commentData, dxy));
|
||||
}
|
||||
|
||||
// Check to see if any of this block's connections are within range of
|
||||
// another block's connection.
|
||||
var myConnections = this.getConnections_(false);
|
||||
// Also check the last connection on this stack
|
||||
var lastOnStack = this.lastConnectionInStack_();
|
||||
if (lastOnStack && lastOnStack != this.nextConnection) {
|
||||
myConnections.push(lastOnStack);
|
||||
}
|
||||
var closestConnection = null;
|
||||
var localConnection = null;
|
||||
var radiusConnection = Blockly.SNAP_RADIUS;
|
||||
for (var i = 0; i < myConnections.length; i++) {
|
||||
var myConnection = myConnections[i];
|
||||
var neighbour = myConnection.closest(radiusConnection, dxy);
|
||||
if (neighbour.connection) {
|
||||
closestConnection = neighbour.connection;
|
||||
localConnection = myConnection;
|
||||
radiusConnection = neighbour.radius;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove connection highlighting if needed.
|
||||
if (Blockly.highlightedConnection_ &&
|
||||
Blockly.highlightedConnection_ != closestConnection) {
|
||||
Blockly.highlightedConnection_.unhighlight();
|
||||
Blockly.highlightedConnection_ = null;
|
||||
Blockly.localConnection_ = null;
|
||||
}
|
||||
|
||||
var wouldDeleteBlock = this.updateCursor_(e, closestConnection);
|
||||
|
||||
// Add connection highlighting if needed.
|
||||
if (!wouldDeleteBlock && closestConnection &&
|
||||
closestConnection != Blockly.highlightedConnection_) {
|
||||
closestConnection.highlight();
|
||||
Blockly.highlightedConnection_ = closestConnection;
|
||||
Blockly.localConnection_ = localConnection;
|
||||
}
|
||||
}
|
||||
// This event has been handled. No need to bubble up to the document.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
* Provide visual indication of whether the block will be deleted if
|
||||
* dropped here.
|
||||
* Prefer connecting over dropping into the trash can, but prefer dragging to
|
||||
* the toolbox over connecting to other blocks.
|
||||
* @param {!Event} e Mouse move event.
|
||||
* @param {Blockly.Connection} closestConnection The connection this block would
|
||||
* potentially connect to if dropped here, or null.
|
||||
* @return {boolean} True if the block would be deleted if dropped here,
|
||||
* otherwise false.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.updateCursor_ = function(e, closestConnection) {
|
||||
var deleteArea = this.workspace.isDeleteArea(e);
|
||||
var wouldConnect = Blockly.selected && closestConnection &&
|
||||
deleteArea != Blockly.DELETE_AREA_TOOLBOX;
|
||||
var wouldDelete = deleteArea && !this.getParent() &&
|
||||
Blockly.selected.isDeletable();
|
||||
var showDeleteCursor = wouldDelete && !wouldConnect;
|
||||
|
||||
if (showDeleteCursor) {
|
||||
Blockly.utils.addClass(/** @type {!Element} */ (this.svgGroup_),
|
||||
'blocklyDraggingDelete');
|
||||
|
||||
if (this.workspace.toolbox_) {
|
||||
// Change the cursor to a hand with an 'x'
|
||||
this.workspace.toolbox_.addDeleteStyle();
|
||||
}
|
||||
|
||||
if (deleteArea == Blockly.DELETE_AREA_TRASH && this.workspace.trashcan) {
|
||||
this.workspace.trashcan.setOpen_(true);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
if (this.workspace.trashcan) {
|
||||
this.workspace.trashcan.setOpen_(false);
|
||||
}
|
||||
Blockly.utils.removeClass(/** @type {!Element} */ (this.svgGroup_),
|
||||
'blocklyDraggingDelete');
|
||||
if (this.workspace.toolbox_) {
|
||||
// Change the cursor on the toolbox
|
||||
this.workspace.toolbox_.removeDeleteStyle();
|
||||
}
|
||||
return false;
|
||||
this.childBlocks_[i].setDragging(adding);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1165,7 +845,7 @@ Blockly.BlockSvg.prototype.dispose = function(healStack, animate) {
|
||||
// If this block is being dragged, unlink the mouse events.
|
||||
if (Blockly.selected == this) {
|
||||
this.unselect();
|
||||
Blockly.terminateDrag_();
|
||||
this.workspace.cancelCurrentGesture();
|
||||
}
|
||||
// If this block has a context menu open, close it.
|
||||
if (Blockly.ContextMenu.currentBlock == this) {
|
||||
@@ -1493,7 +1173,7 @@ Blockly.BlockSvg.prototype.setWarningText = function(text, opt_id) {
|
||||
clearTimeout(this.setWarningText.pid_[id]);
|
||||
delete this.setWarningText.pid_[id];
|
||||
}
|
||||
if (Blockly.dragMode_ == Blockly.DRAG_FREE) {
|
||||
if (this.workspace.isDragging()) {
|
||||
// Don't change the warning text during a drag.
|
||||
// Wait until the drag finishes.
|
||||
var thisBlock = this;
|
||||
@@ -1614,6 +1294,22 @@ Blockly.BlockSvg.prototype.removeSelect = function() {
|
||||
'blocklySelected');
|
||||
};
|
||||
|
||||
/**
|
||||
* Update the cursor over this block by adding or removing a class.
|
||||
* @param {boolean} enable True if the delete cursor should be shown, false
|
||||
* otherwise.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.setDeleteStyle = function(enable) {
|
||||
if (enable) {
|
||||
Blockly.utils.addClass(/** @type {!Element} */ (this.svgGroup_),
|
||||
'blocklyDraggingDelete');
|
||||
} else {
|
||||
Blockly.utils.removeClass(/** @type {!Element} */ (this.svgGroup_),
|
||||
'blocklyDraggingDelete');
|
||||
}
|
||||
};
|
||||
|
||||
// Overrides of functions on Blockly.Block that take into account whether the
|
||||
// block has been rendered.
|
||||
|
||||
@@ -1629,14 +1325,14 @@ Blockly.BlockSvg.prototype.setColour = function(colour) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Move this block to the front of the visible workspace.
|
||||
* <g> tags do not respect z-index so svg renders them in the
|
||||
* order that they are in the dom. By placing this block first within the
|
||||
* block group's <g>, it will render on top of any other blocks.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.bringToFront_ = function() {
|
||||
Blockly.BlockSvg.prototype.bringToFront = function() {
|
||||
var block = this;
|
||||
do {
|
||||
var root = block.getSvgRoot();
|
||||
@@ -1644,6 +1340,7 @@ Blockly.BlockSvg.prototype.bringToFront_ = function() {
|
||||
block = block.getParent();
|
||||
} while (block);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set whether this block can chain onto the bottom of another block.
|
||||
* @param {boolean} newBoolean True if there can be a previous statement.
|
||||
@@ -1767,7 +1464,7 @@ Blockly.BlockSvg.prototype.appendInput_ = function(type, name) {
|
||||
* Otherwise, for a non-rendered block return an empty list, and for a
|
||||
* collapsed block don't return inputs connections.
|
||||
* @return {!Array.<!Blockly.Connection>} Array of connections.
|
||||
* @private
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.getConnections_ = function(all) {
|
||||
var myConnections = [];
|
||||
@@ -1847,3 +1544,26 @@ Blockly.BlockSvg.prototype.bumpNeighbours_ = function() {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Schedule snapping to grid and bumping neighbours to occur after a brief
|
||||
* delay.
|
||||
* @package
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.scheduleSnapAndBump = function() {
|
||||
var block = this;
|
||||
// Ensure that any snap and bump are part of this move's event group.
|
||||
var group = Blockly.Events.getGroup();
|
||||
|
||||
setTimeout(function() {
|
||||
Blockly.Events.setGroup(group);
|
||||
block.snapToGrid();
|
||||
Blockly.Events.setGroup(false);
|
||||
}, Blockly.BUMP_DELAY / 2);
|
||||
|
||||
setTimeout(function() {
|
||||
Blockly.Events.setGroup(group);
|
||||
block.bumpNeighbours_();
|
||||
Blockly.Events.setGroup(false);
|
||||
}, Blockly.BUMP_DELAY);
|
||||
};
|
||||
|
||||
+11
-41
@@ -73,20 +73,6 @@ Blockly.mainWorkspace = null;
|
||||
*/
|
||||
Blockly.selected = null;
|
||||
|
||||
/**
|
||||
* Currently highlighted connection (during a drag).
|
||||
* @type {Blockly.Connection}
|
||||
* @private
|
||||
*/
|
||||
Blockly.highlightedConnection_ = null;
|
||||
|
||||
/**
|
||||
* Connection on dragged block that matches the highlighted connection.
|
||||
* @type {Blockly.Connection}
|
||||
* @private
|
||||
*/
|
||||
Blockly.localConnection_ = null;
|
||||
|
||||
/**
|
||||
* All of the connections on blocks that are currently being dragged.
|
||||
* @type {!Array.<!Blockly.Connection>}
|
||||
@@ -108,15 +94,6 @@ Blockly.clipboardXml_ = null;
|
||||
*/
|
||||
Blockly.clipboardSource_ = null;
|
||||
|
||||
/**
|
||||
* Is the mouse dragging a block?
|
||||
* DRAG_NONE - No drag operation.
|
||||
* DRAG_STICKY - Still inside the sticky DRAG_RADIUS.
|
||||
* DRAG_FREE - Freely draggable.
|
||||
* @private
|
||||
*/
|
||||
Blockly.dragMode_ = Blockly.DRAG_NONE;
|
||||
|
||||
/**
|
||||
* Cached value for whether 3D is supported.
|
||||
* @type {!boolean}
|
||||
@@ -206,10 +183,18 @@ Blockly.onKeyDown_ = function(e) {
|
||||
// Do this first to prevent an error in the delete code from resulting in
|
||||
// data loss.
|
||||
e.preventDefault();
|
||||
// Don't delete while dragging. Jeez.
|
||||
if (Blockly.mainWorkspace.isDragging()) {
|
||||
return;
|
||||
}
|
||||
if (Blockly.selected && Blockly.selected.isDeletable()) {
|
||||
deleteBlock = true;
|
||||
}
|
||||
} else if (e.altKey || e.ctrlKey || e.metaKey) {
|
||||
// Don't use meta keys during drags.
|
||||
if (Blockly.mainWorkspace.isDragging()) {
|
||||
return;
|
||||
}
|
||||
if (Blockly.selected &&
|
||||
Blockly.selected.isDeletable() && Blockly.selected.isMovable()) {
|
||||
if (e.keyCode == 67) {
|
||||
@@ -239,25 +224,11 @@ Blockly.onKeyDown_ = function(e) {
|
||||
// Common code for delete and cut.
|
||||
Blockly.Events.setGroup(true);
|
||||
Blockly.hideChaff();
|
||||
var heal = Blockly.dragMode_ != Blockly.DRAG_FREE;
|
||||
Blockly.selected.dispose(heal, true);
|
||||
if (Blockly.highlightedConnection_) {
|
||||
Blockly.highlightedConnection_.unhighlight();
|
||||
Blockly.highlightedConnection_ = null;
|
||||
}
|
||||
Blockly.selected.dispose(/* heal */ true, true);
|
||||
Blockly.Events.setGroup(false);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Stop binding to the global mouseup and mousemove events.
|
||||
* @private
|
||||
*/
|
||||
Blockly.terminateDrag_ = function() {
|
||||
Blockly.BlockSvg.terminateDrag();
|
||||
Blockly.Flyout.terminateDrag_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Copy a block onto the local clipboard.
|
||||
* @param {!Blockly.Block} block Block to be copied.
|
||||
@@ -265,9 +236,8 @@ Blockly.terminateDrag_ = function() {
|
||||
*/
|
||||
Blockly.copy_ = function(block) {
|
||||
var xmlBlock = Blockly.Xml.blockToDom(block);
|
||||
if (Blockly.dragMode_ != Blockly.DRAG_FREE) {
|
||||
Blockly.Xml.deleteNext(xmlBlock);
|
||||
}
|
||||
// Copy only the selected block and internal blocks.
|
||||
Blockly.Xml.deleteNext(xmlBlock);
|
||||
// Encode start position in XML.
|
||||
var xy = block.getRelativeToSurfaceXY();
|
||||
xmlBlock.setAttribute('x', block.RTL ? -xy.x : xy.x);
|
||||
|
||||
@@ -241,12 +241,6 @@ Blockly.Connection.prototype.dispose = function() {
|
||||
if (this.inDB_) {
|
||||
this.db_.removeConnection_(this);
|
||||
}
|
||||
if (Blockly.highlightedConnection_ == this) {
|
||||
Blockly.highlightedConnection_ = null;
|
||||
}
|
||||
if (Blockly.localConnection_ == this) {
|
||||
Blockly.localConnection_ = null;
|
||||
}
|
||||
this.db_ = null;
|
||||
this.dbOpposite_ = null;
|
||||
};
|
||||
|
||||
@@ -32,6 +32,13 @@ goog.provide('Blockly.constants');
|
||||
*/
|
||||
Blockly.DRAG_RADIUS = 5;
|
||||
|
||||
/**
|
||||
* Number of pixels the mouse must move before a drag/scroll starts from the
|
||||
* flyout. Because the drag-intention is determined when this is reached, it is
|
||||
* larger than Blockly.DRAG_RADIUS so that the drag-direction is clearer.
|
||||
*/
|
||||
Blockly.FLYOUT_DRAG_RADIUS = 10;
|
||||
|
||||
/**
|
||||
* Maximum misalignment between connections for them to snap together.
|
||||
*/
|
||||
@@ -207,6 +214,12 @@ Blockly.TOOLBOX_AT_LEFT = 2;
|
||||
*/
|
||||
Blockly.TOOLBOX_AT_RIGHT = 3;
|
||||
|
||||
/**
|
||||
* ENUM representing that an event is not in any delete areas.
|
||||
* Null for backwards compatibility reasons.
|
||||
* @const
|
||||
*/
|
||||
Blockly.DELETE_AREA_NONE = null;
|
||||
|
||||
/**
|
||||
* ENUM representing that an event is in the delete area of the trash can.
|
||||
|
||||
@@ -43,6 +43,12 @@ goog.require('goog.ui.MenuItem');
|
||||
*/
|
||||
Blockly.ContextMenu.currentBlock = null;
|
||||
|
||||
/**
|
||||
* @type {Array.<!Array>} Opaque data that can be passed to unbindEvent_.
|
||||
* @private
|
||||
*/
|
||||
Blockly.ContextMenu.eventWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Construct the menu based on the list of options and show the menu.
|
||||
* @param {!Event} e Mouse event.
|
||||
@@ -123,6 +129,9 @@ Blockly.ContextMenu.show = function(e, options, rtl) {
|
||||
Blockly.ContextMenu.hide = function() {
|
||||
Blockly.WidgetDiv.hideIfOwner(Blockly.ContextMenu);
|
||||
Blockly.ContextMenu.currentBlock = null;
|
||||
if (Blockly.ContextMenu.eventWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.ContextMenu.eventWrapper_);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,6 +130,7 @@ Blockly.Css.CONTENT = [
|
||||
'height: 100%;',
|
||||
'position: relative;',
|
||||
'overflow: hidden;', /* So blocks in drag surface disappear at edges */
|
||||
'touch-action: none',
|
||||
'}',
|
||||
|
||||
'.blocklyNonSelectable {',
|
||||
@@ -409,6 +410,10 @@ Blockly.Css.CONTENT = [
|
||||
'fill-opacity: .8;',
|
||||
'}',
|
||||
|
||||
'.blocklyTransparentBackground {',
|
||||
'opacity: 0;',
|
||||
'}',
|
||||
|
||||
'.blocklyMainWorkspaceScrollbar {',
|
||||
'z-index: 20;',
|
||||
'}',
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Editor
|
||||
*
|
||||
* Copyright 2017 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 Class that controls updates to connections during drags.
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.DraggedConnectionManager');
|
||||
|
||||
goog.require('Blockly.RenderedConnection');
|
||||
|
||||
goog.require('goog.math.Coordinate');
|
||||
|
||||
|
||||
/**
|
||||
* Class that controls updates to connections during drags. It is primarily
|
||||
* responsible for finding the closest eligible connection and highlighting or
|
||||
* unhiglighting it as needed during a drag.
|
||||
* @param {!Blockly.BlockSvg} block The top block in the stack being dragged.
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.DraggedConnectionManager = function(block) {
|
||||
Blockly.selected = block;
|
||||
|
||||
/**
|
||||
* The top block in the stack being dragged.
|
||||
* Does not change during a drag.
|
||||
* @type {!Blockly.Block}
|
||||
* @private
|
||||
*/
|
||||
this.topBlock_ = block;
|
||||
|
||||
/**
|
||||
* The workspace on which these connections are being dragged.
|
||||
* Does not change during a drag.
|
||||
* @type {!Blockly.WorkspaceSvg}
|
||||
* @private
|
||||
*/
|
||||
this.workspace_ = block.workspace;
|
||||
|
||||
/**
|
||||
* The connections on the dragging blocks that are available to connect to
|
||||
* other blocks. This includes all open connections on the top block, as well
|
||||
* as the last connection on the block stack.
|
||||
* Does not change during a drag.
|
||||
* @type {!Array.<!Blockly.RenderedConnection>}
|
||||
* @private
|
||||
*/
|
||||
this.availableConnections_ = this.initAvailableConnections_();
|
||||
|
||||
/**
|
||||
* The connection that this block would connect to if released immediately.
|
||||
* Updated on every mouse move.
|
||||
* @type {Blockly.RenderedConnection}
|
||||
* @private
|
||||
*/
|
||||
this.closestConnection_ = null;
|
||||
|
||||
/**
|
||||
* The connection that would connect to this.closestConnection_ if this block
|
||||
* were released immediately.
|
||||
* Updated on every mouse move.
|
||||
* @type {Blockly.RenderedConnection}
|
||||
* @private
|
||||
*/
|
||||
this.localConnection_ = null;
|
||||
|
||||
/**
|
||||
* The distance between this.closestConnection_ and this.localConnection_,
|
||||
* in workspace units.
|
||||
* Updated on every mouse move.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
this.radiusConnection_ = 0;
|
||||
|
||||
/**
|
||||
* Whether the block would be deleted if it were dropped immediately.
|
||||
* Updated on every mouse move.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.wouldDeleteBlock_ = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sever all links from this object.
|
||||
* @package
|
||||
*/
|
||||
Blockly.DraggedConnectionManager.prototype.dispose = function() {
|
||||
this.topBlock_ = null;
|
||||
this.workspace_ = null;
|
||||
this.availableConnections_.length = 0;
|
||||
this.closestConnection_ = null;
|
||||
this.localConnection_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return whether the block would be deleted if dropped immediately, based on
|
||||
* information from the most recent move event.
|
||||
* @return {boolean} true if the block would be deleted if dropped immediately.
|
||||
* @package
|
||||
*/
|
||||
Blockly.DraggedConnectionManager.prototype.wouldDeleteBlock = function() {
|
||||
return this.wouldDeleteBlock_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Connect to the closest connection and render the results.
|
||||
* This should be called at the end of a drag.
|
||||
* @package
|
||||
*/
|
||||
Blockly.DraggedConnectionManager.prototype.applyConnections = function() {
|
||||
if (this.closestConnection_) {
|
||||
// Connect two blocks together.
|
||||
this.localConnection_.connect(this.closestConnection_);
|
||||
if (this.rendered) {
|
||||
// Trigger a connection animation.
|
||||
// Determine which connection is inferior (lower in the source stack).
|
||||
var inferiorConnection = this.localConnection_.isSuperior() ?
|
||||
this.closestConnection_ : this.localConnection_;
|
||||
inferiorConnection.getSourceBlock().connectionUiEffect();
|
||||
}
|
||||
this.removeHighlighting_();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Update highlighted connections based on the most recent move location.
|
||||
* @param {!goog.math.Coordinate} dxy Position relative to drag start,
|
||||
* in workspace units.
|
||||
* @param {?number} deleteArea One of {@link Blockly.DELETE_AREA_TRASH},
|
||||
* {@link Blockly.DELETE_AREA_TOOLBOX}, or {@link Blockly.DELETE_AREA_NONE}.
|
||||
* @package
|
||||
*/
|
||||
Blockly.DraggedConnectionManager.prototype.update = function(dxy, deleteArea) {
|
||||
var oldClosestConnection = this.closestConnection_;
|
||||
var closestConnectionChanged = this.updateClosest_(dxy);
|
||||
|
||||
if (closestConnectionChanged && oldClosestConnection) {
|
||||
oldClosestConnection.unhighlight();
|
||||
}
|
||||
|
||||
// Prefer connecting over dropping into the trash can, but prefer dragging to
|
||||
// the toolbox over connecting to other blocks.
|
||||
var wouldConnect = !!this.closestConnection_ &&
|
||||
deleteArea != Blockly.DELETE_AREA_TOOLBOX;
|
||||
var wouldDelete = !!deleteArea && !this.topBlock_.getParent() &&
|
||||
this.topBlock_.isDeletable();
|
||||
this.wouldDeleteBlock_ = wouldDelete && !wouldConnect;
|
||||
|
||||
if (!this.wouldDeleteBlock_ && closestConnectionChanged &&
|
||||
this.closestConnection_) {
|
||||
this.addHighlighting_();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove highlighting from the currently highlighted connection, if it exists.
|
||||
* @private
|
||||
*/
|
||||
Blockly.DraggedConnectionManager.prototype.removeHighlighting_ = function() {
|
||||
if (this.closestConnection_) {
|
||||
this.closestConnection_.unhighlight();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Add highlighting to the closest connection, if it exists.
|
||||
* @private
|
||||
*/
|
||||
Blockly.DraggedConnectionManager.prototype.addHighlighting_ = function() {
|
||||
if (this.closestConnection_) {
|
||||
this.closestConnection_.highlight();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Populate the list of available connections on this block stack. This should
|
||||
* only be called once, at the beginning of a drag.
|
||||
* @return {!Array.<!Blockly.RenderedConnection>} a list of available
|
||||
* connections.
|
||||
* @private
|
||||
*/
|
||||
Blockly.DraggedConnectionManager.prototype.initAvailableConnections_ = function() {
|
||||
var available = this.topBlock_.getConnections_(false);
|
||||
// Also check the last connection on this stack
|
||||
var lastOnStack = this.topBlock_.lastConnectionInStack_();
|
||||
if (lastOnStack && lastOnStack != this.topBlock_.nextConnection) {
|
||||
available.push(lastOnStack);
|
||||
}
|
||||
return available;
|
||||
};
|
||||
|
||||
/**
|
||||
* Find the new closest connection, and update internal state in response.
|
||||
* @param {!goog.math.Coordinate} dxy Position relative to the drag start,
|
||||
* in workspace units.
|
||||
* @return {boolean} Whether the closest connection has changed.
|
||||
* @private
|
||||
*/
|
||||
Blockly.DraggedConnectionManager.prototype.updateClosest_ = function(dxy) {
|
||||
var oldClosestConnection = this.closestConnection_;
|
||||
|
||||
this.closestConnection_ = null;
|
||||
this.localConnection_ = null;
|
||||
this.radiusConnection_ = Blockly.SNAP_RADIUS;
|
||||
for (var i = 0; i < this.availableConnections_.length; i++) {
|
||||
var myConnection = this.availableConnections_[i];
|
||||
var neighbour = myConnection.closest(this.radiusConnection_, dxy);
|
||||
if (neighbour.connection) {
|
||||
this.closestConnection_ = neighbour.connection;
|
||||
this.localConnection_ = myConnection;
|
||||
this.radiusConnection_ = neighbour.radius;
|
||||
}
|
||||
}
|
||||
return oldClosestConnection != this.closestConnection_;
|
||||
};
|
||||
+1
-1
@@ -821,7 +821,7 @@ Blockly.Events.disableOrphans = function(event) {
|
||||
child.setDisabled(false);
|
||||
}
|
||||
} else if ((block.outputConnection || block.previousConnection) &&
|
||||
Blockly.dragMode_ == Blockly.DRAG_NONE) {
|
||||
!workspace.isDragging()) {
|
||||
do {
|
||||
block.setDisabled(true);
|
||||
block = block.getNextBlock();
|
||||
|
||||
+17
-26
@@ -28,6 +28,8 @@
|
||||
|
||||
goog.provide('Blockly.Field');
|
||||
|
||||
goog.require('Blockly.Gesture');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.math.Size');
|
||||
@@ -152,9 +154,9 @@ Blockly.Field.prototype.init = function() {
|
||||
|
||||
this.updateEditable();
|
||||
this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_);
|
||||
this.mouseUpWrapper_ =
|
||||
Blockly.bindEventWithChecks_(this.fieldGroup_, 'mouseup', this,
|
||||
this.onMouseUp_);
|
||||
this.mouseDownWrapper_ =
|
||||
Blockly.bindEventWithChecks_(this.fieldGroup_, 'mousedown', this,
|
||||
this.onMouseDown_);
|
||||
// Force a render.
|
||||
this.render_();
|
||||
};
|
||||
@@ -170,9 +172,9 @@ Blockly.Field.prototype.initModel = function() {
|
||||
* Dispose of all DOM objects belonging to this editable field.
|
||||
*/
|
||||
Blockly.Field.prototype.dispose = function() {
|
||||
if (this.mouseUpWrapper_) {
|
||||
Blockly.unbindEvent_(this.mouseUpWrapper_);
|
||||
this.mouseUpWrapper_ = null;
|
||||
if (this.mouseDownWrapper_) {
|
||||
Blockly.unbindEvent_(this.mouseDownWrapper_);
|
||||
this.mouseDownWrapper_ = null;
|
||||
}
|
||||
this.sourceBlock_ = null;
|
||||
goog.dom.removeNode(this.fieldGroup_);
|
||||
@@ -500,32 +502,21 @@ Blockly.Field.prototype.setValue = function(newValue) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mouse up event on an editable field.
|
||||
* @param {!Event} e Mouse up event.
|
||||
* Handle a mouse down event on a field.
|
||||
* @param {!Event} e Mouse down event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Field.prototype.onMouseUp_ = function(e) {
|
||||
if ((goog.userAgent.IPHONE || goog.userAgent.IPAD) &&
|
||||
!goog.userAgent.isVersionOrHigher('537.51.2') &&
|
||||
e.layerX !== 0 && e.layerY !== 0) {
|
||||
// Old iOS spawns a bogus event on the next touch after a 'prompt()' edit.
|
||||
// Unlike the real events, these have a layerX and layerY set.
|
||||
Blockly.Field.prototype.onMouseDown_ = function(e) {
|
||||
if (!this.sourceBlock_ || !this.sourceBlock_.workspace) {
|
||||
return;
|
||||
} else if (Blockly.utils.isRightButton(e)) {
|
||||
// Right-click.
|
||||
return;
|
||||
} else if (this.sourceBlock_.workspace.isDragging()) {
|
||||
// Drag operation is concluding. Don't open the editor.
|
||||
return;
|
||||
} else if (this.sourceBlock_.isEditable()) {
|
||||
// Non-abstract sub-classes must define a showEditor_ method.
|
||||
this.showEditor_();
|
||||
// The field is handling the touch, but we also want the blockSvg onMouseUp
|
||||
// handler to fire, so we will leave the touch identifier as it is.
|
||||
// The next onMouseUp is responsible for nulling it out.
|
||||
}
|
||||
var gesture = this.sourceBlock_.workspace.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.setStartField(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Change the tooltip text for this field.
|
||||
* @param {string|!Element} newTip Text for tooltip or a parent element to
|
||||
|
||||
+76
-325
@@ -30,6 +30,7 @@ goog.require('Blockly.Block');
|
||||
goog.require('Blockly.Comment');
|
||||
goog.require('Blockly.Events');
|
||||
goog.require('Blockly.FlyoutButton');
|
||||
goog.require('Blockly.Gesture');
|
||||
goog.require('Blockly.Touch');
|
||||
goog.require('Blockly.WorkspaceSvg');
|
||||
goog.require('goog.dom');
|
||||
@@ -46,6 +47,7 @@ goog.require('goog.userAgent');
|
||||
Blockly.Flyout = function(workspaceOptions) {
|
||||
workspaceOptions.getMetrics = this.getMetrics_.bind(this);
|
||||
workspaceOptions.setMetrics = this.setMetrics_.bind(this);
|
||||
|
||||
/**
|
||||
* @type {!Blockly.Workspace}
|
||||
* @private
|
||||
@@ -108,68 +110,8 @@ Blockly.Flyout = function(workspaceOptions) {
|
||||
* @private
|
||||
*/
|
||||
this.permanentlyDisabled_ = [];
|
||||
|
||||
/**
|
||||
* y coordinate of mousedown - used to calculate scroll distances.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
this.startDragMouseY_ = 0;
|
||||
|
||||
/**
|
||||
* x coordinate of mousedown - used to calculate scroll distances.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
this.startDragMouseX_ = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* When a flyout drag is in progress, this is a reference to the flyout being
|
||||
* dragged. This is used by Flyout.terminateDrag_ to reset dragMode_.
|
||||
* @type {Blockly.Flyout}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.startFlyout_ = null;
|
||||
|
||||
/**
|
||||
* Event that started a drag. Used to determine the drag distance/direction and
|
||||
* also passed to BlockSvg.onMouseDown_() after creating a new block.
|
||||
* @type {Event}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.startDownEvent_ = null;
|
||||
|
||||
/**
|
||||
* Flyout block where the drag/click was initiated. Used to fire click events or
|
||||
* create a new block.
|
||||
* @type {Event}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.startBlock_ = null;
|
||||
|
||||
/**
|
||||
* Wrapper function called when a mouseup occurs during a background or block
|
||||
* drag operation.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.onMouseUpWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Wrapper function called when a mousemove occurs during a background drag.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.onMouseMoveWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Wrapper function called when a mousemove occurs during a block drag.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.onMouseMoveBlockWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Does the flyout automatically close when a block is created?
|
||||
* @type {boolean}
|
||||
@@ -197,13 +139,6 @@ Blockly.Flyout.prototype.containerVisible_ = true;
|
||||
*/
|
||||
Blockly.Flyout.prototype.CORNER_RADIUS = 8;
|
||||
|
||||
/**
|
||||
* Number of pixels the mouse must move before a drag/scroll starts. Because the
|
||||
* drag-intention is determined when this is reached, it is larger than
|
||||
* Blockly.DRAG_RADIUS so that the drag-direction is clearer.
|
||||
*/
|
||||
Blockly.Flyout.prototype.DRAG_RADIUS = 10;
|
||||
|
||||
/**
|
||||
* Margin around the edges of the blocks in the flyout.
|
||||
* @type {number}
|
||||
@@ -246,15 +181,6 @@ Blockly.Flyout.prototype.width_ = 0;
|
||||
*/
|
||||
Blockly.Flyout.prototype.height_ = 0;
|
||||
|
||||
/**
|
||||
* Is the flyout dragging (scrolling)?
|
||||
* DRAG_NONE - no drag is ongoing or state is undetermined.
|
||||
* DRAG_STICKY - still within the sticky drag radius.
|
||||
* DRAG_FREE - in scroll mode (never create a new block).
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.prototype.dragMode_ = Blockly.DRAG_NONE;
|
||||
|
||||
/**
|
||||
* Range of a drag angle from a flyout considered "dragging toward workspace".
|
||||
* Drags that are within the bounds of this many degrees from the orthogonal
|
||||
@@ -318,10 +244,15 @@ Blockly.Flyout.prototype.init = function(targetWorkspace) {
|
||||
this.filterWrapper_ = this.filterForCapacity_.bind(this);
|
||||
this.targetWorkspace_.addChangeListener(this.filterWrapper_);
|
||||
}
|
||||
|
||||
// Dragging the flyout up and down.
|
||||
Array.prototype.push.apply(this.eventWrappers_,
|
||||
Blockly.bindEventWithChecks_(this.svgGroup_, 'mousedown', this,
|
||||
Blockly.bindEventWithChecks_(this.svgBackground_, 'mousedown', this,
|
||||
this.onMouseDown_));
|
||||
|
||||
// A flyout connected to a workspace doesn't have its own current gesture.
|
||||
this.workspace_.getGesture =
|
||||
this.targetWorkspace_.getGesture.bind(this.targetWorkspace_);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -368,6 +299,15 @@ Blockly.Flyout.prototype.getHeight = function() {
|
||||
return this.height_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the workspace inside the flyout.
|
||||
* @return {!Blockly.WorkspaceSvg} The workspace inside the flyout.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Flyout.prototype.getWorkspace = function() {
|
||||
return this.workspace_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return an object with all the metrics required to size scrollbars for the
|
||||
* flyout. The following properties are computed:
|
||||
@@ -871,8 +811,10 @@ Blockly.Flyout.prototype.layout_ = function(contents, gaps) {
|
||||
var buttonSvg = button.createDom();
|
||||
button.moveTo(cursorX, cursorY);
|
||||
button.show();
|
||||
Blockly.bindEventWithChecks_(buttonSvg, 'mouseup', button,
|
||||
button.onMouseUp);
|
||||
// Clicking on a flyout button or label is a lot like clicking on the
|
||||
// flyout background.
|
||||
this.listeners_.push(Blockly.bindEventWithChecks_(buttonSvg, 'mousedown',
|
||||
this, this.onMouseDown_));
|
||||
|
||||
this.buttons_.push(button);
|
||||
if (this.horizontalLayout_) {
|
||||
@@ -931,20 +873,6 @@ Blockly.Flyout.prototype.addBlockListeners_ = function(root, block, rect) {
|
||||
block.removeSelect));
|
||||
};
|
||||
|
||||
/**
|
||||
* Actions to take when a block in the flyout is right-clicked.
|
||||
* @param {!Event} e Event that triggered the right-click. Could originate from
|
||||
* a long-press in a touch environment.
|
||||
* @param {Blockly.BlockSvg} block The block that was clicked.
|
||||
*/
|
||||
Blockly.Flyout.blockRightClick_ = function(e, block) {
|
||||
Blockly.terminateDrag_();
|
||||
Blockly.hideChaff(true);
|
||||
block.showContextMenu_(e);
|
||||
// This was a right-click, so end the gesture immediately.
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mouse-down on an SVG block in a non-closing flyout.
|
||||
* @param {!Blockly.Block} block The flyout block to copy.
|
||||
@@ -954,26 +882,11 @@ Blockly.Flyout.blockRightClick_ = function(e, block) {
|
||||
Blockly.Flyout.prototype.blockMouseDown_ = function(block) {
|
||||
var flyout = this;
|
||||
return function(e) {
|
||||
if (Blockly.utils.isRightButton(e)) {
|
||||
Blockly.Flyout.blockRightClick_(e, block);
|
||||
} else {
|
||||
Blockly.terminateDrag_();
|
||||
Blockly.hideChaff(true);
|
||||
// Left-click (or middle click)
|
||||
// Record the current mouse position.
|
||||
flyout.startDragMouseY_ = e.clientY;
|
||||
flyout.startDragMouseX_ = e.clientX;
|
||||
Blockly.Flyout.startDownEvent_ = e;
|
||||
Blockly.Flyout.startBlock_ = block;
|
||||
Blockly.Flyout.startFlyout_ = flyout;
|
||||
Blockly.Flyout.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document,
|
||||
'mouseup', flyout, flyout.onMouseUp_);
|
||||
Blockly.Flyout.onMouseMoveBlockWrapper_ = Blockly.bindEventWithChecks_(
|
||||
document, 'mousemove', flyout, flyout.onMouseMoveBlock_);
|
||||
var gesture = flyout.targetWorkspace_.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.setStartBlock(block);
|
||||
gesture.handleFlyoutStart(e, flyout);
|
||||
}
|
||||
// This event has been handled. No need to bubble up to the document.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
};
|
||||
|
||||
@@ -983,151 +896,24 @@ Blockly.Flyout.prototype.blockMouseDown_ = function(block) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.prototype.onMouseDown_ = function(e) {
|
||||
if (Blockly.utils.isRightButton(e)) {
|
||||
// Don't start drags with right clicks.
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
return;
|
||||
}
|
||||
Blockly.hideChaff(true);
|
||||
this.dragMode_ = Blockly.DRAG_FREE;
|
||||
this.startDragMouseY_ = e.clientY;
|
||||
this.startDragMouseX_ = e.clientX;
|
||||
Blockly.Flyout.startFlyout_ = this;
|
||||
Blockly.Flyout.onMouseMoveWrapper_ = Blockly.bindEventWithChecks_(document,
|
||||
'mousemove', this, this.onMouseMove_);
|
||||
Blockly.Flyout.onMouseUpWrapper_ = Blockly.bindEventWithChecks_(document,
|
||||
'mouseup', this, Blockly.Flyout.terminateDrag_);
|
||||
// This event has been handled. No need to bubble up to the document.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mouse-up anywhere in the SVG pane. Is only registered when a
|
||||
* block is clicked. We can't use mouseUp on the block since a fast-moving
|
||||
* cursor can briefly escape the block before it catches up.
|
||||
* @param {!Event} e Mouse up event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.prototype.onMouseUp_ = function(e) {
|
||||
if (!this.workspace_.isDragging()) {
|
||||
// This was a click, not a drag. End the gesture.
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
if (this.autoClose) {
|
||||
this.createBlockFunc_(Blockly.Flyout.startBlock_)(
|
||||
Blockly.Flyout.startDownEvent_);
|
||||
} else if (!Blockly.WidgetDiv.isVisible()) {
|
||||
Blockly.Events.fire(
|
||||
new Blockly.Events.Ui(Blockly.Flyout.startBlock_, 'click',
|
||||
undefined, undefined));
|
||||
}
|
||||
}
|
||||
Blockly.terminateDrag_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mouse-move to vertically drag the flyout.
|
||||
* @param {!Event} e Mouse move event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.prototype.onMouseMove_ = function(e) {
|
||||
var metrics = this.getMetrics_();
|
||||
if (this.horizontalLayout_) {
|
||||
if (metrics.contentWidth - metrics.viewWidth < 0) {
|
||||
return;
|
||||
}
|
||||
var dx = e.clientX - this.startDragMouseX_;
|
||||
this.startDragMouseX_ = e.clientX;
|
||||
var x = metrics.viewLeft - dx;
|
||||
x = goog.math.clamp(x, 0, metrics.contentWidth - metrics.viewWidth);
|
||||
this.scrollbar_.set(x);
|
||||
} else {
|
||||
if (metrics.contentHeight - metrics.viewHeight < 0) {
|
||||
return;
|
||||
}
|
||||
var dy = e.clientY - this.startDragMouseY_;
|
||||
this.startDragMouseY_ = e.clientY;
|
||||
var y = metrics.viewTop - dy;
|
||||
y = goog.math.clamp(y, 0, metrics.contentHeight - metrics.viewHeight);
|
||||
this.scrollbar_.set(y);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Mouse button is down on a block in a non-closing flyout. Create the block
|
||||
* if the mouse moves beyond a small radius. This allows one to play with
|
||||
* fields without instantiating blocks that instantly self-destruct.
|
||||
* @param {!Event} e Mouse move event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.prototype.onMouseMoveBlock_ = function(e) {
|
||||
if (e.type == 'mousemove' && e.clientX <= 1 && e.clientY == 0 &&
|
||||
e.button == 0) {
|
||||
/* HACK:
|
||||
Safari Mobile 6.0 and Chrome for Android 18.0 fire rogue mousemove events
|
||||
on certain touch actions. Ignore events with these signatures.
|
||||
This may result in a one-pixel blind spot in other browsers,
|
||||
but this shouldn't be noticeable. */
|
||||
e.stopPropagation();
|
||||
return;
|
||||
}
|
||||
var dx = e.clientX - Blockly.Flyout.startDownEvent_.clientX;
|
||||
var dy = e.clientY - Blockly.Flyout.startDownEvent_.clientY;
|
||||
|
||||
var createBlock = this.determineDragIntention_(dx, dy);
|
||||
if (createBlock) {
|
||||
Blockly.longStop_();
|
||||
this.createBlockFunc_(Blockly.Flyout.startBlock_)(
|
||||
Blockly.Flyout.startDownEvent_);
|
||||
} else if (this.dragMode_ == Blockly.DRAG_FREE) {
|
||||
Blockly.longStop_();
|
||||
// Do a scroll.
|
||||
this.onMouseMove_(e);
|
||||
}
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine the intention of a drag.
|
||||
* Updates dragMode_ based on a drag delta and the current mode,
|
||||
* and returns true if we should create a new block.
|
||||
* @param {number} dx X delta of the drag.
|
||||
* @param {number} dy Y delta of the drag.
|
||||
* @return {boolean} True if a new block should be created.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.prototype.determineDragIntention_ = function(dx, dy) {
|
||||
if (this.dragMode_ == Blockly.DRAG_FREE) {
|
||||
// Once in free mode, always stay in free mode and never create a block.
|
||||
return false;
|
||||
}
|
||||
var dragDistance = Math.sqrt(dx * dx + dy * dy);
|
||||
if (dragDistance < this.DRAG_RADIUS) {
|
||||
// Still within the sticky drag radius.
|
||||
this.dragMode_ = Blockly.DRAG_STICKY;
|
||||
return false;
|
||||
} else {
|
||||
if (this.isDragTowardWorkspace_(dx, dy) || !this.scrollbar_.isVisible()) {
|
||||
// Immediately create a block.
|
||||
return true;
|
||||
} else {
|
||||
// Immediately move to free mode - the drag is away from the workspace.
|
||||
this.dragMode_ = Blockly.DRAG_FREE;
|
||||
return false;
|
||||
}
|
||||
var gesture = this.targetWorkspace_.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.handleFlyoutStart(e, this);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine if a drag delta is toward the workspace, based on the position
|
||||
* and orientation of the flyout. This is used in determineDragIntention_ to
|
||||
* determine if a new block should be created or if the flyout should scroll.
|
||||
* @param {number} dx X delta of the drag.
|
||||
* @param {number} dy Y delta of the drag.
|
||||
* and orientation of the flyout. This to decide if a new block should be
|
||||
* created or if the flyout should scroll.
|
||||
* @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has
|
||||
* moved from the position at mouse down, in pixel units.
|
||||
* @return {boolean} true if the drag is toward the workspace.
|
||||
* @private
|
||||
* @package
|
||||
*/
|
||||
Blockly.Flyout.prototype.isDragTowardWorkspace_ = function(dx, dy) {
|
||||
Blockly.Flyout.prototype.isDragTowardWorkspace = function(currentDragDeltaXY) {
|
||||
var dx = currentDragDeltaXY.x;
|
||||
var dy = currentDragDeltaXY.y;
|
||||
// Direction goes from -180 to 180, with 0 toward the right and 90 on top.
|
||||
var dragDirection = Math.atan2(dy, dx) / Math.PI * 180;
|
||||
|
||||
@@ -1150,62 +936,46 @@ Blockly.Flyout.prototype.isDragTowardWorkspace_ = function(dx, dy) {
|
||||
|
||||
/**
|
||||
* Create a copy of this block on the workspace.
|
||||
* @param {!Blockly.Block} originBlock The flyout block to copy.
|
||||
* @return {!Function} Function to call when block is clicked.
|
||||
* @private
|
||||
* @param {!Blockly.BlockSvg} originalBlock The block to copy from the flyout.
|
||||
* @return {Blockly.BlockSvg} The newly created block, or null if something
|
||||
* went wrong with deserialization.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Flyout.prototype.createBlockFunc_ = function(originBlock) {
|
||||
var flyout = this;
|
||||
return function(e) {
|
||||
if (Blockly.utils.isRightButton(e)) {
|
||||
// Right-click. Don't create a block, let the context menu show.
|
||||
return;
|
||||
}
|
||||
if (originBlock.disabled) {
|
||||
// Beyond capacity.
|
||||
return;
|
||||
}
|
||||
Blockly.Events.disable();
|
||||
// Disable workspace resizing. Reenable at the end of the drag. This avoids
|
||||
// a spurious resize between creating the new block and placing it in the
|
||||
// workspace.
|
||||
flyout.targetWorkspace_.setResizesEnabled(false);
|
||||
try {
|
||||
var block = flyout.placeNewBlock_(originBlock);
|
||||
} finally {
|
||||
Blockly.Events.enable();
|
||||
}
|
||||
if (Blockly.Events.isEnabled()) {
|
||||
Blockly.Events.setGroup(true);
|
||||
Blockly.Events.fire(new Blockly.Events.Create(block));
|
||||
}
|
||||
if (flyout.autoClose) {
|
||||
flyout.hide();
|
||||
} else {
|
||||
flyout.filterForCapacity_();
|
||||
}
|
||||
|
||||
// Re-render the blocks before starting the drag:
|
||||
// Force a render on IE and Edge to get around the issue described in
|
||||
// Blockly.Field.getCachedWidth
|
||||
Blockly.Flyout.prototype.createBlock = function(originalBlock) {
|
||||
var newBlock = null;
|
||||
Blockly.Events.disable();
|
||||
this.targetWorkspace_.setResizesEnabled(false);
|
||||
try {
|
||||
newBlock = this.placeNewBlock_(originalBlock);
|
||||
//Force a render on IE and Edge to get around the issue described in
|
||||
//Blockly.Field.getCachedWidth
|
||||
if (goog.userAgent.IE || goog.userAgent.EDGE) {
|
||||
var blocks = block.getDescendants();
|
||||
var blocks = newBlock.getDescendants();
|
||||
for (var i = blocks.length - 1; i >= 0; i--) {
|
||||
blocks[i].render(false);
|
||||
}
|
||||
}
|
||||
// Close the flyout.
|
||||
Blockly.hideChaff();
|
||||
} finally {
|
||||
Blockly.Events.enable();
|
||||
}
|
||||
|
||||
// Start a dragging operation on the new block.
|
||||
block.onMouseDown_(e);
|
||||
Blockly.dragMode_ = Blockly.DRAG_FREE;
|
||||
block.setDragging_(true);
|
||||
block.moveToDragSurface_();
|
||||
};
|
||||
if (Blockly.Events.isEnabled()) {
|
||||
Blockly.Events.setGroup(true);
|
||||
Blockly.Events.fire(new Blockly.Events.Create(newBlock));
|
||||
}
|
||||
if (this.autoClose) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.filterForCapacity_();
|
||||
}
|
||||
return newBlock;
|
||||
};
|
||||
|
||||
/**
|
||||
* Copy a block from the flyout to the workspace and position it correctly.
|
||||
* @param {!Blockly.Block} originBlock The flyout block to copy..
|
||||
* @param {!Blockly.Block} originBlock The flyout block to copy.
|
||||
* @return {!Blockly.Block} The new block in the main workspace.
|
||||
* @private
|
||||
*/
|
||||
@@ -1289,7 +1059,8 @@ Blockly.Flyout.prototype.placeNewBlock_ = function(originBlock) {
|
||||
|
||||
/**
|
||||
* Filter the blocks on the flyout to disable the ones that are above the
|
||||
* capacity limit.
|
||||
* capacity limit. For instance, if the user may only place two more blocks on
|
||||
* the workspace, an "a + b" block that has two shadow blocks would be disabled.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.prototype.filterForCapacity_ = function() {
|
||||
@@ -1336,35 +1107,6 @@ Blockly.Flyout.prototype.getClientRect = function() {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Stop binding to the global mouseup and mousemove events.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Flyout.terminateDrag_ = function() {
|
||||
if (Blockly.Flyout.startFlyout_) {
|
||||
// User was dragging the flyout background, and has stopped.
|
||||
if (Blockly.Flyout.startFlyout_.dragMode_ == Blockly.DRAG_FREE) {
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
}
|
||||
Blockly.Flyout.startFlyout_.dragMode_ = Blockly.DRAG_NONE;
|
||||
Blockly.Flyout.startFlyout_ = null;
|
||||
}
|
||||
if (Blockly.Flyout.onMouseUpWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.Flyout.onMouseUpWrapper_);
|
||||
Blockly.Flyout.onMouseUpWrapper_ = null;
|
||||
}
|
||||
if (Blockly.Flyout.onMouseMoveBlockWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveBlockWrapper_);
|
||||
Blockly.Flyout.onMouseMoveBlockWrapper_ = null;
|
||||
}
|
||||
if (Blockly.Flyout.onMouseMoveWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.Flyout.onMouseMoveWrapper_);
|
||||
Blockly.Flyout.onMouseMoveWrapper_ = null;
|
||||
}
|
||||
Blockly.Flyout.startDownEvent_ = null;
|
||||
Blockly.Flyout.startBlock_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Compute height of flyout. Position button under each block.
|
||||
* For RTL: Lay out the blocks right-aligned.
|
||||
@@ -1483,3 +1225,12 @@ Blockly.Flyout.prototype.reflow = function() {
|
||||
this.workspace_.addChangeListener(this.reflowWrapper_);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {boolean} True if this flyout may be scrolled with a scrollbar or by
|
||||
* dragging.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Flyout.prototype.isScrollable = function() {
|
||||
return this.scrollbar_ ? this.scrollbar_.isVisible() : false;
|
||||
};
|
||||
|
||||
+19
-8
@@ -115,6 +115,13 @@ Blockly.FlyoutButton.prototype.width = 0;
|
||||
*/
|
||||
Blockly.FlyoutButton.prototype.height = 0;
|
||||
|
||||
/**
|
||||
* Opaque data that can be passed to Blockly.unbindEvent_.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.FlyoutButton.prototype.onMouseUpWrapper_ = null;
|
||||
|
||||
/**
|
||||
* Create the button elements.
|
||||
* @return {!Element} The button's SVG group.
|
||||
@@ -163,6 +170,9 @@ Blockly.FlyoutButton.prototype.createDom = function() {
|
||||
svgText.setAttribute('y', this.height - Blockly.FlyoutButton.MARGIN);
|
||||
|
||||
this.updateTransform_();
|
||||
|
||||
this.mouseUpWrapper_ = Blockly.bindEventWithChecks_(this.svgGroup_, 'mouseup',
|
||||
this, this.onMouseUp_);
|
||||
return this.svgGroup_;
|
||||
};
|
||||
|
||||
@@ -207,6 +217,9 @@ Blockly.FlyoutButton.prototype.getTargetWorkspace = function() {
|
||||
* Dispose of this button.
|
||||
*/
|
||||
Blockly.FlyoutButton.prototype.dispose = function() {
|
||||
if (this.onMouseUpWrapper_) {
|
||||
Blockly.unbindEvent_(this.onMouseUpWrapper_);
|
||||
}
|
||||
if (this.svgGroup_) {
|
||||
goog.dom.removeNode(this.svgGroup_);
|
||||
this.svgGroup_ = null;
|
||||
@@ -218,15 +231,13 @@ Blockly.FlyoutButton.prototype.dispose = function() {
|
||||
/**
|
||||
* Do something when the button is clicked.
|
||||
* @param {!Event} e Mouse up event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.FlyoutButton.prototype.onMouseUp = function(e) {
|
||||
// Don't scroll the page.
|
||||
e.preventDefault();
|
||||
// Don't propagate mousewheel event (zooming).
|
||||
e.stopPropagation();
|
||||
// Stop binding to mouseup and mousemove events--flyout mouseup would normally
|
||||
// do this, but we're skipping that.
|
||||
Blockly.Flyout.terminateDrag_();
|
||||
Blockly.FlyoutButton.prototype.onMouseUp_ = function(e) {
|
||||
var gesture = this.targetWorkspace_.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.cancel();
|
||||
}
|
||||
|
||||
// Call the callback registered to this button.
|
||||
if (this.callback_) {
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Editor
|
||||
*
|
||||
* Copyright 2017 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 Methods for dragging a flyout visually.
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.FlyoutDragger');
|
||||
|
||||
goog.require('Blockly.WorkspaceDragger');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.math.Coordinate');
|
||||
|
||||
|
||||
/**
|
||||
* Class for a flyout dragger. It moves a flyout workspace around when it is
|
||||
* being dragged by a mouse or touch.
|
||||
* Note that the workspace itself manages whether or not it has a drag surface
|
||||
* and how to do translations based on that. This simply passes the right
|
||||
* commands based on events.
|
||||
* @param {!Blockly.Flyout} flyout The flyout to drag.
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.FlyoutDragger = function(flyout) {
|
||||
Blockly.FlyoutDragger.superClass_.constructor.call(this,
|
||||
flyout.getWorkspace());
|
||||
|
||||
/**
|
||||
* The scrollbar to update to move the flyout.
|
||||
* Unlike the main workspace, the flyout has only one scrollbar, in either the
|
||||
* horizontal or the vertical direction.
|
||||
* @type {!Blockly.Scrollbar}
|
||||
* @private
|
||||
*/
|
||||
this.scrollbar_ = flyout.scrollbar_;
|
||||
|
||||
/**
|
||||
* Whether the flyout scrolls horizontally. If false, the flyout scrolls
|
||||
* vertically.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.horizontalLayout_ = flyout.horizontalLayout_;
|
||||
};
|
||||
goog.inherits(Blockly.FlyoutDragger, Blockly.WorkspaceDragger);
|
||||
|
||||
/**
|
||||
* Move the appropriate scrollbar to drag the flyout.
|
||||
* Since flyouts only scroll in one direction at a time, this will discard one
|
||||
* of the calculated values.
|
||||
* x and y are in pixels.
|
||||
* @param {number} x The new x position to move the scrollbar to.
|
||||
* @param {number} y The new y position to move the scrollbar to.
|
||||
* @private
|
||||
*/
|
||||
Blockly.FlyoutDragger.prototype.updateScroll_ = function(x, y) {
|
||||
// Move the scrollbar and the flyout will scroll automatically.
|
||||
if (this.horizontalLayout_) {
|
||||
this.scrollbar_.set(x);
|
||||
} else {
|
||||
this.scrollbar_.set(y);
|
||||
}
|
||||
};
|
||||
+753
@@ -0,0 +1,753 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Editor
|
||||
*
|
||||
* Copyright 2017 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 The class representing an in-progress gesture, usually a drag
|
||||
* or a tap.
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.Gesture');
|
||||
|
||||
goog.require('Blockly.BlockDragger');
|
||||
goog.require('Blockly.constants');
|
||||
goog.require('Blockly.FlyoutDragger');
|
||||
goog.require('Blockly.Tooltip');
|
||||
goog.require('Blockly.Touch');
|
||||
goog.require('Blockly.WorkspaceDragger');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.math.Coordinate');
|
||||
|
||||
|
||||
/**
|
||||
* NB: In this file "start" refers to touchstart, mousedown, and pointerstart
|
||||
* events. "End" refers to touchend, mouseup, and pointerend events.
|
||||
* TODO: Consider touchcancel/pointercancel.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class for one gesture.
|
||||
* @param {!Event} e The event that kicked off this gesture.
|
||||
* @param {!Blockly.WorkspaceSvg} creatorWorkspace The workspace that created
|
||||
* this gesture and has a reference to it.
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.Gesture = function(e, creatorWorkspace) {
|
||||
|
||||
/**
|
||||
* The position of the mouse when the gesture started. Units are css pixels,
|
||||
* with (0, 0) at the top left of the browser window (mouseEvent clientX/Y).
|
||||
* @type {goog.math.Coordinate}
|
||||
*/
|
||||
this.mouseDownXY_ = null;
|
||||
|
||||
/**
|
||||
* How far the mouse has moved during this drag, in pixel units.
|
||||
* (0, 0) is at this.mouseDownXY_.
|
||||
* @type {goog.math.Coordinate}
|
||||
* private
|
||||
*/
|
||||
this.currentDragDeltaXY_ = 0;
|
||||
|
||||
/**
|
||||
* The field that the gesture started on, or null if it did not start on a
|
||||
* field.
|
||||
* @type {Blockly.Field}
|
||||
* @private
|
||||
*/
|
||||
this.startField_ = null;
|
||||
|
||||
/**
|
||||
* The block that the gesture started on, or null if it did not block on a
|
||||
* field.
|
||||
* @type {Blockly.BlockSvg}
|
||||
* @private
|
||||
*/
|
||||
this.startBlock_ = null;
|
||||
|
||||
/**
|
||||
* The workspace that the gesture started on. There may be multiple
|
||||
* workspaces on a page; this is more accurate than using
|
||||
* Blockly.getMainWorkspace().
|
||||
* @type {Blockly.WorkspaceSvg}
|
||||
* @private
|
||||
*/
|
||||
this.startWorkspace_ = null;
|
||||
|
||||
/**
|
||||
* The workspace that created this gesture. This workspace keeps a reference
|
||||
* to the gesture, which will need to be cleared at deletion.
|
||||
* This may be different from the start workspace. For instance, a flyout is
|
||||
* a workspace, but its parent workspace manages gestures for it.
|
||||
* @type {Blockly.WorkspaceSvg}
|
||||
* @private
|
||||
*/
|
||||
this.creatorWorkspace_ = creatorWorkspace;
|
||||
|
||||
/**
|
||||
* Whether the pointer has at any point moved out of the drag radius.
|
||||
* A gesture that exceeds the drag radius is a drag even if it ends exactly at
|
||||
* its start point.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.hasExceededDragRadius_ = false;
|
||||
|
||||
/**
|
||||
* Whether the workspace is currently being dragged.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.isDraggingWorkspace_ = false;
|
||||
|
||||
/**
|
||||
* Whether the block is currently being dragged.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.isDraggingBlock_ = false;
|
||||
|
||||
/**
|
||||
* The event that most recently updated this gesture.
|
||||
* @type {!Event}
|
||||
* @private
|
||||
*/
|
||||
this.mostRecentEvent_ = e;
|
||||
|
||||
/**
|
||||
* A handle to use to unbind a mouse move listener at the end of a drag.
|
||||
* Opaque data returned from Blockly.bindEventWithChecks_.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
this.onMoveWrapper_ = null;
|
||||
|
||||
/**
|
||||
* A handle to use to unbind a mouse up listener at the end of a drag.
|
||||
* Opaque data returned from Blockly.bindEventWithChecks_.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
this.onUpWrapper_ = null;
|
||||
|
||||
/**
|
||||
* The object tracking a block drag, or null if none is in progress.
|
||||
* @type {Blockly.BlockDragger}
|
||||
* @private
|
||||
*/
|
||||
this.blockDragger_ = null;
|
||||
|
||||
/**
|
||||
* The object tracking a workspace or flyout workspace drag, or null if none
|
||||
* is in progress.
|
||||
* @type {Blockly.WorkspaceDragger}
|
||||
* @private
|
||||
*/
|
||||
this.workspaceDragger_ = null;
|
||||
|
||||
/**
|
||||
* The flyout a gesture started in, if any.
|
||||
* @type {Blockly.Flyout}
|
||||
* @private
|
||||
*/
|
||||
this.flyout_ = null;
|
||||
|
||||
/**
|
||||
* Boolean for sanity-checking that some code is only called once.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.calledUpdateIsDragging_ = false;
|
||||
|
||||
/**
|
||||
* Boolean for sanity-checking that some code is only called once.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.hasStarted_ = false;
|
||||
|
||||
/**
|
||||
* Boolean used internally to break a cycle in disposal.
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
this.isEnding_ = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sever all links from this object.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.dispose = function() {
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
Blockly.Tooltip.unblock();
|
||||
// Clear the owner's reference to this gesture.
|
||||
this.creatorWorkspace_.clearGesture();
|
||||
|
||||
if (this.onMoveWrapper_) {
|
||||
Blockly.unbindEvent_(this.onMoveWrapper_);
|
||||
}
|
||||
if (this.onUpWrapper_) {
|
||||
Blockly.unbindEvent_(this.onUpWrapper_);
|
||||
}
|
||||
|
||||
|
||||
this.startField_ = null;
|
||||
this.startBlock_ = null;
|
||||
this.startWorkspace_ = null;
|
||||
this.flyout_ = null;
|
||||
|
||||
if (this.blockDragger_) {
|
||||
this.blockDragger_.dispose();
|
||||
this.blockDragger_ = null;
|
||||
}
|
||||
if (this.workspaceDragger_) {
|
||||
this.workspaceDragger_.dispose();
|
||||
this.workspaceDragger_ = null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Update internal state based on an event.
|
||||
* @param {!Event} e The most recent mouse or touch event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.updateFromEvent_ = function(e) {
|
||||
var currentXY = new goog.math.Coordinate(e.clientX, e.clientY);
|
||||
var changed = this.updateDragDelta_(currentXY);
|
||||
// Exceeded the drag radius for the first time.
|
||||
if (changed){
|
||||
this.updateIsDragging_();
|
||||
Blockly.longStop_();
|
||||
}
|
||||
this.mostRecentEvent_ = e;
|
||||
};
|
||||
|
||||
/**
|
||||
* DO MATH to set currentDragDeltaXY_ based on the most recent mouse position.
|
||||
* @param {!goog.math.Coordinate} currentXY The most recent mouse/pointer
|
||||
* position, in pixel units, with (0, 0) at the window's top left corner.
|
||||
* @return {boolean} True if the drag just exceeded the drag radius for the
|
||||
* first time.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.updateDragDelta_ = function(currentXY) {
|
||||
this.currentDragDeltaXY_ = goog.math.Coordinate.difference(currentXY,
|
||||
this.mouseDownXY_);
|
||||
|
||||
if (!this.hasExceededDragRadius_) {
|
||||
var currentDragDelta = goog.math.Coordinate.magnitude(
|
||||
this.currentDragDeltaXY_);
|
||||
|
||||
// The flyout has a different drag radius from the rest of Blockly.
|
||||
var limitRadius = this.flyout_ ? Blockly.FLYOUT_DRAG_RADIUS :
|
||||
Blockly.DRAG_RADIUS;
|
||||
|
||||
this.hasExceededDragRadius_ = currentDragDelta > limitRadius;
|
||||
return this.hasExceededDragRadius_;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Update this gesture to record whether a block is being dragged from the
|
||||
* flyout.
|
||||
* This function should be called on a mouse/touch move event the first time the
|
||||
* drag radius is exceeded. It should be called no more than once per gesture.
|
||||
* If a block should be dragged from the flyout this function creates the new
|
||||
* block on the main workspace and updates startBlock_ and startWorkspace_.
|
||||
* @return {boolean} True if a block is being dragged from the flyout.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.updateIsDraggingFromFlyout_ = function() {
|
||||
// Disabled blocks may not be dragged from the flyout.
|
||||
if (this.startBlock_.disabled) {
|
||||
return false;
|
||||
}
|
||||
if (!this.flyout_.isScrollable() ||
|
||||
this.flyout_.isDragTowardWorkspace(this.currentDragDeltaXY_)) {
|
||||
this.startWorkspace_ = this.flyout_.targetWorkspace_;
|
||||
this.startWorkspace_.updateScreenCalculationsIfScrolled();
|
||||
// Start the event group now, so that the same event group is used for block
|
||||
// creation and block dragging.
|
||||
if (!Blockly.Events.getGroup()) {
|
||||
Blockly.Events.setGroup(true);
|
||||
}
|
||||
this.startBlock_ = this.flyout_.createBlock(this.startBlock_);
|
||||
this.startBlock_.select();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Update this gesture to record whether a block is being dragged.
|
||||
* This function should be called on a mouse/touch move event the first time the
|
||||
* drag radius is exceeded. It should be called no more than once per gesture.
|
||||
* If a block should be dragged, either from the flyout or in the workspace,
|
||||
* this function creates the necessary BlockDragger and starts the drag.
|
||||
* @return {boolean} true if a block is being dragged.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.updateIsDraggingBlock_ = function() {
|
||||
if (!this.startBlock_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.flyout_) {
|
||||
this.isDraggingBlock_ = this.updateIsDraggingFromFlyout_();
|
||||
} else if (this.startBlock_.isMovable()){
|
||||
this.isDraggingBlock_ = true;
|
||||
}
|
||||
|
||||
if (this.isDraggingBlock_) {
|
||||
this.startDraggingBlock_();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Update this gesture to record whether a workspace is being dragged.
|
||||
* This function should be called on a mouse/touch move event the first time the
|
||||
* drag radius is exceeded. It should be called no more than once per gesture.
|
||||
* If a workspace is being dragged this function creates the necessary
|
||||
* WorkspaceDragger or FlyoutDragger and starts the drag.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.updateIsDraggingWorkspace_ = function() {
|
||||
var wsMovable = this.flyout_ ? this.flyout_.isScrollable() :
|
||||
this.startWorkspace_ && this.startWorkspace_.isDraggable();
|
||||
|
||||
if (!wsMovable) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.flyout_) {
|
||||
this.workspaceDragger_ = new Blockly.FlyoutDragger(this.flyout_);
|
||||
} else {
|
||||
this.workspaceDragger_ = new Blockly.WorkspaceDragger(this.startWorkspace_);
|
||||
}
|
||||
|
||||
this.isDraggingWorkspace_ = true;
|
||||
this.workspaceDragger_.startDrag();
|
||||
};
|
||||
|
||||
/**
|
||||
* Update this gesture to record whether anything is being dragged.
|
||||
* This function should be called on a mouse/touch move event the first time the
|
||||
* drag radius is exceeded. It should be called no more than once per gesture.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.updateIsDragging_ = function() {
|
||||
// Sanity check.
|
||||
goog.asserts.assert(!this.calledUpdateIsDragging_,
|
||||
'updateIsDragging_ should only be called once per gesture.');
|
||||
this.calledUpdateIsDragging_ = true;
|
||||
|
||||
// First check if it was a block drag.
|
||||
if (this.updateIsDraggingBlock_()) {
|
||||
return;
|
||||
}
|
||||
// Then check if it's a workspace drag.
|
||||
this.updateIsDraggingWorkspace_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a block dragger and start dragging the selected block.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.startDraggingBlock_ = function() {
|
||||
this.blockDragger_ = new Blockly.BlockDragger(this.startBlock_,
|
||||
this.startWorkspace_);
|
||||
this.blockDragger_.startBlockDrag(this.currentDragDeltaXY_);
|
||||
this.blockDragger_.dragBlock(this.mostRecentEvent_,
|
||||
this.currentDragDeltaXY_);
|
||||
};
|
||||
|
||||
/**
|
||||
* Start a gesture: update the workspace to indicate that a gesture is in
|
||||
* progress and bind mousemove and mouseup handlers.
|
||||
* @param {!Event} e A mouse down or touch start event.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.doStart = function(e) {
|
||||
if (Blockly.utils.isTargetInput(e)) {
|
||||
this.cancel();
|
||||
return;
|
||||
}
|
||||
this.hasStarted_ = true;
|
||||
|
||||
Blockly.BlockSvg.disconnectUiStop_();
|
||||
this.startWorkspace_.updateScreenCalculationsIfScrolled();
|
||||
if (this.startWorkspace_.isMutator) {
|
||||
// Mutator's coordinate system could be out of date because the bubble was
|
||||
// dragged, the block was moved, the parent workspace zoomed, etc.
|
||||
this.startWorkspace_.resize();
|
||||
}
|
||||
this.startWorkspace_.markFocused();
|
||||
this.mostRecentEvent_ = e;
|
||||
|
||||
// Hide chaff also hides the flyout, so don't do it if the click is in a flyout.
|
||||
Blockly.hideChaff(!!this.flyout_);
|
||||
Blockly.Tooltip.block();
|
||||
|
||||
if (this.startBlock_) {
|
||||
this.startBlock_.select();
|
||||
}
|
||||
|
||||
if (Blockly.utils.isRightButton(e)) {
|
||||
this.handleRightClick(e);
|
||||
return;
|
||||
}
|
||||
|
||||
if (goog.string.caseInsensitiveEquals(e.type, 'touchstart')) {
|
||||
Blockly.longStart_(e, this);
|
||||
}
|
||||
|
||||
this.mouseDownXY_ = new goog.math.Coordinate(e.clientX, e.clientY);
|
||||
|
||||
this.onMoveWrapper_ = Blockly.bindEventWithChecks_(
|
||||
document, 'mousemove', null, this.handleMove.bind(this));
|
||||
this.onUpWrapper_ = Blockly.bindEventWithChecks_(
|
||||
document, 'mouseup', null, this.handleUp.bind(this));
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mouse move or touch move event.
|
||||
* @param {!Event} e A mouse move or touch move event.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.handleMove = function(e) {
|
||||
this.updateFromEvent_(e);
|
||||
if (this.isDraggingWorkspace_) {
|
||||
this.workspaceDragger_.drag(this.currentDragDeltaXY_);
|
||||
} else if (this.isDraggingBlock_) {
|
||||
this.blockDragger_.dragBlock(this.mostRecentEvent_,
|
||||
this.currentDragDeltaXY_);
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mouse up or touch end event.
|
||||
* @param {!Event} e A mouse up or touch end event.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.handleUp = function(e) {
|
||||
this.updateFromEvent_(e);
|
||||
Blockly.longStop_();
|
||||
|
||||
if (this.isEnding_) {
|
||||
console.log('Trying to end a gesture recursively.');
|
||||
return;
|
||||
}
|
||||
this.isEnding_ = true;
|
||||
// The ordering of these checks is important: drags have higher priority than
|
||||
// clicks. Fields have higher priority than blocks; blocks have higher
|
||||
// priority than workspaces.
|
||||
if (this.isDraggingBlock_) {
|
||||
this.blockDragger_.endBlockDrag(e, this.currentDragDeltaXY_);
|
||||
} else if (this.isDraggingWorkspace_) {
|
||||
this.workspaceDragger_.endDrag(this.currentDragDeltaXY_);
|
||||
} else if (this.isFieldClick_()) {
|
||||
this.doFieldClick_();
|
||||
} else if (this.isBlockClick_()) {
|
||||
this.doBlockClick_();
|
||||
} else if (this.isWorkspaceClick_()) {
|
||||
this.doWorkspaceClick_();
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
this.dispose();
|
||||
};
|
||||
|
||||
/**
|
||||
* Cancel an in-progress gesture. If a workspace or block drag is in progress,
|
||||
* end the drag at the most recent location.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.cancel = function() {
|
||||
// Disposing of a block cancels in-progress drags, but dragging to a delete
|
||||
// area disposes of a block and leads to recursive disposal. Break that cycle.
|
||||
if (this.isEnding_) {
|
||||
return;
|
||||
}
|
||||
Blockly.longStop_();
|
||||
if (this.isDraggingBlock_) {
|
||||
this.blockDragger_.endBlockDrag(this.mostRecentEvent_,
|
||||
this.currentDragDeltaXY_);
|
||||
} else if (this.isDraggingWorkspace_) {
|
||||
this.workspaceDragger_.endDrag(this.currentDragDeltaXY_);
|
||||
}
|
||||
this.dispose();
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a real or faked right-click event by showing a context menu.
|
||||
* @param {!Event} e A mouse move or touch move event.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.handleRightClick = function(e) {
|
||||
if (this.startBlock_) {
|
||||
this.bringBlockToFront_();
|
||||
Blockly.hideChaff(this.flyout_);
|
||||
this.startBlock_.showContextMenu_(e);
|
||||
} else if (this.startWorkspace_ && !this.flyout_) {
|
||||
Blockly.hideChaff();
|
||||
this.startWorkspace_.showContextMenu_(e);
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
this.dispose();
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mousedown/touchstart event on a workspace.
|
||||
* @param {!Event} e A mouse down or touch start event.
|
||||
* @param {!Blockly.Workspace} ws The workspace the event hit.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.handleWsStart = function(e, ws) {
|
||||
goog.asserts.assert(!this.hasStarted_,
|
||||
'Tried to call gesture.handleWsStart, but the gesture had already been ' +
|
||||
'started.');
|
||||
this.setStartWorkspace_(ws);
|
||||
this.mostRecentEvent_ = e;
|
||||
this.doStart(e);
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mousedown/touchstart event on a flyout.
|
||||
* @param {!Event} e A mouse down or touch start event.
|
||||
* @param {!Blockly.Flyout} flyout The flyout the event hit.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.handleFlyoutStart = function(e, flyout) {
|
||||
goog.asserts.assert(!this.hasStarted_,
|
||||
'Tried to call gesture.handleFlyoutStart, but the gesture had already been ' +
|
||||
'started.');
|
||||
this.setStartFlyout_(flyout);
|
||||
this.handleWsStart(e, flyout.getWorkspace());
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mousedown/touchstart event on a block.
|
||||
* @param {!Event} e A mouse down or touch start event.
|
||||
* @param {!Blockly.BlockSvg} block The block the event hit.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.handleBlockStart = function(e, block) {
|
||||
goog.asserts.assert(!this.hasStarted_,
|
||||
'Tried to call gesture.handleBlockStart, but the gesture had already been ' +
|
||||
'started.');
|
||||
this.setStartBlock(block);
|
||||
this.mostRecentEvent_ = e;
|
||||
};
|
||||
|
||||
/* Begin functions defining what actions to take to execute clicks on each type
|
||||
* of target. Any developer wanting to add behaviour on clicks should modify
|
||||
* only this code. */
|
||||
|
||||
/**
|
||||
* Execute a field click.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.doFieldClick_ = function() {
|
||||
this.startField_.showEditor_();
|
||||
this.bringBlockToFront_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Execute a block click.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.doBlockClick_ = function() {
|
||||
// Block click in an autoclosing flyout.
|
||||
if (this.flyout_ && this.flyout_.autoClose) {
|
||||
if (!Blockly.Events.getGroup()) {
|
||||
Blockly.Events.setGroup(true);
|
||||
}
|
||||
var newBlock = this.flyout_.createBlock(this.startBlock_);
|
||||
newBlock.scheduleSnapAndBump();
|
||||
} else {
|
||||
Blockly.Events.fire(
|
||||
new Blockly.Events.Ui(this.startBlock_, 'click', undefined, undefined));
|
||||
}
|
||||
this.bringBlockToFront_();
|
||||
Blockly.Events.setGroup(false);
|
||||
};
|
||||
|
||||
/**
|
||||
* Execute a workspace click.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.doWorkspaceClick_ = function() {
|
||||
if (Blockly.selected) {
|
||||
Blockly.selected.unselect();
|
||||
}
|
||||
};
|
||||
|
||||
/* End functions defining what actions to take to execute clicks on each type
|
||||
* of target. */
|
||||
|
||||
/**
|
||||
* Move the dragged/clicked block to the front of the workspace so that it is
|
||||
* not occluded by other blocks.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.bringBlockToFront_ = function() {
|
||||
// Blocks in the flyout don't overlap, so skip the work.
|
||||
if (this.startBlock_ && !this.flyout_) {
|
||||
this.startBlock_.bringToFront();
|
||||
}
|
||||
};
|
||||
|
||||
/* Begin functions for populating a gesture at mouse down. */
|
||||
|
||||
/**
|
||||
* Record the field that a gesture started on.
|
||||
* @param {Blockly.Field} field The field the gesture started on.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.setStartField = function(field) {
|
||||
goog.asserts.assert(!this.hasStarted_,
|
||||
'Tried to call gesture.setStartField, but the gesture had already been ' +
|
||||
'started.');
|
||||
if (!this.startField_) {
|
||||
this.startField_ = field;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Record the block that a gesture started on.
|
||||
* If the block is a shadow, record the parent. If the block is in the flyout,
|
||||
* use the root block from the block group.
|
||||
* @param {Blockly.BlockSvg} block The block the gesture started on.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.setStartBlock = function(block) {
|
||||
if (!this.startBlock_) {
|
||||
if (block.isShadow()) {
|
||||
this.setStartBlock(block.getParent());
|
||||
} else if (block.isInFlyout && block != block.getRootBlock()) {
|
||||
this.setStartBlock(block.getRootBlock());
|
||||
} else {
|
||||
this.startBlock_ = block;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Record the workspace that a gesture started on.
|
||||
* @param {Blockly.WorkspaceSvg} ws The workspace the gesture started on.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.setStartWorkspace_ = function(ws) {
|
||||
if (!this.startWorkspace_) {
|
||||
this.startWorkspace_ = ws;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Record the flyout that a gesture started on.
|
||||
* @param {Blockly.Flyout} flyout The flyout the gesture started on.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.setStartFlyout_ = function(flyout) {
|
||||
if (!this.flyout_) {
|
||||
this.flyout_ = flyout;
|
||||
}
|
||||
};
|
||||
|
||||
/* End functions for populating a gesture at mouse down. */
|
||||
|
||||
/* Begin helper functions defining types of clicks. Any developer wanting
|
||||
* to change the definition of a click should modify only this code. */
|
||||
|
||||
/**
|
||||
* Whether this gesture is a click on a block. This should only be called when
|
||||
* ending a gesture (mouse up, touch end).
|
||||
* @return {boolean} whether this gesture was a click on a block.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.isBlockClick_ = function() {
|
||||
// A block click starts on a block, never escapes the drag radius, and is not
|
||||
// a field click.
|
||||
var hasStartBlock = !!this.startBlock_;
|
||||
return hasStartBlock && !this.hasExceededDragRadius_ && !this.isFieldClick_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether this gesture is a click on a field. This should only be called when
|
||||
* ending a gesture (mouse up, touch end).
|
||||
* @return {boolean} whether this gesture was a click on a field.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.isFieldClick_ = function() {
|
||||
var fieldEditable = this.startField_ ?
|
||||
this.startField_.isCurrentlyEditable() : false;
|
||||
return fieldEditable && !this.hasExceededDragRadius_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether this gesture is a click on a workspace. This should only be called
|
||||
* when ending a gesture (mouse up, touch end).
|
||||
* @return {boolean} whether this gesture was a click on a workspace.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Gesture.prototype.isWorkspaceClick_ = function() {
|
||||
var onlyTouchedWorkspace = !this.startBlock_ && !this.startField_;
|
||||
return onlyTouchedWorkspace && !this.hasExceededDragRadius_;
|
||||
};
|
||||
|
||||
/* End helper functions defining types of clicks. */
|
||||
|
||||
/**
|
||||
* Whether this gesture is a drag of either a workspace or block.
|
||||
* This function is called externally to block actions that cannot be taken
|
||||
* mid-drag (e.g. using the keyboard to delete the selected blocks).
|
||||
* @return {boolean} true if this gesture is a drag of a workspace or block.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.isDragging = function() {
|
||||
return this.isDraggingWorkspace_ || this.isDraggingBlock_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether this gesture has already been started. In theory every mouse down
|
||||
* has a corresponding mouse up, but in reality it is possible to lose a
|
||||
* mouse up, leaving an in-process gesture hanging.
|
||||
* @return {boolean} whether this gesture was a click on a workspace.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Gesture.prototype.hasStarted = function() {
|
||||
return this.hasStarted_;
|
||||
};
|
||||
+3
-2
@@ -170,7 +170,7 @@ Blockly.Icon.prototype.renderIcon = function(cursorX) {
|
||||
|
||||
/**
|
||||
* Notification that the icon has moved. Update the arrow accordingly.
|
||||
* @param {!goog.math.Coordinate} xy Absolute location.
|
||||
* @param {!goog.math.Coordinate} xy Absolute location in workspace coordinates.
|
||||
*/
|
||||
Blockly.Icon.prototype.setIconLocation = function(xy) {
|
||||
this.iconXY_ = xy;
|
||||
@@ -197,7 +197,8 @@ Blockly.Icon.prototype.computeIconLocation = function() {
|
||||
|
||||
/**
|
||||
* Returns the center of the block's icon relative to the surface.
|
||||
* @return {!goog.math.Coordinate} Object with x and y properties.
|
||||
* @return {!goog.math.Coordinate} Object with x and y properties in workspace
|
||||
* coordinates.
|
||||
*/
|
||||
Blockly.Icon.prototype.getIconLocation = function() {
|
||||
return this.iconXY_;
|
||||
|
||||
+1
-5
@@ -217,7 +217,7 @@ Blockly.createMainWorkspace_ = function(svg, options, blockDragSurface, workspac
|
||||
|
||||
if (!options.readOnly && !options.hasScrollbars) {
|
||||
var workspaceChanged = function() {
|
||||
if (Blockly.dragMode_ == Blockly.DRAG_NONE) {
|
||||
if (!mainWorkspace.isDragging()) {
|
||||
var metrics = mainWorkspace.getMetrics();
|
||||
var edgeLeft = metrics.viewLeft + metrics.absoluteLeft;
|
||||
var edgeTop = metrics.viewTop + metrics.absoluteTop;
|
||||
@@ -343,10 +343,6 @@ Blockly.inject.bindDocumentEvents_ = function() {
|
||||
// should run regardless of what other touch event handlers have run.
|
||||
Blockly.bindEvent_(document, 'touchend', null, Blockly.longStop_);
|
||||
Blockly.bindEvent_(document, 'touchcancel', null, Blockly.longStop_);
|
||||
// Don't use bindEvent_ for document's mouseup since that would create a
|
||||
// corresponding touch handler that would squelch the ability to interact
|
||||
// with non-Blockly elements.
|
||||
document.addEventListener('mouseup', Blockly.onMouseUp_, false);
|
||||
// Some iPad versions don't fire resize after portrait to landscape change.
|
||||
if (goog.userAgent.IPAD) {
|
||||
Blockly.bindEventWithChecks_(window, 'orientationchange', document,
|
||||
|
||||
+6
-2
@@ -289,7 +289,7 @@ Blockly.Mutator.prototype.setVisible = function(visible) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Mutator.prototype.workspaceChanged_ = function() {
|
||||
if (Blockly.dragMode_ == Blockly.DRAG_NONE) {
|
||||
if (!this.workspace_.isDragging()) {
|
||||
var blocks = this.workspace_.getTopBlocks(false);
|
||||
var MARGIN = 20;
|
||||
for (var b = 0, block; block = blocks[b]; b++) {
|
||||
@@ -333,7 +333,11 @@ Blockly.Mutator.prototype.workspaceChanged_ = function() {
|
||||
if (block.rendered) {
|
||||
block.render();
|
||||
}
|
||||
this.resizeBubble_();
|
||||
// Don't update the bubble until the drag has ended, to avoid moving blocks
|
||||
// under the cursor.
|
||||
if (!this.workspace_.isDragging()) {
|
||||
this.resizeBubble_();
|
||||
}
|
||||
Blockly.Events.setGroup(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -69,7 +69,7 @@ Blockly.RenderedConnection.prototype.distanceFrom = function(otherConnection) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.RenderedConnection.prototype.bumpAwayFrom_ = function(staticConnection) {
|
||||
if (Blockly.dragMode_ != Blockly.DRAG_NONE) {
|
||||
if (this.sourceBlock_.workspace.isDragging()) {
|
||||
// Don't move blocks around while the user is doing the same.
|
||||
return;
|
||||
}
|
||||
@@ -168,6 +168,7 @@ Blockly.RenderedConnection.prototype.tighten_ = function() {
|
||||
if (!svgRoot) {
|
||||
throw 'block is not rendered.';
|
||||
}
|
||||
// Workspace coordinates.
|
||||
var xy = Blockly.utils.getRelativeXY(svgRoot);
|
||||
block.getSvgRoot().setAttribute('transform',
|
||||
'translate(' + (xy.x - dx) + ',' + (xy.y - dy) + ')');
|
||||
@@ -177,7 +178,7 @@ Blockly.RenderedConnection.prototype.tighten_ = function() {
|
||||
|
||||
/**
|
||||
* Find the closest compatible connection to this connection.
|
||||
* All parameters are in workspace units
|
||||
* All parameters are in workspace units.
|
||||
* @param {number} maxLimit The maximum radius to another connection.
|
||||
* @param {number} dx Horizontal offset between this connection's location
|
||||
* in the database and the current location (as a result of dragging).
|
||||
|
||||
@@ -240,6 +240,7 @@ Blockly.Scrollbar.prototype.origin_ = new goog.math.Coordinate(0, 0);
|
||||
|
||||
/**
|
||||
* The size of the area within which the scrollbar handle can move.
|
||||
* Coordinate system: pixel coordinates.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
@@ -247,6 +248,7 @@ Blockly.Scrollbar.prototype.scrollViewSize_ = 0;
|
||||
|
||||
/**
|
||||
* The length of the scrollbar handle.
|
||||
* Coordinate system: pixel coordinates.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
@@ -254,6 +256,7 @@ Blockly.Scrollbar.prototype.handleLength_ = 0;
|
||||
|
||||
/**
|
||||
* The offset of the start of the handle from the start of the scrollbar range.
|
||||
* Coordinate system: pixel coordinates.
|
||||
* @type {number}
|
||||
* @private
|
||||
*/
|
||||
|
||||
+1
-1
@@ -423,7 +423,7 @@ Blockly.Toolbox.prototype.addDeleteStyle = function() {
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove styles from the toolbox that indicate blocks will be deleted.
|
||||
* Remove styles from the toolbox that indicate blocks will be deleted.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Toolbox.prototype.removeDeleteStyle = function() {
|
||||
|
||||
+42
-3
@@ -44,6 +44,13 @@ goog.require('goog.dom.TagName');
|
||||
*/
|
||||
Blockly.Tooltip.visible = false;
|
||||
|
||||
/**
|
||||
* Is someone else blocking the tooltip from being shown?
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Tooltip.blocked_ = false;
|
||||
|
||||
/**
|
||||
* Maximum width (in characters) of a tooltip.
|
||||
*/
|
||||
@@ -153,6 +160,10 @@ Blockly.Tooltip.bindMouseEvents = function(element) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Tooltip.onMouseOver_ = function(e) {
|
||||
if (Blockly.Tooltip.blocked_) {
|
||||
// Someone doesn't want us to show tooltips.
|
||||
return;
|
||||
}
|
||||
// If the tooltip is an object, treat it as a pointer to the next object in
|
||||
// the chain to look at. Terminate when a string or function is found.
|
||||
var element = e.target;
|
||||
@@ -174,6 +185,10 @@ Blockly.Tooltip.onMouseOver_ = function(e) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Tooltip.onMouseOut_ = function(e) {
|
||||
if (Blockly.Tooltip.blocked_) {
|
||||
// Someone doesn't want us to show tooltips.
|
||||
return;
|
||||
}
|
||||
// Moving from one element to another (overlapping or with no gap) generates
|
||||
// a mouseOut followed instantly by a mouseOver. Fork off the mouseOut
|
||||
// event and kill it if a mouseOver is received immediately.
|
||||
@@ -196,12 +211,13 @@ Blockly.Tooltip.onMouseMove_ = function(e) {
|
||||
if (!Blockly.Tooltip.element_ || !Blockly.Tooltip.element_.tooltip) {
|
||||
// No tooltip here to show.
|
||||
return;
|
||||
} else if (Blockly.dragMode_ != Blockly.DRAG_NONE) {
|
||||
// Don't display a tooltip during a drag.
|
||||
return;
|
||||
} else if (Blockly.WidgetDiv.isVisible()) {
|
||||
// Don't display a tooltip if a widget is open (tooltip would be under it).
|
||||
return;
|
||||
} else if (Blockly.Tooltip.blocked_) {
|
||||
// Someone doesn't want us to show tooltips. We are probably handling a
|
||||
// user gesture, such as a click or drag.
|
||||
return;
|
||||
}
|
||||
if (Blockly.Tooltip.visible) {
|
||||
// Compute the distance between the mouse position when the tooltip was
|
||||
@@ -235,11 +251,34 @@ Blockly.Tooltip.hide = function() {
|
||||
clearTimeout(Blockly.Tooltip.showPid_);
|
||||
};
|
||||
|
||||
/**
|
||||
* Hide any in-progress tooltips and block showing new tooltips until the next
|
||||
* call to unblock().
|
||||
* @package
|
||||
*/
|
||||
Blockly.Tooltip.block = function() {
|
||||
Blockly.Tooltip.hide();
|
||||
Blockly.Tooltip.blocked_ = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Unblock tooltips: allow them to be scheduled and shown according to their own
|
||||
* logic.
|
||||
* @package
|
||||
*/
|
||||
Blockly.Tooltip.unblock = function() {
|
||||
Blockly.Tooltip.blocked_ = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create the tooltip and show it.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Tooltip.show_ = function() {
|
||||
if (Blockly.Tooltip.blocked_) {
|
||||
// Someone doesn't want us to show tooltips.
|
||||
return;
|
||||
}
|
||||
Blockly.Tooltip.poisonedElement_ = Blockly.Tooltip.element_;
|
||||
if (!Blockly.Tooltip.DIV) {
|
||||
return;
|
||||
|
||||
+8
-71
@@ -41,13 +41,6 @@ goog.require('goog.string');
|
||||
*/
|
||||
Blockly.Touch.touchIdentifier_ = null;
|
||||
|
||||
/**
|
||||
* Wrapper function called when a touch mouseUp occurs during a drag operation.
|
||||
* @type {Array.<!Array>}
|
||||
* @private
|
||||
*/
|
||||
Blockly.Touch.onTouchUpWrapper_ = null;
|
||||
|
||||
/**
|
||||
* The TOUCH_MAP lookup dictionary specifies additional touch events to fire,
|
||||
* in conjunction with mouse events.
|
||||
@@ -75,11 +68,10 @@ Blockly.longPid_ = 0;
|
||||
* which after about a second opens the context menu. The tasks is killed
|
||||
* if the touch event terminates early.
|
||||
* @param {!Event} e Touch start event.
|
||||
* @param {!Blockly.Block|!Blockly.WorkspaceSvg} uiObject The block or workspace
|
||||
* under the touchstart event.
|
||||
* @param {Blockly.Gesture} gesture The gesture that triggered this longStart.
|
||||
* @private
|
||||
*/
|
||||
Blockly.longStart_ = function(e, uiObject) {
|
||||
Blockly.longStart_ = function(e, gesture) {
|
||||
Blockly.longStop_();
|
||||
// Punt on multitouch events.
|
||||
if (e.changedTouches.length != 1) {
|
||||
@@ -90,7 +82,12 @@ Blockly.longStart_ = function(e, uiObject) {
|
||||
// e was a touch event. It needs to pretend to be a mouse event.
|
||||
e.clientX = e.changedTouches[0].clientX;
|
||||
e.clientY = e.changedTouches[0].clientY;
|
||||
uiObject.onMouseDown_(e);
|
||||
|
||||
// Let the gesture route the right-click correctly.
|
||||
if (gesture) {
|
||||
gesture.handleRightClick(e);
|
||||
}
|
||||
|
||||
}, Blockly.LONGPRESS);
|
||||
};
|
||||
|
||||
@@ -106,66 +103,6 @@ Blockly.longStop_ = function() {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handle a mouse-up anywhere on the page.
|
||||
* @param {!Event} e Mouse up event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.onMouseUp_ = function(e) {
|
||||
var workspace = Blockly.getMainWorkspace();
|
||||
if (workspace.dragMode_ == Blockly.DRAG_NONE) {
|
||||
return;
|
||||
}
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
|
||||
// TODO(#781): Check whether this needs to be called for all drag modes.
|
||||
workspace.resetDragSurface();
|
||||
workspace.dragMode_ = Blockly.DRAG_NONE;
|
||||
// Unbind the touch event if it exists.
|
||||
if (Blockly.Touch.onTouchUpWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.Touch.onTouchUpWrapper_);
|
||||
Blockly.Touch.onTouchUpWrapper_ = null;
|
||||
}
|
||||
if (Blockly.onMouseMoveWrapper_) {
|
||||
Blockly.unbindEvent_(Blockly.onMouseMoveWrapper_);
|
||||
Blockly.onMouseMoveWrapper_ = null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle a mouse-move on SVG drawing surface.
|
||||
* @param {!Event} e Mouse move event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.onMouseMove_ = function(e) {
|
||||
var workspace = Blockly.getMainWorkspace();
|
||||
if (workspace.dragMode_ != Blockly.DRAG_NONE) {
|
||||
var dx = e.clientX - workspace.startDragMouseX;
|
||||
var dy = e.clientY - workspace.startDragMouseY;
|
||||
var metrics = workspace.startDragMetrics;
|
||||
var x = workspace.startScrollX + dx;
|
||||
var y = workspace.startScrollY + dy;
|
||||
x = Math.min(x, -metrics.contentLeft);
|
||||
y = Math.min(y, -metrics.contentTop);
|
||||
x = Math.max(x, metrics.viewWidth - metrics.contentLeft -
|
||||
metrics.contentWidth);
|
||||
y = Math.max(y, metrics.viewHeight - metrics.contentTop -
|
||||
metrics.contentHeight);
|
||||
|
||||
// Move the scrollbars and the page will scroll automatically.
|
||||
workspace.scrollbar.set(-x - metrics.contentLeft,
|
||||
-y - metrics.contentTop);
|
||||
// Cancel the long-press if the drag has moved too far.
|
||||
if (Math.sqrt(dx * dx + dy * dy) > Blockly.DRAG_RADIUS) {
|
||||
Blockly.longStop_();
|
||||
workspace.dragMode_ = Blockly.DRAG_FREE;
|
||||
}
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear the touch identifier that tracks which touch stream to pay attention
|
||||
* to. This ends the current drag/gesture and allows other pointers to be
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Editor
|
||||
*
|
||||
* Copyright 2017 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 Methods for dragging a workspace visually.
|
||||
* @author fenichel@google.com (Rachel Fenichel)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.WorkspaceDragger');
|
||||
|
||||
goog.require('goog.math.Coordinate');
|
||||
goog.require('goog.asserts');
|
||||
|
||||
|
||||
/**
|
||||
* Class for a workspace dragger. It moves the workspace around when it is
|
||||
* being dragged by a mouse or touch.
|
||||
* Note that the workspace itself manages whether or not it has a drag surface
|
||||
* and how to do translations based on that. This simply passes the right
|
||||
* commands based on events.
|
||||
* @param {!Blockly.WorkspaceSvg} workspace The workspace to drag.
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.WorkspaceDragger = function(workspace) {
|
||||
/**
|
||||
* @type {!Blockly.WorkspaceSvg}
|
||||
* @private
|
||||
*/
|
||||
this.workspace_ = workspace;
|
||||
|
||||
/**
|
||||
* The workspace's metrics object at the beginning of the drag. Contains size
|
||||
* and position metrics of a workspace.
|
||||
* Coordinate system: pixel coordinates.
|
||||
* @type {!Object}
|
||||
* @private
|
||||
*/
|
||||
this.startDragMetrics_ = workspace.getMetrics();
|
||||
|
||||
/**
|
||||
* The scroll position of the workspace at the beginning of the drag.
|
||||
* Coordinate system: pixel coordinates.
|
||||
* @type {!goog.math.Coordinate}
|
||||
* @private
|
||||
*/
|
||||
this.startScrollXY_ = new goog.math.Coordinate(workspace.scrollX,
|
||||
workspace.scrollY);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sever all links from this object.
|
||||
* @package
|
||||
*/
|
||||
Blockly.WorkspaceDragger.prototype.dispose = function() {
|
||||
this.workspace_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Start dragging the workspace.
|
||||
* @package
|
||||
*/
|
||||
Blockly.WorkspaceDragger.prototype.startDrag = function() {
|
||||
if (Blockly.selected) {
|
||||
Blockly.selected.unselect();
|
||||
}
|
||||
this.workspace_.setupDragSurface();
|
||||
};
|
||||
|
||||
/**
|
||||
* Finish dragging the workspace and put everything back where it belongs.
|
||||
* @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has
|
||||
* moved from the position at the start of the drag, in pixel coordinates.
|
||||
* @package
|
||||
*/
|
||||
Blockly.WorkspaceDragger.prototype.endDrag = function(currentDragDeltaXY) {
|
||||
// Make sure everything is up to date.
|
||||
this.drag(currentDragDeltaXY);
|
||||
this.workspace_.resetDragSurface();
|
||||
};
|
||||
|
||||
/**
|
||||
* Move the workspace based on the most recent mouse movements.
|
||||
* @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has
|
||||
* moved from the position at the start of the drag, in pixel coordinates.
|
||||
* @package
|
||||
*/
|
||||
Blockly.WorkspaceDragger.prototype.drag = function(currentDragDeltaXY) {
|
||||
var metrics = this.startDragMetrics_;
|
||||
var newXY = goog.math.Coordinate.sum(this.startScrollXY_, currentDragDeltaXY);
|
||||
|
||||
// Bound the new XY based on workspace bounds.
|
||||
var x = Math.min(newXY.x, -metrics.contentLeft);
|
||||
var y = Math.min(newXY.y, -metrics.contentTop);
|
||||
x = Math.max(x, metrics.viewWidth - metrics.contentLeft -
|
||||
metrics.contentWidth);
|
||||
y = Math.max(y, metrics.viewHeight - metrics.contentTop -
|
||||
metrics.contentHeight);
|
||||
|
||||
x = -x - metrics.contentLeft;
|
||||
y = -y - metrics.contentTop;
|
||||
|
||||
this.updateScroll_(x, y);
|
||||
};
|
||||
|
||||
/**
|
||||
* Move the scrollbars to drag the workspace.
|
||||
* x and y are in pixels.
|
||||
* @param {number} x The new x position to move the scrollbar to.
|
||||
* @param {number} y The new y position to move the scrollbar to.
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceDragger.prototype.updateScroll_ = function(x, y) {
|
||||
this.workspace_.scrollbar.set(x, y);
|
||||
};
|
||||
+100
-79
@@ -30,6 +30,7 @@ goog.provide('Blockly.WorkspaceSvg');
|
||||
//goog.require('Blockly.BlockSvg');
|
||||
goog.require('Blockly.ConnectionDB');
|
||||
goog.require('Blockly.constants');
|
||||
goog.require('Blockly.Gesture');
|
||||
goog.require('Blockly.Options');
|
||||
goog.require('Blockly.ScrollbarPair');
|
||||
goog.require('Blockly.Touch');
|
||||
@@ -125,15 +126,6 @@ Blockly.WorkspaceSvg.prototype.isFlyout = false;
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.isMutator = false;
|
||||
|
||||
/**
|
||||
* Is this workspace currently being dragged around?
|
||||
* DRAG_NONE - No drag operation.
|
||||
* DRAG_BEGIN - Still inside the initial DRAG_RADIUS.
|
||||
* DRAG_FREE - Workspace has been dragged further than DRAG_RADIUS.
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.dragMode_ = Blockly.DRAG_NONE;
|
||||
|
||||
/**
|
||||
* Whether this workspace has resizes enabled.
|
||||
* Disable during batch operations for a performance improvement.
|
||||
@@ -143,25 +135,25 @@ Blockly.WorkspaceSvg.prototype.dragMode_ = Blockly.DRAG_NONE;
|
||||
Blockly.WorkspaceSvg.prototype.resizesEnabled_ = true;
|
||||
|
||||
/**
|
||||
* Current horizontal scrolling offset.
|
||||
* Current horizontal scrolling offset in pixel units.
|
||||
* @type {number}
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.scrollX = 0;
|
||||
|
||||
/**
|
||||
* Current vertical scrolling offset.
|
||||
* Current vertical scrolling offset in pixel units.
|
||||
* @type {number}
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.scrollY = 0;
|
||||
|
||||
/**
|
||||
* Horizontal scroll value when scrolling started.
|
||||
* Horizontal scroll value when scrolling started in pixel units.
|
||||
* @type {number}
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.startScrollX = 0;
|
||||
|
||||
/**
|
||||
* Vertical scroll value when scrolling started.
|
||||
* Vertical scroll value when scrolling started in pixel units.
|
||||
* @type {number}
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.startScrollY = 0;
|
||||
@@ -191,6 +183,13 @@ Blockly.WorkspaceSvg.prototype.trashcan = null;
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.scrollbar = null;
|
||||
|
||||
/**
|
||||
* The current gesture in progress on this workspace, if any.
|
||||
* @type {Blockly.Gesture}
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.currentGesture_ = null;
|
||||
|
||||
/**
|
||||
* This workspace's surface for dragging blocks, if it exists.
|
||||
* @type {Blockly.BlockDragSurfaceSvg}
|
||||
@@ -338,11 +337,16 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
|
||||
*/
|
||||
this.svgGroup_ = Blockly.utils.createSvgElement('g',
|
||||
{'class': 'blocklyWorkspace'}, null);
|
||||
|
||||
// Note that a <g> alone does not receive mouse events--it must have a
|
||||
// valid target inside it. If no background class is specified, as in the
|
||||
// flyout, the workspace will not receive mouse events.
|
||||
if (opt_backgroundClass) {
|
||||
/** @type {SVGElement} */
|
||||
this.svgBackground_ = Blockly.utils.createSvgElement('rect',
|
||||
{'height': '100%', 'width': '100%', 'class': opt_backgroundClass},
|
||||
this.svgGroup_);
|
||||
|
||||
if (opt_backgroundClass == 'blocklyMainBackground') {
|
||||
this.svgBackground_.style.fill =
|
||||
'url(#' + this.options.gridPattern.id + ')';
|
||||
@@ -365,9 +369,6 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
|
||||
if (!this.isFlyout) {
|
||||
Blockly.bindEventWithChecks_(this.svgGroup_, 'mousedown', this,
|
||||
this.onMouseDown_);
|
||||
var thisWorkspace = this;
|
||||
Blockly.bindEvent_(this.svgGroup_, 'touchstart', null,
|
||||
function(e) {Blockly.longStart_(e, thisWorkspace);});
|
||||
if (this.options.zoomOptions && this.options.zoomOptions.wheel) {
|
||||
// Mouse-wheel.
|
||||
Blockly.bindEventWithChecks_(this.svgGroup_, 'wheel', this,
|
||||
@@ -396,6 +397,9 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
|
||||
Blockly.WorkspaceSvg.prototype.dispose = function() {
|
||||
// Stop rerendering.
|
||||
this.rendered = false;
|
||||
if (this.currentGesture_) {
|
||||
this.currentGesture_.cancel();
|
||||
}
|
||||
Blockly.WorkspaceSvg.superClass_.dispose.call(this);
|
||||
if (this.svgGroup_) {
|
||||
goog.dom.removeNode(this.svgGroup_);
|
||||
@@ -811,10 +815,20 @@ Blockly.WorkspaceSvg.prototype.paste = function(xmlBlock) {
|
||||
this.remainingCapacity()) {
|
||||
return;
|
||||
}
|
||||
Blockly.terminateDrag_(); // Dragging while pasting? No.
|
||||
if (this.currentGesture_) {
|
||||
this.currentGesture_.cancel(); // Dragging while pasting? No.
|
||||
}
|
||||
Blockly.Events.disable();
|
||||
try {
|
||||
var block = Blockly.Xml.domToBlock(xmlBlock, this);
|
||||
// Rerender to get around problem with IE and Edge not measuring text
|
||||
// correctly when it is hidden.
|
||||
if (goog.userAgent.IE || goog.userAgent.EDGE) {
|
||||
var blocks = block.getDescendants();
|
||||
for (var i = blocks.length - 1; i >= 0; i--) {
|
||||
blocks[i].render(false);
|
||||
}
|
||||
}
|
||||
// Move the duplicate to original position.
|
||||
var blockX = parseInt(xmlBlock.getAttribute('x'), 10);
|
||||
var blockY = parseInt(xmlBlock.getAttribute('y'), 10);
|
||||
@@ -876,7 +890,7 @@ Blockly.WorkspaceSvg.prototype.paste = function(xmlBlock) {
|
||||
Blockly.WorkspaceSvg.prototype.createVariable = function(name) {
|
||||
Blockly.WorkspaceSvg.superClass_.createVariable.call(this, name);
|
||||
// Don't refresh the toolbox if there's a drag in progress.
|
||||
if (this.toolbox_ && this.toolbox_.flyout_ && !Blockly.Flyout.startFlyout_) {
|
||||
if (this.toolbox_ && this.toolbox_.flyout_ && !this.currentGesture_) {
|
||||
this.toolbox_.refreshSelection();
|
||||
}
|
||||
};
|
||||
@@ -901,7 +915,6 @@ Blockly.WorkspaceSvg.prototype.recordDeleteAreas = function() {
|
||||
|
||||
/**
|
||||
* Is the mouse event over a delete area (toolbox or non-closing flyout)?
|
||||
* Opens or closes the trashcan and sets the cursor as a side effect.
|
||||
* @param {!Event} e Mouse move event.
|
||||
* @return {?number} Null if not over a delete area, or an enum representing
|
||||
* which delete area the event is over.
|
||||
@@ -914,7 +927,7 @@ Blockly.WorkspaceSvg.prototype.isDeleteArea = function(e) {
|
||||
if (this.deleteAreaToolbox_ && this.deleteAreaToolbox_.contains(xy)) {
|
||||
return Blockly.DELETE_AREA_TOOLBOX;
|
||||
}
|
||||
return null;
|
||||
return Blockly.DELETE_AREA_NONE;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -923,60 +936,10 @@ Blockly.WorkspaceSvg.prototype.isDeleteArea = function(e) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.onMouseDown_ = function(e) {
|
||||
this.markFocused();
|
||||
if (Blockly.utils.isTargetInput(e)) {
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
return;
|
||||
var gesture = this.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.handleWsStart(e, this);
|
||||
}
|
||||
Blockly.terminateDrag_(); // In case mouse-up event was lost.
|
||||
Blockly.hideChaff();
|
||||
var isTargetWorkspace = e.target && e.target.nodeName &&
|
||||
(e.target.nodeName.toLowerCase() == 'svg' ||
|
||||
e.target == this.svgBackground_);
|
||||
if (isTargetWorkspace && Blockly.selected && !this.options.readOnly) {
|
||||
// Clicking on the document clears the selection.
|
||||
Blockly.selected.unselect();
|
||||
}
|
||||
if (Blockly.utils.isRightButton(e)) {
|
||||
// Right-click.
|
||||
this.showContextMenu_(e);
|
||||
// This is to handle the case where the event is pretending to be a right
|
||||
// click event but it was really a long press. In that case, we want to make
|
||||
// sure any in progress drags are stopped.
|
||||
Blockly.onMouseUp_(e);
|
||||
// Since this was a click, not a drag, end the gesture immediately.
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
} else if (this.scrollbar) {
|
||||
this.dragMode_ = Blockly.DRAG_BEGIN;
|
||||
// Record the current mouse position.
|
||||
this.startDragMouseX = e.clientX;
|
||||
this.startDragMouseY = e.clientY;
|
||||
this.startDragMetrics = this.getMetrics();
|
||||
this.startScrollX = this.scrollX;
|
||||
this.startScrollY = this.scrollY;
|
||||
|
||||
this.setupDragSurface();
|
||||
// If this is a touch event then bind to the mouseup so workspace drag mode
|
||||
// is turned off and double move events are not performed on a block.
|
||||
// See comment in inject.js Blockly.init_ as to why mouseup events are
|
||||
// bound to the document instead of the SVG's surface.
|
||||
if ('mouseup' in Blockly.Touch.TOUCH_MAP) {
|
||||
Blockly.Touch.onTouchUpWrapper_ = Blockly.Touch.onTouchUpWrapper_ || [];
|
||||
Blockly.Touch.onTouchUpWrapper_ = Blockly.Touch.onTouchUpWrapper_.concat(
|
||||
Blockly.bindEventWithChecks_(document, 'mouseup', null,
|
||||
Blockly.onMouseUp_));
|
||||
}
|
||||
Blockly.onMouseMoveWrapper_ = Blockly.onMouseMoveWrapper_ || [];
|
||||
Blockly.onMouseMoveWrapper_ = Blockly.onMouseMoveWrapper_.concat(
|
||||
Blockly.bindEventWithChecks_(document, 'mousemove', null,
|
||||
Blockly.onMouseMove_));
|
||||
} else {
|
||||
// It was a click, but the workspace isn't draggable.
|
||||
Blockly.Touch.clearTouchIdentifier();
|
||||
}
|
||||
// This event has been handled. No need to bubble up to the document.
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1013,10 +976,7 @@ Blockly.WorkspaceSvg.prototype.moveDrag = function(e) {
|
||||
* @return {boolean} True if currently dragging or scrolling.
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.isDragging = function() {
|
||||
return Blockly.dragMode_ == Blockly.DRAG_FREE ||
|
||||
(Blockly.Flyout.startFlyout_ &&
|
||||
Blockly.Flyout.startFlyout_.dragMode_ == Blockly.DRAG_FREE) ||
|
||||
this.dragMode_ == Blockly.DRAG_FREE;
|
||||
return this.currentGesture_ && this.currentGesture_.isDragging();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1033,8 +993,11 @@ Blockly.WorkspaceSvg.prototype.isDraggable = function() {
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.onMouseWheel_ = function(e) {
|
||||
// TODO: Remove terminateDrag and compensate for coordinate skew during zoom.
|
||||
Blockly.terminateDrag_();
|
||||
// TODO: Remove gesture cancellation and compensate for coordinate skew during
|
||||
// zoom.
|
||||
if (this.currentGesture_) {
|
||||
this.currentGesture_.cancel();
|
||||
}
|
||||
// The vertical scroll distance that corresponds to a click of a zoom button.
|
||||
var PIXELS_PER_ZOOM_STEP = 50;
|
||||
var delta = -e.deltaY / PIXELS_PER_ZOOM_STEP;
|
||||
@@ -1046,6 +1009,7 @@ Blockly.WorkspaceSvg.prototype.onMouseWheel_ = function(e) {
|
||||
|
||||
/**
|
||||
* Calculate the bounding box for the blocks on the workspace.
|
||||
* Coordinate system: workspace coordinates.
|
||||
*
|
||||
* @return {Object} Contains the position and size of the bounding box
|
||||
* containing the blocks on the workspace.
|
||||
@@ -1115,6 +1079,7 @@ Blockly.WorkspaceSvg.prototype.showContextMenu_ = function(e) {
|
||||
var menuOptions = [];
|
||||
var topBlocks = this.getTopBlocks(true);
|
||||
var eventGroup = Blockly.utils.genUid();
|
||||
var ws = this;
|
||||
|
||||
// Options to undo/redo previous action.
|
||||
var undoOption = {};
|
||||
@@ -1224,6 +1189,9 @@ Blockly.WorkspaceSvg.prototype.showContextMenu_ = function(e) {
|
||||
Blockly.Msg.DELETE_X_BLOCKS.replace('%1', String(deleteList.length)),
|
||||
enabled: deleteList.length > 0,
|
||||
callback: function() {
|
||||
if (ws.currentGesture_) {
|
||||
ws.currentGesture_.cancel();
|
||||
}
|
||||
if (deleteList.length < 2 ) {
|
||||
deleteNext();
|
||||
} else {
|
||||
@@ -1564,6 +1532,7 @@ Blockly.WorkspaceSvg.prototype.updateGridPattern_ = function() {
|
||||
/**
|
||||
* Return an object with all the metrics required to size scrollbars for a
|
||||
* top level workspace. The following properties are computed:
|
||||
* Coordinate system: pixel coordinates.
|
||||
* .viewHeight: Height of the visible rectangle,
|
||||
* .viewWidth: Width of the visible rectangle,
|
||||
* .contentHeight: Height of the contents,
|
||||
@@ -1600,6 +1569,7 @@ Blockly.WorkspaceSvg.getTopLevelWorkspaceMetrics_ = function() {
|
||||
var MARGIN = Blockly.Flyout.prototype.CORNER_RADIUS - 1;
|
||||
var viewWidth = svgSize.width - MARGIN;
|
||||
var viewHeight = svgSize.height - MARGIN;
|
||||
|
||||
var blockBox = this.getBlocksBoundingBox();
|
||||
|
||||
// Fix scale.
|
||||
@@ -1783,6 +1753,57 @@ Blockly.WorkspaceSvg.prototype.removeToolboxCategoryCallback = function(key) {
|
||||
this.toolboxCategoryCallbacks_[key] = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Look up the gesture that is tracking this touch stream on this workspace.
|
||||
* May create a new gesture.
|
||||
* @param {!Event} e Mouse event or touch event
|
||||
* @return {Blockly.Gesture} The gesture that is tracking this touch stream,
|
||||
* or null if no valid gesture exists.
|
||||
* @package
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.getGesture = function(e) {
|
||||
var isStart = (e.type == 'mousedown' || e.type == 'touchstart');
|
||||
|
||||
var gesture = this.currentGesture_;
|
||||
if (gesture) {
|
||||
if (isStart && gesture.hasStarted()) {
|
||||
console.warn('tried to start the same gesture twice');
|
||||
// That's funny. We must have missed a mouse up.
|
||||
// Cancel it, rather than try to retrieve all of the state we need.
|
||||
gesture.cancel();
|
||||
return null;
|
||||
}
|
||||
return gesture;
|
||||
}
|
||||
|
||||
// No gesture existed on this workspace, but this looks like the start of a
|
||||
// new gesture.
|
||||
if (isStart) {
|
||||
this.currentGesture_ = new Blockly.Gesture(e, this);
|
||||
return this.currentGesture_;
|
||||
}
|
||||
// No gesture existed and this event couldn't be the start of a new gesture.
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Clear the reference to the current gesture.
|
||||
* @package
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.clearGesture = function() {
|
||||
this.currentGesture_ = null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Cancel the current gesture, if one exists.
|
||||
* @package
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.cancelCurrentGesture = function() {
|
||||
if (this.currentGesture_) {
|
||||
this.currentGesture_.cancel();
|
||||
}
|
||||
};
|
||||
|
||||
// Export symbols that would otherwise be renamed by Closure compiler.
|
||||
Blockly.WorkspaceSvg.prototype['setVisible'] =
|
||||
Blockly.WorkspaceSvg.prototype.setVisible;
|
||||
|
||||
+19
-19
@@ -16,7 +16,7 @@ d&&(a=c?"-("+a+")":"-"+a,g=Blockly.Dart.ORDER_UNARY_PREFIX);g=Math.floor(g);e=Ma
|
||||
Blockly.Dart.lists_repeat=function(a){var b=Blockly.Dart.valueToCode(a,"ITEM",Blockly.Dart.ORDER_NONE)||"null";return["new List.filled("+(Blockly.Dart.valueToCode(a,"NUM",Blockly.Dart.ORDER_NONE)||"0")+", "+b+")",Blockly.Dart.ORDER_UNARY_POSTFIX]};Blockly.Dart.lists_length=function(a){return[(Blockly.Dart.valueToCode(a,"VALUE",Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]")+".length",Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.lists_isEmpty=function(a){return[(Blockly.Dart.valueToCode(a,"VALUE",Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]")+".isEmpty",Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.lists_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"indexOf":"lastIndexOf",c=Blockly.Dart.valueToCode(a,"FIND",Blockly.Dart.ORDER_NONE)||"''",b=(Blockly.Dart.valueToCode(a,"VALUE",Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]")+"."+b+"("+c+")";return a.workspace.options.oneBasedIndex?[b+" + 1",Blockly.Dart.ORDER_ADDITIVE]:[b,Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.lists_getIndex=function(a){function b(){var a=Blockly.Dart.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),b="List "+a+" = "+e+";\n";e=a;return b}var c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Dart.valueToCode(a,"VALUE","RANDOM"==d||"FROM_END"==d?Blockly.Dart.ORDER_NONE:Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]";if(("RANDOM"!=d||"REMOVE"!=c)&&"FROM_END"!=d||e.match(/^\w+$/))switch(d){case "FIRST":if("GET"==c)return[e+".first",
|
||||
Blockly.Dart.lists_getIndex=function(a){function b(){var a=Blockly.Dart.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),b="List "+a+" = "+e+";\n";e=a;return b}var c=a.getFieldValue("MODE")||"GET";var d=a.getFieldValue("WHERE")||"FROM_START";var e=Blockly.Dart.valueToCode(a,"VALUE","RANDOM"==d||"FROM_END"==d?Blockly.Dart.ORDER_NONE:Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]";if(("RANDOM"!=d||"REMOVE"!=c)&&"FROM_END"!=d||e.match(/^\w+$/))switch(d){case "FIRST":if("GET"==c)return[e+".first",
|
||||
Blockly.Dart.ORDER_UNARY_POSTFIX];if("GET_REMOVE"==c)return[e+".removeAt(0)",Blockly.Dart.ORDER_UNARY_POSTFIX];if("REMOVE"==c)return e+".removeAt(0);\n";break;case "LAST":if("GET"==c)return[e+".last",Blockly.Dart.ORDER_UNARY_POSTFIX];if("GET_REMOVE"==c)return[e+".removeLast()",Blockly.Dart.ORDER_UNARY_POSTFIX];if("REMOVE"==c)return e+".removeLast();\n";break;case "FROM_START":d=Blockly.Dart.getAdjusted(a,"AT");if("GET"==c)return[e+"["+d+"]",Blockly.Dart.ORDER_UNARY_POSTFIX];if("GET_REMOVE"==c)return[e+
|
||||
".removeAt("+d+")",Blockly.Dart.ORDER_UNARY_POSTFIX];if("REMOVE"==c)return e+".removeAt("+d+");\n";break;case "FROM_END":d=Blockly.Dart.getAdjusted(a,"AT",1,!1,Blockly.Dart.ORDER_ADDITIVE);if("GET"==c)return[e+"["+e+".length - "+d+"]",Blockly.Dart.ORDER_UNARY_POSTFIX];if("GET_REMOVE"==c||"REMOVE"==c){a=e+".removeAt("+e+".length - "+d+")";if("GET_REMOVE"==c)return[a,Blockly.Dart.ORDER_UNARY_POSTFIX];if("REMOVE"==c)return a+";\n"}break;case "RANDOM":Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;";
|
||||
if("REMOVE"==c)return c=Blockly.Dart.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE),"int "+c+" = new Math.Random().nextInt("+e+".length);\n"+(e+".removeAt("+c+");\n");if("GET"==c)return c=Blockly.Dart.provideFunction_("lists_get_random_item",["dynamic "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(List my_list) {"," int x = new Math.Random().nextInt(my_list.length);"," return my_list[x];","}"]),[c+"("+e+")",Blockly.Dart.ORDER_UNARY_POSTFIX];if("GET_REMOVE"==c)return c=Blockly.Dart.provideFunction_("lists_remove_random_item",
|
||||
@@ -27,22 +27,22 @@ Blockly.Dart.lists_setIndex=function(a){function b(){if(e.match(/^\w+$/))return"
|
||||
c)return e+".insert(0, "+f+");\n";break;case "LAST":if("SET"==c)return a=b(),a+(e+"["+e+".length - 1] = "+f+";\n");if("INSERT"==c)return e+".add("+f+");\n";break;case "FROM_START":d=Blockly.Dart.getAdjusted(a,"AT");if("SET"==c)return e+"["+d+"] = "+f+";\n";if("INSERT"==c)return e+".insert("+d+", "+f+");\n";break;case "FROM_END":d=Blockly.Dart.getAdjusted(a,"AT",1,!1,Blockly.Dart.ORDER_ADDITIVE);a=b();if("SET"==c)return a+(e+"["+e+".length - "+d+"] = "+f+";\n");if("INSERT"==c)return a+(e+".insert("+
|
||||
e+".length - "+d+", "+f+");\n");break;case "RANDOM":Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;";a=b();d=Blockly.Dart.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);a+="int "+d+" = new Math.Random().nextInt("+e+".length);\n";if("SET"==c)return a+(e+"["+d+"] = "+f+";\n");if("INSERT"==c)return a+(e+".insert("+d+", "+f+");\n")}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.Dart.lists_getSublist=function(a){var b=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if(b.match(/^\w+$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":var e=Blockly.Dart.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.Dart.getAdjusted(a,"AT1",1,!1,Blockly.Dart.ORDER_ADDITIVE);e=b+".length - "+e;break;case "FIRST":e="0";break;default:throw"Unhandled option (lists_getSublist).";}switch(d){case "FROM_START":var f=
|
||||
Blockly.Dart.getAdjusted(a,"AT2",1);break;case "FROM_END":f=Blockly.Dart.getAdjusted(a,"AT2",0,!1,Blockly.Dart.ORDER_ADDITIVE);f=b+".length - "+f;break;case "LAST":break;default:throw"Unhandled option (lists_getSublist).";}a="LAST"==d?b+".sublist("+e+")":b+".sublist("+e+", "+f+")"}else e=Blockly.Dart.getAdjusted(a,"AT1"),f=Blockly.Dart.getAdjusted(a,"AT2"),a=Blockly.Dart.provideFunction_("lists_get_sublist",["List "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(list, where1, at1, where2, at2) {"," int getAt(where, at) {",
|
||||
" if (where == 'FROM_END') {"," at = list.length - 1 - at;"," } else if (where == 'FIRST') {"," at = 0;"," } else if (where == 'LAST') {"," at = list.length - 1;"," } else if (where != 'FROM_START') {"," throw 'Unhandled option (lists_getSublist).';"," }"," return at;"," }"," at1 = getAt(where1, at1);"," at2 = getAt(where2, at2) + 1;"," return list.sublist(at1, at2);","}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+f+")";return[a,Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.getAdjusted(a,"AT2",1);break;case "FROM_END":f=Blockly.Dart.getAdjusted(a,"AT2",0,!1,Blockly.Dart.ORDER_ADDITIVE);f=b+".length - "+f;break;case "LAST":break;default:throw"Unhandled option (lists_getSublist).";}f="LAST"==d?b+".sublist("+e+")":b+".sublist("+e+", "+f+")"}else e=Blockly.Dart.getAdjusted(a,"AT1"),f=Blockly.Dart.getAdjusted(a,"AT2"),a=Blockly.Dart.provideFunction_("lists_get_sublist",["List "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(list, where1, at1, where2, at2) {"," int getAt(where, at) {",
|
||||
" if (where == 'FROM_END') {"," at = list.length - 1 - at;"," } else if (where == 'FIRST') {"," at = 0;"," } else if (where == 'LAST') {"," at = list.length - 1;"," } else if (where != 'FROM_START') {"," throw 'Unhandled option (lists_getSublist).';"," }"," return at;"," }"," at1 = getAt(where1, at1);"," at2 = getAt(where2, at2) + 1;"," return list.sublist(at1, at2);","}"]),f=a+"("+b+", '"+c+"', "+e+", '"+d+"', "+f+")";return[f,Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.lists_sort=function(a){var b=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_NONE)||"[]",c="1"===a.getFieldValue("DIRECTION")?1:-1;a=a.getFieldValue("TYPE");return[Blockly.Dart.provideFunction_("lists_sort",["List "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(list, type, direction) {"," var compareFuncs = {",' "NUMERIC": (a, b) => direction * a.compareTo(b),',' "TEXT": (a, b) => direction * a.toString().compareTo(b.toString()),',' "IGNORE_CASE": '," (a, b) => direction * ",
|
||||
" a.toString().toLowerCase().compareTo(b.toString().toLowerCase())"," };"," list = new List.from(list);"," var compare = compareFuncs[type];"," list.sort(compare);"," return list;","}"])+"("+b+', "'+a+'", '+c+")",Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.lists_split=function(a){var b=Blockly.Dart.valueToCode(a,"INPUT",Blockly.Dart.ORDER_UNARY_POSTFIX),c=Blockly.Dart.valueToCode(a,"DELIM",Blockly.Dart.ORDER_NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a="split";else if("JOIN"==a)b||(b="[]"),a="join";else throw"Unknown mode: "+a;return[b+"."+a+"("+c+")",Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.lists_reverse=function(a){return["new List.from("+(Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_NONE)||"[]")+".reversed)",Blockly.Dart.ORDER_UNARY_POSTFIX]};Blockly.Dart.math={};Blockly.Dart.addReservedWords("Math");Blockly.Dart.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));var b;Infinity==a?(a="double.INFINITY",b=Blockly.Dart.ORDER_UNARY_POSTFIX):-Infinity==a?(a="-double.INFINITY",b=Blockly.Dart.ORDER_UNARY_PREFIX):b=0>a?Blockly.Dart.ORDER_UNARY_PREFIX:Blockly.Dart.ORDER_ATOMIC;return[a,b]};
|
||||
Blockly.Dart.lists_reverse=function(a){return["new List.from("+(Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_NONE)||"[]")+".reversed)",Blockly.Dart.ORDER_UNARY_POSTFIX]};Blockly.Dart.math={};Blockly.Dart.addReservedWords("Math");Blockly.Dart.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));if(Infinity==a){a="double.INFINITY";var b=Blockly.Dart.ORDER_UNARY_POSTFIX}else-Infinity==a?(a="-double.INFINITY",b=Blockly.Dart.ORDER_UNARY_PREFIX):b=0>a?Blockly.Dart.ORDER_UNARY_PREFIX:Blockly.Dart.ORDER_ATOMIC;return[a,b]};
|
||||
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)||
|
||||
"0":Blockly.Dart.valueToCode(a,"NUM",Blockly.Dart.ORDER_NONE)||"0";switch(b){case "ABS":c=a+".abs()";break;case "ROOT":c="Math.sqrt("+a+")";break;case "LN":c="Math.log("+a+")";break;case "EXP":c="Math.exp("+a+")";break;case "POW10":c="Math.pow(10,"+a+")";break;case "ROUND":c=a+".round()";break;case "ROUNDUP":c=a+".ceil()";break;case "ROUNDDOWN":c=a+".floor()";break;case "SIN":c="Math.sin("+a+" / 180 * Math.PI)";break;case "COS":c="Math.cos("+a+" / 180 * Math.PI)";break;case "TAN":c="Math.tan("+a+
|
||||
Blockly.Dart.math_single=function(a){var b=a.getFieldValue("OP");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)||"0":
|
||||
Blockly.Dart.valueToCode(a,"NUM",Blockly.Dart.ORDER_NONE)||"0";switch(b){case "ABS":var c=a+".abs()";break;case "ROOT":c="Math.sqrt("+a+")";break;case "LN":c="Math.log("+a+")";break;case "EXP":c="Math.exp("+a+")";break;case "POW10":c="Math.pow(10,"+a+")";break;case "ROUND":c=a+".round()";break;case "ROUNDUP":c=a+".ceil()";break;case "ROUNDDOWN":c=a+".floor()";break;case "SIN":c="Math.sin("+a+" / 180 * Math.PI)";break;case "COS":c="Math.cos("+a+" / 180 * Math.PI)";break;case "TAN":c="Math.tan("+a+
|
||||
" / 180 * Math.PI)"}if(c)return[c,Blockly.Dart.ORDER_UNARY_POSTFIX];switch(b){case "LOG10":c="Math.log("+a+") / Math.log(10)";break;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.Dart.ORDER_MULTIPLICATIVE]};
|
||||
Blockly.Dart.math_constant=function(a){var b={PI:["Math.PI",Blockly.Dart.ORDER_UNARY_POSTFIX],E:["Math.E",Blockly.Dart.ORDER_UNARY_POSTFIX],GOLDEN_RATIO:["(1 + Math.sqrt(5)) / 2",Blockly.Dart.ORDER_MULTIPLICATIVE],SQRT2:["Math.SQRT2",Blockly.Dart.ORDER_UNARY_POSTFIX],SQRT1_2:["Math.SQRT1_2",Blockly.Dart.ORDER_UNARY_POSTFIX],INFINITY:["double.INFINITY",Blockly.Dart.ORDER_ATOMIC]};a=a.getFieldValue("CONSTANT");"INFINITY"!=a&&(Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;");
|
||||
return b[a]};
|
||||
Blockly.Dart.math_number_property=function(a){var b=Blockly.Dart.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Dart.ORDER_MULTIPLICATIVE);if(!b)return["false",Blockly.Python.ORDER_ATOMIC];var c=a.getFieldValue("PROPERTY"),d;if("PRIME"==c)return Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;",[Blockly.Dart.provideFunction_("math_isPrime",["bool "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(n) {"," // https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if (n == 2 || n == 3) {"," return true;",
|
||||
" }"," // False if n is null, negative, is 1, or not whole."," // And false if n is divisible by 2 or 3."," if (n == null || 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 (var x = 6; x <= Math.sqrt(n) + 1; x += 6) {"," if (n % (x - 1) == 0 || n % (x + 1) == 0) {"," return false;"," }"," }"," return true;","}"])+"("+b+")",Blockly.Dart.ORDER_UNARY_POSTFIX];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.Dart.valueToCode(a,"DIVISOR",Blockly.Dart.ORDER_MULTIPLICATIVE);if(!a)return["false",Blockly.Python.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Dart.ORDER_EQUALITY]};
|
||||
Blockly.Dart.math_number_property=function(a){var b=Blockly.Dart.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Dart.ORDER_MULTIPLICATIVE);if(!b)return["false",Blockly.Python.ORDER_ATOMIC];var c=a.getFieldValue("PROPERTY");if("PRIME"==c)return Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;",[Blockly.Dart.provideFunction_("math_isPrime",["bool "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(n) {"," // https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if (n == 2 || n == 3) {"," return true;",
|
||||
" }"," // False if n is null, negative, is 1, or not whole."," // And false if n is divisible by 2 or 3."," if (n == null || 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 (var x = 6; x <= Math.sqrt(n) + 1; x += 6) {"," if (n % (x - 1) == 0 || n % (x + 1) == 0) {"," return false;"," }"," }"," return true;","}"])+"("+b+")",Blockly.Dart.ORDER_UNARY_POSTFIX];switch(c){case "EVEN":var 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.Dart.valueToCode(a,"DIVISOR",Blockly.Dart.ORDER_MULTIPLICATIVE);if(!a)return["false",Blockly.Python.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Dart.ORDER_EQUALITY]};
|
||||
Blockly.Dart.math_change=function(a){var b=Blockly.Dart.valueToCode(a,"DELTA",Blockly.Dart.ORDER_ADDITIVE)||"0";a=Blockly.Dart.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = ("+a+" is num ? "+a+" : 0) + "+b+";\n"};Blockly.Dart.math_round=Blockly.Dart.math_single;Blockly.Dart.math_trig=Blockly.Dart.math_single;
|
||||
Blockly.Dart.math_on_list=function(a){var b=a.getFieldValue("OP");a=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_NONE)||"[]";switch(b){case "SUM":b=Blockly.Dart.provideFunction_("math_sum",["num "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {"," num sumVal = 0;"," myList.forEach((num entry) {sumVal += entry;});"," return sumVal;","}"]);b=b+"("+a+")";break;case "MIN":Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;";b=Blockly.Dart.provideFunction_("math_min",
|
||||
["num "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {"," if (myList.isEmpty) return null;"," num minVal = myList[0];"," myList.forEach((num entry) {minVal = Math.min(minVal, entry);});"," return minVal;","}"]);b=b+"("+a+")";break;case "MAX":Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;";b=Blockly.Dart.provideFunction_("math_max",["num "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(List myList) {"," if (myList.isEmpty) return null;"," num maxVal = myList[0];",
|
||||
@@ -73,24 +73,24 @@ Blockly.Dart.text_isEmpty=function(a){return[(Blockly.Dart.valueToCode(a,"VALUE"
|
||||
Blockly.Dart.text_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"indexOf":"lastIndexOf",c=Blockly.Dart.valueToCode(a,"FIND",Blockly.Dart.ORDER_NONE)||"''",b=(Blockly.Dart.valueToCode(a,"VALUE",Blockly.Dart.ORDER_UNARY_POSTFIX)||"''")+"."+b+"("+c+")";return a.workspace.options.oneBasedIndex?[b+" + 1",Blockly.Dart.ORDER_ADDITIVE]:[b,Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.text_charAt=function(a){var b=a.getFieldValue("WHERE")||"FROM_START",c=Blockly.Dart.valueToCode(a,"VALUE",Blockly.Dart.ORDER_UNARY_POSTFIX)||"''";switch(b){case "FIRST":return[c+"[0]",Blockly.Dart.ORDER_UNARY_POSTFIX];case "FROM_START":return a=Blockly.Dart.getAdjusted(a,"AT"),[c+"["+a+"]",Blockly.Dart.ORDER_UNARY_POSTFIX];case "LAST":case "FROM_END":return a=Blockly.Dart.getAdjusted(a,"AT",1),b=Blockly.Dart.provideFunction_("text_get_from_end",["String "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+
|
||||
"(String text, num x) {"," return text[text.length - x];","}"]),[b+"("+c+", "+a+")",Blockly.Dart.ORDER_UNARY_POSTFIX];case "RANDOM":return Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;",b=Blockly.Dart.provideFunction_("text_random_letter",["String "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(String text) {"," int x = new Math.Random().nextInt(text.length);"," return text[x];","}"]),[b+"("+c+")",Blockly.Dart.ORDER_UNARY_POSTFIX]}throw"Unhandled option (text_charAt).";};
|
||||
Blockly.Dart.text_getSubstring=function(a){var b=Blockly.Dart.valueToCode(a,"STRING",Blockly.Dart.ORDER_UNARY_POSTFIX)||"''",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"==c&&"LAST"==d)a=b;else if(b.match(/^'?\w+'?$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":var e=Blockly.Dart.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.Dart.getAdjusted(a,"AT1",1,!1,Blockly.Dart.ORDER_ADDITIVE);e=b+".length - "+e;break;case "FIRST":e="0";break;default:throw"Unhandled option (text_getSubstring).";
|
||||
}switch(d){case "FROM_START":var f=Blockly.Dart.getAdjusted(a,"AT2",1);break;case "FROM_END":f=Blockly.Dart.getAdjusted(a,"AT2",0,!1,Blockly.Dart.ORDER_ADDITIVE);f=b+".length - "+f;break;case "LAST":break;default:throw"Unhandled option (text_getSubstring).";}a="LAST"==d?b+".substring("+e+")":b+".substring("+e+", "+f+")"}else e=Blockly.Dart.getAdjusted(a,"AT1"),f=Blockly.Dart.getAdjusted(a,"AT2"),a=Blockly.Dart.provideFunction_("text_get_substring",["List "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+
|
||||
"(text, where1, at1, where2, at2) {"," int getAt(where, at) {"," if (where == 'FROM_END') {"," at = text.length - 1 - at;"," } else if (where == 'FIRST') {"," at = 0;"," } else if (where == 'LAST') {"," at = text.length - 1;"," } else if (where != 'FROM_START') {"," throw 'Unhandled option (text_getSubstring).';"," }"," return at;"," }"," at1 = getAt(where1, at1);"," at2 = getAt(where2, at2) + 1;"," return text.substring(at1, at2);","}"])+"("+b+", '"+c+"', "+
|
||||
e+", '"+d+"', "+f+")";return[a,Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.text_changeCase=function(a){var b={UPPERCASE:".toUpperCase()",LOWERCASE:".toLowerCase()",TITLECASE:null}[a.getFieldValue("CASE")];a=Blockly.Dart.valueToCode(a,"TEXT",b?Blockly.Dart.ORDER_UNARY_POSTFIX:Blockly.Dart.ORDER_NONE)||"''";return[b?a+b:Blockly.Dart.provideFunction_("text_toTitleCase",["String "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(String str) {"," RegExp exp = new RegExp(r'\\b');"," List<String> list = str.split(exp);"," final title = new StringBuffer();"," for (String part in list) {",
|
||||
" if (part.length > 0) {"," title.write(part[0].toUpperCase());"," if (part.length > 0) {"," title.write(part.substring(1).toLowerCase());"," }"," }"," }"," return title.toString();","}"])+"("+a+")",Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.text_getSubstring=function(a){var b=Blockly.Dart.valueToCode(a,"STRING",Blockly.Dart.ORDER_UNARY_POSTFIX)||"''",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"==c&&"LAST"==d)var e=b;else if(b.match(/^'?\w+'?$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":var f=Blockly.Dart.getAdjusted(a,"AT1");break;case "FROM_END":f=Blockly.Dart.getAdjusted(a,"AT1",1,!1,Blockly.Dart.ORDER_ADDITIVE);f=b+".length - "+f;break;case "FIRST":f="0";break;default:throw"Unhandled option (text_getSubstring).";
|
||||
}switch(d){case "FROM_START":e=Blockly.Dart.getAdjusted(a,"AT2",1);break;case "FROM_END":e=Blockly.Dart.getAdjusted(a,"AT2",0,!1,Blockly.Dart.ORDER_ADDITIVE);e=b+".length - "+e;break;case "LAST":break;default:throw"Unhandled option (text_getSubstring).";}e="LAST"==d?b+".substring("+f+")":b+".substring("+f+", "+e+")"}else f=Blockly.Dart.getAdjusted(a,"AT1"),e=Blockly.Dart.getAdjusted(a,"AT2"),a=Blockly.Dart.provideFunction_("text_get_substring",["List "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(text, where1, at1, where2, at2) {",
|
||||
" int getAt(where, at) {"," if (where == 'FROM_END') {"," at = text.length - 1 - at;"," } else if (where == 'FIRST') {"," at = 0;"," } else if (where == 'LAST') {"," at = text.length - 1;"," } else if (where != 'FROM_START') {"," throw 'Unhandled option (text_getSubstring).';"," }"," return at;"," }"," at1 = getAt(where1, at1);"," at2 = getAt(where2, at2) + 1;"," return text.substring(at1, at2);","}"]),e=a+"("+b+", '"+c+"', "+f+", '"+d+"', "+e+")";return[e,
|
||||
Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.text_changeCase=function(a){var b={UPPERCASE:".toUpperCase()",LOWERCASE:".toLowerCase()",TITLECASE:null}[a.getFieldValue("CASE")];a=Blockly.Dart.valueToCode(a,"TEXT",b?Blockly.Dart.ORDER_UNARY_POSTFIX:Blockly.Dart.ORDER_NONE)||"''";b?b=a+b:(b=Blockly.Dart.provideFunction_("text_toTitleCase",["String "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(String str) {"," RegExp exp = new RegExp(r'\\b');"," List<String> list = str.split(exp);"," final title = new StringBuffer();"," for (String part in list) {",
|
||||
" if (part.length > 0) {"," title.write(part[0].toUpperCase());"," if (part.length > 0) {"," title.write(part.substring(1).toLowerCase());"," }"," }"," }"," return title.toString();","}"]),b=b+"("+a+")");return[b,Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.text_trim=function(a){var b={LEFT:".replaceFirst(new RegExp(r'^\\s+'), '')",RIGHT:".replaceFirst(new RegExp(r'\\s+$'), '')",BOTH:".trim()"}[a.getFieldValue("MODE")];return[(Blockly.Dart.valueToCode(a,"TEXT",Blockly.Dart.ORDER_UNARY_POSTFIX)||"''")+b,Blockly.Dart.ORDER_UNARY_POSTFIX]};Blockly.Dart.text_print=function(a){return"print("+(Blockly.Dart.valueToCode(a,"TEXT",Blockly.Dart.ORDER_NONE)||"''")+");\n"};
|
||||
Blockly.Dart.text_prompt_ext=function(a){Blockly.Dart.definitions_.import_dart_html="import 'dart:html' as Html;";var b="Html.window.prompt("+(a.getField("TEXT")?Blockly.Dart.quote_(a.getFieldValue("TEXT")):Blockly.Dart.valueToCode(a,"TEXT",Blockly.Dart.ORDER_NONE)||"''")+", '')";"NUMBER"==a.getFieldValue("TYPE")&&(Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;",b="Math.parseDouble("+b+")");return[b,Blockly.Dart.ORDER_UNARY_POSTFIX]};Blockly.Dart.text_prompt=Blockly.Dart.text_prompt_ext;
|
||||
Blockly.Dart.text_count=function(a){var b=Blockly.Dart.valueToCode(a,"TEXT",Blockly.Dart.ORDER_UNARY_POSTFIX)||"''";a=Blockly.Dart.valueToCode(a,"SUB",Blockly.Dart.ORDER_NONE)||"''";return[Blockly.Dart.provideFunction_("text_count",["int "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(String haystack, String needle) {"," if (needle.length == 0) {"," return haystack.length + 1;"," }"," int index = 0;"," int count = 0;"," while (index != -1) {"," index = haystack.indexOf(needle, index);"," if (index != -1) {",
|
||||
" count++;"," index += needle.length;"," }"," }"," return count;","}"])+"("+b+", "+a+")",Blockly.Dart.ORDER_UNARY_POSTFIX]};Blockly.Dart.text_replace=function(a){var b=Blockly.Dart.valueToCode(a,"TEXT",Blockly.Dart.ORDER_UNARY_POSTFIX)||"''",c=Blockly.Dart.valueToCode(a,"FROM",Blockly.Dart.ORDER_NONE)||"''";a=Blockly.Dart.valueToCode(a,"TO",Blockly.Dart.ORDER_NONE)||"''";return[b+".replaceAll("+c+", "+a+")",Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
Blockly.Dart.text_reverse=function(a){return["new String.fromCharCodes("+(Blockly.Dart.valueToCode(a,"TEXT",Blockly.Dart.ORDER_UNARY_POSTFIX)||"''")+".runes.toList().reversed)",Blockly.Dart.ORDER_UNARY_POSTFIX]};Blockly.Dart.loops={};
|
||||
Blockly.Dart.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.Dart.valueToCode(a,"TIMES",Blockly.Dart.ORDER_ASSIGNMENT)||"0",c=Blockly.Dart.statementToCode(a,"DO"),c=Blockly.Dart.addLoopTrap(c,a.id);a="";var d=Blockly.Dart.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE),e=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(e=Blockly.Dart.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),a+="var "+e+" = "+b+";\n");
|
||||
return a+("for (int "+d+" = 0; "+d+" < "+e+"; "+d+"++) {\n"+c+"}\n")};Blockly.Dart.controls_repeat=Blockly.Dart.controls_repeat_ext;Blockly.Dart.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Dart.valueToCode(a,"BOOL",b?Blockly.Dart.ORDER_UNARY_PREFIX:Blockly.Dart.ORDER_NONE)||"false",d=Blockly.Dart.statementToCode(a,"DO"),d=Blockly.Dart.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"};
|
||||
Blockly.Dart.controls_for=function(a){var b=Blockly.Dart.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Dart.valueToCode(a,"FROM",Blockly.Dart.ORDER_ASSIGNMENT)||"0",d=Blockly.Dart.valueToCode(a,"TO",Blockly.Dart.ORDER_ASSIGNMENT)||"0",e=Blockly.Dart.valueToCode(a,"BY",Blockly.Dart.ORDER_ASSIGNMENT)||"1",f=Blockly.Dart.statementToCode(a,"DO"),f=Blockly.Dart.addLoopTrap(f,a.id);if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var g=parseFloat(c)<=
|
||||
Blockly.Dart.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.Dart.valueToCode(a,"TIMES",Blockly.Dart.ORDER_ASSIGNMENT)||"0";var c=Blockly.Dart.statementToCode(a,"DO"),c=Blockly.Dart.addLoopTrap(c,a.id),d="",e=Blockly.Dart.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);a=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(a=Blockly.Dart.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),d+="var "+a+" = "+b+";\n");
|
||||
return d+("for (int "+e+" = 0; "+e+" < "+a+"; "+e+"++) {\n"+c+"}\n")};Blockly.Dart.controls_repeat=Blockly.Dart.controls_repeat_ext;Blockly.Dart.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Dart.valueToCode(a,"BOOL",b?Blockly.Dart.ORDER_UNARY_PREFIX:Blockly.Dart.ORDER_NONE)||"false",d=Blockly.Dart.statementToCode(a,"DO"),d=Blockly.Dart.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"};
|
||||
Blockly.Dart.controls_for=function(a){var b=Blockly.Dart.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);var c=Blockly.Dart.valueToCode(a,"FROM",Blockly.Dart.ORDER_ASSIGNMENT)||"0";var d=Blockly.Dart.valueToCode(a,"TO",Blockly.Dart.ORDER_ASSIGNMENT)||"0",e=Blockly.Dart.valueToCode(a,"BY",Blockly.Dart.ORDER_ASSIGNMENT)||"1",f=Blockly.Dart.statementToCode(a,"DO"),f=Blockly.Dart.addLoopTrap(f,a.id);if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var g=parseFloat(c)<=
|
||||
parseFloat(d);a="for ("+b+" = "+c+"; "+b+(g?" <= ":" >= ")+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.Dart.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="var "+g+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Dart.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),a+="var "+c+" = "+d+";\n"),d=Blockly.Dart.variableDB_.getDistinctName(b+
|
||||
"_inc",Blockly.Variables.NAME_TYPE),a+="num "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("("+e+").abs();\n"),a=a+("if ("+g+" > "+c+") {\n")+(Blockly.Dart.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+g+"; "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+"; "+b+" += "+d+") {\n"+f+"}\n";return a};
|
||||
Blockly.Dart.controls_forEach=function(a){var b=Blockly.Dart.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_ASSIGNMENT)||"[]",d=Blockly.Dart.statementToCode(a,"DO"),d=Blockly.Dart.addLoopTrap(d,a.id);return"for (var "+b+" in "+c+") {\n"+d+"}\n"};
|
||||
Blockly.Dart.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Dart.logic={};Blockly.Dart.controls_if=function(a){var b=0,c="",d,e;do e=Blockly.Dart.valueToCode(a,"IF"+b,Blockly.Dart.ORDER_NONE)||"false",d=Blockly.Dart.statementToCode(a,"DO"+b),c+=(0<b?"else ":"")+"if ("+e+") {\n"+d+"}",++b;while(a.getInput("IF"+b));a.getInput("ELSE")&&(d=Blockly.Dart.statementToCode(a,"ELSE"),c+=" else {\n"+d+"}");return c+"\n"};Blockly.Dart.controls_ifelse=Blockly.Dart.controls_if;
|
||||
Blockly.Dart.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Dart.logic={};Blockly.Dart.controls_if=function(a){var b=0,c="";do{var d=Blockly.Dart.valueToCode(a,"IF"+b,Blockly.Dart.ORDER_NONE)||"false";var e=Blockly.Dart.statementToCode(a,"DO"+b);c+=(0<b?"else ":"")+"if ("+d+") {\n"+e+"}";++b}while(a.getInput("IF"+b));a.getInput("ELSE")&&(e=Blockly.Dart.statementToCode(a,"ELSE"),c+=" else {\n"+e+"}");return c+"\n"};Blockly.Dart.controls_ifelse=Blockly.Dart.controls_if;
|
||||
Blockly.Dart.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c="=="==b||"!="==b?Blockly.Dart.ORDER_EQUALITY:Blockly.Dart.ORDER_RELATIONAL,d=Blockly.Dart.valueToCode(a,"A",c)||"0";a=Blockly.Dart.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]};
|
||||
Blockly.Dart.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"&&":"||",c="&&"==b?Blockly.Dart.ORDER_LOGICAL_AND:Blockly.Dart.ORDER_LOGICAL_OR,d=Blockly.Dart.valueToCode(a,"A",c);a=Blockly.Dart.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.Dart.logic_negate=function(a){var b=Blockly.Dart.ORDER_UNARY_PREFIX;return["!"+(Blockly.Dart.valueToCode(a,"BOOL",b)||"true"),b]};
|
||||
Blockly.Dart.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Dart.ORDER_ATOMIC]};Blockly.Dart.logic_null=function(a){return["null",Blockly.Dart.ORDER_ATOMIC]};Blockly.Dart.logic_ternary=function(a){var b=Blockly.Dart.valueToCode(a,"IF",Blockly.Dart.ORDER_CONDITIONAL)||"false",c=Blockly.Dart.valueToCode(a,"THEN",Blockly.Dart.ORDER_CONDITIONAL)||"null";a=Blockly.Dart.valueToCode(a,"ELSE",Blockly.Dart.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.Dart.ORDER_CONDITIONAL]};
|
||||
+24
-23
@@ -18,29 +18,29 @@ d&&(a=-a);else{if(0<c){a=a+" + "+c;var g=Blockly.JavaScript.ORDER_ADDITION}else
|
||||
Blockly.JavaScript.lists_repeat=function(a){var b=Blockly.JavaScript.provideFunction_("listsRepeat",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(value, n) {"," var array = [];"," for (var i = 0; i < n; i++) {"," array[i] = value;"," }"," return array;","}"]),c=Blockly.JavaScript.valueToCode(a,"ITEM",Blockly.JavaScript.ORDER_COMMA)||"null";a=Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_COMMA)||"0";return[b+"("+c+", "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.lists_length=function(a){return[(Blockly.JavaScript.valueToCode(a,"VALUE",Blockly.JavaScript.ORDER_MEMBER)||"[]")+".length",Blockly.JavaScript.ORDER_MEMBER]};Blockly.JavaScript.lists_isEmpty=function(a){return["!"+(Blockly.JavaScript.valueToCode(a,"VALUE",Blockly.JavaScript.ORDER_MEMBER)||"[]")+".length",Blockly.JavaScript.ORDER_LOGICAL_NOT]};
|
||||
Blockly.JavaScript.lists_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"indexOf":"lastIndexOf",c=Blockly.JavaScript.valueToCode(a,"FIND",Blockly.JavaScript.ORDER_NONE)||"''",b=(Blockly.JavaScript.valueToCode(a,"VALUE",Blockly.JavaScript.ORDER_MEMBER)||"[]")+"."+b+"("+c+")";return a.workspace.options.oneBasedIndex?[b+" + 1",Blockly.JavaScript.ORDER_ADDITION]:[b,Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.JavaScript.valueToCode(a,"VALUE","RANDOM"==c?Blockly.JavaScript.ORDER_COMMA:Blockly.JavaScript.ORDER_MEMBER)||"[]";switch(c){case "FIRST":if("GET"==b)return[d+"[0]",Blockly.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==b)return[d+".shift()",Blockly.JavaScript.ORDER_MEMBER];if("REMOVE"==b)return d+".shift();\n";break;case "LAST":if("GET"==b)return[d+".slice(-1)[0]",Blockly.JavaScript.ORDER_MEMBER];
|
||||
if("GET_REMOVE"==b)return[d+".pop()",Blockly.JavaScript.ORDER_MEMBER];if("REMOVE"==b)return d+".pop();\n";break;case "FROM_START":a=Blockly.JavaScript.getAdjusted(a,"AT");if("GET"==b)return[d+"["+a+"]",Blockly.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==b)return[d+".splice("+a+", 1)[0]",Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==b)return d+".splice("+a+", 1);\n";break;case "FROM_END":a=Blockly.JavaScript.getAdjusted(a,"AT",1,!0);if("GET"==b)return[d+".slice("+a+")[0]",Blockly.JavaScript.ORDER_FUNCTION_CALL];
|
||||
if("GET_REMOVE"==b)return[d+".splice("+a+", 1)[0]",Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==b)return d+".splice("+a+", 1);";break;case "RANDOM":d=Blockly.JavaScript.provideFunction_("listsGetRandomItem",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(list, remove) {"," var x = Math.floor(Math.random() * list.length);"," if (remove) {"," return list.splice(x, 1)[0];"," } else {"," return list[x];"," }","}"])+"("+d+", "+("GET"!=b)+")";if("GET"==b||"GET_REMOVE"==b)return[d,
|
||||
Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==b)return d+";\n"}throw"Unhandled combination (lists_getIndex).";};
|
||||
Blockly.JavaScript.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START";var d=Blockly.JavaScript.valueToCode(a,"VALUE","RANDOM"==c?Blockly.JavaScript.ORDER_COMMA:Blockly.JavaScript.ORDER_MEMBER)||"[]";switch(c){case "FIRST":if("GET"==b)return[d+"[0]",Blockly.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==b)return[d+".shift()",Blockly.JavaScript.ORDER_MEMBER];if("REMOVE"==b)return d+".shift();\n";break;case "LAST":if("GET"==b)return[d+".slice(-1)[0]",
|
||||
Blockly.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==b)return[d+".pop()",Blockly.JavaScript.ORDER_MEMBER];if("REMOVE"==b)return d+".pop();\n";break;case "FROM_START":a=Blockly.JavaScript.getAdjusted(a,"AT");if("GET"==b)return[d+"["+a+"]",Blockly.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==b)return[d+".splice("+a+", 1)[0]",Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==b)return d+".splice("+a+", 1);\n";break;case "FROM_END":a=Blockly.JavaScript.getAdjusted(a,"AT",1,!0);if("GET"==b)return[d+".slice("+
|
||||
a+")[0]",Blockly.JavaScript.ORDER_FUNCTION_CALL];if("GET_REMOVE"==b)return[d+".splice("+a+", 1)[0]",Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==b)return d+".splice("+a+", 1);";break;case "RANDOM":d=Blockly.JavaScript.provideFunction_("listsGetRandomItem",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(list, remove) {"," var x = Math.floor(Math.random() * list.length);"," if (remove) {"," return list.splice(x, 1)[0];"," } else {"," return list[x];"," }","}"])+"("+d+
|
||||
", "+("GET"!=b)+")";if("GET"==b||"GET_REMOVE"==b)return[d,Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==b)return d+";\n"}throw"Unhandled combination (lists_getIndex).";};
|
||||
Blockly.JavaScript.lists_setIndex=function(a){function b(){if(c.match(/^\w+$/))return"";var a=Blockly.JavaScript.variableDB_.getDistinctName("tmpList",Blockly.Variables.NAME_TYPE),b="var "+a+" = "+c+";\n";c=a;return b}var c=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_MEMBER)||"[]",d=a.getFieldValue("MODE")||"GET",e=a.getFieldValue("WHERE")||"FROM_START",f=Blockly.JavaScript.valueToCode(a,"TO",Blockly.JavaScript.ORDER_ASSIGNMENT)||"null";switch(e){case "FIRST":if("SET"==d)return c+
|
||||
"[0] = "+f+";\n";if("INSERT"==d)return c+".unshift("+f+");\n";break;case "LAST":if("SET"==d)return a=b(),a+(c+"["+c+".length - 1] = "+f+";\n");if("INSERT"==d)return c+".push("+f+");\n";break;case "FROM_START":e=Blockly.JavaScript.getAdjusted(a,"AT");if("SET"==d)return c+"["+e+"] = "+f+";\n";if("INSERT"==d)return c+".splice("+e+", 0, "+f+");\n";break;case "FROM_END":e=Blockly.JavaScript.getAdjusted(a,"AT",1,!1,Blockly.JavaScript.ORDER_SUBTRACTION);a=b();if("SET"==d)return a+(c+"["+c+".length - "+e+
|
||||
"] = "+f+";\n");if("INSERT"==d)return a+(c+".splice("+c+".length - "+e+", 0, "+f+");\n");break;case "RANDOM":a=b();e=Blockly.JavaScript.variableDB_.getDistinctName("tmpX",Blockly.Variables.NAME_TYPE);a+="var "+e+" = Math.floor(Math.random() * "+c+".length);\n";if("SET"==d)return a+(c+"["+e+"] = "+f+";\n");if("INSERT"==d)return a+(c+".splice("+e+", 0, "+f+");\n")}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.JavaScript.lists.getIndex_=function(a,b,c){return"FIRST"==b?"0":"FROM_END"==b?a+".length - 1 - "+c:"LAST"==b?a+".length - 1":c};
|
||||
Blockly.JavaScript.lists_getSublist=function(a){var b=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"==c&&"LAST"==d)b+=".slice(0)";else if(b.match(/^\w+$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":var e=Blockly.JavaScript.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.JavaScript.getAdjusted(a,"AT1",1,!1,Blockly.JavaScript.ORDER_SUBTRACTION);e=b+".length - "+e;break;case "FIRST":e=
|
||||
"0";break;default:throw"Unhandled option (lists_getSublist).";}switch(d){case "FROM_START":a=Blockly.JavaScript.getAdjusted(a,"AT2",1);break;case "FROM_END":a=Blockly.JavaScript.getAdjusted(a,"AT2",0,!1,Blockly.JavaScript.ORDER_SUBTRACTION);a=b+".length - "+a;break;case "LAST":a=b+".length";break;default:throw"Unhandled option (lists_getSublist).";}b=b+".slice("+e+", "+a+")"}else{e=Blockly.JavaScript.getAdjusted(a,"AT1");a=Blockly.JavaScript.getAdjusted(a,"AT2");var f=Blockly.JavaScript.lists.getIndex_,
|
||||
g={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"},b=Blockly.JavaScript.provideFunction_("subsequence"+g[c]+g[d],["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(sequence"+("FROM_END"==c||"FROM_START"==c?", at1":"")+("FROM_END"==d||"FROM_START"==d?", at2":"")+") {"," var start = "+f("sequence",c,"at1")+";"," var end = "+f("sequence",d,"at2")+" + 1;"," return sequence.slice(start, end);","}"])+"("+b+("FROM_END"==c||"FROM_START"==c?", "+e:"")+("FROM_END"==d||"FROM_START"==
|
||||
d?", "+a:"")+")"}return[b,Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.lists_getSublist=function(a){var b=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"==c&&"LAST"==d)var e=b+".slice(0)";else if(b.match(/^\w+$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":e=Blockly.JavaScript.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.JavaScript.getAdjusted(a,"AT1",1,!1,Blockly.JavaScript.ORDER_SUBTRACTION);e=b+".length - "+e;break;case "FIRST":e=
|
||||
"0";break;default:throw"Unhandled option (lists_getSublist).";}switch(d){case "FROM_START":a=Blockly.JavaScript.getAdjusted(a,"AT2",1);break;case "FROM_END":a=Blockly.JavaScript.getAdjusted(a,"AT2",0,!1,Blockly.JavaScript.ORDER_SUBTRACTION);a=b+".length - "+a;break;case "LAST":a=b+".length";break;default:throw"Unhandled option (lists_getSublist).";}e=b+".slice("+e+", "+a+")"}else{e=Blockly.JavaScript.getAdjusted(a,"AT1");a=Blockly.JavaScript.getAdjusted(a,"AT2");var f=Blockly.JavaScript.lists.getIndex_;
|
||||
var g={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"};f=Blockly.JavaScript.provideFunction_("subsequence"+g[c]+g[d],["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(sequence"+("FROM_END"==c||"FROM_START"==c?", at1":"")+("FROM_END"==d||"FROM_START"==d?", at2":"")+") {"," var start = "+f("sequence",c,"at1")+";"," var end = "+f("sequence",d,"at2")+" + 1;"," return sequence.slice(start, end);","}"]);e=f+"("+b+("FROM_END"==c||"FROM_START"==c?", "+e:"")+("FROM_END"==
|
||||
d||"FROM_START"==d?", "+a:"")+")"}return[e,Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.lists_sort=function(a){var b=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_FUNCTION_CALL)||"[]",c="1"===a.getFieldValue("DIRECTION")?1:-1;a=a.getFieldValue("TYPE");var d=Blockly.JavaScript.provideFunction_("listsGetSortCompare",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(type, direction) {"," var compareFuncs = {",' "NUMERIC": function(a, b) {'," return parseFloat(a) - parseFloat(b); },",' "TEXT": function(a, b) {'," return a.toString() > b.toString() ? 1 : -1; },",
|
||||
' "IGNORE_CASE": function(a, b) {'," return a.toString().toLowerCase() > b.toString().toLowerCase() ? 1 : -1; },"," };"," var compare = compareFuncs[type];"," return function(a, b) { return compare(a, b) * direction; }","}"]);return[b+".slice().sort("+d+'("'+a+'", '+c+"))",Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.lists_split=function(a){var b=Blockly.JavaScript.valueToCode(a,"INPUT",Blockly.JavaScript.ORDER_MEMBER),c=Blockly.JavaScript.valueToCode(a,"DELIM",Blockly.JavaScript.ORDER_NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a="split";else if("JOIN"==a)b||(b="[]"),a="join";else throw"Unknown mode: "+a;return[b+"."+a+"("+c+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.lists_reverse=function(a){return[(Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_FUNCTION_CALL)||"[]")+".slice().reverse()",Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.math={};Blockly.JavaScript.math_number=function(a){return[parseFloat(a.getFieldValue("NUM")),Blockly.JavaScript.ORDER_ATOMIC]};
|
||||
Blockly.JavaScript.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.JavaScript.ORDER_ADDITION],MINUS:[" - ",Blockly.JavaScript.ORDER_SUBTRACTION],MULTIPLY:[" * ",Blockly.JavaScript.ORDER_MULTIPLICATION],DIVIDE:[" / ",Blockly.JavaScript.ORDER_DIVISION],POWER:[null,Blockly.JavaScript.ORDER_COMMA]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.JavaScript.valueToCode(a,"A",b)||"0";a=Blockly.JavaScript.valueToCode(a,"B",b)||"0";return c?[d+c+a,b]:["Math.pow("+d+", "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return a=Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_UNARY_NEGATION)||"0","-"==a[0]&&(a=" "+a),["-"+a,Blockly.JavaScript.ORDER_UNARY_NEGATION];a="SIN"==b||"COS"==b||"TAN"==b?Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_DIVISION)||"0":Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_NONE)||"0";switch(b){case "ABS":c="Math.abs("+a+")";break;case "ROOT":c="Math.sqrt("+
|
||||
Blockly.JavaScript.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"==b)return a=Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_UNARY_NEGATION)||"0","-"==a[0]&&(a=" "+a),["-"+a,Blockly.JavaScript.ORDER_UNARY_NEGATION];a="SIN"==b||"COS"==b||"TAN"==b?Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_DIVISION)||"0":Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_NONE)||"0";switch(b){case "ABS":var c="Math.abs("+a+")";break;case "ROOT":c="Math.sqrt("+
|
||||
a+")";break;case "LN":c="Math.log("+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 * Math.PI)";break;case "COS":c="Math.cos("+a+" / 180 * Math.PI)";break;case "TAN":c="Math.tan("+a+" / 180 * Math.PI)"}if(c)return[c,Blockly.JavaScript.ORDER_FUNCTION_CALL];switch(b){case "LOG10":c="Math.log("+a+
|
||||
") / Math.log(10)";break;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.JavaScript.ORDER_DIVISION]};
|
||||
Blockly.JavaScript.math_constant=function(a){return{PI:["Math.PI",Blockly.JavaScript.ORDER_MEMBER],E:["Math.E",Blockly.JavaScript.ORDER_MEMBER],GOLDEN_RATIO:["(1 + Math.sqrt(5)) / 2",Blockly.JavaScript.ORDER_DIVISION],SQRT2:["Math.SQRT2",Blockly.JavaScript.ORDER_MEMBER],SQRT1_2:["Math.SQRT1_2",Blockly.JavaScript.ORDER_MEMBER],INFINITY:["Infinity",Blockly.JavaScript.ORDER_ATOMIC]}[a.getFieldValue("CONSTANT")]};
|
||||
Blockly.JavaScript.math_number_property=function(a){var b=Blockly.JavaScript.valueToCode(a,"NUMBER_TO_CHECK",Blockly.JavaScript.ORDER_MODULUS)||"0",c=a.getFieldValue("PROPERTY"),d;if("PRIME"==c)return[Blockly.JavaScript.provideFunction_("mathIsPrime",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(n) {"," // https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if (n == 2 || n == 3) {"," return true;"," }"," // False if n is NaN, negative, is 1, or not whole."," // And false if n is divisible by 2 or 3.",
|
||||
" if (isNaN(n) || 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 (var x = 6; x <= Math.sqrt(n) + 1; x += 6) {"," if (n % (x - 1) == 0 || n % (x + 1) == 0) {"," return false;"," }"," }"," return true;","}"])+"("+b+")",Blockly.JavaScript.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=
|
||||
Blockly.JavaScript.math_number_property=function(a){var b=Blockly.JavaScript.valueToCode(a,"NUMBER_TO_CHECK",Blockly.JavaScript.ORDER_MODULUS)||"0",c=a.getFieldValue("PROPERTY");if("PRIME"==c)return[Blockly.JavaScript.provideFunction_("mathIsPrime",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(n) {"," // https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if (n == 2 || n == 3) {"," return true;"," }"," // False if n is NaN, negative, is 1, or not whole."," // And false if n is divisible by 2 or 3.",
|
||||
" if (isNaN(n) || 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 (var x = 6; x <= Math.sqrt(n) + 1; x += 6) {"," if (n % (x - 1) == 0 || n % (x + 1) == 0) {"," return false;"," }"," }"," return true;","}"])+"("+b+")",Blockly.JavaScript.ORDER_FUNCTION_CALL];switch(c){case "EVEN":var 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.JavaScript.valueToCode(a,"DIVISOR",Blockly.JavaScript.ORDER_MODULUS)||"0",d=b+" % "+a+" == 0"}return[d,Blockly.JavaScript.ORDER_EQUALITY]};Blockly.JavaScript.math_change=function(a){var b=Blockly.JavaScript.valueToCode(a,"DELTA",Blockly.JavaScript.ORDER_ADDITION)||"0";a=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = (typeof "+a+" == 'number' ? "+a+" : 0) + "+b+";\n"};
|
||||
Blockly.JavaScript.math_round=Blockly.JavaScript.math_single;Blockly.JavaScript.math_trig=Blockly.JavaScript.math_single;
|
||||
Blockly.JavaScript.math_on_list=function(a){var b=a.getFieldValue("OP");switch(b){case "SUM":a=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_MEMBER)||"[]";a+=".reduce(function(x, y) {return x + y;})";break;case "MIN":a=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_COMMA)||"[]";a="Math.min.apply(null, "+a+")";break;case "MAX":a=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_COMMA)||"[]";a="Math.max.apply(null, "+a+")";break;case "AVERAGE":b=Blockly.JavaScript.provideFunction_("mathMean",
|
||||
@@ -70,24 +70,25 @@ Blockly.JavaScript.text_indexOf=function(a){var b="FIRST"==a.getFieldValue("END"
|
||||
Blockly.JavaScript.text_charAt=function(a){var b=a.getFieldValue("WHERE")||"FROM_START",c=Blockly.JavaScript.valueToCode(a,"VALUE","RANDOM"==b?Blockly.JavaScript.ORDER_NONE:Blockly.JavaScript.ORDER_MEMBER)||"''";switch(b){case "FIRST":return[c+".charAt(0)",Blockly.JavaScript.ORDER_FUNCTION_CALL];case "LAST":return[c+".slice(-1)",Blockly.JavaScript.ORDER_FUNCTION_CALL];case "FROM_START":return a=Blockly.JavaScript.getAdjusted(a,"AT"),[c+".charAt("+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL];case "FROM_END":return a=
|
||||
Blockly.JavaScript.getAdjusted(a,"AT",1,!0),[c+".slice("+a+").charAt(0)",Blockly.JavaScript.ORDER_FUNCTION_CALL];case "RANDOM":return[Blockly.JavaScript.provideFunction_("textRandomLetter",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(text) {"," var x = Math.floor(Math.random() * text.length);"," return text[x];","}"])+"("+c+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]}throw"Unhandled option (text_charAt).";};
|
||||
Blockly.JavaScript.text.getIndex_=function(a,b,c){return"FIRST"==b?"0":"FROM_END"==b?a+".length - 1 - "+c:"LAST"==b?a+".length - 1":c};
|
||||
Blockly.JavaScript.text_getSubstring=function(a){var b=Blockly.JavaScript.valueToCode(a,"STRING",Blockly.JavaScript.ORDER_FUNCTION_CALL)||"''",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"!=c||"LAST"!=d)if(b.match(/^'?\w+'?$/)||"FROM_END"!=c&&"LAST"!=c&&"FROM_END"!=d&&"LAST"!=d){switch(c){case "FROM_START":var e=Blockly.JavaScript.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.JavaScript.getAdjusted(a,"AT1",1,!1,Blockly.JavaScript.ORDER_SUBTRACTION);e=b+".length - "+e;break;
|
||||
case "FIRST":e="0";break;default:throw"Unhandled option (text_getSubstring).";}switch(d){case "FROM_START":a=Blockly.JavaScript.getAdjusted(a,"AT2",1);break;case "FROM_END":a=Blockly.JavaScript.getAdjusted(a,"AT2",0,!1,Blockly.JavaScript.ORDER_SUBTRACTION);a=b+".length - "+a;break;case "LAST":a=b+".length";break;default:throw"Unhandled option (text_getSubstring).";}b=b+".slice("+e+", "+a+")"}else{e=Blockly.JavaScript.getAdjusted(a,"AT1");a=Blockly.JavaScript.getAdjusted(a,"AT2");var f=Blockly.JavaScript.text.getIndex_,
|
||||
g={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"},b=Blockly.JavaScript.provideFunction_("subsequence"+g[c]+g[d],["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(sequence"+("FROM_END"==c||"FROM_START"==c?", at1":"")+("FROM_END"==d||"FROM_START"==d?", at2":"")+") {"," var start = "+f("sequence",c,"at1")+";"," var end = "+f("sequence",d,"at2")+" + 1;"," return sequence.slice(start, end);","}"])+"("+b+("FROM_END"==c||"FROM_START"==c?", "+e:"")+("FROM_END"==d||"FROM_START"==
|
||||
d?", "+a:"")+")"}return[b,Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.text_changeCase=function(a){var b={UPPERCASE:".toUpperCase()",LOWERCASE:".toLowerCase()",TITLECASE:null}[a.getFieldValue("CASE")];a=Blockly.JavaScript.valueToCode(a,"TEXT",b?Blockly.JavaScript.ORDER_MEMBER:Blockly.JavaScript.ORDER_NONE)||"''";return[b?a+b:Blockly.JavaScript.provideFunction_("textToTitleCase",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(str) {"," return str.replace(/\\S+/g,"," function(txt) {return txt[0].toUpperCase() + txt.substring(1).toLowerCase();});","}"])+
|
||||
"("+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.text_trim=function(a){var b={LEFT:".replace(/^[\\s\\xa0]+/, '')",RIGHT:".replace(/[\\s\\xa0]+$/, '')",BOTH:".trim()"}[a.getFieldValue("MODE")];return[(Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_MEMBER)||"''")+b,Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.text_print=function(a){return"window.alert("+(Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_NONE)||"''")+");\n"};
|
||||
Blockly.JavaScript.text_prompt_ext=function(a){var b="window.prompt("+(a.getField("TEXT")?Blockly.JavaScript.quote_(a.getFieldValue("TEXT")):Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_NONE)||"''")+")";"NUMBER"==a.getFieldValue("TYPE")&&(b="parseFloat("+b+")");return[b,Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.text_prompt=Blockly.JavaScript.text_prompt_ext;
|
||||
Blockly.JavaScript.text_getSubstring=function(a){var b=Blockly.JavaScript.valueToCode(a,"STRING",Blockly.JavaScript.ORDER_FUNCTION_CALL)||"''",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"==c&&"LAST"==d)var e=b;else if(b.match(/^'?\w+'?$/)||"FROM_END"!=c&&"LAST"!=c&&"FROM_END"!=d&&"LAST"!=d){switch(c){case "FROM_START":e=Blockly.JavaScript.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.JavaScript.getAdjusted(a,"AT1",1,!1,Blockly.JavaScript.ORDER_SUBTRACTION);e=b+".length - "+
|
||||
e;break;case "FIRST":e="0";break;default:throw"Unhandled option (text_getSubstring).";}switch(d){case "FROM_START":a=Blockly.JavaScript.getAdjusted(a,"AT2",1);break;case "FROM_END":a=Blockly.JavaScript.getAdjusted(a,"AT2",0,!1,Blockly.JavaScript.ORDER_SUBTRACTION);a=b+".length - "+a;break;case "LAST":a=b+".length";break;default:throw"Unhandled option (text_getSubstring).";}e=b+".slice("+e+", "+a+")"}else{e=Blockly.JavaScript.getAdjusted(a,"AT1");a=Blockly.JavaScript.getAdjusted(a,"AT2");var f=Blockly.JavaScript.text.getIndex_;
|
||||
var g={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"};f=Blockly.JavaScript.provideFunction_("subsequence"+g[c]+g[d],["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(sequence"+("FROM_END"==c||"FROM_START"==c?", at1":"")+("FROM_END"==d||"FROM_START"==d?", at2":"")+") {"," var start = "+f("sequence",c,"at1")+";"," var end = "+f("sequence",d,"at2")+" + 1;"," return sequence.slice(start, end);","}"]);e=f+"("+b+("FROM_END"==c||"FROM_START"==c?", "+e:"")+("FROM_END"==
|
||||
d||"FROM_START"==d?", "+a:"")+")"}return[e,Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.text_changeCase=function(a){var b={UPPERCASE:".toUpperCase()",LOWERCASE:".toLowerCase()",TITLECASE:null}[a.getFieldValue("CASE")];a=Blockly.JavaScript.valueToCode(a,"TEXT",b?Blockly.JavaScript.ORDER_MEMBER:Blockly.JavaScript.ORDER_NONE)||"''";b?b=a+b:(b=Blockly.JavaScript.provideFunction_("textToTitleCase",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(str) {"," return str.replace(/\\S+/g,"," function(txt) {return txt[0].toUpperCase() + txt.substring(1).toLowerCase();});",
|
||||
"}"]),b=b+"("+a+")");return[b,Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.text_trim=function(a){var b={LEFT:".replace(/^[\\s\\xa0]+/, '')",RIGHT:".replace(/[\\s\\xa0]+$/, '')",BOTH:".trim()"}[a.getFieldValue("MODE")];return[(Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_MEMBER)||"''")+b,Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.text_print=function(a){return"window.alert("+(Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_NONE)||"''")+");\n"};Blockly.JavaScript.text_prompt_ext=function(a){var b="window.prompt("+(a.getField("TEXT")?Blockly.JavaScript.quote_(a.getFieldValue("TEXT")):Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_NONE)||"''")+")";"NUMBER"==a.getFieldValue("TYPE")&&(b="parseFloat("+b+")");return[b,Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.text_prompt=Blockly.JavaScript.text_prompt_ext;
|
||||
Blockly.JavaScript.text_count=function(a){var b=Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_MEMBER)||"''";a=Blockly.JavaScript.valueToCode(a,"SUB",Blockly.JavaScript.ORDER_NONE)||"''";return[Blockly.JavaScript.provideFunction_("textCount",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(haystack, needle) {"," if (needle.length === 0) {"," return haystack.length + 1;"," } else {"," return haystack.split(needle).length - 1;"," }","}"])+"("+b+", "+a+")",Blockly.JavaScript.ORDER_SUBTRACTION]};
|
||||
Blockly.JavaScript.text_replace=function(a){var b=Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_MEMBER)||"''",c=Blockly.JavaScript.valueToCode(a,"FROM",Blockly.JavaScript.ORDER_NONE)||"''";a=Blockly.JavaScript.valueToCode(a,"TO",Blockly.JavaScript.ORDER_NONE)||"''";return[Blockly.JavaScript.provideFunction_("textReplace",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(haystack, needle, replacement) {",' needle = needle.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g,"\\\\$1")',
|
||||
' .replace(/\\x08/g,"\\\\x08");'," return haystack.replace(new RegExp(needle, 'g'), replacement);","}"])+"("+b+", "+c+", "+a+")",Blockly.JavaScript.ORDER_MEMBER]};Blockly.JavaScript.text_reverse=function(a){return[(Blockly.JavaScript.valueToCode(a,"TEXT",Blockly.JavaScript.ORDER_MEMBER)||"''")+".split('').reverse().join('')",Blockly.JavaScript.ORDER_MEMBER]};Blockly.JavaScript.loops={};
|
||||
Blockly.JavaScript.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.JavaScript.valueToCode(a,"TIMES",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",c=Blockly.JavaScript.statementToCode(a,"DO"),c=Blockly.JavaScript.addLoopTrap(c,a.id);a="";var d=Blockly.JavaScript.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE),e=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(e=Blockly.JavaScript.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),
|
||||
a+="var "+e+" = "+b+";\n");return a+("for (var "+d+" = 0; "+d+" < "+e+"; "+d+"++) {\n"+c+"}\n")};Blockly.JavaScript.controls_repeat=Blockly.JavaScript.controls_repeat_ext;
|
||||
Blockly.JavaScript.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.JavaScript.valueToCode(a,"TIMES",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0";var c=Blockly.JavaScript.statementToCode(a,"DO"),c=Blockly.JavaScript.addLoopTrap(c,a.id),d="",e=Blockly.JavaScript.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);a=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(a=Blockly.JavaScript.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),
|
||||
d+="var "+a+" = "+b+";\n");return d+("for (var "+e+" = 0; "+e+" < "+a+"; "+e+"++) {\n"+c+"}\n")};Blockly.JavaScript.controls_repeat=Blockly.JavaScript.controls_repeat_ext;
|
||||
Blockly.JavaScript.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.JavaScript.valueToCode(a,"BOOL",b?Blockly.JavaScript.ORDER_LOGICAL_NOT:Blockly.JavaScript.ORDER_NONE)||"false",d=Blockly.JavaScript.statementToCode(a,"DO"),d=Blockly.JavaScript.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"};
|
||||
Blockly.JavaScript.controls_for=function(a){var b=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.JavaScript.valueToCode(a,"FROM",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",d=Blockly.JavaScript.valueToCode(a,"TO",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",e=Blockly.JavaScript.valueToCode(a,"BY",Blockly.JavaScript.ORDER_ASSIGNMENT)||"1",f=Blockly.JavaScript.statementToCode(a,"DO"),f=Blockly.JavaScript.addLoopTrap(f,a.id);if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&
|
||||
Blockly.isNumber(e)){var g=parseFloat(c)<=parseFloat(d);a="for ("+b+" = "+c+"; "+b+(g?" <= ":" >= ")+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),
|
||||
Blockly.JavaScript.controls_for=function(a){var b=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);var c=Blockly.JavaScript.valueToCode(a,"FROM",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0";var d=Blockly.JavaScript.valueToCode(a,"TO",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",e=Blockly.JavaScript.valueToCode(a,"BY",Blockly.JavaScript.ORDER_ASSIGNMENT)||"1",f=Blockly.JavaScript.statementToCode(a,"DO"),f=Blockly.JavaScript.addLoopTrap(f,a.id);if(Blockly.isNumber(c)&&
|
||||
Blockly.isNumber(d)&&Blockly.isNumber(e)){var g=parseFloat(c)<=parseFloat(d);a="for ("+b+" = "+c+"; "+b+(g?" <= ":" >= ")+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=a+("if ("+g+" > "+c+") {\n")+(Blockly.JavaScript.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+g+"; "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+"; "+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.logic={};Blockly.JavaScript.controls_if=function(a){var b=0,c="",d,e;do e=Blockly.JavaScript.valueToCode(a,"IF"+b,Blockly.JavaScript.ORDER_NONE)||"false",d=Blockly.JavaScript.statementToCode(a,"DO"+b),c+=(0<b?" else ":"")+"if ("+e+") {\n"+d+"}",++b;while(a.getInput("IF"+b));a.getInput("ELSE")&&(d=Blockly.JavaScript.statementToCode(a,"ELSE"),c+=" else {\n"+d+"}");return c+"\n"};Blockly.JavaScript.controls_ifelse=Blockly.JavaScript.controls_if;
|
||||
"_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.logic={};Blockly.JavaScript.controls_if=function(a){var b=0,c="";do{var d=Blockly.JavaScript.valueToCode(a,"IF"+b,Blockly.JavaScript.ORDER_NONE)||"false";var e=Blockly.JavaScript.statementToCode(a,"DO"+b);c+=(0<b?" else ":"")+"if ("+d+") {\n"+e+"}";++b}while(a.getInput("IF"+b));a.getInput("ELSE")&&(e=Blockly.JavaScript.statementToCode(a,"ELSE"),c+=" else {\n"+e+"}");return c+"\n"};Blockly.JavaScript.controls_ifelse=Blockly.JavaScript.controls_if;
|
||||
Blockly.JavaScript.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c="=="==b||"!="==b?Blockly.JavaScript.ORDER_EQUALITY:Blockly.JavaScript.ORDER_RELATIONAL,d=Blockly.JavaScript.valueToCode(a,"A",c)||"0";a=Blockly.JavaScript.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]};
|
||||
Blockly.JavaScript.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"&&":"||",c="&&"==b?Blockly.JavaScript.ORDER_LOGICAL_AND:Blockly.JavaScript.ORDER_LOGICAL_OR,d=Blockly.JavaScript.valueToCode(a,"A",c);a=Blockly.JavaScript.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.JavaScript.logic_negate=function(a){var b=Blockly.JavaScript.ORDER_LOGICAL_NOT;return["!"+(Blockly.JavaScript.valueToCode(a,"BOOL",b)||"true"),b]};Blockly.JavaScript.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.JavaScript.ORDER_ATOMIC]};Blockly.JavaScript.logic_null=function(a){return["null",Blockly.JavaScript.ORDER_ATOMIC]};
|
||||
|
||||
+15
-15
@@ -13,8 +13,8 @@ Blockly.Lua.lists_repeat=function(a){var b=Blockly.Lua.provideFunction_("create_
|
||||
Blockly.Lua.lists_length=function(a){return["#"+(Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_UNARY)||"{}"),Blockly.Lua.ORDER_UNARY]};Blockly.Lua.lists_isEmpty=function(a){return["#"+(Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_UNARY)||"{}")+" == 0",Blockly.Lua.ORDER_RELATIONAL]};
|
||||
Blockly.Lua.lists_indexOf=function(a){var b=Blockly.Lua.valueToCode(a,"FIND",Blockly.Lua.ORDER_NONE)||"''",c=Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_NONE)||"{}";return[("FIRST"==a.getFieldValue("END")?Blockly.Lua.provideFunction_("first_index",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(t, elem)"," for k, v in ipairs(t) do"," if v == elem then"," return k"," end"," end"," return 0","end"]):Blockly.Lua.provideFunction_("last_index",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+
|
||||
"(t, elem)"," for i = #t, 1, -1 do"," if t[i] == elem then"," return i"," end"," end"," return 0","end"]))+"("+c+", "+b+")",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.lists.getIndex_=function(a,b,c){return"FIRST"==b?"1":"FROM_END"==b?"#"+a+" + 1 - "+c:"LAST"==b?"#"+a:"RANDOM"==b?"math.random(#"+a+")":c};
|
||||
Blockly.Lua.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_HIGH)||"{}",e=Blockly.Lua.lists.getIndex_;if("LAST"!=c&&"FROM_END"!=c&&"RANDOM"!=c||d.match(/^\w+$/)){f="GET"==b&&"FROM_END"==c?Blockly.Lua.ORDER_ADDITIVE:Blockly.Lua.ORDER_NONE;a=Blockly.Lua.valueToCode(a,"AT",f)||"1";a=e(d,c,a);if("GET"==b)return[d+"["+a+"]",Blockly.Lua.ORDER_HIGH];c="table.remove("+d+", "+a+")";return"GET_REMOVE"==
|
||||
b?[c,Blockly.Lua.ORDER_HIGH]:c+"\n"}if("REMOVE"==b){var f="FROM_END"==c?Blockly.Lua.ORDER_ADDITIVE:Blockly.Lua.ORDER_NONE;a=Blockly.Lua.valueToCode(a,"AT",f)||"1";b=Blockly.Lua.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE);a=e(b,c,a);return b+" = "+d+"\ntable.remove("+b+", "+a+")\n"}a=Blockly.Lua.valueToCode(a,"AT",Blockly.Lua.ORDER_NONE)||"1";return[("GET"==b?Blockly.Lua.provideFunction_("list_get_"+c.toLowerCase(),["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(t"+("FROM_END"==
|
||||
Blockly.Lua.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET";var c=a.getFieldValue("WHERE")||"FROM_START";var d=Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_HIGH)||"{}",e=Blockly.Lua.lists.getIndex_;if("LAST"!=c&&"FROM_END"!=c&&"RANDOM"!=c||d.match(/^\w+$/)){var f="GET"==b&&"FROM_END"==c?Blockly.Lua.ORDER_ADDITIVE:Blockly.Lua.ORDER_NONE;a=Blockly.Lua.valueToCode(a,"AT",f)||"1";a=e(d,c,a);if("GET"==b)return[d+"["+a+"]",Blockly.Lua.ORDER_HIGH];c="table.remove("+d+", "+a+")";return"GET_REMOVE"==
|
||||
b?[c,Blockly.Lua.ORDER_HIGH]:c+"\n"}if("REMOVE"==b)return f="FROM_END"==c?Blockly.Lua.ORDER_ADDITIVE:Blockly.Lua.ORDER_NONE,a=Blockly.Lua.valueToCode(a,"AT",f)||"1",b=Blockly.Lua.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),a=e(b,c,a),b+" = "+d+"\ntable.remove("+b+", "+a+")\n";a=Blockly.Lua.valueToCode(a,"AT",Blockly.Lua.ORDER_NONE)||"1";return[("GET"==b?Blockly.Lua.provideFunction_("list_get_"+c.toLowerCase(),["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(t"+("FROM_END"==
|
||||
c||"FROM_START"==c?", at)":")")," return t["+e("t",c,"at")+"]","end"]):Blockly.Lua.provideFunction_("list_remove_"+c.toLowerCase(),["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(t"+("FROM_END"==c||"FROM_START"==c?", at)":")")," return table.remove(t, "+e("t",c,"at")+")","end"]))+"("+d+("FROM_END"==c||"FROM_START"==c?", "+a:"")+")",Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.lists_setIndex=function(a){var b=Blockly.Lua.valueToCode(a,"LIST",Blockly.Lua.ORDER_HIGH)||"{}",c=a.getFieldValue("MODE")||"SET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Lua.valueToCode(a,"AT",Blockly.Lua.ORDER_ADDITIVE)||"1";a=Blockly.Lua.valueToCode(a,"TO",Blockly.Lua.ORDER_NONE)||"None";var f=Blockly.Lua.lists.getIndex_,g="";if(("LAST"==d||"FROM_END"==d||"RANDOM"==d)&&!b.match(/^\w+$/))var h=Blockly.Lua.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),g=
|
||||
h+" = "+b+"\n",b=h;g="SET"==c?g+(b+"["+f(b,d,e)+"] = "+a):g+("table.insert("+b+", "+(f(b,d,e)+("LAST"==d?" + 1":""))+", "+a+")");return g+"\n"};
|
||||
@@ -29,8 +29,8 @@ Blockly.Lua.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Lua.ORDER_ADDI
|
||||
Blockly.Lua.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"==b)return a=Blockly.Lua.valueToCode(a,"NUM",Blockly.Lua.ORDER_UNARY)||"0",["-"+a,Blockly.Lua.ORDER_UNARY];a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Lua.valueToCode(a,"NUM",Blockly.Lua.ORDER_MULTIPLICATIVE)||"0":Blockly.Lua.valueToCode(a,"NUM",Blockly.Lua.ORDER_NONE)||"0";switch(b){case "ABS":b="math.abs("+a+")";break;case "ROOT":b="math.sqrt("+a+")";break;case "LN":b="math.log("+a+")";break;case "LOG10":b="math.log10("+a+")";break;
|
||||
case "EXP":b="math.exp("+a+")";break;case "POW10":b="math.pow(10,"+a+")";break;case "ROUND":b="math.floor("+a+" + .5)";break;case "ROUNDUP":b="math.ceil("+a+")";break;case "ROUNDDOWN":b="math.floor("+a+")";break;case "SIN":b="math.sin(math.rad("+a+"))";break;case "COS":b="math.cos(math.rad("+a+"))";break;case "TAN":b="math.tan(math.rad("+a+"))";break;case "ASIN":b="math.deg(math.asin("+a+"))";break;case "ACOS":b="math.deg(math.acos("+a+"))";break;case "ATAN":b="math.deg(math.atan("+a+"))";break;default:throw"Unknown math operator: "+
|
||||
b;}return[b,Blockly.Lua.ORDER_HIGH]};Blockly.Lua.math_constant=function(a){return{PI:["math.pi",Blockly.Lua.ORDER_HIGH],E:["math.exp(1)",Blockly.Lua.ORDER_HIGH],GOLDEN_RATIO:["(1 + math.sqrt(5)) / 2",Blockly.Lua.ORDER_MULTIPLICATIVE],SQRT2:["math.sqrt(2)",Blockly.Lua.ORDER_HIGH],SQRT1_2:["math.sqrt(1 / 2)",Blockly.Lua.ORDER_HIGH],INFINITY:["math.huge",Blockly.Lua.ORDER_HIGH]}[a.getFieldValue("CONSTANT")]};
|
||||
Blockly.Lua.math_number_property=function(a){var b=Blockly.Lua.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Lua.ORDER_MULTIPLICATIVE)||"0",c=a.getFieldValue("PROPERTY"),d;if("PRIME"==c)return[Blockly.Lua.provideFunction_("math_isPrime",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(n)"," -- https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if n == 2 or n == 3 then"," return true"," end"," -- False if n is NaN, negative, is 1, or not whole."," -- And false if n is divisible by 2 or 3.",
|
||||
" if not(n > 1) or n % 1 ~= 0 or n % 2 == 0 or n % 3 == 0 then"," return false"," end"," -- Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for x = 6, math.sqrt(n) + 1.5, 6 do"," if n % (x - 1) == 0 or n % (x + 1) == 0 then"," return false"," end"," end"," return true","end"])+"("+b+")",Blockly.Lua.ORDER_HIGH];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=
|
||||
Blockly.Lua.math_number_property=function(a){var b=Blockly.Lua.valueToCode(a,"NUMBER_TO_CHECK",Blockly.Lua.ORDER_MULTIPLICATIVE)||"0",c=a.getFieldValue("PROPERTY");if("PRIME"==c)return[Blockly.Lua.provideFunction_("math_isPrime",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(n)"," -- https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if n == 2 or n == 3 then"," return true"," end"," -- False if n is NaN, negative, is 1, or not whole."," -- And false if n is divisible by 2 or 3.",
|
||||
" if not(n > 1) or n % 1 ~= 0 or n % 2 == 0 or n % 3 == 0 then"," return false"," end"," -- Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for x = 6, math.sqrt(n) + 1.5, 6 do"," if n % (x - 1) == 0 or n % (x + 1) == 0 then"," return false"," end"," end"," return true","end"])+"("+b+")",Blockly.Lua.ORDER_HIGH];switch(c){case "EVEN":var 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.Lua.valueToCode(a,"DIVISOR",Blockly.Lua.ORDER_MULTIPLICATIVE);if(!a||"0"==a)return["nil",Blockly.Lua.ORDER_ATOMIC];d=b+" % "+a+" == 0"}return[d,Blockly.Lua.ORDER_RELATIONAL]};Blockly.Lua.math_change=function(a){var b=Blockly.Lua.valueToCode(a,"DELTA",Blockly.Lua.ORDER_ADDITIVE)||"0";a=Blockly.Lua.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);return a+" = "+a+" + "+b+"\n"};Blockly.Lua.math_round=Blockly.Lua.math_single;
|
||||
Blockly.Lua.math_trig=Blockly.Lua.math_single;
|
||||
Blockly.Lua.math_on_list=function(a){function b(){return Blockly.Lua.provideFunction_("math_sum",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(t)"," local result = 0"," for _, v in ipairs(t) do"," result = result + v"," end"," return result","end"])}var c=a.getFieldValue("OP");a=Blockly.Lua.valueToCode(a,"LIST",Blockly.Lua.ORDER_NONE)||"{}";switch(c){case "SUM":c=b();break;case "MIN":c=Blockly.Lua.provideFunction_("math_min",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(t)",
|
||||
@@ -51,29 +51,29 @@ c||(c="");for(var e=[],f=0;f<a.arguments_.length;f++)e[f]=Blockly.Lua.variableDB
|
||||
Blockly.Lua.procedures_callreturn=function(a){for(var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=[],d=0;d<a.arguments_.length;d++)c[d]=Blockly.Lua.valueToCode(a,"ARG"+d,Blockly.Lua.ORDER_NONE)||"nil";return[b+"("+c.join(", ")+")",Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.procedures_callnoreturn=function(a){for(var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=[],d=0;d<a.arguments_.length;d++)c[d]=Blockly.Lua.valueToCode(a,"ARG"+d,Blockly.Lua.ORDER_NONE)||"nil";return b+"("+c.join(", ")+")\n"};
|
||||
Blockly.Lua.procedures_ifreturn=function(a){var b="if "+(Blockly.Lua.valueToCode(a,"CONDITION",Blockly.Lua.ORDER_NONE)||"false")+" then\n";a.hasReturnValue_?(a=Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_NONE)||"nil",b+=" return "+a+"\n"):b+=" return\n";return b+"end\n"};Blockly.Lua.texts={};Blockly.Lua.text=function(a){return[Blockly.Lua.quote_(a.getFieldValue("TEXT")),Blockly.Lua.ORDER_ATOMIC]};
|
||||
Blockly.Lua.text_join=function(a){if(0==a.itemCount_)return["''",Blockly.Lua.ORDER_ATOMIC];if(1==a.itemCount_)return["tostring("+(Blockly.Lua.valueToCode(a,"ADD0",Blockly.Lua.ORDER_NONE)||"''")+")",Blockly.Lua.ORDER_HIGH];if(2==a.itemCount_){var b=Blockly.Lua.valueToCode(a,"ADD0",Blockly.Lua.ORDER_CONCATENATION)||"''";a=Blockly.Lua.valueToCode(a,"ADD1",Blockly.Lua.ORDER_CONCATENATION)||"''";return[b+" .. "+a,Blockly.Lua.ORDER_CONCATENATION]}for(var b=[],c=0;c<a.itemCount_;c++)b[c]=Blockly.Lua.valueToCode(a,
|
||||
"ADD"+c,Blockly.Lua.ORDER_NONE)||"''";a="table.concat({"+b.join(", ")+"})";return[a,Blockly.Lua.ORDER_HIGH]};Blockly.Lua.text_append=function(a){var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);a=Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_CONCATENATION)||"''";return b+" = "+b+" .. "+a+"\n"};Blockly.Lua.text_length=function(a){return["#"+(Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_UNARY)||"''"),Blockly.Lua.ORDER_UNARY]};
|
||||
Blockly.Lua.text_join=function(a){if(0==a.itemCount_)return["''",Blockly.Lua.ORDER_ATOMIC];if(1==a.itemCount_)return a=Blockly.Lua.valueToCode(a,"ADD0",Blockly.Lua.ORDER_NONE)||"''",["tostring("+a+")",Blockly.Lua.ORDER_HIGH];if(2==a.itemCount_){var b=Blockly.Lua.valueToCode(a,"ADD0",Blockly.Lua.ORDER_CONCATENATION)||"''";a=Blockly.Lua.valueToCode(a,"ADD1",Blockly.Lua.ORDER_CONCATENATION)||"''";return[b+" .. "+a,Blockly.Lua.ORDER_CONCATENATION]}b=[];for(var c=0;c<a.itemCount_;c++)b[c]=Blockly.Lua.valueToCode(a,
|
||||
"ADD"+c,Blockly.Lua.ORDER_NONE)||"''";return["table.concat({"+b.join(", ")+"})",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.text_append=function(a){var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);a=Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_CONCATENATION)||"''";return b+" = "+b+" .. "+a+"\n"};Blockly.Lua.text_length=function(a){return["#"+(Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_UNARY)||"''"),Blockly.Lua.ORDER_UNARY]};
|
||||
Blockly.Lua.text_isEmpty=function(a){return["#"+(Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_UNARY)||"''")+" == 0",Blockly.Lua.ORDER_RELATIONAL]};
|
||||
Blockly.Lua.text_indexOf=function(a){var b=Blockly.Lua.valueToCode(a,"FIND",Blockly.Lua.ORDER_NONE)||"''",c=Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_NONE)||"''";return[("FIRST"==a.getFieldValue("END")?Blockly.Lua.provideFunction_("firstIndexOf",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(str, substr) "," local i = string.find(str, substr, 1, true)"," if i == nil then"," return 0"," else"," return i"," end","end"]):Blockly.Lua.provideFunction_("lastIndexOf",["function "+
|
||||
Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(str, substr)"," local i = string.find(string.reverse(str), string.reverse(substr), 1, true)"," if i then"," return #str + 2 - i - #substr"," end"," return 0","end"]))+"("+c+", "+b+")",Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.text_charAt=function(a){var b=a.getFieldValue("WHERE")||"FROM_START",c=Blockly.Lua.valueToCode(a,"AT","FROM_END"==b?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_NONE)||"1";a=Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_NONE)||"''";if("RANDOM"==b)b=Blockly.Lua.provideFunction_("text_random_letter",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(str)"," local index = math.random(string.len(str))"," return string.sub(str, index, index)","end"]),a=b+"("+a+")";else{if("FIRST"==
|
||||
Blockly.Lua.text_charAt=function(a){var b=a.getFieldValue("WHERE")||"FROM_START";var c=Blockly.Lua.valueToCode(a,"AT","FROM_END"==b?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_NONE)||"1";a=Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_NONE)||"''";if("RANDOM"==b)b=Blockly.Lua.provideFunction_("text_random_letter",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(str)"," local index = math.random(string.len(str))"," return string.sub(str, index, index)","end"]),a=b+"("+a+")";else{if("FIRST"==
|
||||
b)c="1";else if("LAST"==b)c="-1";else if("FROM_START"!=b)if("FROM_END"==b)c="-"+c;else throw"Unhandled option (text_charAt).";c.match(/^-?\w*$/)?a="string.sub("+a+", "+c+", "+c+")":(b=Blockly.Lua.provideFunction_("text_char_at",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(str, index)"," return string.sub(str, index, index)","end"]),a=b+"("+a+", "+c+")")}return[a,Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.text_getSubstring=function(a){var b=Blockly.Lua.valueToCode(a,"STRING",Blockly.Lua.ORDER_NONE)||"''",c=a.getFieldValue("WHERE1"),d=Blockly.Lua.valueToCode(a,"AT1","FROM_END"==c?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_NONE)||"1";if("FIRST"==c)c=1;else if("FROM_START"==c)c=d;else if("FROM_END"==c)c="-"+d;else throw"Unhandled option (text_getSubstring)";d=a.getFieldValue("WHERE2");a=Blockly.Lua.valueToCode(a,"AT2","FROM_END"==d?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_NONE)||"1";if("LAST"==
|
||||
d)a=-1;else if("FROM_START"!=d)if("FROM_END"==d)a="-"+a;else throw"Unhandled option (text_getSubstring)";return["string.sub("+b+", "+c+", "+a+")",Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.text_changeCase=function(a){var b=a.getFieldValue("CASE");a=Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''";if("UPPERCASE"==b)var c="string.upper";else"LOWERCASE"==b?c="string.lower":"TITLECASE"==b&&(c=Blockly.Lua.provideFunction_("text_titlecase",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(str)"," local buf = {}"," local inWord = false"," for i = 1, #str do"," local c = string.sub(str, i, i)"," if inWord then"," table.insert(buf, string.lower(c))",
|
||||
' if string.find(c, "%s") then'," inWord = false"," end"," else"," table.insert(buf, string.upper(c))"," inWord = true"," end"," end"," return table.concat(buf)","end"]));return[c+"("+a+")",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.text_trim=function(a){var b={LEFT:"^%s*(,-)",RIGHT:"(.-)%s*$",BOTH:"^%s*(.-)%s*$"}[a.getFieldValue("MODE")];return["string.gsub("+(Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''")+', "'+b+'", "%1")',Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.text_getSubstring=function(a){var b=Blockly.Lua.valueToCode(a,"STRING",Blockly.Lua.ORDER_NONE)||"''";var c=a.getFieldValue("WHERE1");var d=Blockly.Lua.valueToCode(a,"AT1","FROM_END"==c?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_NONE)||"1";if("FIRST"==c)c=1;else if("FROM_START"==c)c=d;else if("FROM_END"==c)c="-"+d;else throw"Unhandled option (text_getSubstring)";d=a.getFieldValue("WHERE2");a=Blockly.Lua.valueToCode(a,"AT2","FROM_END"==d?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_NONE)||"1";
|
||||
if("LAST"==d)a=-1;else if("FROM_START"!=d)if("FROM_END"==d)a="-"+a;else throw"Unhandled option (text_getSubstring)";return["string.sub("+b+", "+c+", "+a+")",Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.text_changeCase=function(a){var b,c=a.getFieldValue("CASE");a=Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''";"UPPERCASE"==c?b="string.upper":"LOWERCASE"==c?b="string.lower":"TITLECASE"==c&&(b=Blockly.Lua.provideFunction_("text_titlecase",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(str)"," local buf = {}"," local inWord = false"," for i = 1, #str do"," local c = string.sub(str, i, i)"," if inWord then"," table.insert(buf, string.lower(c))",' if string.find(c, "%s") then',
|
||||
" inWord = false"," end"," else"," table.insert(buf, string.upper(c))"," inWord = true"," end"," end"," return table.concat(buf)","end"]));return[b+"("+a+")",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.text_trim=function(a){var b={LEFT:"^%s*(,-)",RIGHT:"(.-)%s*$",BOTH:"^%s*(.-)%s*$"}[a.getFieldValue("MODE")];return["string.gsub("+(Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''")+', "'+b+'", "%1")',Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.text_print=function(a){return"print("+(Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''")+")\n"};
|
||||
Blockly.Lua.text_prompt_ext=function(a){var b=a.getField("TEXT")?Blockly.Lua.quote_(a.getFieldValue("TEXT")):Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''",b=Blockly.Lua.provideFunction_("text_prompt",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(msg)"," io.write(msg)"," io.flush()"," return io.read()","end"])+"("+b+")";"NUMBER"==a.getFieldValue("TYPE")&&(b="tonumber("+b+", 10)");return[b,Blockly.Lua.ORDER_HIGH]};Blockly.Lua.text_prompt=Blockly.Lua.text_prompt_ext;
|
||||
Blockly.Lua.text_prompt_ext=function(a){var b=a.getField("TEXT")?Blockly.Lua.quote_(a.getFieldValue("TEXT")):Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''";b=Blockly.Lua.provideFunction_("text_prompt",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(msg)"," io.write(msg)"," io.flush()"," return io.read()","end"])+"("+b+")";"NUMBER"==a.getFieldValue("TYPE")&&(b="tonumber("+b+", 10)");return[b,Blockly.Lua.ORDER_HIGH]};Blockly.Lua.text_prompt=Blockly.Lua.text_prompt_ext;
|
||||
Blockly.Lua.text_count=function(a){var b=Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''";a=Blockly.Lua.valueToCode(a,"SUB",Blockly.Lua.ORDER_NONE)||"''";return[Blockly.Lua.provideFunction_("text_count",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(haystack, needle)"," if #needle == 0 then"," return #haystack + 1"," end"," local i = 1"," local count = 0"," while true do"," i = string.find(haystack, needle, i, true)"," if i == nil then"," break"," end"," count = count + 1",
|
||||
" i = i + #needle"," end"," return count","end"])+"("+b+", "+a+")",Blockly.Lua.ORDER_HIGH]};
|
||||
Blockly.Lua.text_replace=function(a){var b=Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_NONE)||"''",c=Blockly.Lua.valueToCode(a,"FROM",Blockly.Lua.ORDER_NONE)||"''";a=Blockly.Lua.valueToCode(a,"TO",Blockly.Lua.ORDER_NONE)||"''";return[Blockly.Lua.provideFunction_("text_replace",["function "+Blockly.Lua.FUNCTION_NAME_PLACEHOLDER_+"(haystack, needle, replacement)"," local buf = {}"," local i = 1"," while i <= #haystack do"," if string.sub(haystack, i, i + #needle - 1) == needle then"," for j = 1, #replacement do",
|
||||
" table.insert(buf, string.sub(replacement, j, j))"," end"," i = i + #needle"," else"," table.insert(buf, string.sub(haystack, i, i))"," i = i + 1"," end"," end"," return table.concat(buf)","end"])+"("+b+", "+c+", "+a+")",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.text_reverse=function(a){return["string.reverse("+(Blockly.Lua.valueToCode(a,"TEXT",Blockly.Lua.ORDER_HIGH)||"''")+")",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.loops={};Blockly.Lua.CONTINUE_STATEMENT="goto continue\n";Blockly.Lua.addContinueLabel=function(a){return-1<a.indexOf(Blockly.Lua.CONTINUE_STATEMENT)?a+Blockly.Lua.INDENT+"::continue::\n":a};Blockly.Lua.controls_repeat=function(a){var b=parseInt(a.getFieldValue("TIMES"),10);a=Blockly.Lua.statementToCode(a,"DO")||"";a=Blockly.Lua.addContinueLabel(a);return"for "+Blockly.Lua.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE)+" = 1, "+b+" do\n"+a+"end\n"};
|
||||
Blockly.Lua.controls_repeat_ext=function(a){var b=Blockly.Lua.valueToCode(a,"TIMES",Blockly.Lua.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"math.floor("+b+")";a=Blockly.Lua.statementToCode(a,"DO")||"\n";a=Blockly.Lua.addContinueLabel(a);return"for "+Blockly.Lua.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE)+" = 1, "+b+" do\n"+a+"end\n"};
|
||||
Blockly.Lua.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Lua.valueToCode(a,"BOOL",b?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_NONE)||"false",d=Blockly.Lua.statementToCode(a,"DO")||"\n",d=Blockly.Lua.addLoopTrap(d,a.id),d=Blockly.Lua.addContinueLabel(d);b&&(c="not "+c);return"while "+c+" do\n"+d+"end\n"};
|
||||
Blockly.Lua.controls_for=function(a){var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Lua.valueToCode(a,"FROM",Blockly.Lua.ORDER_NONE)||"0",d=Blockly.Lua.valueToCode(a,"TO",Blockly.Lua.ORDER_NONE)||"0",e=Blockly.Lua.valueToCode(a,"BY",Blockly.Lua.ORDER_NONE)||"1",f=Blockly.Lua.statementToCode(a,"DO")||"\n",f=Blockly.Lua.addLoopTrap(f,a.id),f=Blockly.Lua.addContinueLabel(f);a="";var g;Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)?(g=
|
||||
parseFloat(c)<=parseFloat(d),e=Math.abs(parseFloat(e)),g=(g?"":"-")+e):(a="",g=Blockly.Lua.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+=g+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+"\n"):a+("math.abs("+e+")\n"),a=a+("if ("+c+") > ("+d+") then\n")+(Blockly.Lua.INDENT+g+" = -"+g+"\n"),a+="end\n");return a+("for "+b+" = "+c+", "+d+", "+g)+(" do\n"+f+"end\n")};
|
||||
Blockly.Lua.controls_for=function(a){var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Lua.valueToCode(a,"FROM",Blockly.Lua.ORDER_NONE)||"0",d=Blockly.Lua.valueToCode(a,"TO",Blockly.Lua.ORDER_NONE)||"0",e=Blockly.Lua.valueToCode(a,"BY",Blockly.Lua.ORDER_NONE)||"1",f=Blockly.Lua.statementToCode(a,"DO")||"\n",f=Blockly.Lua.addLoopTrap(f,a.id),f=Blockly.Lua.addContinueLabel(f);a="";if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var g=
|
||||
parseFloat(c)<=parseFloat(d);e=Math.abs(parseFloat(e));g=(g?"":"-")+e}else a="",g=Blockly.Lua.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+=g+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+"\n"):a+("math.abs("+e+")\n"),a=a+("if ("+c+") > ("+d+") then\n")+(Blockly.Lua.INDENT+g+" = -"+g+"\n"),a+="end\n";return a+("for "+b+" = "+c+", "+d+", "+g)+(" do\n"+f+"end\n")};
|
||||
Blockly.Lua.controls_forEach=function(a){var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Lua.valueToCode(a,"LIST",Blockly.Lua.ORDER_NONE)||"{}";a=Blockly.Lua.statementToCode(a,"DO")||"\n";a=Blockly.Lua.addContinueLabel(a);return"for _, "+b+" in ipairs("+c+") do \n"+a+"end\n"};
|
||||
Blockly.Lua.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break\n";case "CONTINUE":return Blockly.Lua.CONTINUE_STATEMENT}throw"Unknown flow statement.";};Blockly.Lua.logic={};Blockly.Lua.controls_if=function(a){var b=0,c="",d,e;do e=Blockly.Lua.valueToCode(a,"IF"+b,Blockly.Lua.ORDER_NONE)||"false",d=Blockly.Lua.statementToCode(a,"DO"+b),c+=(0<b?"else":"")+"if "+e+" then\n"+d,++b;while(a.getInput("IF"+b));a.getInput("ELSE")&&(d=Blockly.Lua.statementToCode(a,"ELSE"),c+="else\n"+d);return c+"end\n"};Blockly.Lua.controls_ifelse=Blockly.Lua.controls_if;
|
||||
Blockly.Lua.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break\n";case "CONTINUE":return Blockly.Lua.CONTINUE_STATEMENT}throw"Unknown flow statement.";};Blockly.Lua.logic={};Blockly.Lua.controls_if=function(a){var b=0,c="";do{var d=Blockly.Lua.valueToCode(a,"IF"+b,Blockly.Lua.ORDER_NONE)||"false";var e=Blockly.Lua.statementToCode(a,"DO"+b);c+=(0<b?"else":"")+"if "+d+" then\n"+e;++b}while(a.getInput("IF"+b));a.getInput("ELSE")&&(e=Blockly.Lua.statementToCode(a,"ELSE"),c+="else\n"+e);return c+"end\n"};Blockly.Lua.controls_ifelse=Blockly.Lua.controls_if;
|
||||
Blockly.Lua.logic_compare=function(a){var b={EQ:"==",NEQ:"~=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Lua.valueToCode(a,"A",Blockly.Lua.ORDER_RELATIONAL)||"0";a=Blockly.Lua.valueToCode(a,"B",Blockly.Lua.ORDER_RELATIONAL)||"0";return[c+" "+b+" "+a,Blockly.Lua.ORDER_RELATIONAL]};
|
||||
Blockly.Lua.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"and":"or",c="and"==b?Blockly.Lua.ORDER_AND:Blockly.Lua.ORDER_OR,d=Blockly.Lua.valueToCode(a,"A",c);a=Blockly.Lua.valueToCode(a,"B",c);if(d||a){var e="and"==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+" "+b+" "+a,c]};Blockly.Lua.logic_negate=function(a){return["not "+(Blockly.Lua.valueToCode(a,"BOOL",Blockly.Lua.ORDER_UNARY)||"true"),Blockly.Lua.ORDER_UNARY]};
|
||||
Blockly.Lua.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Lua.ORDER_ATOMIC]};Blockly.Lua.logic_null=function(a){return["nil",Blockly.Lua.ORDER_ATOMIC]};Blockly.Lua.logic_ternary=function(a){var b=Blockly.Lua.valueToCode(a,"IF",Blockly.Lua.ORDER_AND)||"false",c=Blockly.Lua.valueToCode(a,"THEN",Blockly.Lua.ORDER_AND)||"nil";a=Blockly.Lua.valueToCode(a,"ELSE",Blockly.Lua.ORDER_OR)||"nil";return[b+" and "+c+" or "+a,Blockly.Lua.ORDER_OR]};
|
||||
+16
-2
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ar');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "اضافة تعليق";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "تغيير قيمة:";
|
||||
Blockly.Msg.CLEAN_UP = "مجموعات التنظيف";
|
||||
Blockly.Msg.COLLAPSE_ALL = "إخفاء القطع";
|
||||
@@ -66,13 +67,26 @@ Blockly.Msg.DELETE_VARIABLE = "حذف المتغير %1";
|
||||
Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "حذف%1 1 استخدامات المتغير '%2'؟";
|
||||
Blockly.Msg.DELETE_X_BLOCKS = "إحذف قطع %1";
|
||||
Blockly.Msg.DISABLE_BLOCK = "عطّل القطعة";
|
||||
Blockly.Msg.DUPLICATE_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.INLINE_INPUTS = "ادخال خطي";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "إنشئ قائمة فارغة";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "تقوم بإرجاع قائمة، طولها 0, لا تحتوي على أية سجلات البيانات";
|
||||
@@ -362,7 +376,7 @@ Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "يعكس ترتيب حروف النص";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "حرف أو كلمة أو سطر من النص.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.az');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Şərh əlavə et";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Qiyməti dəyiş:";
|
||||
Blockly.Msg.CLEAN_UP = "Blokları təmizlə";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Blokları yığ";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Bloku aç";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Xarici girişlər";
|
||||
Blockly.Msg.HELP = "Kömək";
|
||||
Blockly.Msg.INLINE_INPUTS = "Sətiriçi girişlər";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "boş siyahı düzəlt";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Heç bir verilən qeyd olunmamış, uzunluğu 0 olan bir siyahı verir";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ba');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Фекер өҫтәргә";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Мәғәнәне үҙгәртегеҙ:";
|
||||
Blockly.Msg.CLEAN_UP = "Блоктарҙы таҙартырға";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Блоктарҙы төрөргә";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Блокты йәйергә";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Тышҡы өҫтәлмә";
|
||||
Blockly.Msg.HELP = "Ярҙам";
|
||||
Blockly.Msg.INLINE_INPUTS = "Эске өҫтәлмә";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
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
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.bcc');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "افزودن نظر";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "تغییر مقدار:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "فروپاشی بلوکها";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "گسترش بلوک";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "ورودیهای خارجی";
|
||||
Blockly.Msg.HELP = "کومک";
|
||||
Blockly.Msg.INLINE_INPUTS = "ورودیهای درون خطی";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "ایجاد فهرست خالی";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "فهرستی با طول صفر شامل هیچ رکورد دادهای بر میگرداند.";
|
||||
|
||||
+28
-14
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.be.tarask');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Дадаць камэнтар";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Зьмяніць значэньне:";
|
||||
Blockly.Msg.CLEAN_UP = "Ачысьціць блёкі";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Згарнуць блёкі";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Разгарнуць блёк";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Зьнешнія ўваходы";
|
||||
Blockly.Msg.HELP = "Дапамога";
|
||||
Blockly.Msg.INLINE_INPUTS = "Унутраныя ўваходы";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "стварыць пусты сьпіс";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Вяртае сьпіс даўжынёй 0, які ня ўтрымлівае запісаў зьвестак";
|
||||
@@ -128,9 +142,9 @@ Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Вяртае даўжыню сьпісу.";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "стварыць сьпіс з элемэнту %1, які паўтараецца %2 разоў";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Стварае сьпіс, які ўтрымлівае пададзеную колькасьць копіяў элемэнту.";
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list";
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "адваротна %1";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Зьмяняе парадак копіі сьпісу на адваротны.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "як";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "уставіць у";
|
||||
@@ -272,9 +286,9 @@ Blockly.Msg.NEW_VARIABLE_TITLE = "Імя новай зьменнай:";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "дазволіць зацьвярджэньне";
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "з:";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Запусьціць функцыю вызначаную карыстальнікам '%1'.";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Запусьціць функцыю вызначаную карыстальнікам '%1' і выкарыстаць яе вынік.";
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "з:";
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "Стварыць '%1'";
|
||||
@@ -318,9 +332,9 @@ Blockly.Msg.TEXT_CHARAT_LAST = "узяць апошнюю літару";
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "узяць выпадковую літару";
|
||||
Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Вяртае літару ў пазначанай пазыцыі.";
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "падлічыць %1 сярод %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Падлічвае колькі разоў нейкі тэкст сустракаецца ўнутры нейкага іншага тэксту.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Дадаць элемэнт да тэксту.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "далучыць";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Дадайце, выдаліце ці зьмяніце парадак разьдзелаў для перадачы тэкставага блёку.";
|
||||
@@ -357,12 +371,12 @@ Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Запытаць у карысталь
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Запытаць у карыстальніка тэкст.";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "запытаць лічбу з падказкай";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "запытаць тэкст з падказкай";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "замяніць %1 на %2 у %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Замяняе ўсе выпадкі нейкага тэксту на іншы тэкст.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "адваротна %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Мяняе парадак сымбаляў у тэксьце на адваротны.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Літара, слова ці радок тэксту.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
+20
-6
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.bg');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Добави коментар";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Промени стойността:";
|
||||
Blockly.Msg.CLEAN_UP = "Премахни блокове";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Скрий блокове";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Покажи блок";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Външни входове";
|
||||
Blockly.Msg.HELP = "Помощ";
|
||||
Blockly.Msg.INLINE_INPUTS = "Вътрешни входове";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "създай празен списък";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Връща списък с дължина 0, не съдържащ данни";
|
||||
@@ -129,8 +143,8 @@ Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "създай списък от %1 повторен %2 пъти";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Създава списък, състоящ се от определен брой копия на елемента.";
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list";
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "промени реда на обратно %1";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Промени реда на списъка на обратно.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "следното";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "вмъкни на позиция";
|
||||
@@ -320,7 +334,7 @@ Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Връща буквата в определена позиция.";
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "пресмята броя на %1 в %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Преброй колко пъти даден текст се среща в друг текст.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Добави елемент към текста.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "свържи";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Добави, премахни или пренареди частите, за да промениш този текстов блок.";
|
||||
@@ -359,10 +373,10 @@ Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "питай за число със съо
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "питай за текст със съобщение";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "замяна на %1 с %2 в %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Замени всички появи на даден текст в друг текст.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "промени реда на обратно %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Промени реда на знаците в текста на обратно.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://bg.wikipedia.org/wiki/Низ";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Буква, дума или ред";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.bn');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "মন্তব্য যোগ করুন";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "মান পরিবর্তন করুন:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "Collapse Blocks"; // untranslated
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "ব্লকটি সম্প্রসারিত
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "বহি:স্থ ইনপুট";
|
||||
Blockly.Msg.HELP = "সাহায্য";
|
||||
Blockly.Msg.INLINE_INPUTS = "সারি ইনপুট";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "খালি তালিকা তৈরি করুন";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "পাঠাবে একটি তালিকা, দের্ঘ্য হবে ০, কোন উপাত্ত থাকবে না";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.br');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Ouzhpennañ un evezhiadenn";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Kemmañ an dalvoudenn :";
|
||||
Blockly.Msg.CLEAN_UP = "Naetaat ar bloc'hoù";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Bihanaat ar bloc'hoù";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Astenn ar bloc'h";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Monedoù diavaez";
|
||||
Blockly.Msg.HELP = "Skoazell";
|
||||
Blockly.Msg.INLINE_INPUTS = "Monedoù enlinenn";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "krouiñ ur roll goullo";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Distreiñ ul listenn, 0 a hirder, n'eus enrolladenn ebet enni";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ca');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Afegeix un comentari";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Canvia valor:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "Contraure blocs";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Expandir bloc";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Entrades externes";
|
||||
Blockly.Msg.HELP = "Ajuda";
|
||||
Blockly.Msg.INLINE_INPUTS = "Entrades en línia";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "crear llista buida";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Retorna una llista, de longitud 0, que no conté cap dada.";
|
||||
|
||||
+16
-2
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.cs');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Přidat komentář";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Změnit hodnotu:";
|
||||
Blockly.Msg.CLEAN_UP = "Uspořádat bloky";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Sbalit bloky";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Rozbalit blok";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "vnější vstupy";
|
||||
Blockly.Msg.HELP = "Nápověda";
|
||||
Blockly.Msg.INLINE_INPUTS = "Vložené vstupy";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "vytvořit prázdný seznam";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Vrátí seznam nulové délky, který neobsahuje žádné datové záznamy";
|
||||
@@ -272,9 +286,9 @@ Blockly.Msg.NEW_VARIABLE_TITLE = "Nový název proměnné:";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "povolit příkazy";
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "s:";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://cs.wikipedia.org/wiki/Funkce_(programov%C3%A1n%C3%AD)";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://cs.wikipedia.org/wiki/Podprogram";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Spustí uživatelem definovanou funkci '%1'.";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://cs.wikipedia.org/wiki/Funkce_(programov%C3%A1n%C3%AD)";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://cs.wikipedia.org/wiki/Podprogram";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Spustí uživatelem definovanou funkci '%1' a použije její výstup.";
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "s:";
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "Vytvořit '%1'";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.da');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Tilføj kommentar";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Skift værdi:";
|
||||
Blockly.Msg.CLEAN_UP = "Ryd op i blokke";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Fold blokkene sammen";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Fold blokken ud";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Udvendige inputs";
|
||||
Blockly.Msg.HELP = "Hjælp";
|
||||
Blockly.Msg.INLINE_INPUTS = "Indlejrede inputs";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "opret en tom liste";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returnerer en liste af længde 0, som ikke indeholder nogen data";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.de');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Kommentar hinzufügen";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Wert ändern:";
|
||||
Blockly.Msg.CLEAN_UP = "Bausteine aufräumen";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Alle Bausteine zusammenfalten";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Baustein entfalten";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "externe Eingänge";
|
||||
Blockly.Msg.HELP = "Hilfe";
|
||||
Blockly.Msg.INLINE_INPUTS = "interne Eingänge";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "erzeuge eine leere Liste";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Erzeugt eine leere Liste ohne Inhalt.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.diq');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Tefsir cı ke";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Erci bıvurne:";
|
||||
Blockly.Msg.CLEAN_UP = "Blokan pak ke";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Blokan teng ke";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Bloki hera ke";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Cıkewtışê xarıciy";
|
||||
Blockly.Msg.HELP = "Peşti";
|
||||
Blockly.Msg.INLINE_INPUTS = "Cıkerdışê xomiyani";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "lista venge vıraze";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
|
||||
|
||||
+15
-1
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.el');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Πρόσθεσε Το Σχόλιο";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Άλλαξε την τιμή:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "Σύμπτυξτε Όλα Τα Μπλοκ";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Επέκτεινε Το Μπλοκ";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Εξωτερικές Είσοδοι";
|
||||
Blockly.Msg.HELP = "Βοήθεια";
|
||||
Blockly.Msg.INLINE_INPUTS = "Εσωτερικές Είσοδοι";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "δημιούργησε κενή λίστα";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Επιστρέφει μια λίστα, με μήκος 0, η οποία δεν περιέχει εγγραφές δεδομένων";
|
||||
@@ -320,7 +334,7 @@ Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Επιστρέφει το γράμμα στην καθορισμένη θέση.";
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Μετρά πόσες φορές κάποιο κείμενο εμφανίζεται μέσα σε ένα άλλο κείμενο.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Προσθέτει ένα στοιχείο στο κείμενο.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "ένωσε";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Προσθέτει, αφαιρεί ή αναδιατάσσει τους τομείς για να αναδιαμορφώσει αυτό το μπλοκ κειμένου.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.en.gb');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Add Comment";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Change value:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Collapse Blocks";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Expand Block";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "External Inputs";
|
||||
Blockly.Msg.HELP = "Help";
|
||||
Blockly.Msg.INLINE_INPUTS = "Inline Inputs";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
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
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.en');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Add Comment";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'";
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Change value:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Collapse Blocks";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Expand Block";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "External Inputs";
|
||||
Blockly.Msg.HELP = "Help";
|
||||
Blockly.Msg.INLINE_INPUTS = "Inline Inputs";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel";
|
||||
Blockly.Msg.IOS_ERROR = "Error";
|
||||
Blockly.Msg.IOS_OK = "OK";
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input";
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements";
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs.";
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS";
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add";
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable";
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete";
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name.";
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename";
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "create empty list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.eo');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Aldoni komenton";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Ŝangi valoron:";
|
||||
Blockly.Msg.CLEAN_UP = "Purigi blokojn";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Faldi blokojn";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Malfaldi blokon";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Eksteraj eniroj";
|
||||
Blockly.Msg.HELP = "Helpo";
|
||||
Blockly.Msg.INLINE_INPUTS = "Entekstaj eniroj";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "krei malplenan liston";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Listo, de longo 0, sen datumaj registroj, estos liverita.";
|
||||
|
||||
+25
-11
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.es');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Añadir comentario";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Cambiar el valor:";
|
||||
Blockly.Msg.CLEAN_UP = "Limpiar los bloques";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Contraer bloques";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Expandir bloque";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Entradas externas";
|
||||
Blockly.Msg.HELP = "Ayuda";
|
||||
Blockly.Msg.INLINE_INPUTS = "Entradas en línea";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "crear lista vacía";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Devuelve una lista, de longitud 0, sin ningún dato";
|
||||
@@ -128,9 +142,9 @@ Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Devuelve la longitud de una lista.";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "crear lista con el elemento %1 repetido %2 veces";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Crea una lista que consta de un valor dado repetido el número de veces especificado.";
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "revertir %1";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list";
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "invertir %1";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Invertir una copia de una lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "como";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "insertar en";
|
||||
@@ -308,7 +322,7 @@ Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Te
|
||||
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_TOOLTIP = "Devuelve una copia del texto en un caso diferente.";
|
||||
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Devuelve una copia del texto en un tamaño diferente.";
|
||||
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 #";
|
||||
@@ -318,9 +332,9 @@ 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_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "contar %1 en %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Cuantas veces aparece un texto dentro de otro texto.";
|
||||
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.";
|
||||
@@ -357,11 +371,11 @@ 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";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "solicitar texto con el mensaje";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "reemplaza %1 con %2 en %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "reemplazar %1 con %2 en %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Reemplazar todas las veces que un texto dentro de otro texto.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "revertir %1";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "invertir %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Invierte el orden de los caracteres en el texto.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://es.wikipedia.org/wiki/Cadena_de_caracteres";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Una letra, palabra o línea de texto.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.et');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Lisa kommentaar";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Muuda väärtust:";
|
||||
Blockly.Msg.CLEAN_UP = "Korista plokid kokku";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Tõmba plokid kokku";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Laota plokk laiali";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Sisendid ploki taga";
|
||||
Blockly.Msg.HELP = "Abi";
|
||||
Blockly.Msg.INLINE_INPUTS = "Sisendid ploki sees";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "tühi loend";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Tagastab loendi, mille pikkus on 0 ja milles pole ühtegi elementi.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.fa');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "افزودن نظر";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "تغییر مقدار:";
|
||||
Blockly.Msg.CLEAN_UP = "تمیز کردن بلوکها";
|
||||
Blockly.Msg.COLLAPSE_ALL = "فروپاشی بلوکها";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "گسترش بلوک";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "ورودیهای خارجی";
|
||||
Blockly.Msg.HELP = "راهنما";
|
||||
Blockly.Msg.INLINE_INPUTS = "ورودیهای درون خطی";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "ایجاد فهرست خالی";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "فهرستی با طول صفر شامل هیچ رکورد دادهای بر میگرداند.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.fi');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Lisää kommentti";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Muuta arvoa:";
|
||||
Blockly.Msg.CLEAN_UP = "Siivoa lohkot";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Sulje lohkot";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Laajenna lohko";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Ulkoiset syötteet";
|
||||
Blockly.Msg.HELP = "Apua";
|
||||
Blockly.Msg.INLINE_INPUTS = "Tuo syötteet";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "Luo tyhjä lista";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Palauta tyhjä lista, pituus 0";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.fr');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Ajouter un commentaire";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Modifier la valeur :";
|
||||
Blockly.Msg.CLEAN_UP = "Nettoyer les blocs";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Réduire les blocs";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Développer le bloc";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Entrées externes";
|
||||
Blockly.Msg.HELP = "Aide";
|
||||
Blockly.Msg.INLINE_INPUTS = "Entrées en ligne";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "créer une liste vide";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Renvoyer une liste, de longueur 0, ne contenant aucun enregistrement";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.he');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "הוסף תגובה";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "שנה ערך:";
|
||||
Blockly.Msg.CLEAN_UP = "סידור בלוקים";
|
||||
Blockly.Msg.COLLAPSE_ALL = "צמצם קטעי קוד";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "הרחב קטע קוד";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "קלטים חיצוניים";
|
||||
Blockly.Msg.HELP = "עזרה";
|
||||
Blockly.Msg.INLINE_INPUTS = "קלטים פנימיים";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "צור רשימה ריקה";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "החזר רשימה,באורך 0, המכילה רשומות נתונים";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.hi');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "टिप्पणी छोड़ें";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "मान परिवर्तित करें:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "ब्लॉक संक्षिप्त करें";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "ब्लॉक का विस्तार कर
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "बाहरी इनपुट";
|
||||
Blockly.Msg.HELP = "सहायता";
|
||||
Blockly.Msg.INLINE_INPUTS = "इनलाइन इनपुट";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "खाली सूची बनाएँ";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.hrx');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Kommentar hinzufüche";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Neie Variable...";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "Blocke zusammerfalte";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Block entfalte";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "External Inputsexterne Ingänge";
|
||||
Blockly.Msg.HELP = "Hellef";
|
||||
Blockly.Msg.INLINE_INPUTS = "interne Ingänge";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "Generier/erzeich en leear List";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Generier/erzeich en leear List ohne Inhalt.";
|
||||
|
||||
+15
-1
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.hu');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Megjegyzés hozzáadása";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Érték módosítása:";
|
||||
Blockly.Msg.CLEAN_UP = "Blokkok kiürítése";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Blokkok összecsukása";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Blokk kibontása";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Külső kapcsolatok";
|
||||
Blockly.Msg.HELP = "Súgó";
|
||||
Blockly.Msg.INLINE_INPUTS = "Belső kapcsolatok";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "üres lista";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Elemeket nem tartalmazó üres listát ad eredményül";
|
||||
@@ -358,7 +372,7 @@ 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";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "Kérj be szöveget";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "%1 cseréje %2-vel %3-ban";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ia');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Adder commento";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Cambiar valor:";
|
||||
Blockly.Msg.CLEAN_UP = "Clarar le blocos";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Plicar blocos";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Displicar bloco";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Entrata externe";
|
||||
Blockly.Msg.HELP = "Adjuta";
|
||||
Blockly.Msg.INLINE_INPUTS = "Entrata interne";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "crear un lista vacue";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Retorna un lista, de longitude 0, sin datos.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.id');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Tambahkan Komentar";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Ubah nilai:";
|
||||
Blockly.Msg.CLEAN_UP = "Bersihkan Blok";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Ciutkan Blok";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Kembangkan Blok";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Input Eksternal";
|
||||
Blockly.Msg.HELP = "Bantuan";
|
||||
Blockly.Msg.INLINE_INPUTS = "Input Inline";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "buat list kosong";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Kembalikan list, dengan panjang 0, tidak berisi data";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.is');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Skrifa skýringu";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Breyta gildi:";
|
||||
Blockly.Msg.CLEAN_UP = "Hreinsa kubba";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Loka kubbum";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Opna kubb";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Ytri inntök";
|
||||
Blockly.Msg.HELP = "Hjálp";
|
||||
Blockly.Msg.INLINE_INPUTS = "Innri inntök";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "búa til tóman lista";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Skilar lista með lengdina 0 án gagna";
|
||||
|
||||
+16
-2
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.it');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Aggiungi commento";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Modifica valore:";
|
||||
Blockly.Msg.CLEAN_UP = "Pulisci i blocchi";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Comprimi blocchi";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Espandi blocco";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Ingressi esterni";
|
||||
Blockly.Msg.HELP = "Aiuto";
|
||||
Blockly.Msg.INLINE_INPUTS = "Ingressi in linea";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "crea lista vuota";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Restituisce una lista, di lunghezza 0, contenente nessun record di dati";
|
||||
@@ -318,7 +332,7 @@ 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_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "conta %1 in %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Contare quante volte una parte di testo si ripete all'interno di qualche altro testo.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Aggiungi un elemento al testo.";
|
||||
@@ -357,7 +371,7 @@ 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";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "richiedi testo con messaggio";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "sostituisci %1 con %2 in %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "sostituisci tutte le occorrenze di un certo testo con qualche altro testo.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
|
||||
+26
-12
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ja');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "コメントを追加";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "値を変える:";
|
||||
Blockly.Msg.CLEAN_UP = "ブロックを整理する";
|
||||
Blockly.Msg.COLLAPSE_ALL = "ブロックを折りたたむ";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "ブロックを展開する";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "外部入力";
|
||||
Blockly.Msg.HELP = "ヘルプ";
|
||||
Blockly.Msg.INLINE_INPUTS = "インライン入力";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "空のリストを作成";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "長さ0でデータ・レコードを含まない空のリストを返す";
|
||||
@@ -128,9 +142,9 @@ Blockly.Msg.LISTS_LENGTH_TOOLTIP = "リストの長さを返します。";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "項目%1を%2回繰り返したリストを作成";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "与えられた値を指定された回数繰り返してリストを作成。";
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list";
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "%1を逆順に";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "リストのコピーを逆順にする。";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "として";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "挿入位置:";
|
||||
@@ -318,9 +332,9 @@ Blockly.Msg.TEXT_CHARAT_LAST = "最後の文字を得る";
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "ランダムな文字を得る";
|
||||
Blockly.Msg.TEXT_CHARAT_TAIL = "";
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "指定された位置に文字を返します。";
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "%2に含まれる%1の数を数える";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "とある文が別の文のなかに使われた回数を数える。";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "テキストへ項目を追加。";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "結合";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "セクションを追加、削除、または順序変更して、ブロックを再構成。";
|
||||
@@ -357,12 +371,12 @@ Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "ユーザーに数値のインプッ
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "ユーザーにテキスト入力を求める。";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "メッセージで番号の入力を求める";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "メッセージでテキスト入力を求める";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "%3に含まれる%1を%2に置換";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "文に含まれるキーワードを置換する。";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "%1を逆順に";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "文の文字を逆順にする。";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://ja.wikipedia.org/wiki/文字列";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "文字、単語、または行のテキスト。";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ko');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "댓글 추가";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "값 바꾸기:";
|
||||
Blockly.Msg.CLEAN_UP = "블록 정리";
|
||||
Blockly.Msg.COLLAPSE_ALL = "블록 축소";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "블록 확장";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "외부 입력";
|
||||
Blockly.Msg.HELP = "도움말";
|
||||
Blockly.Msg.INLINE_INPUTS = "내부 입력";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "빈 리스트 생성";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "데이터 레코드가 없는, 길이가 0인 목록을 반환합니다.";
|
||||
|
||||
+18
-4
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.lb');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Bemierkung derbäisetzen";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Wäert änneren:";
|
||||
Blockly.Msg.CLEAN_UP = "Bléck opraumen";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Bléck zesummeklappen";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Block opklappen";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "External Inputs"; // untranslated
|
||||
Blockly.Msg.HELP = "Hëllef";
|
||||
Blockly.Msg.INLINE_INPUTS = "Inline Inputs"; // untranslated
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
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
|
||||
@@ -128,7 +142,7 @@ Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Returns the length of a list."; // untransl
|
||||
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_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list";
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "%1 ëmdréinen";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
@@ -318,7 +332,7 @@ Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "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_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "En Element bei den Text derbäisetzen.";
|
||||
@@ -359,10 +373,10 @@ Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untr
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "prompt for text with message"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "%1 duerch %2 a(n) %3 ersetzen";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "All Kéiers wou e bestëmmten Text do ass duerch en aneren Text ersetzen.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Dréint d'Reiefolleg vun den Zeechen am Text ëm.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "E Buschtaf, e Wuert oder eng Textzeil.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.lki');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "گةپ دائن";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "تةغییر مقدار:";
|
||||
Blockly.Msg.CLEAN_UP = "تمیزکردن بلاکةل";
|
||||
Blockly.Msg.COLLAPSE_ALL = "چؤیچانن/پشکانن بلاکةل";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "کةلنگآ کردِن بلاک";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "ورودیةل خروجی";
|
||||
Blockly.Msg.HELP = "کؤمةک";
|
||||
Blockly.Msg.INLINE_INPUTS = "ورودیةل نوم جا";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "ایجاد فهرست خالی";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "فهرستی با طول صفر شامل هیچ رکورد دادهای بر میگرداند.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.lrc');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "نظرتونه اضاف بکید";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "ارزشت آلشت کو:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "کوچک کردن برشتیا";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "گپ کردن برشت";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "داده یا وه دری";
|
||||
Blockly.Msg.HELP = "هومياری";
|
||||
Blockly.Msg.INLINE_INPUTS = "داده یا مئنجا";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "یه گل نوم گه حالی راس بکیت";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
|
||||
|
||||
+53
-39
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.lt');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Palikti komentarą";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Keisti reikšmę:";
|
||||
Blockly.Msg.CLEAN_UP = "Išvalyti blokus";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Suskleisti blokus";
|
||||
@@ -39,7 +40,7 @@ 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_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_TOOLTIP = "Imama kintamoji '%1' reikšmė nuo pradinio skaičiaus iki pabaigos skaičiaus, skaičiuojant nustatytais intervalais ir atliekant nustatytus blokus.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Pridėti sąlygą „jei“ blokui.";
|
||||
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Pridėti veiksmų vykdymo variantą/\"šaką\", kai netenkinama nė viena sąlyga.";
|
||||
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
|
||||
@@ -73,11 +74,24 @@ Blockly.Msg.EXPAND_BLOCK = "Išskleisti bloką";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Išdėstyti stulpeliu, kai daug parametrų";
|
||||
Blockly.Msg.HELP = "Pagalba";
|
||||
Blockly.Msg.INLINE_INPUTS = "Išdėstyti vienoje eilutėje";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "tuščias sąrašas";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Grąžina sąrašą, ilgio 0, neturintį duomenų";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "sąrašas";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this list block."; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Pridėti, pašalinti arba paskirstyti skyrius, kad pertvarkyti šį teksto bloką.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "sukurti sąrašą su";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Pridėti elementą į sąrašą.";
|
||||
@@ -163,14 +177,14 @@ Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Reikšmė gali būti \"teisinga\"/\"Taip\"
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "tiesa";
|
||||
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
|
||||
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
|
||||
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_TOOLTIP_GT = "Grįžti tiesa, jei pirmoji įvestis didesnė nei antroji įvestis.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Grįžti tiesa, jei pirma įvestis didesnė arba lygi antrajai įvesčiai.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Grįžti tiesa, jei pirma įvestis mažesnė nei antra įvestis.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Grįžti tiesa, jei pirma įvestis mažesnė arba lygi antrajai įvesčiai.";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Grįžti tiesa, jeigu abi įvestys ne lygios tarpusavyje.";
|
||||
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_TOOLTIP = "Grįžti tiesa, jei įvestis klaidinga. Grįžti klaidinga, jei įvestis teisinga.";
|
||||
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...";
|
||||
@@ -178,7 +192,7 @@ Blockly.Msg.LOGIC_OPERATION_AND = "ir";
|
||||
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
|
||||
Blockly.Msg.LOGIC_OPERATION_OR = "arba";
|
||||
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_OPERATION_TOOLTIP_OR = "Grįžti tiesa, jei bent viena įvestis teisinga.";
|
||||
Blockly.Msg.LOGIC_TERNARY_CONDITION = "sąlyga";
|
||||
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "jei ne";
|
||||
@@ -195,10 +209,10 @@ Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idi
|
||||
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_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/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)."; // untranslated
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Grįžti viena iš pagrindinių konstantų: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (begalybė).";
|
||||
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_(graphics)"; // 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_TOOLTIP = "Apriboti skaičių, kad būtų tarp nustatytų ribų (imtinai).";
|
||||
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "yra dalus iš";
|
||||
Blockly.Msg.MATH_IS_EVEN = "yra lyginis";
|
||||
@@ -210,7 +224,7 @@ Blockly.Msg.MATH_IS_TOOLTIP = "Patikrina skaičiaus savybę: (ne)lyginis/pirmini
|
||||
Blockly.Msg.MATH_IS_WHOLE = "yra sveikasis";
|
||||
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation";
|
||||
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_TOOLTIP = "Grįžti likučiu nuo dviejų skaičių dalybos.";
|
||||
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated
|
||||
Blockly.Msg.MATH_NUMBER_HELPURL = "https://lt.wikipedia.org/wiki/Skaičius";
|
||||
Blockly.Msg.MATH_NUMBER_TOOLTIP = "Skaičius.";
|
||||
@@ -223,13 +237,13 @@ 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_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_AVERAGE = "Grįžti vidurkiu (aritmetinis vidurkis) iš skaitinių reikšmių sąraše.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Grįžti didžiausiu skaičiumi sąraše.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Grąžinti sąrašo medianą.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Return the smallest number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Grįžti mažiausiu skaičiumi sąraše.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Grąžinti sąrašą dažniausių elementų sąraše.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Grąžinti atsitiktinį elementą iš sąrašo.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Return the standard deviation of the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Grįžti standartine pakraipa iš sąrašo.";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "didžiausia reikšmė";
|
||||
Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
|
||||
@@ -237,7 +251,7 @@ Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "atsitiktinė trupmena";
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Atsitiktinė trupmena nuo 0 (imtinai) iki 1 (neimtinai).";
|
||||
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
|
||||
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_TOOLTIP = "Grįžti atsitiktinį sveikąjį skaičių tarp dviejų nustatytų ribų, imtinai.";
|
||||
Blockly.Msg.MATH_ROUND_HELPURL = "https://lt.wikipedia.org/wiki/Apvalinimas";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "apvalink";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "apvalink žemyn";
|
||||
@@ -249,10 +263,10 @@ Blockly.Msg.MATH_SINGLE_OP_ROOT = "kvadratinė šaknis";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Skaičiaus modulis - reikšmė be ženklo (panaikina minusą).";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Grąžinti skaičių laipsniu e.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Grąžinti skaičiaus natūrinį logaritmą.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Return the base 10 logarithm of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Grįžti 10 pagrindinių logaritmų iš skaičiaus.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Grąžina skaičiui priešingą skaičių.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Grąžinti skaičių laipsniu 10.";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Grįžti kvadratinę šaknį iš skaičiaus.";
|
||||
Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated
|
||||
@@ -303,12 +317,12 @@ Blockly.Msg.RENAME_VARIABLE_TITLE = "Pervadinti visus '%1' kintamuosius į:";
|
||||
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_TOOLTIP = "Pridėti tekstą prie kintamojo '%1'.";
|
||||
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-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_TOOLTIP = "Return a copy of the text in a different case."; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Kitu atvėju, grąžina teksto kopiją.";
|
||||
Blockly.Msg.TEXT_CHARAT_FIRST = "gauti pirmą raidę";
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_END = "raidė nuo galo #";
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_START = "gauti raidę #";
|
||||
@@ -317,13 +331,13 @@ Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "tekste";
|
||||
Blockly.Msg.TEXT_CHARAT_LAST = "gauti paskutinę raidę";
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "gauti atsitiktinę raidę";
|
||||
Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Grąžina raidę į tam tikrą poziciją.";
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "skaičius %1 iš %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Suskaičiuoti, kiek kartų šis tekstas kartojasi kitame tekste.";
|
||||
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_CREATE_JOIN_TOOLTIP = "Pridėti, pašalinti arba paskirstyti skyrius, kad pertvarkyti šį teksto bloką.";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "iki raidės nuo galo #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "iki raidės #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "iki pabaigos";
|
||||
@@ -333,43 +347,43 @@ Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "dalis nuo pradžios";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "dalis nuo raidės #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "dalis nuo raidės #";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Grąžina tam tikrą teksto dalį.";
|
||||
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_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
|
||||
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found."; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Grąžina pirmą/paskutinę pirmo teksto reikšmę antrame tekste. Grąžina %1, jei tekstas nerastas.";
|
||||
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_TOOLTIP = "Grįžti tiesa, jei numatytas tekstas tuščias.";
|
||||
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "sukurti tekstą su";
|
||||
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Sukurti teksto fragmentą sujungiant bet kokį skaičių fragmentų.";
|
||||
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_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_TOOLTIP = "Spausdinti nurodytą tekstą, skaičių ar kitą reikšmę.";
|
||||
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prašyti vartotoją įvesti skaičių.";
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prašyti vartotoją įvesti tekstą.";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "paprašyk įvesti skaičių :";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "paprašyk įvesti tekstą :";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "pakeisti %1 į %2 šiame %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Pašalinti visas teksto dalis kitame tekste.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "atbulai %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Apversti teksto simbolių tvarką.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Tekstas (arba žodis, ar raidė)";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // 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_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Grąžina teksto kopiją, pašalinus tarpus iš vieno ar abiejų kraštų.";
|
||||
Blockly.Msg.TODAY = "Šiandien";
|
||||
Blockly.Msg.UNDO = "Anuliuoti";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "elementas";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.lv');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Pievienot komentāru";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Mainīt vērtību:";
|
||||
Blockly.Msg.CLEAN_UP = "Sakopt blokus";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Sakļaut blokus";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Izvērst bloku";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Ārējie ievaddati";
|
||||
Blockly.Msg.HELP = "Palīdzība";
|
||||
Blockly.Msg.INLINE_INPUTS = "Iekšējie ievaddati";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "izveidot tukšu sarakstu";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Izveidot sarakstu bez elementiem tajā.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.mk');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Додај коментар:";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Смена на вредност:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "Собери блокови";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Рашири го блокови";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Надворешен внос";
|
||||
Blockly.Msg.HELP = "Помош";
|
||||
Blockly.Msg.INLINE_INPUTS = "Внатрешен внос";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
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
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ms');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Berikan Komen";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Ubah nilai:";
|
||||
Blockly.Msg.CLEAN_UP = "Kemaskan Blok";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Lipat Blok²";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Buka Blok";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Input Luaran";
|
||||
Blockly.Msg.HELP = "Bantuan";
|
||||
Blockly.Msg.INLINE_INPUTS = "Input Sebaris";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "Wujudkan senarai kosong";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Kembalikan senarai panjang 0, yang tidak mengandungi rekod data";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.nb');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Legg til kommentar";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Bytt verdi:";
|
||||
Blockly.Msg.CLEAN_UP = "Rydd opp Blocks";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Skjul blokker";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Utvid blokk";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Eksterne kilder";
|
||||
Blockly.Msg.HELP = "Hjelp";
|
||||
Blockly.Msg.INLINE_INPUTS = "Interne kilder";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "opprett en tom liste";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returnerer en tom liste, altså med lengde 0";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.nl');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Reactie toevoegen";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Waarde wijzigen:";
|
||||
Blockly.Msg.CLEAN_UP = "Blokken opschonen";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Blokken samenvouwen";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Blok uitvouwen";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Externe invoer";
|
||||
Blockly.Msg.HELP = "Hulp";
|
||||
Blockly.Msg.INLINE_INPUTS = "Inline invoer";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "maak een lege lijst";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Geeft een lijst terug met lengte 0, zonder items";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.oc');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Apondre un comentari";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Modificar la valor :";
|
||||
Blockly.Msg.CLEAN_UP = "Netejar los blòts";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Redusir los blòts";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Desvolopar lo blòt";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Entradas extèrnas";
|
||||
Blockly.Msg.HELP = "Ajuda";
|
||||
Blockly.Msg.INLINE_INPUTS = "Entradas en linha";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
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
|
||||
|
||||
+17
-3
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.pl');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Dodaj komentarz";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Zmień wartość:";
|
||||
Blockly.Msg.CLEAN_UP = "Uporządkuj bloki";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Zwiń bloki";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Rozwiń blok";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Zewnętrzne wejścia";
|
||||
Blockly.Msg.HELP = "Pomoc";
|
||||
Blockly.Msg.INLINE_INPUTS = "Wbudowane wejścia";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "utwórz pustą listę";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Zwraca listę, o długości 0, nie zawierającą rekordów z danymi";
|
||||
@@ -318,7 +332,7 @@ 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_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Dodaj element do tekstu.";
|
||||
@@ -360,8 +374,8 @@ Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "poproś o tekst z tą wiadomością";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "odwróć %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://pl.wikipedia.org/wiki/Tekstowy_typ_danych";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Litera, wyraz lub linia tekstu.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.pms');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Gionté un coment";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Modifiché ël valor:";
|
||||
Blockly.Msg.CLEAN_UP = "Dëscancelé ij blòch";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Arduve ij blòch";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Dësvlupé ël blòch";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Imission esterne";
|
||||
Blockly.Msg.HELP = "Agiut";
|
||||
Blockly.Msg.INLINE_INPUTS = "Imission an linia";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "creé na lista veuida";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Smon-e na lista, ëd longheur 0, ch'a conten gnun-a argistrassion";
|
||||
|
||||
+29
-15
@@ -7,9 +7,10 @@ goog.provide('Blockly.Msg.pt.br');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Adicionar comentário";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Mudar valor:";
|
||||
Blockly.Msg.CLEAN_UP = "Limpar blocos";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Colapsar Bloco";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Colapsar Blocos";
|
||||
Blockly.Msg.COLLAPSE_BLOCK = "Colapsar Bloco";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "cor 1";
|
||||
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "cor 2";
|
||||
@@ -36,10 +37,10 @@ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Ignora o resto deste la
|
||||
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_TITLE = "para cada item %1 na lista %2";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para cada item em uma lista, atribuir o item à variável '%1' e então realiza algumas instruções.";
|
||||
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Para cada item em uma lista, atribua o item à variável '%1' e então realize algumas instruções.";
|
||||
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_TOOLTIP = "Faça 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 execute os blocos especificados.";
|
||||
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_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Expandir bloco";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Entradas externas";
|
||||
Blockly.Msg.HELP = "Ajuda";
|
||||
Blockly.Msg.INLINE_INPUTS = "Entradas incorporadas";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "criar lista vazia";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Retorna uma lista, de tamanho 0, contendo nenhum registro";
|
||||
@@ -128,9 +142,9 @@ Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Retorna o tamanho de uma lista.";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "criar lista com item %1 repetido %2 vezes";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Cria uma lista consistindo no valor informado repetido o número de vezes especificado.";
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Listas#invertendo-uma-lista";
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "inverter %1";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Inverter uma cópia da lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "como";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "inserir em";
|
||||
@@ -318,9 +332,9 @@ 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_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "Contar %1 em %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Calcule quantas vezes algum texto aparece centro de algum outro texto.";
|
||||
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.";
|
||||
@@ -357,12 +371,12 @@ 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";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "Pede um texto com uma mensagem";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Texto#substituindo-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "substituir %1 por %2 em %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Substitua todas as ocorrências de algum texto dentro de algum outro texto.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Texto#invertendo-texto";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "inverter %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Inverter a ordem dos caracteres no texto.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://pt.wikipedia.org/wiki/Cadeia_de_caracteres";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Uma letra, palavra ou linha de texto.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.pt');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Adicionar Comentário";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Alterar valor:";
|
||||
Blockly.Msg.CLEAN_UP = "Limpar Blocos";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Ocultar Blocos";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Expandir Bloco";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Entradas Externas";
|
||||
Blockly.Msg.HELP = "Ajuda";
|
||||
Blockly.Msg.INLINE_INPUTS = "Entradas Em Linhas";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "criar lista vazia";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Retorna uma lista, de tamanho 0, contendo nenhum registo";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ro');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Adaugă un comentariu";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Schimbaţi valoarea:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "Restrange blocurile";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Extinde bloc";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Intrări externe";
|
||||
Blockly.Msg.HELP = "Ajutor";
|
||||
Blockly.Msg.INLINE_INPUTS = "Intrări în linie";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "creează listă goală";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returnează o listă, de lungime 0, care nu conţine înregistrări de date";
|
||||
|
||||
+15
-1
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ru');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Добавить комментарий";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Измените значение:";
|
||||
Blockly.Msg.CLEAN_UP = "Убрать блоки";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Свернуть блоки";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Развернуть блок";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Вставки снаружи";
|
||||
Blockly.Msg.HELP = "Справка";
|
||||
Blockly.Msg.INLINE_INPUTS = "Вставки внутри";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "создать пустой список";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Возвращает список длины 0, не содержащий данных";
|
||||
@@ -359,7 +373,7 @@ Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "запросить число с подс
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "запросить текст с подсказкой";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "заменить %1 на %2 в %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Заменить все вхождения некоторого текста другим текстом.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "изменить порядок на обратный %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Меняет порядок символов в тексте на обратный.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.sc');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Agiunghe unu cumentu";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Muda valori:";
|
||||
Blockly.Msg.CLEAN_UP = "Lìmpia is brocus";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Serra e stringi Brocus";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Aberi Brocu";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Intradas esternas";
|
||||
Blockly.Msg.HELP = "Agiudu";
|
||||
Blockly.Msg.INLINE_INPUTS = "Intradas in lìnia";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "fait una lista buida";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Torrat una lista, de longària 0, chena records de datus.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.sd');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "تاثرات ڏيو";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "قدر بدلايو";
|
||||
Blockly.Msg.CLEAN_UP = "بندشون هٽايو";
|
||||
Blockly.Msg.COLLAPSE_ALL = "بلاڪَ ڍڪيو";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "بلاڪ نمايو";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "خارجي ڄاڻ";
|
||||
Blockly.Msg.HELP = "مدد";
|
||||
Blockly.Msg.INLINE_INPUTS = "Inline Inputs"; // untranslated
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "خالي فهرست تخليق ڪريو";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.shn');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "သႂ်ႇၶေႃႈၵႂၢမ်း";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "လႅၵ်ႈလၢႆႈၼမ်ႉၵတ်ႉ";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "ပလွၵ်ႉတင်းၼမ် လႅဝ်";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "ၶႂၢၵ်ႈပလွၵ်ႉ";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "ၶိူင်ႈဢၼ်လုၵ်ႉတၢင်းၼွၵ်ႈၶဝ်ႈမႃး";
|
||||
Blockly.Msg.HELP = "ၸွႆႈထႅမ်";
|
||||
Blockly.Msg.INLINE_INPUTS = "ၶိူင်ႈဢၼ်ၶဝ်ႈမႃးၸွမ်းလႅင်း";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
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
|
||||
|
||||
+20
-6
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.sk');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Pridať komentár";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Zmeniť hodnotu:";
|
||||
Blockly.Msg.CLEAN_UP = "Narovnať bloky";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Zvinúť bloky";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Rozvinúť blok";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Vonkajšie vstupy";
|
||||
Blockly.Msg.HELP = "Pomoc";
|
||||
Blockly.Msg.INLINE_INPUTS = "Riadkové vstupy";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "prázdny zoznam";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Vráti zoznam nulovej dĺžky, ktorý neobsahuje žiadne prvky.";
|
||||
@@ -319,8 +333,8 @@ 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_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "počet výskytov %1 v %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Počet výskytov textu nachádzajúcom sa v inom texte.";
|
||||
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.";
|
||||
@@ -358,11 +372,11 @@ Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Výzva pre používateľa na zadanie tex
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "výzva na zadanie čísla so správou";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "výzva za zadanie textu so správou";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "zameniť %1 za %2 v reťazci %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Zameniť všetky výskyty textu za iný text.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "text odzadu %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Obrátiť poradie písmen v texte.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Písmeno, slovo alebo riadok textu.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.sl');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Dodaj komentar";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Spremeni vrednost:";
|
||||
Blockly.Msg.CLEAN_UP = "Ponastavi kocke";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Skrči kocke";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Razširi kocko";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Vnosi zunaj";
|
||||
Blockly.Msg.HELP = "Pomoč";
|
||||
Blockly.Msg.INLINE_INPUTS = "Vnosi v vrsti";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "ustvari prazen seznam";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Vrne seznam, dolžine 0, ki ne vsebuje nobenih podatkov.";
|
||||
|
||||
+16
-2
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.sq');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Vendos nje Koment";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Ndrysho Vlerat:";
|
||||
Blockly.Msg.CLEAN_UP = "Pastro blloqet";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Mbyll blloqet";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Zmadho bllokun";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Hyrjet e jashtme";
|
||||
Blockly.Msg.HELP = "Ndihmë";
|
||||
Blockly.Msg.INLINE_INPUTS = "Hyrjet e brendshme";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "krijo një listë të zbrazët";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Kthen një listë, te gjatësisë 0, duke mos përmbajtur asnjë regjistrim të të dhënave";
|
||||
@@ -318,8 +332,8 @@ 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_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "numro %1 në %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Shto nje gje ne tekst";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "bashkangjit";
|
||||
|
||||
+28
-14
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.sr');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Додај коментар";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Промените вредност:";
|
||||
Blockly.Msg.CLEAN_UP = "Уклони блокове";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Скупи блокове";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Прошири блок";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Спољни улази";
|
||||
Blockly.Msg.HELP = "Помоћ";
|
||||
Blockly.Msg.INLINE_INPUTS = "Унутрашњи улази";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "направи празан списак";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "враћа листу, дужине 0, не садржавајући евиденцију података";
|
||||
@@ -128,9 +142,9 @@ Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Враћа дужину списка.";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "Направити листу са ставком %1 која се понавлја %2 пута";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Прави листу која се састоји од задане вредности коју понавлјамо одређени број шута.";
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list";
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "обрнуто %1";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Обрни копију списка.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "као";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "убаци на";
|
||||
@@ -272,9 +286,9 @@ Blockly.Msg.NEW_VARIABLE_TITLE = "Име нове променљиве:";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = "";
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "дозволити изреке";
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "са:";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://sr.wikipedia.org/sr-ec/Potprogram?%2";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Покрените прилагођену функцију „%1“.";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://sr.wikipedia.org/sr-ec/Potprogram?%2";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Покрените прилагођену функцију „%1“ и користи њен излаз.";
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "са:";
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "Направи „%1“";
|
||||
@@ -318,9 +332,9 @@ Blockly.Msg.TEXT_CHARAT_LAST = "преузми последње слово";
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "преузми случајно слово";
|
||||
Blockly.Msg.TEXT_CHARAT_TAIL = "";
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Враћа слово на одређени положај.";
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "број %1 у %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Броји колико пута се неки текст појављује унутар неког другог текста.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Додајте ставку у текст.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "спајањем";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Додај, уклони, или другачије поредај одјелке како би изнова поставили овај текст блок.";
|
||||
@@ -357,12 +371,12 @@ Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Питајте корисника за
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Питајте корисника за унос текста.";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "питај за број са поруком";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "питај за текст са поруком";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "замена %1 са %2 у %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Замена свих појава неког текста унутар неког другог текста.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "обрнуто %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Обрће редослед карактера у тексту.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://sr.wikipedia.org/wiki/Ниска";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Слово, реч или ред текста.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
+28
-14
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.sv');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Lägg till kommentar";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Ändra värde:";
|
||||
Blockly.Msg.CLEAN_UP = "Rada upp block";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Fäll ihop block";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Fäll ut block";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Externa inmatningar";
|
||||
Blockly.Msg.HELP = "Hjälp";
|
||||
Blockly.Msg.INLINE_INPUTS = "Radinmatning";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "skapa tom lista";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Ger tillbaka en lista utan någon data, alltså med längden 0";
|
||||
@@ -128,9 +142,9 @@ Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Returnerar längden på en lista.";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "skapa lista med föremålet %1 upprepat %2 gånger";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Skapar en lista som innehåller ett valt värde upprepat ett bestämt antalet gånger.";
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list";
|
||||
Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "vänd på %1";
|
||||
Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Vänd på en kopia av en lista.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "som";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "Sätt in vid";
|
||||
@@ -272,9 +286,9 @@ Blockly.Msg.NEW_VARIABLE_TITLE = "Nytt variabelnamn:";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "tillåta uttalanden";
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "med:";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://sv.wikipedia.org/wiki/Funktion_%28programmering%29";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Kör den användardefinierade funktionen \"%1\".";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://sv.wikipedia.org/wiki/Funktion_%28programmering%29";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Kör den användardefinierade funktionen \"%1\" och använd resultatet av den.";
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "med:";
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "Skapa '%1'";
|
||||
@@ -318,9 +332,9 @@ 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_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings";
|
||||
Blockly.Msg.TEXT_COUNT_MESSAGE0 = "räkna %1 i %2";
|
||||
Blockly.Msg.TEXT_COUNT_TOOLTIP = "Räkna hur många gånger en text förekommer inom en annan text.";
|
||||
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.";
|
||||
@@ -357,12 +371,12 @@ 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";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "fråga efter text med meddelande";
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
|
||||
Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings";
|
||||
Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "ersätt %1 med %2 i %3";
|
||||
Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Ersätt alla förekomster av en text inom en annan text.";
|
||||
Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text";
|
||||
Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "vänd på %1";
|
||||
Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Vänder på teckenordningen i texten.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://sv.wikipedia.org/wiki/Str%C3%A4ng_%28data%29";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "En bokstav, ord eller textrad.";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.ta');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "கருத்தை சேர்";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "மதிப்பை மாற்றவும்:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "உறுப்புகளை மரை";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "உறுப்பை காட்டு";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "வெளி கருவிகளுடன் உள்ளீடு";
|
||||
Blockly.Msg.HELP = "உதவி";
|
||||
Blockly.Msg.INLINE_INPUTS = "சூழமைவில் உள்ளீடு";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "காலி பட்டியல் உருவாக்க";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "காலி பட்டியல் பின்கொடு.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.tcy');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "ಟಿಪ್ಪಣಿ ಸೇರ್ಸಲೆ";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "ಮೌಲ್ಯೊದ ಬದಲಾವಣೆ";
|
||||
Blockly.Msg.CLEAN_UP = "ನಿರ್ಬಂದೊಲೆನ್ ಸ್ವೊಚ್ಚೊ ಮಲ್ಪುಲೆ";
|
||||
Blockly.Msg.COLLAPSE_ALL = "ಕುಗ್ಗಿಸಾದ್ ನಿರ್ಬಂಧಿಸಾಪುನೆ";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "ವಿಸ್ತರಿಸಾದ್ ತಡೆಪತ್
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "ಬಾಹ್ಯೊ ಪರಿಕರೊ";
|
||||
Blockly.Msg.HELP = "ಸಹಾಯೊ";
|
||||
Blockly.Msg.INLINE_INPUTS = "ಉಳಸಾಲ್ದ ಉಳಪರಿಪು";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "ಕಾಲಿ ಪಟ್ಟಿನ್ ಸ್ರಿಸ್ಟಿಸಲೆ";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "ಒಂಜಿ ಪಟ್ಟಿ, ೦ದ ಉದ್ದೊ, ಒವ್ವೇ ಅಂಕಿಅಂಸೊ ಇದ್ಯಾಂತಿನ ದಾಖಲೆ ಪಿರಕೊರು.";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.th');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "ใส่คำอธิบาย";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "เปลี่ยนค่า:";
|
||||
Blockly.Msg.CLEAN_UP = "จัดเรียงบล็อกให้เป็นแถว";
|
||||
Blockly.Msg.COLLAPSE_ALL = "ย่อบล็อก";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "ขยายบล็อก";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "อินพุตภายนอก";
|
||||
Blockly.Msg.HELP = "ช่วยเหลือ";
|
||||
Blockly.Msg.INLINE_INPUTS = "อินพุตในบรรทัด";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "สร้างรายการเปล่า";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "สร้างรายการเปล่า (ความยาวเป็น 0) ยังไม่มีข้อมูลใดๆ อยู่";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.tl');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Dagdag komento";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "pagbago ng value:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "bloke";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Palawakin ang Block";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Panlabas na Inputs";
|
||||
Blockly.Msg.HELP = "Tulong";
|
||||
Blockly.Msg.INLINE_INPUTS = "Inline na Inputs";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "Gumawa ng walang laman na list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Ibabalik ang list, na may haba na 0, nag lalaman ng walang data records";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.tlh');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "QInHom chel";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "choH:";
|
||||
Blockly.Msg.CLEAN_UP = "ngoghmeyvaD tlhegh rurmoH";
|
||||
Blockly.Msg.COLLAPSE_ALL = "ngoghmey DejmoH";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "ngogh DejHa'moH";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Hur rar";
|
||||
Blockly.Msg.HELP = "QaH";
|
||||
Blockly.Msg.INLINE_INPUTS = "qoD rar";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "tetlh chIm";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.tr');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Yorum Ekle";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Değeri değiştir:";
|
||||
Blockly.Msg.CLEAN_UP = "Blokları temizle";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Blokları Daralt";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Bloğu Genişlet";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Harici Girişler";
|
||||
Blockly.Msg.HELP = "Yardım";
|
||||
Blockly.Msg.INLINE_INPUTS = "Satır içi girdiler";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "Boş liste oluştur";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Veri kaydı içermeyen uzunluğu 0 olan bir listeyi verir";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.uk');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Додати коментар";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Змінити значення:";
|
||||
Blockly.Msg.CLEAN_UP = "Вирівняти блоки";
|
||||
Blockly.Msg.COLLAPSE_ALL = "Згорнути блоки";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Розгорнути блок";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Зовнішні входи";
|
||||
Blockly.Msg.HELP = "Довідка";
|
||||
Blockly.Msg.INLINE_INPUTS = "Вбудовані входи";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "створити порожній список";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Повертає список, довжиною 0, що не містить записів даних";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.vi');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "Thêm Chú Giải";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "Thay giá trị thành:";
|
||||
Blockly.Msg.CLEAN_UP = "Clean up Blocks"; // untranslated
|
||||
Blockly.Msg.COLLAPSE_ALL = "Thu Nhỏ Mọi Mảnh";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "Mở Lớn Mảnh";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "Chỗ Gắn Bên Ngoài";
|
||||
Blockly.Msg.HELP = "Trợ Giúp";
|
||||
Blockly.Msg.INLINE_INPUTS = "Chỗ Gắn Cùng Dòng";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "tạo danh sách trống";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Hoàn trả một danh sách, với độ dài 0, không có thành tố nào cả";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.zh.hans');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "添加注释";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "更改值:";
|
||||
Blockly.Msg.CLEAN_UP = "整理块";
|
||||
Blockly.Msg.COLLAPSE_ALL = "折叠块";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "展开块";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "外部输入";
|
||||
Blockly.Msg.HELP = "帮助";
|
||||
Blockly.Msg.INLINE_INPUTS = "单行输入";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "创建空列表";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "返回一个列表,长度为 0,不包含任何数据记录";
|
||||
|
||||
@@ -7,6 +7,7 @@ goog.provide('Blockly.Msg.zh.hant');
|
||||
goog.require('Blockly.Msg');
|
||||
|
||||
Blockly.Msg.ADD_COMMENT = "加入註解";
|
||||
Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
|
||||
Blockly.Msg.CHANGE_VALUE_TITLE = "修改值:";
|
||||
Blockly.Msg.CLEAN_UP = "整理積木";
|
||||
Blockly.Msg.COLLAPSE_ALL = "收合積木";
|
||||
@@ -73,6 +74,19 @@ Blockly.Msg.EXPAND_BLOCK = "展開積木";
|
||||
Blockly.Msg.EXTERNAL_INPUTS = "多行輸入";
|
||||
Blockly.Msg.HELP = "幫助";
|
||||
Blockly.Msg.INLINE_INPUTS = "單行輸入";
|
||||
Blockly.Msg.IOS_CANCEL = "Cancel"; // untranslated
|
||||
Blockly.Msg.IOS_ERROR = "Error"; // untranslated
|
||||
Blockly.Msg.IOS_OK = "OK"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ Add Input"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
|
||||
Blockly.Msg.IOS_PROCEDURES_INPUTS = "INPUTS"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "Add"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "Delete"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "You can't use an empty variable name."; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "Rename"; // untranslated
|
||||
Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "Variable name"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "建立空的清單";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "返回一個長度(項目數量)為 0 的清單,不包含任何資料記錄";
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"@metadata": {
|
||||
"author": "Ellen Spertus <ellen.spertus@gmail.com>",
|
||||
"lastupdated": "2017-04-04 17:16:42.193032",
|
||||
"lastupdated": "2017-05-04 13:31:31.892658",
|
||||
"locale": "en",
|
||||
"messagedocumentation" : "qqq"
|
||||
},
|
||||
|
||||
+27
-27
@@ -12,12 +12,12 @@ Blockly.PHP.init=function(a){Blockly.PHP.definitions_=Object.create(null);Blockl
|
||||
Blockly.PHP.finish=function(a){var b=[],c;for(c in Blockly.PHP.definitions_)b.push(Blockly.PHP.definitions_[c]);delete Blockly.PHP.definitions_;delete Blockly.PHP.functionNames_;Blockly.PHP.variableDB_.reset();return b.join("\n\n")+"\n\n\n"+a};Blockly.PHP.scrubNakedValue=function(a){return a+";\n"};Blockly.PHP.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,"\\'");return"'"+a+"'"};
|
||||
Blockly.PHP.scrub_=function(a,b){var c="";if(!a.outputConnection||!a.outputConnection.targetConnection){var d=a.getCommentText();(d=Blockly.utils.wrap(d,Blockly.PHP.COMMENT_WRAP-3))&&(c+=Blockly.PHP.prefixLines(d,"// ")+"\n");for(var e=0;e<a.inputList.length;e++)a.inputList[e].type==Blockly.INPUT_VALUE&&(d=a.inputList[e].connection.targetBlock())&&(d=Blockly.PHP.allNestedComments(d))&&(c+=Blockly.PHP.prefixLines(d,"// "))}e=a.nextConnection&&a.nextConnection.targetBlock();e=Blockly.PHP.blockToCode(e);
|
||||
return c+b+e};
|
||||
Blockly.PHP.getAdjusted=function(a,b,c,d,e){c=c||0;e=e||Blockly.PHP.ORDER_NONE;a.workspace.options.oneBasedIndex&&c--;var g=a.workspace.options.oneBasedIndex?"1":"0";a=0<c?Blockly.PHP.valueToCode(a,b,Blockly.PHP.ORDER_ADDITION)||g:0>c?Blockly.PHP.valueToCode(a,b,Blockly.PHP.ORDER_SUBTRACTION)||g:d?Blockly.PHP.valueToCode(a,b,Blockly.PHP.ORDER_UNARY_NEGATION)||g:Blockly.PHP.valueToCode(a,b,e)||g;if(Blockly.isNumber(a))a=parseFloat(a)+c,d&&(a=-a);else{if(0<c){a=a+" + "+c;var f=Blockly.PHP.ORDER_ADDITION}else 0>c&&
|
||||
(a=a+" - "+-c,f=Blockly.PHP.ORDER_SUBTRACTION);d&&(a=c?"-("+a+")":"-"+a,f=Blockly.PHP.ORDER_UNARY_NEGATION);f=Math.floor(f);e=Math.floor(e);f&&e>=f&&(a="("+a+")")}return a};Blockly.PHP.lists={};Blockly.PHP.lists_create_empty=function(a){return["array()",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c<a.itemCount_;c++)b[c]=Blockly.PHP.valueToCode(a,"ADD"+c,Blockly.PHP.ORDER_COMMA)||"null";b="array("+b.join(", ")+")";return[b,Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.getAdjusted=function(a,b,c,d,e){c=c||0;e=e||Blockly.PHP.ORDER_NONE;a.workspace.options.oneBasedIndex&&c--;var f=a.workspace.options.oneBasedIndex?"1":"0";a=0<c?Blockly.PHP.valueToCode(a,b,Blockly.PHP.ORDER_ADDITION)||f:0>c?Blockly.PHP.valueToCode(a,b,Blockly.PHP.ORDER_SUBTRACTION)||f:d?Blockly.PHP.valueToCode(a,b,Blockly.PHP.ORDER_UNARY_NEGATION)||f:Blockly.PHP.valueToCode(a,b,e)||f;if(Blockly.isNumber(a))a=parseFloat(a)+c,d&&(a=-a);else{if(0<c){a=a+" + "+c;var g=Blockly.PHP.ORDER_ADDITION}else 0>c&&
|
||||
(a=a+" - "+-c,g=Blockly.PHP.ORDER_SUBTRACTION);d&&(a=c?"-("+a+")":"-"+a,g=Blockly.PHP.ORDER_UNARY_NEGATION);g=Math.floor(g);e=Math.floor(e);g&&e>=g&&(a="("+a+")")}return a};Blockly.PHP.lists={};Blockly.PHP.lists_create_empty=function(a){return["array()",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c<a.itemCount_;c++)b[c]=Blockly.PHP.valueToCode(a,"ADD"+c,Blockly.PHP.ORDER_COMMA)||"null";b="array("+b.join(", ")+")";return[b,Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.lists_repeat=function(a){var b=Blockly.PHP.provideFunction_("lists_repeat",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($value, $count) {"," $array = array();"," for ($index = 0; $index < $count; $index++) {"," $array[] = $value;"," }"," return $array;","}"]),c=Blockly.PHP.valueToCode(a,"ITEM",Blockly.PHP.ORDER_COMMA)||"null";a=Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_COMMA)||"0";return[b+"("+c+", "+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.lists_length=function(a){var b=Blockly.PHP.provideFunction_("length",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($value) {"," if (is_string($value)) {"," return strlen($value);"," } else {"," return count($value);"," }","}"]);a=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"''";return[b+"("+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.lists_isEmpty=function(a){return["empty("+(Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_FUNCTION_CALL)||"array()")+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.lists_indexOf=function(a){var b=Blockly.PHP.valueToCode(a,"FIND",Blockly.PHP.ORDER_NONE)||"''",c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_MEMBER)||"[]";if(a.workspace.options.oneBasedIndex)var d=" 0",e=" + 1";else d=" -1",e="";return[("FIRST"==a.getFieldValue("END")?Blockly.PHP.provideFunction_("indexOf",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($haystack, $needle) {"," for ($index = 0; $index < count($haystack); $index++) {"," if ($haystack[$index] == $needle) return $index"+
|
||||
Blockly.PHP.lists_indexOf=function(a){var b=Blockly.PHP.valueToCode(a,"FIND",Blockly.PHP.ORDER_NONE)||"''",c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_MEMBER)||"[]";if(a.workspace.options.oneBasedIndex){var d=" 0";var e=" + 1"}else d=" -1",e="";return[("FIRST"==a.getFieldValue("END")?Blockly.PHP.provideFunction_("indexOf",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($haystack, $needle) {"," for ($index = 0; $index < count($haystack); $index++) {"," if ($haystack[$index] == $needle) return $index"+
|
||||
e+";"," }"," return "+d+";","}"]):Blockly.PHP.provideFunction_("lastIndexOf",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($haystack, $needle) {"," $last = "+d+";"," for ($index = 0; $index < count($haystack); $index++) {"," if ($haystack[$index] == $needle) $last = $index"+e+";"," }"," return $last;","}"]))+"("+c+", "+b+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET";switch(a.getFieldValue("WHERE")||"FROM_START"){case "FIRST":if("GET"==b){var c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_MEMBER)||"array()";return[c+"[0]",Blockly.PHP.ORDER_MEMBER]}if("GET_REMOVE"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()",["array_shift("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||
|
||||
"array()","array_shift("+c+");\n";break;case "LAST":if("GET"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()",["end("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("GET_REMOVE"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()",["array_pop("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()","array_pop("+c+");\n";break;case "FROM_START":var d=Blockly.PHP.getAdjusted(a,
|
||||
@@ -25,24 +25,24 @@ Blockly.PHP.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET";swit
|
||||
"VALUE",Blockly.PHP.ORDER_COMMA)||"array()",d=Blockly.PHP.getAdjusted(a,"AT",1,!0),["array_slice("+c+", "+d+", 1)[0]",Blockly.PHP.ORDER_FUNCTION_CALL];if("GET_REMOVE"==b||"REMOVE"==b){c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()";d=Blockly.PHP.getAdjusted(a,"AT",1,!1,Blockly.PHP.ORDER_SUBTRACTION);c="array_splice("+c+", count("+c+") - "+d+", 1)[0]";if("GET_REMOVE"==b)return[c,Blockly.PHP.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}break;case "RANDOM":c=Blockly.PHP.valueToCode(a,
|
||||
"VALUE",Blockly.PHP.ORDER_NONE)||"array()";if("GET"==b)return b=Blockly.PHP.provideFunction_("lists_get_random_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list) {"," return $list[rand(0,count($list)-1)];","}"]),[b+"("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("GET_REMOVE"==b)return b=Blockly.PHP.provideFunction_("lists_get_remove_random_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list) {"," $x = rand(0,count($list)-1);"," unset($list[$x]);"," return array_values($list);",
|
||||
"}"]),[b+"("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("REMOVE"==b)return b=Blockly.PHP.provideFunction_("lists_remove_random_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list) {"," unset($list[rand(0,count($list)-1)]);","}"]),b+"("+c+");\n"}throw"Unhandled combination (lists_getIndex).";};
|
||||
Blockly.PHP.lists_setIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"null";switch(c){case "FIRST":if("SET"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c+"[0] = "+d+";\n";if("INSERT"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()","array_unshift("+c+", "+d+");\n";break;case "LAST":c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||
|
||||
"array()";if("SET"==b)return b=Blockly.PHP.provideFunction_("lists_set_last_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $value) {"," $list[count($list) - 1] = $value;","}"]),b+"("+c+", "+d+");\n";if("INSERT"==b)return"array_push("+c+", "+d+");\n";break;case "FROM_START":var e=Blockly.PHP.getAdjusted(a,"AT");if("SET"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c+"["+e+"] = "+d+";\n";if("INSERT"==b)return c=Blockly.PHP.valueToCode(a,"LIST",
|
||||
Blockly.PHP.ORDER_COMMA)||"array()","array_splice("+c+", "+e+", 0, "+d+");\n";break;case "FROM_END":c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()";e=Blockly.PHP.getAdjusted(a,"AT",1);if("SET"==b)return b=Blockly.PHP.provideFunction_("lists_set_from_end",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $at, $value) {"," $list[count($list) - $at] = $value;","}"]),b+"("+c+", "+e+", "+d+");\n";if("INSERT"==b)return b=Blockly.PHP.provideFunction_("lists_insert_from_end",
|
||||
Blockly.PHP.lists_setIndex=function(a){var b=a.getFieldValue("MODE")||"GET";var c=a.getFieldValue("WHERE")||"FROM_START";var d=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"null";switch(c){case "FIRST":if("SET"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c+"[0] = "+d+";\n";if("INSERT"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()","array_unshift("+c+", "+d+");\n";break;case "LAST":c=Blockly.PHP.valueToCode(a,
|
||||
"LIST",Blockly.PHP.ORDER_COMMA)||"array()";if("SET"==b)return b=Blockly.PHP.provideFunction_("lists_set_last_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $value) {"," $list[count($list) - 1] = $value;","}"]),b+"("+c+", "+d+");\n";if("INSERT"==b)return"array_push("+c+", "+d+");\n";break;case "FROM_START":var e=Blockly.PHP.getAdjusted(a,"AT");if("SET"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c+"["+e+"] = "+d+";\n";if("INSERT"==b)return c=
|
||||
Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()","array_splice("+c+", "+e+", 0, "+d+");\n";break;case "FROM_END":c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()";e=Blockly.PHP.getAdjusted(a,"AT",1);if("SET"==b)return b=Blockly.PHP.provideFunction_("lists_set_from_end",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $at, $value) {"," $list[count($list) - $at] = $value;","}"]),b+"("+c+", "+e+", "+d+");\n";if("INSERT"==b)return b=Blockly.PHP.provideFunction_("lists_insert_from_end",
|
||||
["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $at, $value) {"," return array_splice($list, count($list) - $at, 0, $value);","}"]),b+"("+c+", "+e+", "+d+");\n";break;case "RANDOM":c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_REFERENCE)||"array()";c.match(/^\$\w+$/)?a="":(a=Blockly.PHP.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),e=a+" = &"+c+";\n",c=a,a=e);e=Blockly.PHP.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);a+=e+" = rand(0, count("+
|
||||
c+")-1);\n";if("SET"==b)return a+(c+"["+e+"] = "+d+";\n");if("INSERT"==b)return a+("array_splice("+c+", "+e+", 0, "+d+");\n")}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.PHP.lists_getSublist=function(a){var b=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"!=c||"LAST"!=d)if(b.match(/^\$\w+$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":var e=Blockly.PHP.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.PHP.getAdjusted(a,"AT1",1,!1,Blockly.PHP.ORDER_SUBTRACTION);e="count("+b+") - "+e;break;case "FIRST":e="0";break;default:throw"Unhandled option (lists_getSublist).";
|
||||
}switch(d){case "FROM_START":a=Blockly.PHP.getAdjusted(a,"AT2",0,!1,Blockly.PHP.ORDER_SUBTRACTION);c=a+" - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+e+")");c+=" + 1";break;case "FROM_END":a=Blockly.PHP.getAdjusted(a,"AT2",0,!1,Blockly.PHP.ORDER_SUBTRACTION);c="count("+b+") - "+a+" - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+e+")");break;case "LAST":c="count("+b+") - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+
|
||||
e+")");break;default:throw"Unhandled option (lists_getSublist).";}b="array_slice("+b+", "+e+", "+c+")"}else e=Blockly.PHP.getAdjusted(a,"AT1"),a=Blockly.PHP.getAdjusted(a,"AT2"),b=Blockly.PHP.provideFunction_("lists_get_sublist",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list, $where1, $at1, $where2, $at2) {"," if ($where1 == 'FROM_END') {"," $at1 = count($list) - 1 - $at1;"," } else if ($where1 == 'FIRST') {"," $at1 = 0;"," } else if ($where1 != 'FROM_START'){"," throw new Exception('Unhandled option (lists_get_sublist).');",
|
||||
" }"," $length = 0;"," if ($where2 == 'FROM_START') {"," $length = $at2 - $at1 + 1;"," } else if ($where2 == 'FROM_END') {"," $length = count($list) - $at1 - $at2;"," } else if ($where2 == 'LAST') {"," $length = count($list) - $at1;"," } else {"," throw new Exception('Unhandled option (lists_get_sublist).');"," }"," return array_slice($list, $at1, $length);","}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")";return[b,Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.lists_getSublist=function(a){var b=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()";var c=a.getFieldValue("WHERE1");var d=a.getFieldValue("WHERE2");if("FIRST"==c&&"LAST"==d)var e=b;else if(b.match(/^\$\w+$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":e=Blockly.PHP.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.PHP.getAdjusted(a,"AT1",1,!1,Blockly.PHP.ORDER_SUBTRACTION);e="count("+b+") - "+e;break;case "FIRST":e="0";break;default:throw"Unhandled option (lists_getSublist).";
|
||||
}switch(d){case "FROM_START":var f=Blockly.PHP.getAdjusted(a,"AT2",0,!1,Blockly.PHP.ORDER_SUBTRACTION);c=f+" - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+e+")");c+=" + 1";break;case "FROM_END":f=Blockly.PHP.getAdjusted(a,"AT2",0,!1,Blockly.PHP.ORDER_SUBTRACTION);c="count("+b+") - "+f+" - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+e+")");break;case "LAST":c="count("+b+") - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+
|
||||
e+")");break;default:throw"Unhandled option (lists_getSublist).";}e="array_slice("+b+", "+e+", "+c+")"}else e=Blockly.PHP.getAdjusted(a,"AT1"),f=Blockly.PHP.getAdjusted(a,"AT2"),a=Blockly.PHP.provideFunction_("lists_get_sublist",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list, $where1, $at1, $where2, $at2) {"," if ($where1 == 'FROM_END') {"," $at1 = count($list) - 1 - $at1;"," } else if ($where1 == 'FIRST') {"," $at1 = 0;"," } else if ($where1 != 'FROM_START'){"," throw new Exception('Unhandled option (lists_get_sublist).');",
|
||||
" }"," $length = 0;"," if ($where2 == 'FROM_START') {"," $length = $at2 - $at1 + 1;"," } else if ($where2 == 'FROM_END') {"," $length = count($list) - $at1 - $at2;"," } else if ($where2 == 'LAST') {"," $length = count($list) - $at1;"," } else {"," throw new Exception('Unhandled option (lists_get_sublist).');"," }"," return array_slice($list, $at1, $length);","}"]),e=a+"("+b+", '"+c+"', "+e+", '"+d+"', "+f+")";return[e,Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.lists_sort=function(a){var b=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()",c="1"===a.getFieldValue("DIRECTION")?1:-1;a=a.getFieldValue("TYPE");return[Blockly.PHP.provideFunction_("lists_sort",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list, $type, $direction) {"," $sortCmpFuncs = array(",' "NUMERIC" => "strnatcasecmp",',' "TEXT" => "strcmp",',' "IGNORE_CASE" => "strcasecmp"'," );"," $sortCmp = $sortCmpFuncs[$type];"," $list2 = $list;"," usort($list2, $sortCmp);",
|
||||
" if ($direction == -1) {"," $list2 = array_reverse($list2);"," }"," return $list2;","}"])+"("+b+', "'+a+'", '+c+")",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.lists_split=function(a){var b=Blockly.PHP.valueToCode(a,"INPUT",Blockly.PHP.ORDER_COMMA),c=Blockly.PHP.valueToCode(a,"DELIM",Blockly.PHP.ORDER_COMMA)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a="explode";else if("JOIN"==a)b||(b="array()"),a="implode";else throw"Unknown mode: "+a;return[a+"("+c+", "+b+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.lists_reverse=function(a){return["array_reverse("+(Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"[]")+")",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.math={};Blockly.PHP.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));Infinity==a?a="INF":-Infinity==a&&(a="-INF");return[a,Blockly.PHP.ORDER_ATOMIC]};
|
||||
Blockly.PHP.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.PHP.ORDER_ADDITION],MINUS:[" - ",Blockly.PHP.ORDER_SUBTRACTION],MULTIPLY:[" * ",Blockly.PHP.ORDER_MULTIPLICATION],DIVIDE:[" / ",Blockly.PHP.ORDER_DIVISION],POWER:[" ** ",Blockly.PHP.ORDER_POWER]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.PHP.valueToCode(a,"A",b)||"0";a=Blockly.PHP.valueToCode(a,"B",b)||"0";return[d+c+a,b]};
|
||||
Blockly.PHP.math_single=function(a){var b=a.getFieldValue("OP"),c;if("NEG"==b)return a=Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_UNARY_NEGATION)||"0","-"==a[0]&&(a=" "+a),["-"+a,Blockly.PHP.ORDER_UNARY_NEGATION];a="SIN"==b||"COS"==b||"TAN"==b?Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_DIVISION)||"0":Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_NONE)||"0";switch(b){case "ABS":c="abs("+a+")";break;case "ROOT":c="sqrt("+a+")";break;case "LN":c="log("+a+")";break;case "EXP":c="exp("+
|
||||
Blockly.PHP.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"==b)return a=Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_UNARY_NEGATION)||"0","-"==a[0]&&(a=" "+a),["-"+a,Blockly.PHP.ORDER_UNARY_NEGATION];a="SIN"==b||"COS"==b||"TAN"==b?Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_DIVISION)||"0":Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_NONE)||"0";switch(b){case "ABS":var c="abs("+a+")";break;case "ROOT":c="sqrt("+a+")";break;case "LN":c="log("+a+")";break;case "EXP":c="exp("+
|
||||
a+")";break;case "POW10":c="pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="ceil("+a+")";break;case "ROUNDDOWN":c="floor("+a+")";break;case "SIN":c="sin("+a+" / 180 * pi())";break;case "COS":c="cos("+a+" / 180 * pi())";break;case "TAN":c="tan("+a+" / 180 * pi())"}if(c)return[c,Blockly.PHP.ORDER_FUNCTION_CALL];switch(b){case "LOG10":c="log("+a+") / log(10)";break;case "ASIN":c="asin("+a+") / pi() * 180";break;case "ACOS":c="acos("+a+") / pi() * 180";break;case "ATAN":c="atan("+
|
||||
a+") / pi() * 180";break;default:throw"Unknown math operator: "+b;}return[c,Blockly.PHP.ORDER_DIVISION]};Blockly.PHP.math_constant=function(a){return{PI:["M_PI",Blockly.PHP.ORDER_ATOMIC],E:["M_E",Blockly.PHP.ORDER_ATOMIC],GOLDEN_RATIO:["(1 + sqrt(5)) / 2",Blockly.PHP.ORDER_DIVISION],SQRT2:["M_SQRT2",Blockly.PHP.ORDER_ATOMIC],SQRT1_2:["M_SQRT1_2",Blockly.PHP.ORDER_ATOMIC],INFINITY:["INF",Blockly.PHP.ORDER_ATOMIC]}[a.getFieldValue("CONSTANT")]};
|
||||
Blockly.PHP.math_number_property=function(a){var b=Blockly.PHP.valueToCode(a,"NUMBER_TO_CHECK",Blockly.PHP.ORDER_MODULUS)||"0",c=a.getFieldValue("PROPERTY"),d;if("PRIME"==c)return[Blockly.PHP.provideFunction_("math_isPrime",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($n) {"," // https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if ($n == 2 || $n == 3) {"," return true;"," }"," // False if n is NaN, negative, is 1, or not whole."," // And false if n is divisible by 2 or 3.",
|
||||
" if (!is_numeric($n) || $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 ($x = 6; $x <= sqrt($n) + 1; $x += 6) {"," if ($n % ($x - 1) == 0 || $n % ($x + 1) == 0) {"," return false;"," }"," }"," return true;","}"])+"("+b+")",Blockly.JavaScript.ORDER_FUNCTION_CALL];switch(c){case "EVEN":d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d="is_int("+b+")";break;case "POSITIVE":d=
|
||||
Blockly.PHP.math_number_property=function(a){var b=Blockly.PHP.valueToCode(a,"NUMBER_TO_CHECK",Blockly.PHP.ORDER_MODULUS)||"0",c=a.getFieldValue("PROPERTY");if("PRIME"==c)return[Blockly.PHP.provideFunction_("math_isPrime",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($n) {"," // https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if ($n == 2 || $n == 3) {"," return true;"," }"," // False if n is NaN, negative, is 1, or not whole."," // And false if n is divisible by 2 or 3.",
|
||||
" if (!is_numeric($n) || $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 ($x = 6; $x <= sqrt($n) + 1; $x += 6) {"," if ($n % ($x - 1) == 0 || $n % ($x + 1) == 0) {"," return false;"," }"," }"," return true;","}"])+"("+b+")",Blockly.JavaScript.ORDER_FUNCTION_CALL];switch(c){case "EVEN":var d=b+" % 2 == 0";break;case "ODD":d=b+" % 2 == 1";break;case "WHOLE":d="is_int("+b+")";break;case "POSITIVE":d=
|
||||
b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=Blockly.PHP.valueToCode(a,"DIVISOR",Blockly.PHP.ORDER_MODULUS)||"0",d=b+" % "+a+" == 0"}return[d,Blockly.PHP.ORDER_EQUALITY]};Blockly.PHP.math_change=function(a){var b=Blockly.PHP.valueToCode(a,"DELTA",Blockly.PHP.ORDER_ADDITION)||"0";return Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE)+" += "+b+";\n"};Blockly.PHP.math_round=Blockly.PHP.math_single;Blockly.PHP.math_trig=Blockly.PHP.math_single;
|
||||
Blockly.PHP.math_on_list=function(a){var b=a.getFieldValue("OP");switch(b){case "SUM":a=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_FUNCTION_CALL)||"array()";a="array_sum("+a+")";break;case "MIN":a=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_FUNCTION_CALL)||"array()";a="min("+a+")";break;case "MAX":a=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_FUNCTION_CALL)||"array()";a="max("+a+")";break;case "AVERAGE":b=Blockly.PHP.provideFunction_("math_mean",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+
|
||||
"($myList) {"," return array_sum($myList) / count($myList);","}"]);a=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_NONE)||"array()";a=b+"("+a+")";break;case "MEDIAN":b=Blockly.PHP.provideFunction_("math_median",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($arr) {"," sort($arr,SORT_NUMERIC);"," return (count($arr) % 2) ? $arr[floor(count($arr)/2)] : "," ($arr[floor(count($arr)/2)] + $arr[floor(count($arr)/2) - 1]) / 2;","}"]);a=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_NONE)||
|
||||
@@ -57,31 +57,31 @@ 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]};Blockly.PHP.procedures={};
|
||||
Blockly.PHP.procedures_defreturn=function(a){for(var b=[],c=0,d;d=a.workspace.variableList[c];c++)-1==a.arguments_.indexOf(d)&&b.push(Blockly.PHP.variableDB_.getName(d,Blockly.Variables.NAME_TYPE));b=b.length?" global "+b.join(", ")+";\n":"";d=Blockly.PHP.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE);var e=Blockly.PHP.statementToCode(a,"STACK");Blockly.PHP.STATEMENT_PREFIX&&(e=Blockly.PHP.prefixLines(Blockly.PHP.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.PHP.INDENT)+
|
||||
e);Blockly.PHP.INFINITE_LOOP_TRAP&&(e=Blockly.PHP.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+a.id+"'")+e);var g=Blockly.PHP.valueToCode(a,"RETURN",Blockly.PHP.ORDER_NONE)||"";g&&(g=" return "+g+";\n");for(var f=[],c=0;c<a.arguments_.length;c++)f[c]=Blockly.PHP.variableDB_.getName(a.arguments_[c],Blockly.Variables.NAME_TYPE);b="function "+d+"("+f.join(", ")+") {\n"+b+e+g+"}";b=Blockly.PHP.scrub_(a,b);Blockly.PHP.definitions_["%"+d]=b;return null};Blockly.PHP.procedures_defnoreturn=Blockly.PHP.procedures_defreturn;
|
||||
e);Blockly.PHP.INFINITE_LOOP_TRAP&&(e=Blockly.PHP.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+a.id+"'")+e);var f=Blockly.PHP.valueToCode(a,"RETURN",Blockly.PHP.ORDER_NONE)||"";f&&(f=" return "+f+";\n");for(var g=[],c=0;c<a.arguments_.length;c++)g[c]=Blockly.PHP.variableDB_.getName(a.arguments_[c],Blockly.Variables.NAME_TYPE);b="function "+d+"("+g.join(", ")+") {\n"+b+e+f+"}";b=Blockly.PHP.scrub_(a,b);Blockly.PHP.definitions_["%"+d]=b;return null};Blockly.PHP.procedures_defnoreturn=Blockly.PHP.procedures_defreturn;
|
||||
Blockly.PHP.procedures_callreturn=function(a){for(var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=[],d=0;d<a.arguments_.length;d++)c[d]=Blockly.PHP.valueToCode(a,"ARG"+d,Blockly.PHP.ORDER_COMMA)||"null";return[b+"("+c.join(", ")+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.procedures_callnoreturn=function(a){for(var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=[],d=0;d<a.arguments_.length;d++)c[d]=Blockly.PHP.valueToCode(a,"ARG"+d,Blockly.PHP.ORDER_COMMA)||"null";return b+"("+c.join(", ")+");\n"};
|
||||
Blockly.PHP.procedures_ifreturn=function(a){var b="if ("+(Blockly.PHP.valueToCode(a,"CONDITION",Blockly.PHP.ORDER_NONE)||"false")+") {\n";a.hasReturnValue_?(a=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"null",b+=" return "+a+";\n"):b+=" return;\n";return b+"}\n"};Blockly.PHP.texts={};Blockly.PHP.text=function(a){return[Blockly.PHP.quote_(a.getFieldValue("TEXT")),Blockly.PHP.ORDER_ATOMIC]};
|
||||
Blockly.PHP.text_join=function(a){if(0==a.itemCount_)return["''",Blockly.PHP.ORDER_ATOMIC];if(1==a.itemCount_)return[Blockly.PHP.valueToCode(a,"ADD0",Blockly.PHP.ORDER_NONE)||"''",Blockly.PHP.ORDER_FUNCTION_CALL];if(2==a.itemCount_){var b=Blockly.PHP.valueToCode(a,"ADD0",Blockly.PHP.ORDER_NONE)||"''";a=Blockly.PHP.valueToCode(a,"ADD1",Blockly.PHP.ORDER_NONE)||"''";return[b+" . "+a,Blockly.PHP.ORDER_ADDITION]}for(var b=Array(a.itemCount_),c=0;c<a.itemCount_;c++)b[c]=Blockly.PHP.valueToCode(a,"ADD"+
|
||||
c,Blockly.PHP.ORDER_COMMA)||"''";a="implode('', array("+b.join(",")+"))";return[a,Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.text_append=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);a=Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_ASSIGNMENT)||"''";return b+" .= "+a+";\n"};
|
||||
Blockly.PHP.text_join=function(a){if(0==a.itemCount_)return["''",Blockly.PHP.ORDER_ATOMIC];if(1==a.itemCount_)return a=Blockly.PHP.valueToCode(a,"ADD0",Blockly.PHP.ORDER_NONE)||"''",[a,Blockly.PHP.ORDER_FUNCTION_CALL];if(2==a.itemCount_){var b=Blockly.PHP.valueToCode(a,"ADD0",Blockly.PHP.ORDER_NONE)||"''";a=Blockly.PHP.valueToCode(a,"ADD1",Blockly.PHP.ORDER_NONE)||"''";return[b+" . "+a,Blockly.PHP.ORDER_ADDITION]}b=Array(a.itemCount_);for(var c=0;c<a.itemCount_;c++)b[c]=Blockly.PHP.valueToCode(a,
|
||||
"ADD"+c,Blockly.PHP.ORDER_COMMA)||"''";return["implode('', array("+b.join(",")+"))",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.text_append=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);a=Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_ASSIGNMENT)||"''";return b+" .= "+a+";\n"};
|
||||
Blockly.PHP.text_length=function(a){var b=Blockly.PHP.provideFunction_("length",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($value) {"," if (is_string($value)) {"," return strlen($value);"," } else {"," return count($value);"," }","}"]);a=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"''";return[b+"("+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.text_isEmpty=function(a){return["empty("+(Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"''")+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.text_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"strpos":"strrpos",c=Blockly.PHP.valueToCode(a,"FIND",Blockly.PHP.ORDER_NONE)||"''",d=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"''";if(a.workspace.options.oneBasedIndex)var e=" 0",g=" + 1";else e=" -1",g="";return[Blockly.PHP.provideFunction_("FIRST"==a.getFieldValue("END")?"text_indexOf":"text_lastIndexOf",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($text, $search) {"," $pos = "+b+"($text, $search);",
|
||||
" return $pos === false ? "+e+" : $pos"+g+";","}"])+"("+d+", "+c+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.text_indexOf=function(a){var b="FIRST"==a.getFieldValue("END")?"strpos":"strrpos",c=Blockly.PHP.valueToCode(a,"FIND",Blockly.PHP.ORDER_NONE)||"''",d=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"''";if(a.workspace.options.oneBasedIndex){var e=" 0";var f=" + 1"}else e=" -1",f="";return[Blockly.PHP.provideFunction_("FIRST"==a.getFieldValue("END")?"text_indexOf":"text_lastIndexOf",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($text, $search) {"," $pos = "+b+"($text, $search);",
|
||||
" return $pos === false ? "+e+" : $pos"+f+";","}"])+"("+d+", "+c+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.text_charAt=function(a){var b=a.getFieldValue("WHERE")||"FROM_START",c=Blockly.PHP.valueToCode(a,"VALUE","RANDOM"==b?Blockly.PHP.ORDER_NONE:Blockly.PHP.ORDER_COMMA)||"''";switch(b){case "FIRST":return["substr("+c+", 0, 1)",Blockly.PHP.ORDER_FUNCTION_CALL];case "LAST":return["substr("+c+", -1)",Blockly.PHP.ORDER_FUNCTION_CALL];case "FROM_START":return a=Blockly.PHP.getAdjusted(a,"AT"),["substr("+c+", "+a+", 1)",Blockly.PHP.ORDER_FUNCTION_CALL];case "FROM_END":return a=Blockly.PHP.getAdjusted(a,
|
||||
"AT",1,!0),["substr("+c+", "+a+", 1)",Blockly.PHP.ORDER_FUNCTION_CALL];case "RANDOM":return[Blockly.PHP.provideFunction_("text_random_letter",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($text) {"," return $text[rand(0, strlen($text) - 1)];","}"])+"("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL]}throw"Unhandled option (text_charAt).";};
|
||||
Blockly.PHP.text_getSubstring=function(a){var b=Blockly.PHP.valueToCode(a,"STRING",Blockly.PHP.ORDER_FUNCTION_CALL)||"''",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"!=c||"LAST"!=d){var e=Blockly.PHP.getAdjusted(a,"AT1");a=Blockly.PHP.getAdjusted(a,"AT2");b=Blockly.PHP.provideFunction_("text_get_substring",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($text, $where1, $at1, $where2, $at2) {"," if ($where1 == 'FROM_END') {"," $at1 = strlen($text) - 1 - $at1;"," } else if ($where1 == 'FIRST') {",
|
||||
" $at1 = 0;"," } else if ($where1 != 'FROM_START'){"," throw new Exception('Unhandled option (text_get_substring).');"," }"," $length = 0;"," if ($where2 == 'FROM_START') {"," $length = $at2 - $at1 + 1;"," } else if ($where2 == 'FROM_END') {"," $length = strlen($text) - $at1 - $at2;"," } else if ($where2 == 'LAST') {"," $length = strlen($text) - $at1;"," } else {"," throw new Exception('Unhandled option (text_get_substring).');"," }"," return substr($text, $at1, $length);",
|
||||
"}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")"}return[b,Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.text_changeCase=function(a){var b=Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_NONE)||"''";if("UPPERCASE"==a.getFieldValue("CASE"))var c="strtoupper("+b+")";else"LOWERCASE"==a.getFieldValue("CASE")?c="strtolower("+b+")":"TITLECASE"==a.getFieldValue("CASE")&&(c="ucwords(strtolower("+b+"))");return[c,Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.text_getSubstring=function(a){var b=Blockly.PHP.valueToCode(a,"STRING",Blockly.PHP.ORDER_FUNCTION_CALL)||"''",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"==c&&"LAST"==d)var e=b;else{e=Blockly.PHP.getAdjusted(a,"AT1");var f=Blockly.PHP.getAdjusted(a,"AT2");a=Blockly.PHP.provideFunction_("text_get_substring",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($text, $where1, $at1, $where2, $at2) {"," if ($where1 == 'FROM_END') {"," $at1 = strlen($text) - 1 - $at1;",
|
||||
" } else if ($where1 == 'FIRST') {"," $at1 = 0;"," } else if ($where1 != 'FROM_START'){"," throw new Exception('Unhandled option (text_get_substring).');"," }"," $length = 0;"," if ($where2 == 'FROM_START') {"," $length = $at2 - $at1 + 1;"," } else if ($where2 == 'FROM_END') {"," $length = strlen($text) - $at1 - $at2;"," } else if ($where2 == 'LAST') {"," $length = strlen($text) - $at1;"," } else {"," throw new Exception('Unhandled option (text_get_substring).');"," }",
|
||||
" return substr($text, $at1, $length);","}"]);e=a+"("+b+", '"+c+"', "+e+", '"+d+"', "+f+")"}return[e,Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.text_changeCase=function(a){var b,c=Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_NONE)||"''";"UPPERCASE"==a.getFieldValue("CASE")?b="strtoupper("+c+")":"LOWERCASE"==a.getFieldValue("CASE")?b="strtolower("+c+")":"TITLECASE"==a.getFieldValue("CASE")&&(b="ucwords(strtolower("+c+"))");return[b,Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
Blockly.PHP.text_trim=function(a){var b={LEFT:"ltrim",RIGHT:"rtrim",BOTH:"trim"}[a.getFieldValue("MODE")];a=Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_NONE)||"''";return[b+"("+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.text_print=function(a){return"print("+(Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_NONE)||"''")+");\n"};
|
||||
Blockly.PHP.text_prompt_ext=function(a){var b="readline("+(a.getField("TEXT")?Blockly.PHP.quote_(a.getFieldValue("TEXT")):Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_NONE)||"''")+")";"NUMBER"==a.getFieldValue("TYPE")&&(b="floatval("+b+")");return[b,Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.text_prompt=Blockly.PHP.text_prompt_ext;
|
||||
Blockly.PHP.text_count=function(a){var b=Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_MEMBER)||"''";a=Blockly.PHP.valueToCode(a,"SUB",Blockly.PHP.ORDER_NONE)||"''";return["strlen("+a+") === 0 ? strlen("+b+") + 1 : substr_count("+b+", "+a+")",Blockly.PHP.ORDER_CONDITIONAL]};
|
||||
Blockly.PHP.text_replace=function(a){var b=Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_MEMBER)||"''",c=Blockly.PHP.valueToCode(a,"FROM",Blockly.PHP.ORDER_NONE)||"''";a=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_NONE)||"''";return["str_replace("+c+", "+a+", "+b+")",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.text_reverse=function(a){return["strrev("+(Blockly.PHP.valueToCode(a,"TEXT",Blockly.PHP.ORDER_MEMBER)||"''")+")",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.loops={};
|
||||
Blockly.PHP.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.PHP.valueToCode(a,"TIMES",Blockly.PHP.ORDER_ASSIGNMENT)||"0",c=Blockly.PHP.statementToCode(a,"DO"),c=Blockly.PHP.addLoopTrap(c,a.id);a="";var d=Blockly.PHP.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE),e=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(e=Blockly.PHP.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),a+=e+" = "+b+";\n");return a+("for ("+
|
||||
d+" = 0; "+d+" < "+e+"; "+d+"++) {\n"+c+"}\n")};Blockly.PHP.controls_repeat=Blockly.PHP.controls_repeat_ext;Blockly.PHP.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.PHP.valueToCode(a,"BOOL",b?Blockly.PHP.ORDER_LOGICAL_NOT:Blockly.PHP.ORDER_NONE)||"false",d=Blockly.PHP.statementToCode(a,"DO"),d=Blockly.PHP.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"};
|
||||
Blockly.PHP.controls_for=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.PHP.valueToCode(a,"FROM",Blockly.PHP.ORDER_ASSIGNMENT)||"0",d=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"0",e=Blockly.PHP.valueToCode(a,"BY",Blockly.PHP.ORDER_ASSIGNMENT)||"1",g=Blockly.PHP.statementToCode(a,"DO"),g=Blockly.PHP.addLoopTrap(g,a.id);if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var f=parseFloat(c)<=parseFloat(d);
|
||||
a="for ("+b+" = "+c+"; "+b+(f?" <= ":" >= ")+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=a+("if ("+f+" > "+c+") {\n")+(Blockly.PHP.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+f+"; "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+"; "+b+" += "+d+") {\n"+g+"}\n";return a};
|
||||
Blockly.PHP.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.PHP.valueToCode(a,"TIMES",Blockly.PHP.ORDER_ASSIGNMENT)||"0";var c=Blockly.PHP.statementToCode(a,"DO"),c=Blockly.PHP.addLoopTrap(c,a.id),d="",e=Blockly.PHP.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);a=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(a=Blockly.PHP.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),d+=a+" = "+b+";\n");return d+("for ("+
|
||||
e+" = 0; "+e+" < "+a+"; "+e+"++) {\n"+c+"}\n")};Blockly.PHP.controls_repeat=Blockly.PHP.controls_repeat_ext;Blockly.PHP.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.PHP.valueToCode(a,"BOOL",b?Blockly.PHP.ORDER_LOGICAL_NOT:Blockly.PHP.ORDER_NONE)||"false",d=Blockly.PHP.statementToCode(a,"DO"),d=Blockly.PHP.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"};
|
||||
Blockly.PHP.controls_for=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);var c=Blockly.PHP.valueToCode(a,"FROM",Blockly.PHP.ORDER_ASSIGNMENT)||"0";var d=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"0",e=Blockly.PHP.valueToCode(a,"BY",Blockly.PHP.ORDER_ASSIGNMENT)||"1",f=Blockly.PHP.statementToCode(a,"DO"),f=Blockly.PHP.addLoopTrap(f,a.id);if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var g=parseFloat(c)<=parseFloat(d);
|
||||
a="for ("+b+" = "+c+"; "+b+(g?" <= ":" >= ")+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.PHP.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+=g+" = "+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=a+("if ("+g+" > "+c+") {\n")+(Blockly.PHP.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+g+"; "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+"; "+b+" += "+d+") {\n"+f+"}\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.logic={};Blockly.PHP.controls_if=function(a){var b=0,c="",d,e;do e=Blockly.PHP.valueToCode(a,"IF"+b,Blockly.PHP.ORDER_NONE)||"false",d=Blockly.PHP.statementToCode(a,"DO"+b),c+=(0<b?" else ":"")+"if ("+e+") {\n"+d+"}",++b;while(a.getInput("IF"+b));a.getInput("ELSE")&&(d=Blockly.PHP.statementToCode(a,"ELSE"),c+=" else {\n"+d+"}");return c+"\n"};Blockly.PHP.controls_ifelse=Blockly.PHP.controls_if;
|
||||
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.logic={};Blockly.PHP.controls_if=function(a){var b=0,c="";do{var d=Blockly.PHP.valueToCode(a,"IF"+b,Blockly.PHP.ORDER_NONE)||"false";var e=Blockly.PHP.statementToCode(a,"DO"+b);c+=(0<b?" else ":"")+"if ("+d+") {\n"+e+"}";++b}while(a.getInput("IF"+b));a.getInput("ELSE")&&(e=Blockly.PHP.statementToCode(a,"ELSE"),c+=" else {\n"+e+"}");return c+"\n"};Blockly.PHP.controls_ifelse=Blockly.PHP.controls_if;
|
||||
Blockly.PHP.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c="=="==b||"!="==b?Blockly.PHP.ORDER_EQUALITY:Blockly.PHP.ORDER_RELATIONAL,d=Blockly.PHP.valueToCode(a,"A",c)||"0";a=Blockly.PHP.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]};
|
||||
Blockly.PHP.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"&&":"||",c="&&"==b?Blockly.PHP.ORDER_LOGICAL_AND:Blockly.PHP.ORDER_LOGICAL_OR,d=Blockly.PHP.valueToCode(a,"A",c);a=Blockly.PHP.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.PHP.logic_negate=function(a){var b=Blockly.PHP.ORDER_LOGICAL_NOT;return["!"+(Blockly.PHP.valueToCode(a,"BOOL",b)||"true"),b]};
|
||||
Blockly.PHP.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.PHP.ORDER_ATOMIC]};Blockly.PHP.logic_null=function(a){return["null",Blockly.PHP.ORDER_ATOMIC]};Blockly.PHP.logic_ternary=function(a){var b=Blockly.PHP.valueToCode(a,"IF",Blockly.PHP.ORDER_CONDITIONAL)||"false",c=Blockly.PHP.valueToCode(a,"THEN",Blockly.PHP.ORDER_CONDITIONAL)||"null";a=Blockly.PHP.valueToCode(a,"ELSE",Blockly.PHP.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.PHP.ORDER_CONDITIONAL]};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user