2013-10-30 14:46:03 -07:00
/ * *
2014-01-28 03:00:09 -08:00
* @ license
2013-10-30 14:46:03 -07:00
* Visual Blocks Language
*
* Copyright 2012 Google Inc .
2014-10-07 13:09:55 -07:00
* https : //developers.google.com/blockly/
2013-10-30 14:46:03 -07:00
*
* 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 English strings .
* @ author fraser @ google . com ( Neil Fraser )
*
* After modifying this file , either run "build.py" from the parent directory ,
* or run ( from this directory ) :
* . . / i18n / js _to _json . py
* to regenerate json / { en , qqq , synonyms } . json .
*
* To convert all of the json files to . js files , run :
* . . / i18n / create _messages . py json / * . json
* /
'use strict' ;
goog . provide ( 'Blockly.Msg.en' ) ;
goog . require ( 'Blockly.Msg' ) ;
/ * *
* Due to the frequency of long strings , the 80 - column wrap rule need not apply
* to message files .
* /
/ * *
2016-02-29 15:02:05 -08:00
* Each message is preceded with a tripple - slash comment that becomes the
* message descriptor . The build process extracts these descriptors , adds
* them to msg / json / qqq . json , and they show up in the translation console .
2013-10-30 14:46:03 -07:00
* /
Feature/merge feb 2017 (#791)
* Revert "Rebuild nov 3 16"
* Move injected css to start of head
* simplification
* lint
* Remove copy/paste buttons.
* Localisation updates from https://translatewiki.net.
* Don't split dropdown text if there is an image.
* Unblock push to master.
* Revert "Revert "Rebuild nov 3 16""
This reverts commit c8ca24a0007b70e137417e843459c87185141a55.
* rebuild
* Remove ifelse block and messages'
* Remove obsolete Gecko image hack. Apparently this has been fixed in Gecko.
* Add correct focus behavior for the modal. Update boundary sounds.
* Disallow clicks on disabled buttons.
* add back metadata tag to qqq
* revert qqq.json
* Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging. This is a backport of the block drag surface from scratch-blocks. At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move. At the end of the drag, the blocks are dropped back in the svg in their new position.
* API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
* String reference in JSON string messages (#741)
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
* Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
* Fix compiler errors.
* Break the sidebar out into its own individual component.
* Hide notification messages after a short time interval.
* Fix selection border on blocks that have been highlighted.
* controls_ifelse: Remove right-align. Remove Boolean check on statements. (#749)
* Move away from using a common modal service, since the block options and the toolbox modals are going to end up behaving fairly differently.
* Fix conflict between 'utils' and 'image dropdown' merges.
* Add a contextual modal for the toolbox.
* Fix some bugs arising in the toolbox modal for the no-categories case.
* Allow attaching blocks to a marked spot from the toolbox modal. This is the last prerequisite for removal of the existing on-screen toolbox.
* Delete the on-screen toolbox.
* Add warning sounds when the user reaches a boundary of the workspace.
* Stop some blocks from throwing errors in headless workspaces.
* Lint
* Fix speling.
* Fix broken highlighting when highlighted block is deleted. Issue 752.
* When the workspace is empty, make it easy for the user to add a new group of blocks to it.
* Handle the finer points for setting focus correctly after deleting blocks from the workspace.
* When user edits text in a field, set text, not value.
Existing text-editable fields don’t care (dropdown care, but are not
text-editable). But a note picker needs to set its value to 60 if text
is set to ‘C4’.
* Set the text not the value when closing a text editor.
Also rename variables for clarity.
* Localisation updates from https://translatewiki.net.
* Streamline the logic for block selection callbacks in the toolbox modal.
* Do not show disabled actions in the block options modal.
* Set focus correctly when toolbox modal is dismissed.
* Add information regarding target screen reader and browser.
* Rebuild Blockly.
* Remove unavailable blocks from toolbox modal. Hide unnecessary category name in a toolbox without categories.
* Do some refactoring and tidy-up. Pull some hardcoded strings out for i18n purposes; remove unused strings.
* Update config options for sidebar buttons.
* Minor refactoring. Remove unused dependencies.
* Improve styling of sidebar buttons.
* Remove clipboard functionality.
* Refactor and simplify marked spot logic.
* Change dropdowns to select fields instead of lists of buttons.
* Add ability to specify a css class for labels and buttons
* Don't make labels clickable
* console.log -> console.warn
* change 'class' to 'web-style'
* createSvgElement is now in utils. fix two calls.
* Improve comments.
* lint
* fix missing semicolon
* When adding a new block group from the toolbox modal, only show blocks with no output connections.
* Clean up the sidebar file and remove unneeded code.
* Remove some functions from utilsService and consolidate code in workspace-tree.component.js.
* Standardize indentation.
* Remove premature focus on buttons in modal dialogs, since this prevents readout of the dialog text.
* Localisation updates from https://translatewiki.net.
* Don't get Toolbox element unless needed.
* Associate flyout button callbacks directly with workspaces
* Add colour block to the block factory base block initial state
* Start getting helpurl and tooltip in
* Generate helpURL and tooltip for Javascript block definition
* Use Tab keys instead of arrow keys for dialog boxes. Set role=alertdialog and read out the header/text automatically. Ensure that Esc key actually closes dialogs and that all keystrokes are captured.
* Add an aria-describedby to the 'create new block group...' button in the workspace to give more context.
* Fix issue with aria-liveregion not speaking. Allow sufficient time for alert noise to play before speaking the notification.
* Make zoom speed independent of event granularity
Before, touchpads would give "smoother" scrolling by delivering lots of
mousewheel events with small distance changes. Because the code only
looked at the sign of deltaY, ten 5px scrolls would zoom 10x more than
one 50px scroll.
This change makes zooming with a touchpad more like zooming with a
mousewheel. On my laptop, a full-scale zoom (fully out to fully in) was
about a 5mm finger movement before, and is now about 3cm.
Fixes #758.
* Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG. This paves the way to make performance
improvements to workspace dragging.
* remove overflow-y on the block exporter labels so scroll bars do not show upin firefox. Also fix up the styles on the labels so that they display better in firefox. (#699)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure w… (#700)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure why that was there.
Also replaces bad names on input. There are probably more invalid names but this is
a start.
* update generator comments
* Move the call to disable resize before placeNewBlock so that it is of… (#777)
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock. This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
* Disable workspace resizing while loading the flyout from XML
* Localisation updates from https://translatewiki.net.
* Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.
* Address code review comments
* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
* Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. (#787)
* Localisation updates from https://translatewiki.net.
* Change the Python codegen for string quoting to match the behaviour of `repr` on a string in CPython.
* Localisation updates from https://translatewiki.net.
* Add an `allInputsConnected` method to `Block` and `Workspace` to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off `develop` instead of `master` as per discussion in PR #791.
* Localisation updates from https://translatewiki.net.
* Localisation updates from https://translatewiki.net.
* Use the drag surface when scrolling using the scrollbars. #783 (#789)
* End event groups when you finish editing a field
* Fix #794 and make the workspace grid drag along with the workspace. (#801)
There was some IE specific code that also applies to Edge so just updated
a conditional to include Edge.
* Now that text input's setText skips setValue, it needs to explicitly create a change event
* Check if the text has changed before firing an event
* Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory
* Routine rebuild
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Add a block to reverse a list (#844)
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Fix a few small errors and rebuild
* Call dynamic toolbox generators correctly
* cleanup
* Fix unit tests, and delete a few that relied on completely undefined behaviour
* Fix RTL text inputs
* eslintignore more tests
* Fix insertion marker highlighting, I think
* Make getFlyout public
2017-02-21 12:09:23 -08:00
/// {{Notranslate}} Hue value for all logic blocks.
Blockly . Msg . LOGIC _HUE = '210' ;
/// {{Notranslate}} Hue value for all loop blocks.
Blockly . Msg . LOOPS _HUE = '120' ;
/// {{Notranslate}} Hue value for all math blocks.
Blockly . Msg . MATH _HUE = '230' ;
/// {{Notranslate}} Hue value for all text blocks.
Blockly . Msg . TEXTS _HUE = '160' ;
/// {{Notranslate}} Hue value for all list blocks.
Blockly . Msg . LISTS _HUE = '260' ;
/// {{Notranslate}} Hue value for all colour blocks.
Blockly . Msg . COLOUR _HUE = '20' ;
/// {{Notranslate}} Hue value for all variable blocks.
Blockly . Msg . VARIABLES _HUE = '330' ;
/// {{Notranslate}} Hue value for all procedure blocks.
Blockly . Msg . PROCEDURES _HUE = '290' ;
2013-10-30 14:46:03 -07:00
/// default name - A simple, general default name for a variable, preferably short.
/// For more context, see
2015-02-23 14:34:39 -08:00
/// [[Translating:Blockly#infrequent_message_types]].\n{{Identical|Item}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . VARIABLES _DEFAULT _NAME = 'item' ;
2016-05-04 17:25:13 -07:00
/// button text - Button that sets a calendar to today's date.\n{{Identical|Today}}
2015-02-05 13:07:13 -08:00
Blockly . Msg . TODAY = 'Today' ;
2013-10-30 14:46:03 -07:00
// Context menus.
2015-02-23 14:34:39 -08:00
/// context menu - Make a copy of the selected block (and any blocks it contains).\n{{Identical|Duplicate}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . DUPLICATE _BLOCK = 'Duplicate' ;
/// context menu - Add a descriptive comment to the selected block.
Blockly . Msg . ADD _COMMENT = 'Add Comment' ;
/// context menu - Remove the descriptive comment from the selected block.
Blockly . Msg . REMOVE _COMMENT = 'Remove Comment' ;
/// context menu - Change from 'external' to 'inline' mode for displaying blocks used as inputs to the selected block. See [[Translating:Blockly#context_menus]].
Blockly . Msg . EXTERNAL _INPUTS = 'External Inputs' ;
/// context menu - Change from 'internal' to 'external' mode for displaying blocks used as inputs to the selected block. See [[Translating:Blockly#context_menus]].
Blockly . Msg . INLINE _INPUTS = 'Inline Inputs' ;
/// context menu - Permanently delete the selected block.
Blockly . Msg . DELETE _BLOCK = 'Delete Block' ;
/// context menu - Permanently delete the %1 selected blocks.\n\nParameters:\n* %1 - an integer greater than 1.
Blockly . Msg . DELETE _X _BLOCKS = 'Delete %1 Blocks' ;
2015-12-02 22:10:09 -08:00
/// confirmation prompt - Question the user if they really wanted to permanently delete all %1 blocks.\n\nParameters:\n* %1 - an integer greater than 1.
Blockly . Msg . DELETE _ALL _BLOCKS = 'Delete all %1 blocks?' ;
2015-10-09 19:22:22 -07:00
/// context menu - Reposition all the blocks so that they form a neat line.
Blockly . Msg . CLEAN _UP = 'Clean up Blocks' ;
2013-10-30 14:46:03 -07:00
/// context menu - Make the appearance of the selected block smaller by hiding some information about it.
Blockly . Msg . COLLAPSE _BLOCK = 'Collapse Block' ;
2015-10-09 19:22:22 -07:00
/// context menu - Make the appearance of all blocks smaller by hiding some information about it. Use the same terminology as in the previous message.
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLLAPSE _ALL = 'Collapse Blocks' ;
/// context menu - Restore the appearance of the selected block by showing information about it that was hidden (collapsed) earlier.
Blockly . Msg . EXPAND _BLOCK = 'Expand Block' ;
2015-10-09 19:22:22 -07:00
/// context menu - Restore the appearance of all blocks by showing information about it that was hidden (collapsed) earlier. Use the same terminology as in the previous message.
2013-10-30 14:46:03 -07:00
Blockly . Msg . EXPAND _ALL = 'Expand Blocks' ;
/// context menu - Make the selected block have no effect (unless reenabled).
Blockly . Msg . DISABLE _BLOCK = 'Disable Block' ;
/// context menu - Make the selected block have effect (after having been disabled earlier).
Blockly . Msg . ENABLE _BLOCK = 'Enable Block' ;
/// context menu - Provide helpful information about the selected block.\n{{Identical|Help}}
Blockly . Msg . HELP = 'Help' ;
2016-03-17 14:44:26 -07:00
/// context menu - Undo the previous action.\n{{Identical|Undo}}
Blockly . Msg . UNDO = 'Undo' ;
/// context menu - Undo the previous undo action.\n{{Identical|Redo}}
Blockly . Msg . REDO = 'Redo' ;
2017-10-12 10:18:52 -07:00
/// context menu - Edit the currently selected procedure.
Blockly . Msg . EDIT _PROCEDURE = 'Edit' ;
2013-10-30 14:46:03 -07:00
2017-10-12 13:39:24 -07:00
// TODO(#1136): Pick text for this.
/// context menu - Bring the definition of the procedure into view.
Blockly . Msg . SHOW _PROCEDURE _DEFINITION = 'Go to definition' ;
2013-10-30 14:46:03 -07:00
// Variable renaming.
/// prompt - This message is only seen in the Opera browser. With most browsers, users can edit numeric values in blocks by just clicking and typing. Opera does not allows this, so we have to open a new window and prompt users with this message to chanage a value.
Blockly . Msg . CHANGE _VALUE _TITLE = 'Change value:' ;
2014-10-15 14:44:31 -07:00
/// dropdown choice - When the user clicks on a variable block, this is one of the dropdown menu choices. It is used to rename the current variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].
2017-12-20 18:28:25 -05:00
Blockly . Msg . RENAME _VARIABLE = 'Rename variable' ;
2014-10-15 14:44:31 -07:00
/// prompt - Prompts the user to enter the new name for the selected variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].\n\nParameters:\n* %1 - the name of the variable to be renamed.
2013-10-30 14:46:03 -07:00
Blockly . Msg . RENAME _VARIABLE _TITLE = 'Rename all "%1" variables to:' ;
2016-08-12 11:09:32 -07:00
2016-08-17 16:08:38 -07:00
// Variable creation
/// button text - Text on the button used to launch the variable creation dialogue.
2017-12-20 18:28:25 -05:00
Blockly . Msg . NEW _VARIABLE = 'Make a Variable' ;
2016-08-17 16:08:38 -07:00
/// prompt - Prompts the user to enter the name for a new variable. See [https://github.com/google/blockly/wiki/Variables#dropdown-menu https://github.com/google/blockly/wiki/Variables#dropdown-menu].
Blockly . Msg . NEW _VARIABLE _TITLE = 'New variable name:' ;
/// alert - Tells the user that the name they entered is already in use.
2017-07-18 22:47:52 -07:00
Blockly . Msg . VARIABLE _ALREADY _EXISTS = 'A variable named "%1" already exists.' ;
/// alert - Tells the user that the name they entered is already in use for another type.
Blockly . Msg . VARIABLE _ALREADY _EXISTS _FOR _ANOTHER _TYPE = 'A variable named "%1" already exists for another variable of type "%2".' ;
2017-05-22 13:08:22 -07:00
/// alert - Tells the user that the name they entered is already in use for a procedure.
2017-07-18 22:47:52 -07:00
Blockly . Msg . PROCEDURE _ALREADY _EXISTS = 'A procedure named "%1" already exists.' ;
2016-08-17 16:08:38 -07:00
2017-11-15 13:05:39 -05:00
// Custom procedure creation
/// button text - Text on the button used to launch the procedure creation dialogue.
2017-12-20 18:28:25 -05:00
Blockly . Msg . NEW _PROCEDURE = 'Make a Block' ;
2017-11-15 13:05:39 -05:00
2017-07-06 18:00:33 -07:00
// List creation
/// button text - Text on the button used to launch the list creation dialogue.
2017-12-20 18:28:25 -05:00
Blockly . Msg . NEW _LIST = 'Make a List' ;
2017-11-20 14:09:17 -05:00
/// prompt - Prompts the user to enter the name for a new list
Blockly . Msg . NEW _LIST _TITLE = 'New list name:' ;
2017-07-06 18:00:33 -07:00
2017-11-20 11:45:27 -05:00
// Broadcast Message creation
/// dropdown choice - Create a new message.
2017-12-20 18:28:25 -05:00
Blockly . Msg . NEW _BROADCAST _MESSAGE = 'New message' ;
2017-11-20 14:09:17 -05:00
/// prompt - Prompts the user to enter the name for a new broadcast message
Blockly . Msg . NEW _BROADCAST _MESSAGE _TITLE = 'New message name:' ;
2017-11-20 12:05:55 -05:00
/// default broadcast message name
/// (default option in broadcast message dropdown menus)
Blockly . Msg . DEFAULT _BROADCAST _MESSAGE _NAME = 'message1' ;
2017-11-20 11:45:27 -05:00
2016-08-12 11:09:32 -07:00
// Variable deletion.
2016-08-09 17:17:08 -07:00
/// confirm - Ask the user to confirm their deletion of multiple uses of a variable.
2016-08-12 11:09:32 -07:00
Blockly . Msg . DELETE _VARIABLE _CONFIRMATION = 'Delete %1 uses of the "%2" variable?' ;
Merge google/blockly, May 2017 (#881)
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Option for moving one block from stack.
See thread in support group before merging.
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Expand stack-drag modifier key to include alt and ctrl.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* Localisation updates from https://translatewiki.net.
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Localisation updates from https://translatewiki.net.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Temporary fix for broken text field validation.
* rebuild
* Add a block to reverse a list (#844)
* Localisation updates from https://translatewiki.net.
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* Localisation updates from https://translatewiki.net.
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Localisation updates from https://translatewiki.net.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Localisation updates from https://translatewiki.net.
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* Potential bug fix for issue #661
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Clarification update.
Unraveling nested ternaries in Blockly.utils.tokenizeInterpolation_()
* Code correction from previous commit. Moved style to css.js and set ROUNDING=15;
* Fixing Enter so it properly propogates to dropdown selection. (#934)
Fixing FieldSegment so it updates dropdowns when the underlying dropdown changes.
* Localisation updates from https://translatewiki.net.
* Make variable add set/get block in context menu obey block limits
* Localisation updates from https://translatewiki.net.
* Use mutator extension for controls_if block
* Fix #946. Don't check for presence of constants.js
* Fix #945 (annotations) and an eslint issue (constant condition)
* Localisation updates from https://translatewiki.net.
* Fix #950: BlockFactory typo and copypasta
* Add safety checks for mutators and non-mutator extensions
* Handle mutations with both mixins and functions
* Adding warning on duplicate JSON block definition.
* period
* Make some functions private and add tests
* Localisation updates from https://translatewiki.net.
* Update help URL per #937.
Replace URL usages of %28 and %29 with normal parenthesis characters. (They aren't replaced by JavaScript's encodeURIComponent() function, and seem to work just fine without them.)
Added missing semicolon in build.py.
* Typo in comment.
* Make it easier to read the code that creates the variable category in the tolbox
* Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
* Annotation fixes
* Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964)
* Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899)
* Adding new minimap demo
* Basic code style changes. Adding a few more comments. Return early if disableScrollChange in onScrollChange listener.
* `unction` to `function` corrects #962 (#970)
* Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904. This calls blur and focus from workspace.markFocused and removes the event listener on focus events. markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus. As far as I can tell, there are no uses of the focus handler that actually did anything for us.
* Localisation updates from https://translatewiki.net.
* Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974)
* Adding horizontal scrolling. Changed scroll change callbacks from onScroll_ to setHandlePosition. onScroll_ is not challed when workspace is dragged.
* set background color to lilac if opening the playground from file:
* Registering mousemove and mouseup listener in mousedown event. Mousemove and Mouseup events are now listening over document.
* Localisation updates from https://translatewiki.net.
* Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9ff308ff5e361cf77acabb61a4bf4695). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979)
* Fix #969
* Localisation updates from https://translatewiki.net.
* Fix #986. Looks like the original PR just forgot this block. (#992)
* rebuild develop (#996)
* Added the variable modal and component and implemented basic renaming functionality. (#991)
* Fixing commenting from the last commit. (#1000)
* Localisation updates from https://translatewiki.net.
* RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead.
* Adding the remove variable modal and functionality to accessible Blockly. (#1011)
* Minimap position bug fix for browsers other than chrome. Added touch support.
* Adding an add variable modal to accessible Blockly. (#1015)
* Adding the remove variable modal and functionality to accessible Blockly.
* Adding the add variable modal for accessible Blockly.
* Block browser context menu in the toolbox and flyout
* Add links to the dev registration form and contributor guidelines
* Miscellaneous comment cleanup
* Adding the common modal class. (#1017)
Centralizes accessible modal behavior.
* - Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages
- Fixed bug with js_to_json.py script where it didn't recognize ' character
* - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
* Making text_count use a text color (like text_length, which also returns a number). (#1027)
* Enable google/blockly with continuous build on travis ci (#1023) (#1035)
* create .travis for ci job
* initial checkin for blocky-web travis ci job
* rename file to .travis.yaml for typo
* remove after_script
* added cache
* rename .travis.yaml to .travis.yml
* Update .travis.yml
* include build script
* fix yaml file format issue
* debug install part
* debug build issue
* Update .travis.yml
* remove cache for now
* Update .travis.yml
* Update .travis.yml
* Update .travis.yml
* more debug info
* Update .travis.yml
* Update .travis.yml
* fix typo
* installing chrome browser
* remove chrome setting config
* run build.py as part of npm install
* Update .travis.yml
* update karma dependency
* use karma as test runner
* fix typo
* remove karma test for now
* Update .travis.yml
* Update package.json
* add npm test target
* add browserstack-runner depdendency
* update browser support
* fix typo for test target
* fix chrome typo
* added closure dependency
* add google-closure-library
* include blockly_uncompressed.js and core.js dependency
* uncomment out core/*.js files
* add kama job as part of install
* remove browserstack add on for now
* fix karma config typo
* add karma-closure
* add os support
* remove typo config
* include more closure files
* change os back to linux
* use closure-library from node_modules
* change log level back to INFO
* change npm test target to use open browser command instead of karma
* change travis test target to use open command instead of karma
* list current directory
* find what's in current dir
* typo command
* Update .travis.yml
* typo again
* open right index.html
* use right path for index.html
* xdg-open to open default browser on travis
* exit browser after 5s wait
* change timeout to 1 min
* exit after opening up browser
* use browser only
* use karma
* remove un-needed dependency
* clean up script section
* fix typo
* update build status on readme
* initial commit for selenium integration tests
* update selenium jar path
* fix test_runner.js typo
* add more debug info
* check java version
* add && instead of 9288
* fix java path
* add logic to check if selenium is running or not
* add some deugging info
* initial commit to get chromedriver
* add chromedriver flag
* add get_chromedriver.sh to package.json and .travel
* change browser to chrome for now
* fix path issue
* update chromdriver path
* fix path issue again
* more debugging
* add debug msg
* fix typo
* minor fix for getting chromedriver
* install latest chrome browser
* clean up pakcage.json
* use npm target for test run
* remove removing trailing comma
* fix another trailing comma
* updated travis test target
* clean up scripts
* not sure nmp run preinstall
* redirect selenium log to tmp file
* revert writing console log to file
* update test summary
* more clean up
* minor clean up before pull request
* resolved closure-library conflict
1. add closure-library to dependencies instead of devDependencies.
2. add lint back in scripts block
* fix typo (adding comma) in script section
* Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
* Ensure useDragSurface is a boolean.
Fixed #988
* use pretest instead of preinstall in package.json (#1043)
* cherry pick for pretest fix
* put pretest target to test_setup.sh
* fix conflict
* cherry pick for get_chromedriver.sh
* add some sleep to wait download to finish
* use node.js stable
* use npm test target
* field_angle renders degree symbol consistently.
Fixes #973
* bumpNeighbours_ function moved to block_svg.
Fixed #1009
* Update RegEx in js-to-json to match windowi eol (#1050)
The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match.
* Fix French translation of "colour with rgb" block (#1053)
"colorier", which is currently used, is a verb and proposed "couleur" is
a noun: the block in question does not change colour of anything, it
creates new colour instead, thus noun is more applicable.
Also, noun is used in French translation of "random colour" block:
"couleur aléatoire".
* Enforcing non-empty names on value inputs and statement inputs. (#1054)
* Correcting #1054 (#1056)
single quotes. better logic.
* Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
* Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors. The old way was quite slow because it changed the stylesheet directly. See issue #981 for more details on implementation and tradeoffs. This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
* Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059)
* Merge master into develop (#1063)
- pick up translation changes
- clean up trailing spaces
* use goog.string.startswith instead of string.startswith (#1065)
* New jsinterpreter demo includes wait block. Both demos have improved UI for clarity. (#1001)
Refactor of interpreter demo
* Renamed demos/interpreter/index.html as demos/interpreter/step-execution.html (including redirect), and added demos/interpreter/async-execution.html.
* Refactored code to automatically generate/parse the blocks, eliminating the need for a "Parse JavaScript" button. Code is still shown in alert upon stepping to the first statement. Print statements now write to output <textarea> instead of modal dialogs.
* Fix #1069 (#1073)
* Fix cursor and mistaken css from merge
* Comment out broken field angle merge
* Fix broken merge with borders
* Add back original package json (woops)
* Remove render function for field angle, may not be the right way but it was broken...
* Revert merge blocking variable shadow blocks
* Add changes from built lang files
* Add back travis and readme
* Revert broken cleanup additions
* Add notes for scratch-block specific functions
* Revert change to css so blocks stay under the toolbox
* Add back accidentally removed files
* Use getFlyout_ instead of getFlyout everywhere
* Satisfy the linter
* Re-remove deprecated function
* Remove duplicated code in block_svg
* Add back flip_rtl option for images
* Remove more duplicated functions from past merges
* Fix flip_rtl code
* Revert renaming of getFlyout
2017-05-11 15:58:18 -04:00
/// alert - Tell the user that they can't delete a variable because it's part of the definition of a function.
Blockly . Msg . CANNOT _DELETE _VARIABLE _PROCEDURE = 'Can\'t delete the variable "%1" because it\'s part of the definition of the function "%2"' ;
2016-08-12 11:09:32 -07:00
/// dropdown choice - Delete the currently selected variable.
Blockly . Msg . DELETE _VARIABLE = 'Delete the "%1" variable' ;
2013-10-30 14:46:03 -07:00
// Colour Blocks.
/// url - Information about colour.
2013-11-25 17:33:36 -08:00
Blockly . Msg . COLOUR _PICKER _HELPURL = 'https://en.wikipedia.org/wiki/Color' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Colour#picking-a-colour-from-a-palette https://github.com/google/blockly/wiki/Colour#picking-a-colour-from-a-palette].
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _PICKER _TOOLTIP = 'Choose a colour from the palette.' ;
/// url - A link that displays a random colour each time you visit it.
Blockly . Msg . COLOUR _RANDOM _HELPURL = 'http://randomcolour.com' ;
/// block text - Title of block that generates a colour at random.
Blockly . Msg . COLOUR _RANDOM _TITLE = 'random colour' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Colour#generating-a-random-colour https://github.com/google/blockly/wiki/Colour#generating-a-random-colour].
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _RANDOM _TOOLTIP = 'Choose a colour at random.' ;
/// url - A link for color codes with percentages (0-100%) for each component, instead of the more common 0-255, which may be more difficult for beginners.
Blockly . Msg . COLOUR _RGB _HELPURL = 'http://www.december.com/html/spec/colorper.html' ;
2014-10-15 14:44:31 -07:00
/// block text - Title of block for [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _RGB _TITLE = 'colour with' ;
2014-10-15 14:44:31 -07:00
/// block input text - The amount of red (from 0 to 100) to use when [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].\n{{Identical|Red}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _RGB _RED = 'red' ;
2014-10-15 14:44:31 -07:00
/// block input text - The amount of green (from 0 to 100) to use when [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _RGB _GREEN = 'green' ;
2014-10-15 14:44:31 -07:00
/// block input text - The amount of blue (from 0 to 100) to use when [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].\n{{Identical|Blue}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _RGB _BLUE = 'blue' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components https://github.com/google/blockly/wiki/Colour#creating-a-colour-from-red-green-and-blue-components].
2014-11-14 14:21:03 -08:00
Blockly . Msg . COLOUR _RGB _TOOLTIP = 'Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100.' ;
2013-10-30 14:46:03 -07:00
/// url - A useful link that displays blending of two colors.
Blockly . Msg . COLOUR _BLEND _HELPURL = 'http://meyerweb.com/eric/tools/color-blend/' ;
/// block text - A verb for blending two shades of paint.
Blockly . Msg . COLOUR _BLEND _TITLE = 'blend' ;
2014-10-15 14:44:31 -07:00
/// block input text - The first of two colours to [https://github.com/google/blockly/wiki/Colour#blending-colours blend].
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _BLEND _COLOUR1 = 'colour 1' ;
2014-10-15 14:44:31 -07:00
/// block input text - The second of two colours to [https://github.com/google/blockly/wiki/Colour#blending-colours blend].
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _BLEND _COLOUR2 = 'colour 2' ;
2015-07-23 13:09:06 -07:00
/// block input text - The proportion of the [https://github.com/google/blockly/wiki/Colour#blending-colours blend] containing the first color; the remaining proportion is of the second colour. For example, if the first colour is red and the second color blue, a ratio of 1 would yield pure red, a ratio of .5 would yield purple (equal amounts of red and blue), and a ratio of 0 would yield pure blue.\n{{Identical|Ratio}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _BLEND _RATIO = 'ratio' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Colour#blending-colours https://github.com/google/blockly/wiki/Colour#blending-colours].
2013-10-30 14:46:03 -07:00
Blockly . Msg . COLOUR _BLEND _TOOLTIP = 'Blends two colours together with a given ratio (0.0 - 1.0).' ;
2017-10-23 16:36:17 -04:00
/// dropdown - Label of the "hue" color component slider
Blockly . Msg . COLOUR _HUE _LABEL = 'Color' ;
/// dropdown - Label of the "saturation" color component slider
Blockly . Msg . COLOUR _SATURATION _LABEL = 'Saturation' ;
/// dropdown - Label of the "brightness" color component slider
Blockly . Msg . COLOUR _BRIGHTNESS _LABEL = 'Brightness' ;
2013-10-30 14:46:03 -07:00
// Loop Blocks.
2013-11-25 17:33:36 -08:00
/// url - Describes 'repeat loops' in computer programs; consider using the translation of the page [https://en.wikipedia.org/wiki/Control_flow http://en.wikipedia.org/wiki/Control_flow].
Blockly . Msg . CONTROLS _REPEAT _HELPURL = 'https://en.wikipedia.org/wiki/For_loop' ;
2014-09-18 16:52:00 -07:00
/// block input text - Title of [https://github.com/google/blockly/wiki/Loops#repeat repeat block].\n\nParameters:\n* %1 - the number of times the body of the loop should be repeated.
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _REPEAT _TITLE = 'repeat %1 times' ;
2015-07-23 13:09:06 -07:00
/// block text - Preceding the blocks in the body of the loop. See [https://github.com/google/blockly/wiki/Loops https://github.com/google/blockly/wiki/Loops].\n{{Identical|Do}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _REPEAT _INPUT _DO = 'do' ;
2014-09-18 16:52:00 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat https://github.com/google/blockly/wiki/Loops#repeat].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _REPEAT _TOOLTIP = 'Do some statements several times.' ;
2013-12-20 16:25:26 -08:00
/// url - Describes 'while loops' in computer programs; consider using the translation of [https://en.wikipedia.org/wiki/While_loop https://en.wikipedia.org/wiki/While_loop], if present, or [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow].
2014-09-18 16:52:00 -07:00
Blockly . Msg . CONTROLS _WHILEUNTIL _HELPURL = 'https://github.com/google/blockly/wiki/Loops#repeat' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _WHILEUNTIL _INPUT _DO = Blockly . Msg . CONTROLS _REPEAT _INPUT _DO ;
2014-10-15 14:44:31 -07:00
/// dropdown - Specifies that a loop should [https://github.com/google/blockly/wiki/Loops#repeat-while repeat while] the following condition is true.
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _WHILEUNTIL _OPERATOR _WHILE = 'repeat while' ;
2014-10-15 14:44:31 -07:00
/// dropdown - Specifies that a loop should [https://github.com/google/blockly/wiki/Loops#repeat-until repeat until] the following condition becomes true.
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _WHILEUNTIL _OPERATOR _UNTIL = 'repeat until' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat-while Loops#repeat-while https://github.com/google/blockly/wiki/Loops#repeat-while Loops#repeat-while].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _WHILEUNTIL _TOOLTIP _WHILE = 'While a value is true, then do some statements.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Loops#repeat-until https://github.com/google/blockly/wiki/Loops#repeat-until].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _WHILEUNTIL _TOOLTIP _UNTIL = 'While a value is false, then do some statements.' ;
2013-12-20 16:25:26 -08:00
/// url - Describes 'for loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/For_loop https://en.wikipedia.org/wiki/For_loop], if present.
2014-10-15 14:44:31 -07:00
Blockly . Msg . CONTROLS _FOR _HELPURL = 'https://github.com/google/blockly/wiki/Loops#count-with' ;
/// tooltip - See [https://github.com/google/blockly/wiki/Loops#count-with https://github.com/google/blockly/wiki/Loops#count-with].\n\nParameters:\n* %1 - the name of the loop variable.
2015-06-10 18:45:15 -07:00
Blockly . Msg . CONTROLS _FOR _TOOLTIP = 'Have the variable "%1" take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.' ;
2015-06-08 15:54:18 -07:00
/// block text - Repeatedly counts a variable (%1)
/// starting with a (usually lower) number in a range (%2),
/// ending with a (usually higher) number in a range (%3), and counting the
/// iterations by a number of steps (%4). As in
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Loops#count-with
/// https://github.com/google/blockly/wiki/Loops#count-with].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-count-with.png]]
2015-06-08 15:54:18 -07:00
Blockly . Msg . CONTROLS _FOR _TITLE = 'count with %1 from %2 to %3 by %4' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _FOR _INPUT _DO = Blockly . Msg . CONTROLS _REPEAT _INPUT _DO ;
2013-12-20 16:25:26 -08:00
/// url - Describes 'for-each loops' in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Foreach https://en.wikipedia.org/wiki/Foreach] if present.
2015-06-10 18:45:15 -07:00
Blockly . Msg . CONTROLS _FOREACH _HELPURL = 'https://github.com/google/blockly/wiki/Loops#for-each' ;
2014-10-15 14:44:31 -07:00
/// block text - Title of [https://github.com/google/blockly/wiki/Loops#for-each for each block].
2015-06-10 18:45:15 -07:00
/// Sequentially assigns every item in array %2 to the valiable %1.
Blockly . Msg . CONTROLS _FOREACH _TITLE = 'for each item %1 in list %2' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _FOREACH _INPUT _DO = Blockly . Msg . CONTROLS _REPEAT _INPUT _DO ;
2014-10-15 14:44:31 -07:00
/// block text - Description of [https://github.com/google/blockly/wiki/Loops#for-each for each blocks].\n\nParameters:\n* %1 - the name of the loop variable.
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _FOREACH _TOOLTIP = 'For each item in a list, set the variable "%1" to the item, and then do some statements.' ;
2013-12-20 16:25:26 -08:00
/// url - Describes control flow in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/Control_flow https://en.wikipedia.org/wiki/Control_flow], if it exists.
2014-10-15 14:44:31 -07:00
Blockly . Msg . CONTROLS _FLOW _STATEMENTS _HELPURL = 'https://github.com/google/blockly/wiki/Loops#loop-termination-blocks' ;
2014-09-18 16:52:00 -07:00
/// dropdown - The current loop should be exited. See [https://github.com/google/blockly/wiki/Loops#break https://github.com/google/blockly/wiki/Loops#break].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _FLOW _STATEMENTS _OPERATOR _BREAK = 'break out of loop' ;
2014-10-15 14:44:31 -07:00
/// dropdown - The current iteration of the loop should be ended and the next should begin. See [https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _FLOW _STATEMENTS _OPERATOR _CONTINUE = 'continue with next iteration of loop' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Loops#break-out-of-loop https://github.com/google/blockly/wiki/Loops#break-out-of-loop].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _FLOW _STATEMENTS _TOOLTIP _BREAK = 'Break out of the containing loop.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration https://github.com/google/blockly/wiki/Loops#continue-with-next-iteration].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _FLOW _STATEMENTS _TOOLTIP _CONTINUE = 'Skip the rest of this loop, and continue with the next iteration.' ;
2014-10-15 14:44:31 -07:00
/// warning - The user has tried placing a block outside of a loop (for each, while, repeat, etc.), but this type of block may only be used within a loop. See [https://github.com/google/blockly/wiki/Loops#loop-termination-blocks https://github.com/google/blockly/wiki/Loops#loop-termination-blocks].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _FLOW _STATEMENTS _WARNING = 'Warning: This block may only be used within a loop.' ;
// Logic Blocks.
2013-12-20 16:25:26 -08:00
/// url - Describes conditional statements (if-then-else) in computer programs. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_else https://en.wikipedia.org/wiki/If_else], if present.
2014-10-15 17:02:22 -07:00
Blockly . Msg . CONTROLS _IF _HELPURL = 'https://github.com/google/blockly/wiki/IfElse' ;
2014-10-15 14:44:31 -07:00
/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-blocks 'if' blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present.
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _IF _TOOLTIP _1 = 'If a value is true, then do some statements.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-else-blocks if-else blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present.
2014-11-14 14:21:03 -08:00
Blockly . Msg . CONTROLS _IF _TOOLTIP _2 = 'If a value is true, then do the first block of statements. Otherwise, do the second block of statements.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-else-if-blocks if-else-if blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present.
2014-11-14 14:21:03 -08:00
Blockly . Msg . CONTROLS _IF _TOOLTIP _3 = 'If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#if-else-if-else-blocks if-else-if-else blocks]. Consider using your language's translation of [https://en.wikipedia.org/wiki/If_statement https://en.wikipedia.org/wiki/If_statement], if present.
2014-11-14 14:21:03 -08:00
Blockly . Msg . CONTROLS _IF _TOOLTIP _4 = 'If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.' ;
2014-09-18 16:52:00 -07:00
/// block text - See [https://github.com/google/blockly/wiki/IfElse https://github.com/google/blockly/wiki/IfElse].
Feature/merge feb 2017 (#791)
* Revert "Rebuild nov 3 16"
* Move injected css to start of head
* simplification
* lint
* Remove copy/paste buttons.
* Localisation updates from https://translatewiki.net.
* Don't split dropdown text if there is an image.
* Unblock push to master.
* Revert "Revert "Rebuild nov 3 16""
This reverts commit c8ca24a0007b70e137417e843459c87185141a55.
* rebuild
* Remove ifelse block and messages'
* Remove obsolete Gecko image hack. Apparently this has been fixed in Gecko.
* Add correct focus behavior for the modal. Update boundary sounds.
* Disallow clicks on disabled buttons.
* add back metadata tag to qqq
* revert qqq.json
* Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging. This is a backport of the block drag surface from scratch-blocks. At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move. At the end of the drag, the blocks are dropped back in the svg in their new position.
* API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
* String reference in JSON string messages (#741)
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
* Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
* Fix compiler errors.
* Break the sidebar out into its own individual component.
* Hide notification messages after a short time interval.
* Fix selection border on blocks that have been highlighted.
* controls_ifelse: Remove right-align. Remove Boolean check on statements. (#749)
* Move away from using a common modal service, since the block options and the toolbox modals are going to end up behaving fairly differently.
* Fix conflict between 'utils' and 'image dropdown' merges.
* Add a contextual modal for the toolbox.
* Fix some bugs arising in the toolbox modal for the no-categories case.
* Allow attaching blocks to a marked spot from the toolbox modal. This is the last prerequisite for removal of the existing on-screen toolbox.
* Delete the on-screen toolbox.
* Add warning sounds when the user reaches a boundary of the workspace.
* Stop some blocks from throwing errors in headless workspaces.
* Lint
* Fix speling.
* Fix broken highlighting when highlighted block is deleted. Issue 752.
* When the workspace is empty, make it easy for the user to add a new group of blocks to it.
* Handle the finer points for setting focus correctly after deleting blocks from the workspace.
* When user edits text in a field, set text, not value.
Existing text-editable fields don’t care (dropdown care, but are not
text-editable). But a note picker needs to set its value to 60 if text
is set to ‘C4’.
* Set the text not the value when closing a text editor.
Also rename variables for clarity.
* Localisation updates from https://translatewiki.net.
* Streamline the logic for block selection callbacks in the toolbox modal.
* Do not show disabled actions in the block options modal.
* Set focus correctly when toolbox modal is dismissed.
* Add information regarding target screen reader and browser.
* Rebuild Blockly.
* Remove unavailable blocks from toolbox modal. Hide unnecessary category name in a toolbox without categories.
* Do some refactoring and tidy-up. Pull some hardcoded strings out for i18n purposes; remove unused strings.
* Update config options for sidebar buttons.
* Minor refactoring. Remove unused dependencies.
* Improve styling of sidebar buttons.
* Remove clipboard functionality.
* Refactor and simplify marked spot logic.
* Change dropdowns to select fields instead of lists of buttons.
* Add ability to specify a css class for labels and buttons
* Don't make labels clickable
* console.log -> console.warn
* change 'class' to 'web-style'
* createSvgElement is now in utils. fix two calls.
* Improve comments.
* lint
* fix missing semicolon
* When adding a new block group from the toolbox modal, only show blocks with no output connections.
* Clean up the sidebar file and remove unneeded code.
* Remove some functions from utilsService and consolidate code in workspace-tree.component.js.
* Standardize indentation.
* Remove premature focus on buttons in modal dialogs, since this prevents readout of the dialog text.
* Localisation updates from https://translatewiki.net.
* Don't get Toolbox element unless needed.
* Associate flyout button callbacks directly with workspaces
* Add colour block to the block factory base block initial state
* Start getting helpurl and tooltip in
* Generate helpURL and tooltip for Javascript block definition
* Use Tab keys instead of arrow keys for dialog boxes. Set role=alertdialog and read out the header/text automatically. Ensure that Esc key actually closes dialogs and that all keystrokes are captured.
* Add an aria-describedby to the 'create new block group...' button in the workspace to give more context.
* Fix issue with aria-liveregion not speaking. Allow sufficient time for alert noise to play before speaking the notification.
* Make zoom speed independent of event granularity
Before, touchpads would give "smoother" scrolling by delivering lots of
mousewheel events with small distance changes. Because the code only
looked at the sign of deltaY, ten 5px scrolls would zoom 10x more than
one 50px scroll.
This change makes zooming with a touchpad more like zooming with a
mousewheel. On my laptop, a full-scale zoom (fully out to fully in) was
about a 5mm finger movement before, and is now about 3cm.
Fixes #758.
* Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG. This paves the way to make performance
improvements to workspace dragging.
* remove overflow-y on the block exporter labels so scroll bars do not show upin firefox. Also fix up the styles on the labels so that they display better in firefox. (#699)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure w… (#700)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure why that was there.
Also replaces bad names on input. There are probably more invalid names but this is
a start.
* update generator comments
* Move the call to disable resize before placeNewBlock so that it is of… (#777)
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock. This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
* Disable workspace resizing while loading the flyout from XML
* Localisation updates from https://translatewiki.net.
* Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.
* Address code review comments
* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
* Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. (#787)
* Localisation updates from https://translatewiki.net.
* Change the Python codegen for string quoting to match the behaviour of `repr` on a string in CPython.
* Localisation updates from https://translatewiki.net.
* Add an `allInputsConnected` method to `Block` and `Workspace` to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off `develop` instead of `master` as per discussion in PR #791.
* Localisation updates from https://translatewiki.net.
* Localisation updates from https://translatewiki.net.
* Use the drag surface when scrolling using the scrollbars. #783 (#789)
* End event groups when you finish editing a field
* Fix #794 and make the workspace grid drag along with the workspace. (#801)
There was some IE specific code that also applies to Edge so just updated
a conditional to include Edge.
* Now that text input's setText skips setValue, it needs to explicitly create a change event
* Check if the text has changed before firing an event
* Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory
* Routine rebuild
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Add a block to reverse a list (#844)
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Fix a few small errors and rebuild
* Call dynamic toolbox generators correctly
* cleanup
* Fix unit tests, and delete a few that relied on completely undefined behaviour
* Fix RTL text inputs
* eslintignore more tests
* Fix insertion marker highlighting, I think
* Make getFlyout public
2017-02-21 12:09:23 -08:00
/// It is recommended, but not essential, that this have text in common with the translation of 'else if'\n{{Identical|If}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _IF _MSG _IF = 'if' ;
2014-09-18 16:52:00 -07:00
/// block text - See [https://github.com/google/blockly/wiki/IfElse https://github.com/google/blockly/wiki/IfElse]. The English words "otherwise if" would probably be clearer than "else if", but the latter is used because it is traditional and shorter.
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _IF _MSG _ELSEIF = 'else if' ;
2014-09-18 16:52:00 -07:00
/// block text - See [https://github.com/google/blockly/wiki/IfElse https://github.com/google/blockly/wiki/IfElse]. The English word "otherwise" would probably be superior to "else", but the latter is used because it is traditional and shorter.
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _IF _MSG _ELSE = 'else' ;
Blockly . Msg . CONTROLS _IF _MSG _THEN = Blockly . Msg . CONTROLS _REPEAT _INPUT _DO ;
Blockly . Msg . CONTROLS _IF _IF _TITLE _IF = Blockly . Msg . CONTROLS _IF _MSG _IF ;
2014-10-15 14:44:31 -07:00
/// tooltip - Describes [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _IF _IF _TOOLTIP = 'Add, remove, or reorder sections to reconfigure this if block.' ;
Blockly . Msg . CONTROLS _IF _ELSEIF _TITLE _ELSEIF = Blockly . Msg . CONTROLS _IF _MSG _ELSEIF ;
2014-10-15 14:44:31 -07:00
/// tooltip - Describes the 'else if' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _IF _ELSEIF _TOOLTIP = 'Add a condition to the if block.' ;
Blockly . Msg . CONTROLS _IF _ELSE _TITLE _ELSE = Blockly . Msg . CONTROLS _IF _MSG _ELSE ;
2014-10-15 14:44:31 -07:00
/// tooltip - Describes the 'else' subblock during [https://github.com/google/blockly/wiki/IfElse#block-modification if block modification].
2013-10-30 14:46:03 -07:00
Blockly . Msg . CONTROLS _IF _ELSE _TOOLTIP = 'Add a final, catch-all condition to the if block.' ;
Merge google/blockly, May 2017 (#881)
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Option for moving one block from stack.
See thread in support group before merging.
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Expand stack-drag modifier key to include alt and ctrl.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* Localisation updates from https://translatewiki.net.
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Localisation updates from https://translatewiki.net.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Temporary fix for broken text field validation.
* rebuild
* Add a block to reverse a list (#844)
* Localisation updates from https://translatewiki.net.
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* Localisation updates from https://translatewiki.net.
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Localisation updates from https://translatewiki.net.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Localisation updates from https://translatewiki.net.
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* Potential bug fix for issue #661
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Clarification update.
Unraveling nested ternaries in Blockly.utils.tokenizeInterpolation_()
* Code correction from previous commit. Moved style to css.js and set ROUNDING=15;
* Fixing Enter so it properly propogates to dropdown selection. (#934)
Fixing FieldSegment so it updates dropdowns when the underlying dropdown changes.
* Localisation updates from https://translatewiki.net.
* Make variable add set/get block in context menu obey block limits
* Localisation updates from https://translatewiki.net.
* Use mutator extension for controls_if block
* Fix #946. Don't check for presence of constants.js
* Fix #945 (annotations) and an eslint issue (constant condition)
* Localisation updates from https://translatewiki.net.
* Fix #950: BlockFactory typo and copypasta
* Add safety checks for mutators and non-mutator extensions
* Handle mutations with both mixins and functions
* Adding warning on duplicate JSON block definition.
* period
* Make some functions private and add tests
* Localisation updates from https://translatewiki.net.
* Update help URL per #937.
Replace URL usages of %28 and %29 with normal parenthesis characters. (They aren't replaced by JavaScript's encodeURIComponent() function, and seem to work just fine without them.)
Added missing semicolon in build.py.
* Typo in comment.
* Make it easier to read the code that creates the variable category in the tolbox
* Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
* Annotation fixes
* Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964)
* Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899)
* Adding new minimap demo
* Basic code style changes. Adding a few more comments. Return early if disableScrollChange in onScrollChange listener.
* `unction` to `function` corrects #962 (#970)
* Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904. This calls blur and focus from workspace.markFocused and removes the event listener on focus events. markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus. As far as I can tell, there are no uses of the focus handler that actually did anything for us.
* Localisation updates from https://translatewiki.net.
* Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974)
* Adding horizontal scrolling. Changed scroll change callbacks from onScroll_ to setHandlePosition. onScroll_ is not challed when workspace is dragged.
* set background color to lilac if opening the playground from file:
* Registering mousemove and mouseup listener in mousedown event. Mousemove and Mouseup events are now listening over document.
* Localisation updates from https://translatewiki.net.
* Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9ff308ff5e361cf77acabb61a4bf4695). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979)
* Fix #969
* Localisation updates from https://translatewiki.net.
* Fix #986. Looks like the original PR just forgot this block. (#992)
* rebuild develop (#996)
* Added the variable modal and component and implemented basic renaming functionality. (#991)
* Fixing commenting from the last commit. (#1000)
* Localisation updates from https://translatewiki.net.
* RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead.
* Adding the remove variable modal and functionality to accessible Blockly. (#1011)
* Minimap position bug fix for browsers other than chrome. Added touch support.
* Adding an add variable modal to accessible Blockly. (#1015)
* Adding the remove variable modal and functionality to accessible Blockly.
* Adding the add variable modal for accessible Blockly.
* Block browser context menu in the toolbox and flyout
* Add links to the dev registration form and contributor guidelines
* Miscellaneous comment cleanup
* Adding the common modal class. (#1017)
Centralizes accessible modal behavior.
* - Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages
- Fixed bug with js_to_json.py script where it didn't recognize ' character
* - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
* Making text_count use a text color (like text_length, which also returns a number). (#1027)
* Enable google/blockly with continuous build on travis ci (#1023) (#1035)
* create .travis for ci job
* initial checkin for blocky-web travis ci job
* rename file to .travis.yaml for typo
* remove after_script
* added cache
* rename .travis.yaml to .travis.yml
* Update .travis.yml
* include build script
* fix yaml file format issue
* debug install part
* debug build issue
* Update .travis.yml
* remove cache for now
* Update .travis.yml
* Update .travis.yml
* Update .travis.yml
* more debug info
* Update .travis.yml
* Update .travis.yml
* fix typo
* installing chrome browser
* remove chrome setting config
* run build.py as part of npm install
* Update .travis.yml
* update karma dependency
* use karma as test runner
* fix typo
* remove karma test for now
* Update .travis.yml
* Update package.json
* add npm test target
* add browserstack-runner depdendency
* update browser support
* fix typo for test target
* fix chrome typo
* added closure dependency
* add google-closure-library
* include blockly_uncompressed.js and core.js dependency
* uncomment out core/*.js files
* add kama job as part of install
* remove browserstack add on for now
* fix karma config typo
* add karma-closure
* add os support
* remove typo config
* include more closure files
* change os back to linux
* use closure-library from node_modules
* change log level back to INFO
* change npm test target to use open browser command instead of karma
* change travis test target to use open command instead of karma
* list current directory
* find what's in current dir
* typo command
* Update .travis.yml
* typo again
* open right index.html
* use right path for index.html
* xdg-open to open default browser on travis
* exit browser after 5s wait
* change timeout to 1 min
* exit after opening up browser
* use browser only
* use karma
* remove un-needed dependency
* clean up script section
* fix typo
* update build status on readme
* initial commit for selenium integration tests
* update selenium jar path
* fix test_runner.js typo
* add more debug info
* check java version
* add && instead of 9288
* fix java path
* add logic to check if selenium is running or not
* add some deugging info
* initial commit to get chromedriver
* add chromedriver flag
* add get_chromedriver.sh to package.json and .travel
* change browser to chrome for now
* fix path issue
* update chromdriver path
* fix path issue again
* more debugging
* add debug msg
* fix typo
* minor fix for getting chromedriver
* install latest chrome browser
* clean up pakcage.json
* use npm target for test run
* remove removing trailing comma
* fix another trailing comma
* updated travis test target
* clean up scripts
* not sure nmp run preinstall
* redirect selenium log to tmp file
* revert writing console log to file
* update test summary
* more clean up
* minor clean up before pull request
* resolved closure-library conflict
1. add closure-library to dependencies instead of devDependencies.
2. add lint back in scripts block
* fix typo (adding comma) in script section
* Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
* Ensure useDragSurface is a boolean.
Fixed #988
* use pretest instead of preinstall in package.json (#1043)
* cherry pick for pretest fix
* put pretest target to test_setup.sh
* fix conflict
* cherry pick for get_chromedriver.sh
* add some sleep to wait download to finish
* use node.js stable
* use npm test target
* field_angle renders degree symbol consistently.
Fixes #973
* bumpNeighbours_ function moved to block_svg.
Fixed #1009
* Update RegEx in js-to-json to match windowi eol (#1050)
The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match.
* Fix French translation of "colour with rgb" block (#1053)
"colorier", which is currently used, is a verb and proposed "couleur" is
a noun: the block in question does not change colour of anything, it
creates new colour instead, thus noun is more applicable.
Also, noun is used in French translation of "random colour" block:
"couleur aléatoire".
* Enforcing non-empty names on value inputs and statement inputs. (#1054)
* Correcting #1054 (#1056)
single quotes. better logic.
* Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
* Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors. The old way was quite slow because it changed the stylesheet directly. See issue #981 for more details on implementation and tradeoffs. This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
* Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059)
* Merge master into develop (#1063)
- pick up translation changes
- clean up trailing spaces
* use goog.string.startswith instead of string.startswith (#1065)
* New jsinterpreter demo includes wait block. Both demos have improved UI for clarity. (#1001)
Refactor of interpreter demo
* Renamed demos/interpreter/index.html as demos/interpreter/step-execution.html (including redirect), and added demos/interpreter/async-execution.html.
* Refactored code to automatically generate/parse the blocks, eliminating the need for a "Parse JavaScript" button. Code is still shown in alert upon stepping to the first statement. Print statements now write to output <textarea> instead of modal dialogs.
* Fix #1069 (#1073)
* Fix cursor and mistaken css from merge
* Comment out broken field angle merge
* Fix broken merge with borders
* Add back original package json (woops)
* Remove render function for field angle, may not be the right way but it was broken...
* Revert merge blocking variable shadow blocks
* Add changes from built lang files
* Add back travis and readme
* Revert broken cleanup additions
* Add notes for scratch-block specific functions
* Revert change to css so blocks stay under the toolbox
* Add back accidentally removed files
* Use getFlyout_ instead of getFlyout everywhere
* Satisfy the linter
* Re-remove deprecated function
* Remove duplicated code in block_svg
* Add back flip_rtl option for images
* Remove more duplicated functions from past merges
* Fix flip_rtl code
* Revert renaming of getFlyout
2017-05-11 15:58:18 -04:00
/// button text - Text on a button inside a dialogue window, which will accept or acknowledge the contents of the dialogue when pressed.
Blockly . Msg . IOS _OK = 'OK' ;
/// button text - Text on a button inside a dialogue window, which will close or cancel the dialogue when pressed.
Blockly . Msg . IOS _CANCEL = 'Cancel' ;
/// alert - Title text for an error dialogue.
Blockly . Msg . IOS _ERROR = 'Error' ;
/// header text - Title of a section that displays a list of parameters (aka. "inputs") that have been defined for a procedure. This is used inside a dialogue window to configure a procedure.
Blockly . Msg . IOS _PROCEDURES _INPUTS = 'INPUTS' ;
/// button text - Text on a button which will add a parameter (aka. "input") to a procedure. This is used inside a dialogue window to configure a procedure. NOTE: The "+" should be preserved at the beginning of the text.
Blockly . Msg . IOS _PROCEDURES _ADD _INPUT = '+ Add Input' ;
/// option text - Text describing an option to allow statements to be added within a procedure. This is used inside a dialogue window to configure a procedure.
Blockly . Msg . IOS _PROCEDURES _ALLOW _STATEMENTS = 'Allow statements' ;
/// alert - Error message when duplicate parameters (aka. "inputs") have been defined on a procedure. This is used inside a dialogue window to configure procedure parameters.
Blockly . Msg . IOS _PROCEDURES _DUPLICATE _INPUTS _ERROR = 'This function has duplicate inputs.' ;
/// button text - Text on a button which will open a variable creation dialogue when pressed. NOTE: The "+" should be preserved at the beginning of the text.
Blockly . Msg . IOS _VARIABLES _ADD _VARIABLE = '+ Add Variable' ;
/// button text - Text on a button inside a variable creation dialogue, which will add a variable when pressed.
Blockly . Msg . IOS _VARIABLES _ADD _BUTTON = 'Add' ;
/// button text - Text on a button inside a variable rename dialogue, which will rename a variable when pressed.
Blockly . Msg . IOS _VARIABLES _RENAME _BUTTON = 'Rename' ;
/// button text - Text on a button inside a variable deletion dialogue, which will delete a variable when pressed.
Blockly . Msg . IOS _VARIABLES _DELETE _BUTTON = 'Delete' ;
/// placeholder text - Placeholder text used inside a text input, where a variable name should be entered.
Blockly . Msg . IOS _VARIABLES _VARIABLE _NAME = 'Variable name' ;
/// alert - Error message that is displayed when the user attempts to create a variable without a name.
Blockly . Msg . IOS _VARIABLES _EMPTY _NAME _ERROR = 'You can\'t use an empty variable name.' ;
2013-10-30 14:46:03 -07:00
/// url - Information about comparisons.
2013-11-25 17:33:36 -08:00
Blockly . Msg . LOGIC _COMPARE _HELPURL = 'https://en.wikipedia.org/wiki/Inequality_(mathematics)' ;
2013-10-30 14:46:03 -07:00
/// tooltip - Describes the equals (=) block.
Blockly . Msg . LOGIC _COMPARE _TOOLTIP _EQ = 'Return true if both inputs equal each other.' ;
2014-09-08 14:26:52 -07:00
/// tooltip - Describes the not equals (≠) block.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _COMPARE _TOOLTIP _NEQ = 'Return true if both inputs are not equal to each other.' ;
2014-09-08 14:26:52 -07:00
/// tooltip - Describes the less than (<) block.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _COMPARE _TOOLTIP _LT = 'Return true if the first input is smaller than the second input.' ;
2014-09-08 14:26:52 -07:00
/// tooltip - Describes the less than or equals (≤) block.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _COMPARE _TOOLTIP _LTE = 'Return true if the first input is smaller than or equal to the second input.' ;
2014-09-08 14:26:52 -07:00
/// tooltip - Describes the greater than (>) block.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _COMPARE _TOOLTIP _GT = 'Return true if the first input is greater than the second input.' ;
2014-09-08 14:26:52 -07:00
/// tooltip - Describes the greater than or equals (≥) block.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _COMPARE _TOOLTIP _GTE = 'Return true if the first input is greater than or equal to the second input.' ;
2013-12-20 16:25:26 -08:00
/// url - Information about the Boolean conjunction ("and") and disjunction ("or") operators. Consider using the translation of [https://en.wikipedia.org/wiki/Boolean_logic https://en.wikipedia.org/wiki/Boolean_logic], if it exists in your language.
2014-09-19 22:14:51 -07:00
Blockly . Msg . LOGIC _OPERATION _HELPURL = 'https://github.com/google/blockly/wiki/Logic#logical-operations' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _OPERATION _TOOLTIP _AND = 'Return true if both inputs are true.' ;
2016-03-14 16:00:25 -07:00
/// block text - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction].\n{{Identical|And}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _OPERATION _AND = 'and' ;
2013-12-20 16:25:26 -08:00
/// block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _OPERATION _TOOLTIP _OR = 'Return true if at least one of the inputs is true.' ;
2016-03-14 16:00:25 -07:00
/// block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction].\n{{Identical|Or}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _OPERATION _OR = 'or' ;
2013-12-20 16:25:26 -08:00
/// url - Information about logical negation. The translation of [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation] is recommended if it exists in the target language.
2014-09-19 22:14:51 -07:00
Blockly . Msg . LOGIC _NEGATE _HELPURL = 'https://github.com/google/blockly/wiki/Logic#not' ;
2013-10-30 14:46:03 -07:00
/// block text - This is a unary operator that returns ''false'' when the input is ''true'', and ''true'' when the input is ''false''.
/// \n\nParameters:\n* %1 - the input (which should be either the value "true" or "false")
Blockly . Msg . LOGIC _NEGATE _TITLE = 'not %1' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation].
2014-11-14 14:21:03 -08:00
Blockly . Msg . LOGIC _NEGATE _TOOLTIP = 'Returns true if the input is false. Returns false if the input is true.' ;
2013-10-30 14:46:03 -07:00
2013-12-20 16:25:26 -08:00
/// url - Information about the logic values ''true'' and ''false''. Consider using the translation of [https://en.wikipedia.org/wiki/Truth_value https://en.wikipedia.org/wiki/Truth_value] if it exists in your language.
2014-09-19 22:14:51 -07:00
Blockly . Msg . LOGIC _BOOLEAN _HELPURL = 'https://github.com/google/blockly/wiki/Logic#values' ;
2016-04-14 00:29:13 -07:00
/// block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''true''.\n{{Identical|True}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _BOOLEAN _TRUE = 'true' ;
2016-04-14 00:29:13 -07:00
/// block text - The word for the [https://en.wikipedia.org/wiki/Truth_value logical value] ''false''.\n{{Identical|False}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _BOOLEAN _FALSE = 'false' ;
2013-11-25 17:33:36 -08:00
/// tooltip - Indicates that the block returns either of the two possible [https://en.wikipedia.org/wiki/Truth_value logical values].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _BOOLEAN _TOOLTIP = 'Returns either true or false.' ;
2013-12-20 16:25:26 -08:00
/// url - Provide a link to the translation of [https://en.wikipedia.org/wiki/Nullable_type https://en.wikipedia.org/wiki/Nullable_type], if it exists in your language; otherwise, do not worry about translating this advanced concept.
2013-11-25 17:33:36 -08:00
Blockly . Msg . LOGIC _NULL _HELPURL = 'https://en.wikipedia.org/wiki/Nullable_type' ;
2016-05-14 03:50:35 -07:00
/// block text - In computer languages, ''null'' is a special value that indicates that no value has been set. You may use your language's word for "nothing" or "invalid".\n{{Identical|Null}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _NULL = 'null' ;
/// tooltip - This should use the word from the previous message.
Blockly . Msg . LOGIC _NULL _TOOLTIP = 'Returns null.' ;
2013-12-20 16:25:26 -08:00
/// url - Describes the programming language operator known as the ''ternary'' or ''conditional'' operator. It is recommended that you use the translation of [https://en.wikipedia.org/wiki/%3F: https://en.wikipedia.org/wiki/%3F:] if it exists.
2013-11-25 17:33:36 -08:00
Blockly . Msg . LOGIC _TERNARY _HELPURL = 'https://en.wikipedia.org/wiki/%3F:' ;
2013-10-30 14:46:03 -07:00
/// block input text - Label for the input whose value determines which of the other two inputs is returned. In some programming languages, this is called a ''''predicate''''.
Blockly . Msg . LOGIC _TERNARY _CONDITION = 'test' ;
/// block input text - Indicates that the following input should be returned (used as output) if the test input is true. Remember to try to keep block text terse (short).
Blockly . Msg . LOGIC _TERNARY _IF _TRUE = 'if true' ;
/// block input text - Indicates that the following input should be returned (used as output) if the test input is false.
Blockly . Msg . LOGIC _TERNARY _IF _FALSE = 'if false' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/%3F: https://en.wikipedia.org/wiki/%3F:].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LOGIC _TERNARY _TOOLTIP = 'Check the condition in "test". If the condition is true, returns the "if true" value; otherwise returns the "if false" value.' ;
// Math Blocks.
/// url - Information about (real) numbers.
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _NUMBER _HELPURL = 'https://en.wikipedia.org/wiki/Number' ;
2013-10-30 14:46:03 -07:00
/// tooltip - Any positive or negative number, not necessarily an integer.
Blockly . Msg . MATH _NUMBER _TOOLTIP = 'A number.' ;
2015-02-05 13:07:13 -08:00
/// {{optional}}\nmath - The symbol for the binary operation addition.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ADDITION _SYMBOL = '+' ;
2015-02-05 13:07:13 -08:00
/// {{optional}}\nmath - The symbol for the binary operation indicating that the right operand should be
2013-10-30 14:46:03 -07:00
/// subtracted from the left operand.
Blockly . Msg . MATH _SUBTRACTION _SYMBOL = '-' ;
2015-02-05 13:07:13 -08:00
/// {{optional}}\nmath - The binary operation indicating that the left operand should be divided by
2013-10-30 14:46:03 -07:00
/// the right operand.
2013-12-20 16:25:26 -08:00
Blockly . Msg . MATH _DIVISION _SYMBOL = '÷' ;
2015-02-05 13:07:13 -08:00
/// {{optional}}\nmath - The symbol for the binary operation multiplication.
2013-12-20 16:25:26 -08:00
Blockly . Msg . MATH _MULTIPLICATION _SYMBOL = '× ' ;
2015-02-05 13:07:13 -08:00
/// {{optional}}\nmath - The symbol for the binary operation exponentiation. Specifically, if the
2013-10-30 14:46:03 -07:00
/// value of the left operand is L and the value of the right operand (the exponent) is
/// R, multiply L by itself R times. (Fractional and negative exponents are also legal.)
Blockly . Msg . MATH _POWER _SYMBOL = '^' ;
/// math - The short name of the trigonometric function
2013-11-25 17:33:36 -08:00
/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent sine].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _SIN = 'sin' ;
/// math - The short name of the trigonometric function
2013-11-25 17:33:36 -08:00
/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent cosine].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _COS = 'cos' ;
/// math - The short name of the trigonometric function
2013-11-25 17:33:36 -08:00
/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent tangent].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _TAN = 'tan' ;
/// math - The short name of the ''inverse of'' the trigonometric function
2013-11-25 17:33:36 -08:00
/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent sine].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _ASIN = 'asin' ;
/// math - The short name of the ''inverse of'' the trigonometric function
2013-11-25 17:33:36 -08:00
/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent cosine].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _ACOS = 'acos' ;
/// math - The short name of the ''inverse of'' the trigonometric function
2013-11-25 17:33:36 -08:00
/// [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent tangent].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _ATAN = 'atan' ;
/// url - Information about addition, subtraction, multiplication, division, and exponentiation.
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _ARITHMETIC _HELPURL = 'https://en.wikipedia.org/wiki/Arithmetic' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Addition https://en.wikipedia.org/wiki/Addition].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ARITHMETIC _TOOLTIP _ADD = 'Return the sum of the two numbers.' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Subtraction https://en.wikipedia.org/wiki/Subtraction].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ARITHMETIC _TOOLTIP _MINUS = 'Return the difference of the two numbers.' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Multiplication https://en.wikipedia.org/wiki/Multiplication].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ARITHMETIC _TOOLTIP _MULTIPLY = 'Return the product of the two numbers.' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Division_(mathematics) https://en.wikipedia.org/wiki/Division_(mathematics)].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ARITHMETIC _TOOLTIP _DIVIDE = 'Return the quotient of the two numbers.' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Exponentiation https://en.wikipedia.org/wiki/Exponentiation].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ARITHMETIC _TOOLTIP _POWER = 'Return the first number raised to the power of the second number.' ;
/// url - Information about the square root operation.
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _SINGLE _HELPURL = 'https://en.wikipedia.org/wiki/Square_root' ;
/// dropdown - This computes the positive [https://en.wikipedia.org/wiki/Square_root square root] of its input. For example, the square root of 16 is 4.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _SINGLE _OP _ROOT = 'square root' ;
/// tooltip - Please use the same term as in the previous message.
Blockly . Msg . MATH _SINGLE _TOOLTIP _ROOT = 'Return the square root of a number.' ;
2013-12-20 16:25:26 -08:00
/// dropdown - This leaves positive numeric inputs changed and inverts negative inputs. For example, the absolute value of 5 is 5; the absolute value of -5 is also 5. For more information, see [https://en.wikipedia.org/wiki/Absolute_value https://en.wikipedia.org/wiki/Absolute_value].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _SINGLE _OP _ABSOLUTE = 'absolute' ;
/// tooltip - Please use the same term as in the previous message.
Blockly . Msg . MATH _SINGLE _TOOLTIP _ABS = 'Return the absolute value of a number.' ;
/// tooltip - Calculates '''0-n''', where '''n''' is the single numeric input.
Blockly . Msg . MATH _SINGLE _TOOLTIP _NEG = 'Return the negation of a number.' ;
2013-11-25 17:33:36 -08:00
/// tooltip - Calculates the [https://en.wikipedia.org/wiki/Natural_logarithm|natural logarithm] of its single numeric input.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _SINGLE _TOOLTIP _LN = 'Return the natural logarithm of a number.' ;
2013-11-25 17:33:36 -08:00
/// tooltip - Calculates the [https://en.wikipedia.org/wiki/Common_logarithm common logarithm] of its single numeric input.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _SINGLE _TOOLTIP _LOG10 = 'Return the base 10 logarithm of a number.' ;
Merge google/blockly, May 2017 (#881)
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Option for moving one block from stack.
See thread in support group before merging.
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Expand stack-drag modifier key to include alt and ctrl.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* Localisation updates from https://translatewiki.net.
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Localisation updates from https://translatewiki.net.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Temporary fix for broken text field validation.
* rebuild
* Add a block to reverse a list (#844)
* Localisation updates from https://translatewiki.net.
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* Localisation updates from https://translatewiki.net.
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Localisation updates from https://translatewiki.net.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Localisation updates from https://translatewiki.net.
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* Potential bug fix for issue #661
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Clarification update.
Unraveling nested ternaries in Blockly.utils.tokenizeInterpolation_()
* Code correction from previous commit. Moved style to css.js and set ROUNDING=15;
* Fixing Enter so it properly propogates to dropdown selection. (#934)
Fixing FieldSegment so it updates dropdowns when the underlying dropdown changes.
* Localisation updates from https://translatewiki.net.
* Make variable add set/get block in context menu obey block limits
* Localisation updates from https://translatewiki.net.
* Use mutator extension for controls_if block
* Fix #946. Don't check for presence of constants.js
* Fix #945 (annotations) and an eslint issue (constant condition)
* Localisation updates from https://translatewiki.net.
* Fix #950: BlockFactory typo and copypasta
* Add safety checks for mutators and non-mutator extensions
* Handle mutations with both mixins and functions
* Adding warning on duplicate JSON block definition.
* period
* Make some functions private and add tests
* Localisation updates from https://translatewiki.net.
* Update help URL per #937.
Replace URL usages of %28 and %29 with normal parenthesis characters. (They aren't replaced by JavaScript's encodeURIComponent() function, and seem to work just fine without them.)
Added missing semicolon in build.py.
* Typo in comment.
* Make it easier to read the code that creates the variable category in the tolbox
* Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
* Annotation fixes
* Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964)
* Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899)
* Adding new minimap demo
* Basic code style changes. Adding a few more comments. Return early if disableScrollChange in onScrollChange listener.
* `unction` to `function` corrects #962 (#970)
* Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904. This calls blur and focus from workspace.markFocused and removes the event listener on focus events. markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus. As far as I can tell, there are no uses of the focus handler that actually did anything for us.
* Localisation updates from https://translatewiki.net.
* Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974)
* Adding horizontal scrolling. Changed scroll change callbacks from onScroll_ to setHandlePosition. onScroll_ is not challed when workspace is dragged.
* set background color to lilac if opening the playground from file:
* Registering mousemove and mouseup listener in mousedown event. Mousemove and Mouseup events are now listening over document.
* Localisation updates from https://translatewiki.net.
* Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9ff308ff5e361cf77acabb61a4bf4695). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979)
* Fix #969
* Localisation updates from https://translatewiki.net.
* Fix #986. Looks like the original PR just forgot this block. (#992)
* rebuild develop (#996)
* Added the variable modal and component and implemented basic renaming functionality. (#991)
* Fixing commenting from the last commit. (#1000)
* Localisation updates from https://translatewiki.net.
* RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead.
* Adding the remove variable modal and functionality to accessible Blockly. (#1011)
* Minimap position bug fix for browsers other than chrome. Added touch support.
* Adding an add variable modal to accessible Blockly. (#1015)
* Adding the remove variable modal and functionality to accessible Blockly.
* Adding the add variable modal for accessible Blockly.
* Block browser context menu in the toolbox and flyout
* Add links to the dev registration form and contributor guidelines
* Miscellaneous comment cleanup
* Adding the common modal class. (#1017)
Centralizes accessible modal behavior.
* - Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages
- Fixed bug with js_to_json.py script where it didn't recognize ' character
* - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
* Making text_count use a text color (like text_length, which also returns a number). (#1027)
* Enable google/blockly with continuous build on travis ci (#1023) (#1035)
* create .travis for ci job
* initial checkin for blocky-web travis ci job
* rename file to .travis.yaml for typo
* remove after_script
* added cache
* rename .travis.yaml to .travis.yml
* Update .travis.yml
* include build script
* fix yaml file format issue
* debug install part
* debug build issue
* Update .travis.yml
* remove cache for now
* Update .travis.yml
* Update .travis.yml
* Update .travis.yml
* more debug info
* Update .travis.yml
* Update .travis.yml
* fix typo
* installing chrome browser
* remove chrome setting config
* run build.py as part of npm install
* Update .travis.yml
* update karma dependency
* use karma as test runner
* fix typo
* remove karma test for now
* Update .travis.yml
* Update package.json
* add npm test target
* add browserstack-runner depdendency
* update browser support
* fix typo for test target
* fix chrome typo
* added closure dependency
* add google-closure-library
* include blockly_uncompressed.js and core.js dependency
* uncomment out core/*.js files
* add kama job as part of install
* remove browserstack add on for now
* fix karma config typo
* add karma-closure
* add os support
* remove typo config
* include more closure files
* change os back to linux
* use closure-library from node_modules
* change log level back to INFO
* change npm test target to use open browser command instead of karma
* change travis test target to use open command instead of karma
* list current directory
* find what's in current dir
* typo command
* Update .travis.yml
* typo again
* open right index.html
* use right path for index.html
* xdg-open to open default browser on travis
* exit browser after 5s wait
* change timeout to 1 min
* exit after opening up browser
* use browser only
* use karma
* remove un-needed dependency
* clean up script section
* fix typo
* update build status on readme
* initial commit for selenium integration tests
* update selenium jar path
* fix test_runner.js typo
* add more debug info
* check java version
* add && instead of 9288
* fix java path
* add logic to check if selenium is running or not
* add some deugging info
* initial commit to get chromedriver
* add chromedriver flag
* add get_chromedriver.sh to package.json and .travel
* change browser to chrome for now
* fix path issue
* update chromdriver path
* fix path issue again
* more debugging
* add debug msg
* fix typo
* minor fix for getting chromedriver
* install latest chrome browser
* clean up pakcage.json
* use npm target for test run
* remove removing trailing comma
* fix another trailing comma
* updated travis test target
* clean up scripts
* not sure nmp run preinstall
* redirect selenium log to tmp file
* revert writing console log to file
* update test summary
* more clean up
* minor clean up before pull request
* resolved closure-library conflict
1. add closure-library to dependencies instead of devDependencies.
2. add lint back in scripts block
* fix typo (adding comma) in script section
* Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
* Ensure useDragSurface is a boolean.
Fixed #988
* use pretest instead of preinstall in package.json (#1043)
* cherry pick for pretest fix
* put pretest target to test_setup.sh
* fix conflict
* cherry pick for get_chromedriver.sh
* add some sleep to wait download to finish
* use node.js stable
* use npm test target
* field_angle renders degree symbol consistently.
Fixes #973
* bumpNeighbours_ function moved to block_svg.
Fixed #1009
* Update RegEx in js-to-json to match windowi eol (#1050)
The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match.
* Fix French translation of "colour with rgb" block (#1053)
"colorier", which is currently used, is a verb and proposed "couleur" is
a noun: the block in question does not change colour of anything, it
creates new colour instead, thus noun is more applicable.
Also, noun is used in French translation of "random colour" block:
"couleur aléatoire".
* Enforcing non-empty names on value inputs and statement inputs. (#1054)
* Correcting #1054 (#1056)
single quotes. better logic.
* Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
* Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors. The old way was quite slow because it changed the stylesheet directly. See issue #981 for more details on implementation and tradeoffs. This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
* Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059)
* Merge master into develop (#1063)
- pick up translation changes
- clean up trailing spaces
* use goog.string.startswith instead of string.startswith (#1065)
* New jsinterpreter demo includes wait block. Both demos have improved UI for clarity. (#1001)
Refactor of interpreter demo
* Renamed demos/interpreter/index.html as demos/interpreter/step-execution.html (including redirect), and added demos/interpreter/async-execution.html.
* Refactored code to automatically generate/parse the blocks, eliminating the need for a "Parse JavaScript" button. Code is still shown in alert upon stepping to the first statement. Print statements now write to output <textarea> instead of modal dialogs.
* Fix #1069 (#1073)
* Fix cursor and mistaken css from merge
* Comment out broken field angle merge
* Fix broken merge with borders
* Add back original package json (woops)
* Remove render function for field angle, may not be the right way but it was broken...
* Revert merge blocking variable shadow blocks
* Add changes from built lang files
* Add back travis and readme
* Revert broken cleanup additions
* Add notes for scratch-block specific functions
* Revert change to css so blocks stay under the toolbox
* Add back accidentally removed files
* Use getFlyout_ instead of getFlyout everywhere
* Satisfy the linter
* Re-remove deprecated function
* Remove duplicated code in block_svg
* Add back flip_rtl option for images
* Remove more duplicated functions from past merges
* Fix flip_rtl code
* Revert renaming of getFlyout
2017-05-11 15:58:18 -04:00
/// tooltip - Multiplies [https://en.wikipedia.org/wiki/E_(mathematical_constant) e] by itself n times, where n is the single numeric input.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _SINGLE _TOOLTIP _EXP = 'Return e to the power of a number.' ;
/// tooltip - Multiplies 10 by itself n times, where n is the single numeric input.
Blockly . Msg . MATH _SINGLE _TOOLTIP _POW10 = 'Return 10 to the power of a number.' ;
/// url - Information about the trigonometric functions sine, cosine, tangent, and their inverses (ideally using degrees, not radians).
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _TRIG _HELPURL = 'https://en.wikipedia.org/wiki/Trigonometric_functions' ;
2013-12-20 16:25:26 -08:00
/// tooltip - Return the [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent sine] of an [https://en.wikipedia.org/wiki/Degree_(angle) angle in degrees], not radians.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _TOOLTIP _SIN = 'Return the sine of a degree (not radian).' ;
2013-12-20 16:25:26 -08:00
/// tooltip - Return the [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent cosine] of an [https://en.wikipedia.org/wiki/Degree_(angle) angle in degrees], not radians.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _TOOLTIP _COS = 'Return the cosine of a degree (not radian).' ;
2013-12-20 16:25:26 -08:00
/// tooltip - Return the [https://en.wikipedia.org/wiki/Trigonometric_functions#Sine.2C_cosine_and_tangent tangent] of an [https://en.wikipedia.org/wiki/Degree_(angle) angle in degrees], not radians.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _TOOLTIP _TAN = 'Return the tangent of a degree (not radian).' ;
2013-12-20 16:25:26 -08:00
/// tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent sine function], using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _TOOLTIP _ASIN = 'Return the arcsine of a number.' ;
2013-12-20 16:25:26 -08:00
/// tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent cosine] function, using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _TOOLTIP _ACOS = 'Return the arccosine of a number.' ;
2013-12-20 16:25:26 -08:00
/// tooltip - The [https://en.wikipedia.org/wiki/Inverse_trigonometric_functions inverse] of the [https://en.wikipedia.org/wiki/Cosine#Sine.2C_cosine_and_tangent tangent] function, using [https://en.wikipedia.org/wiki/Degree_(angle) degrees], not radians.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _TRIG _TOOLTIP _ATAN = 'Return the arctangent of a number.' ;
2014-09-08 14:26:52 -07:00
/// url - Information about the mathematical constants Pi (π), e, the golden ratio (φ), √ 2, √ 1/2, and infinity (∞).
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _CONSTANT _HELPURL = 'https://en.wikipedia.org/wiki/Mathematical_constant' ;
/// tooltip - Provides the specified [https://en.wikipedia.org/wiki/Mathematical_constant mathematical constant].
2013-12-20 16:25:26 -08:00
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).' ;
2013-10-30 14:46:03 -07:00
/// dropdown - A number is '''even''' if it is a multiple of 2. For example, 4 is even (yielding true), but 3 is not (false).
Blockly . Msg . MATH _IS _EVEN = 'is even' ;
/// dropdown - A number is '''odd''' if it is not a multiple of 2. For example, 3 is odd (yielding true), but 4 is not (false). The opposite of "odd" is "even".
Blockly . Msg . MATH _IS _ODD = 'is odd' ;
2014-09-08 14:26:52 -07:00
/// dropdown - A number is [https://en.wikipedia.org/wiki/Prime prime] if it cannot be evenly divided by any positive integers except for 1 and itself. For example, 5 is prime, but 6 is not because 2 × 3 = 6.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _IS _PRIME = 'is prime' ;
2013-11-25 17:33:36 -08:00
/// dropdown - A number is '''whole''' if it is an [https://en.wikipedia.org/wiki/Integer integer]. For example, 5 is whole, but 5.1 is not.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _IS _WHOLE = 'is whole' ;
/// dropdown - A number is '''positive''' if it is greater than 0. (0 is neither negative nor positive.)
Blockly . Msg . MATH _IS _POSITIVE = 'is positive' ;
/// dropdown - A number is '''negative''' if it is less than 0. (0 is neither negative nor positive.)
Blockly . Msg . MATH _IS _NEGATIVE = 'is negative' ;
/// dropdown - A number x is divisible by y if y goes into x evenly. For example, 10 is divisible by 5, but 10 is not divisible by 3.
Blockly . Msg . MATH _IS _DIVISIBLE _BY = 'is divisible by' ;
/// tooltip - This block lets the user specify via a dropdown menu whether to check if the numeric input is even, odd, prime, whole, positive, negative, or divisible by a given value.
2014-11-14 14:21:03 -08:00
Blockly . Msg . MATH _IS _TOOLTIP = 'Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false.' ;
2013-10-30 14:46:03 -07:00
/// url - Information about incrementing (increasing the value of) a variable.
2013-12-03 03:00:06 -08:00
/// For other languages, just use the translation of the Wikipedia page about
/// addition ([https://en.wikipedia.org/wiki/Addition https://en.wikipedia.org/wiki/Addition]).
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _CHANGE _HELPURL = 'https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter' ;
2015-06-08 15:54:18 -07:00
/// - As in: ''change'' [the value of variable] ''item'' ''by'' 1 (e.g., if the variable named 'item' had the value 5, change it to 6).
/// %1 is a variable name.
/// %2 is the amount of change.
Blockly . Msg . MATH _CHANGE _TITLE = 'change %1 by %2' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _CHANGE _TITLE _ITEM = Blockly . Msg . VARIABLES _DEFAULT _NAME ;
/// tooltip - This updates the value of the variable by adding to it the following numeric input.\n\nParameters:\n* %1 - the name of the variable whose value should be increased.
Blockly . Msg . MATH _CHANGE _TOOLTIP = 'Add a number to variable "%1".' ;
/// url - Information about how numbers are rounded to the nearest integer
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _ROUND _HELPURL = 'https://en.wikipedia.org/wiki/Rounding' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Rounding https://en.wikipedia.org/wiki/Rounding].
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ROUND _TOOLTIP = 'Round a number up or down.' ;
/// dropdown - This rounds its input to the nearest whole number. For example, 3.4 is rounded to 3.
Blockly . Msg . MATH _ROUND _OPERATOR _ROUND = 'round' ;
/// dropdown - This rounds its input up to the nearest whole number. For example, if the input was 2.2, the result would be 3.
Blockly . Msg . MATH _ROUND _OPERATOR _ROUNDUP = 'round up' ;
/// dropdown - This rounds its input down to the nearest whole number. For example, if the input was 3.8, the result would be 3.
Blockly . Msg . MATH _ROUND _OPERATOR _ROUNDDOWN = 'round down' ;
/// url - Information about applying a function to a list of numbers. (We were unable to find such information in English. Feel free to skip this and any other URLs that are difficult.)
Blockly . Msg . MATH _ONLIST _HELPURL = '' ;
/// dropdown - This computes the sum of the numeric elements in the list. For example, the sum of the list {1, 4} is 5.
Blockly . Msg . MATH _ONLIST _OPERATOR _SUM = 'sum of list' ;
/// tooltip - Please use the same term for "sum" as in the previous message.
Blockly . Msg . MATH _ONLIST _TOOLTIP _SUM = 'Return the sum of all the numbers in the list.' ;
/// dropdown - This finds the smallest (minimum) number in a list. For example, the smallest number in the list [-5, 0, 3] is -5.
Blockly . Msg . MATH _ONLIST _OPERATOR _MIN = 'min of list' ;
/// tooltip - Please use the same term for "min" or "minimum" as in the previous message.
Blockly . Msg . MATH _ONLIST _TOOLTIP _MIN = 'Return the smallest number in the list.' ;
/// dropdown - This finds the largest (maximum) number in a list. For example, the largest number in the list [-5, 0, 3] is 3.
Blockly . Msg . MATH _ONLIST _OPERATOR _MAX = 'max of list' ;
/// tooltip
Blockly . Msg . MATH _ONLIST _TOOLTIP _MAX = 'Return the largest number in the list.' ;
2013-11-25 17:33:36 -08:00
/// dropdown - This adds up all of the numbers in a list and divides the sum by the number of elements in the list. For example, the [https://en.wikipedia.org/wiki/Arithmetic_mean average] of the list [1, 2, 3, 4] is 2.5 (10/4).
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ONLIST _OPERATOR _AVERAGE = 'average of list' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Arithmetic_mean https://en.wikipedia.org/wiki/Arithmetic_mean] for more informatin.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ONLIST _TOOLTIP _AVERAGE = 'Return the average (arithmetic mean) of the numeric values in the list.' ;
2013-11-25 17:33:36 -08:00
/// dropdown - This finds the [https://en.wikipedia.org/wiki/Median median] of the numeric values in a list. For example, the median of the list {1, 2, 7, 12, 13} is 7.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ONLIST _OPERATOR _MEDIAN = 'median of list' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Median median https://en.wikipedia.org/wiki/Median median] for more information.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ONLIST _TOOLTIP _MEDIAN = 'Return the median number in the list.' ;
2013-11-25 17:33:36 -08:00
/// dropdown - This finds the most common numbers ([https://en.wikipedia.org/wiki/Mode_(statistics) modes]) in a list. For example, the modes of the list {1, 3, 9, 3, 9} are {3, 9}.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ONLIST _OPERATOR _MODE = 'modes of list' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Mode_(statistics) https://en.wikipedia.org/wiki/Mode_(statistics)] for more information.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ONLIST _TOOLTIP _MODE = 'Return a list of the most common item(s) in the list.' ;
2013-11-25 17:33:36 -08:00
/// dropdown - This finds the [https://en.wikipedia.org/wiki/Standard_deviation standard deviation] of the numeric values in a list.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ONLIST _OPERATOR _STD _DEV = 'standard deviation of list' ;
2013-12-20 16:25:26 -08:00
/// tooltip - See [https://en.wikipedia.org/wiki/Standard_deviation https://en.wikipedia.org/wiki/Standard_deviation] for more information.
2013-10-30 14:46:03 -07:00
Blockly . Msg . MATH _ONLIST _TOOLTIP _STD _DEV = 'Return the standard deviation of the list.' ;
/// dropdown - This choose an element at random from a list. Each element is chosen with equal probability.
Blockly . Msg . MATH _ONLIST _OPERATOR _RANDOM = 'random item of list' ;
/// tooltip - Please use same term for 'random' as in previous entry.
Blockly . Msg . MATH _ONLIST _TOOLTIP _RANDOM = 'Return a random element from the list.' ;
/// url - information about the modulo (remainder) operation.
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _MODULO _HELPURL = 'https://en.wikipedia.org/wiki/Modulo_operation' ;
2013-10-30 14:46:03 -07:00
/// block text - Title of block providing the remainder when dividing the first numerical input by the second. For example, the remainder of 10 divided by 3 is 1.\n\nParameters:\n* %1 - the dividend (10, in our example)\n* %2 - the divisor (3 in our example).
Blockly . Msg . MATH _MODULO _TITLE = 'remainder of %1 ÷ %2' ;
/// tooltip - For example, the remainder of 10 divided by 3 is 1.
Blockly . Msg . MATH _MODULO _TOOLTIP = 'Return the remainder from dividing the two numbers.' ;
/// url - Information about constraining a numeric value to be in a specific range. (The English URL is not ideal. Recall that translating URLs is the lowest priority.)
Merge google/blockly, May 2017 (#881)
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Option for moving one block from stack.
See thread in support group before merging.
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Expand stack-drag modifier key to include alt and ctrl.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* Localisation updates from https://translatewiki.net.
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Localisation updates from https://translatewiki.net.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Temporary fix for broken text field validation.
* rebuild
* Add a block to reverse a list (#844)
* Localisation updates from https://translatewiki.net.
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* Localisation updates from https://translatewiki.net.
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Localisation updates from https://translatewiki.net.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Localisation updates from https://translatewiki.net.
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* Potential bug fix for issue #661
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Clarification update.
Unraveling nested ternaries in Blockly.utils.tokenizeInterpolation_()
* Code correction from previous commit. Moved style to css.js and set ROUNDING=15;
* Fixing Enter so it properly propogates to dropdown selection. (#934)
Fixing FieldSegment so it updates dropdowns when the underlying dropdown changes.
* Localisation updates from https://translatewiki.net.
* Make variable add set/get block in context menu obey block limits
* Localisation updates from https://translatewiki.net.
* Use mutator extension for controls_if block
* Fix #946. Don't check for presence of constants.js
* Fix #945 (annotations) and an eslint issue (constant condition)
* Localisation updates from https://translatewiki.net.
* Fix #950: BlockFactory typo and copypasta
* Add safety checks for mutators and non-mutator extensions
* Handle mutations with both mixins and functions
* Adding warning on duplicate JSON block definition.
* period
* Make some functions private and add tests
* Localisation updates from https://translatewiki.net.
* Update help URL per #937.
Replace URL usages of %28 and %29 with normal parenthesis characters. (They aren't replaced by JavaScript's encodeURIComponent() function, and seem to work just fine without them.)
Added missing semicolon in build.py.
* Typo in comment.
* Make it easier to read the code that creates the variable category in the tolbox
* Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
* Annotation fixes
* Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964)
* Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899)
* Adding new minimap demo
* Basic code style changes. Adding a few more comments. Return early if disableScrollChange in onScrollChange listener.
* `unction` to `function` corrects #962 (#970)
* Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904. This calls blur and focus from workspace.markFocused and removes the event listener on focus events. markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus. As far as I can tell, there are no uses of the focus handler that actually did anything for us.
* Localisation updates from https://translatewiki.net.
* Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974)
* Adding horizontal scrolling. Changed scroll change callbacks from onScroll_ to setHandlePosition. onScroll_ is not challed when workspace is dragged.
* set background color to lilac if opening the playground from file:
* Registering mousemove and mouseup listener in mousedown event. Mousemove and Mouseup events are now listening over document.
* Localisation updates from https://translatewiki.net.
* Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9ff308ff5e361cf77acabb61a4bf4695). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979)
* Fix #969
* Localisation updates from https://translatewiki.net.
* Fix #986. Looks like the original PR just forgot this block. (#992)
* rebuild develop (#996)
* Added the variable modal and component and implemented basic renaming functionality. (#991)
* Fixing commenting from the last commit. (#1000)
* Localisation updates from https://translatewiki.net.
* RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead.
* Adding the remove variable modal and functionality to accessible Blockly. (#1011)
* Minimap position bug fix for browsers other than chrome. Added touch support.
* Adding an add variable modal to accessible Blockly. (#1015)
* Adding the remove variable modal and functionality to accessible Blockly.
* Adding the add variable modal for accessible Blockly.
* Block browser context menu in the toolbox and flyout
* Add links to the dev registration form and contributor guidelines
* Miscellaneous comment cleanup
* Adding the common modal class. (#1017)
Centralizes accessible modal behavior.
* - Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages
- Fixed bug with js_to_json.py script where it didn't recognize ' character
* - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
* Making text_count use a text color (like text_length, which also returns a number). (#1027)
* Enable google/blockly with continuous build on travis ci (#1023) (#1035)
* create .travis for ci job
* initial checkin for blocky-web travis ci job
* rename file to .travis.yaml for typo
* remove after_script
* added cache
* rename .travis.yaml to .travis.yml
* Update .travis.yml
* include build script
* fix yaml file format issue
* debug install part
* debug build issue
* Update .travis.yml
* remove cache for now
* Update .travis.yml
* Update .travis.yml
* Update .travis.yml
* more debug info
* Update .travis.yml
* Update .travis.yml
* fix typo
* installing chrome browser
* remove chrome setting config
* run build.py as part of npm install
* Update .travis.yml
* update karma dependency
* use karma as test runner
* fix typo
* remove karma test for now
* Update .travis.yml
* Update package.json
* add npm test target
* add browserstack-runner depdendency
* update browser support
* fix typo for test target
* fix chrome typo
* added closure dependency
* add google-closure-library
* include blockly_uncompressed.js and core.js dependency
* uncomment out core/*.js files
* add kama job as part of install
* remove browserstack add on for now
* fix karma config typo
* add karma-closure
* add os support
* remove typo config
* include more closure files
* change os back to linux
* use closure-library from node_modules
* change log level back to INFO
* change npm test target to use open browser command instead of karma
* change travis test target to use open command instead of karma
* list current directory
* find what's in current dir
* typo command
* Update .travis.yml
* typo again
* open right index.html
* use right path for index.html
* xdg-open to open default browser on travis
* exit browser after 5s wait
* change timeout to 1 min
* exit after opening up browser
* use browser only
* use karma
* remove un-needed dependency
* clean up script section
* fix typo
* update build status on readme
* initial commit for selenium integration tests
* update selenium jar path
* fix test_runner.js typo
* add more debug info
* check java version
* add && instead of 9288
* fix java path
* add logic to check if selenium is running or not
* add some deugging info
* initial commit to get chromedriver
* add chromedriver flag
* add get_chromedriver.sh to package.json and .travel
* change browser to chrome for now
* fix path issue
* update chromdriver path
* fix path issue again
* more debugging
* add debug msg
* fix typo
* minor fix for getting chromedriver
* install latest chrome browser
* clean up pakcage.json
* use npm target for test run
* remove removing trailing comma
* fix another trailing comma
* updated travis test target
* clean up scripts
* not sure nmp run preinstall
* redirect selenium log to tmp file
* revert writing console log to file
* update test summary
* more clean up
* minor clean up before pull request
* resolved closure-library conflict
1. add closure-library to dependencies instead of devDependencies.
2. add lint back in scripts block
* fix typo (adding comma) in script section
* Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
* Ensure useDragSurface is a boolean.
Fixed #988
* use pretest instead of preinstall in package.json (#1043)
* cherry pick for pretest fix
* put pretest target to test_setup.sh
* fix conflict
* cherry pick for get_chromedriver.sh
* add some sleep to wait download to finish
* use node.js stable
* use npm test target
* field_angle renders degree symbol consistently.
Fixes #973
* bumpNeighbours_ function moved to block_svg.
Fixed #1009
* Update RegEx in js-to-json to match windowi eol (#1050)
The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match.
* Fix French translation of "colour with rgb" block (#1053)
"colorier", which is currently used, is a verb and proposed "couleur" is
a noun: the block in question does not change colour of anything, it
creates new colour instead, thus noun is more applicable.
Also, noun is used in French translation of "random colour" block:
"couleur aléatoire".
* Enforcing non-empty names on value inputs and statement inputs. (#1054)
* Correcting #1054 (#1056)
single quotes. better logic.
* Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
* Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors. The old way was quite slow because it changed the stylesheet directly. See issue #981 for more details on implementation and tradeoffs. This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
* Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059)
* Merge master into develop (#1063)
- pick up translation changes
- clean up trailing spaces
* use goog.string.startswith instead of string.startswith (#1065)
* New jsinterpreter demo includes wait block. Both demos have improved UI for clarity. (#1001)
Refactor of interpreter demo
* Renamed demos/interpreter/index.html as demos/interpreter/step-execution.html (including redirect), and added demos/interpreter/async-execution.html.
* Refactored code to automatically generate/parse the blocks, eliminating the need for a "Parse JavaScript" button. Code is still shown in alert upon stepping to the first statement. Print statements now write to output <textarea> instead of modal dialogs.
* Fix #1069 (#1073)
* Fix cursor and mistaken css from merge
* Comment out broken field angle merge
* Fix broken merge with borders
* Add back original package json (woops)
* Remove render function for field angle, may not be the right way but it was broken...
* Revert merge blocking variable shadow blocks
* Add changes from built lang files
* Add back travis and readme
* Revert broken cleanup additions
* Add notes for scratch-block specific functions
* Revert change to css so blocks stay under the toolbox
* Add back accidentally removed files
* Use getFlyout_ instead of getFlyout everywhere
* Satisfy the linter
* Re-remove deprecated function
* Remove duplicated code in block_svg
* Add back flip_rtl option for images
* Remove more duplicated functions from past merges
* Fix flip_rtl code
* Revert renaming of getFlyout
2017-05-11 15:58:18 -04:00
Blockly . Msg . MATH _CONSTRAIN _HELPURL = 'https://en.wikipedia.org/wiki/Clamping_(graphics)' ;
2013-10-30 14:46:03 -07:00
/// block text - The title of the block that '''constrain'''s (forces) a number to be in a given range.
///For example, if the number 150 is constrained to be between 5 and 100, the result will be 100.
///\n\nParameters:\n* %1 - the value to constrain (e.g., 150)\n* %2 - the minimum value (e.g., 5)\n* %3 - the maximum value (e.g., 100).
Blockly . Msg . MATH _CONSTRAIN _TITLE = 'constrain %1 low %2 high %3' ;
/// tooltip - This compares a number ''x'' to a low value ''L'' and a high value ''H''. If ''x'' is less then ''L'', the result is ''L''. If ''x'' is greater than ''H'', the result is ''H''. Otherwise, the result is ''x''.
Blockly . Msg . MATH _CONSTRAIN _TOOLTIP = 'Constrain a number to be between the specified limits (inclusive).' ;
/// url - Information about how computers generate random numbers.
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _RANDOM _INT _HELPURL = 'https://en.wikipedia.org/wiki/Random_number_generation' ;
2013-10-30 14:46:03 -07:00
/// block text - The title of the block that generates a random integer (whole number) in the specified range. For example, if the range is from 5 to 7, this returns 5, 6, or 7 with equal likelihood. %1 is a placeholder for the lower number, %2 is the placeholder for the larger number.
Blockly . Msg . MATH _RANDOM _INT _TITLE = 'random integer from %1 to %2' ;
/// tooltip - Return a random integer between two values specified as inputs. For example, if one input was 7 and another 9, any of the numbers 7, 8, or 9 could be produced.
Blockly . Msg . MATH _RANDOM _INT _TOOLTIP = 'Return a random integer between the two specified limits, inclusive.' ;
/// url - Information about how computers generate random numbers (specifically, numbers in the range from 0 to just below 1).
2013-11-25 17:33:36 -08:00
Blockly . Msg . MATH _RANDOM _FLOAT _HELPURL = 'https://en.wikipedia.org/wiki/Random_number_generation' ;
2013-10-30 14:46:03 -07:00
/// block text - The title of the block that generates a random number greater than or equal to 0 and less than 1.
Blockly . Msg . MATH _RANDOM _FLOAT _TITLE _RANDOM = 'random fraction' ;
/// tooltip - Return a random fraction between 0 and 1. The value may be equal to 0 but must be less than 1.
Blockly . Msg . MATH _RANDOM _FLOAT _TOOLTIP = 'Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).' ;
// Text Blocks.
/// url - Information about how computers represent text (sometimes referred to as ''string''s).
2013-11-25 17:33:36 -08:00
Blockly . Msg . TEXT _TEXT _HELPURL = 'https://en.wikipedia.org/wiki/String_(computer_science)' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Text https://github.com/google/blockly/wiki/Text].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _TEXT _TOOLTIP = 'A letter, word, or line of text.' ;
/// url - Information on concatenating/appending pieces of text.
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _JOIN _HELPURL = 'https://github.com/google/blockly/wiki/Text#text-creation' ;
/// block text - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _JOIN _TITLE _CREATEWITH = 'create text with' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Text#text-creation create text with] for more information.
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _JOIN _TOOLTIP = 'Create a piece of text by joining together any number of items.' ;
2015-09-11 21:47:17 -07:00
/// block text - This is shown when the programmer wants to change the number of pieces of text being joined together. See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section.\n{{Identical|Join}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _CREATE _JOIN _TITLE _JOIN = 'join' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section.
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _CREATE _JOIN _TOOLTIP = 'Add, remove, or reorder sections to reconfigure this text block.' ;
Blockly . Msg . TEXT _CREATE _JOIN _ITEM _TITLE _ITEM = Blockly . Msg . VARIABLES _DEFAULT _NAME ;
2014-10-15 14:44:31 -07:00
/// block text - See [https://github.com/google/blockly/wiki/Text#text-creation https://github.com/google/blockly/wiki/Text#text-creation], specifically the last picture in the 'Text creation' section.
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _CREATE _JOIN _ITEM _TOOLTIP = 'Add an item to the text.' ;
2013-11-25 17:33:36 -08:00
/// url - This and the other text-related URLs are going to be hard to translate. As always, it is okay to leave untranslated or paste in the English-language URL. For these URLs, you might also consider a general URL about how computers represent text (such as the translation of [https://en.wikipedia.org/wiki/String_(computer_science) this Wikipedia page]).
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _APPEND _HELPURL = 'https://github.com/google/blockly/wiki/Text#text-modification' ;
2013-10-30 14:46:03 -07:00
/// block input text - Message preceding the name of a variable to which text should be appended.
/// [[File:blockly-append-text.png]]
Blockly . Msg . TEXT _APPEND _TO = 'to' ;
/// block input text - Message following the variable and preceding the piece of text that should
/// be appended, as shown below.
/// [[File:blockly-append-text.png]]
Blockly . Msg . TEXT _APPEND _APPENDTEXT = 'append text' ;
Blockly . Msg . TEXT _APPEND _VARIABLE = Blockly . Msg . VARIABLES _DEFAULT _NAME ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Text#text-modification https://github.com/google/blockly/wiki/Text#text-modification] for more information.\n\nParameters:\n* %1 - the name of the variable to which text should be appended
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _APPEND _TOOLTIP = 'Append some text to variable "%1".' ;
/// url - Information about text on computers (usually referred to as 'strings').
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _LENGTH _HELPURL = 'https://github.com/google/blockly/wiki/Text#text-modification' ;
/// block text - See [https://github.com/google/blockly/wiki/Text#text-length https://github.com/google/blockly/wiki/Text#text-length].
2013-10-30 14:46:03 -07:00
/// \n\nParameters:\n* %1 - the piece of text to take the length of
Blockly . Msg . TEXT _LENGTH _TITLE = 'length of %1' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Text#text-length https://github.com/google/blockly/wiki/Text#text-length].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _LENGTH _TOOLTIP = 'Returns the number of letters (including spaces) in the provided text.' ;
/// url - Information about empty pieces of text on computers (usually referred to as 'empty strings').
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _ISEMPTY _HELPURL = 'https://github.com/google/blockly/wiki/Text#checking-for-empty-text' ;
/// block text - See [https://github.com/google/blockly/wiki/Text#checking-for-empty-text https://github.com/google/blockly/wiki/Text#checking-for-empty-text].
2013-10-30 14:46:03 -07:00
/// \n\nParameters:\n* %1 - the piece of text to test for emptiness
Blockly . Msg . TEXT _ISEMPTY _TITLE = '%1 is empty' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Text#checking-for-empty-text https://github.com/google/blockly/wiki/Text#checking-for-empty-text].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _ISEMPTY _TOOLTIP = 'Returns true if the provided text is empty.' ;
/// url - Information about finding a character in a piece of text.
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _INDEXOF _HELPURL = 'https://github.com/google/blockly/wiki/Text#finding-text' ;
2016-07-08 18:58:28 -07:00
/// tooltip - %1 will be replaced by either the number 0 or -1 depending on the indexing mode. See [https://github.com/google/blockly/wiki/Text#finding-text https://github.com/google/blockly/wiki/Text#finding-text].
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.' ;
2013-10-30 14:46:03 -07:00
/// block text - Title of blocks allowing users to find text. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#finding-text
/// https://github.com/google/blockly/wiki/Text#finding-text].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-find-text.png]].
Blockly . Msg . TEXT _INDEXOF _INPUT _INTEXT = 'in text' ;
2014-10-15 14:44:31 -07:00
/// dropdown - See [https://github.com/google/blockly/wiki/Text#finding-text
/// https://github.com/google/blockly/wiki/Text#finding-text].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-find-text.png]].
Blockly . Msg . TEXT _INDEXOF _OPERATOR _FIRST = 'find first occurrence of text' ;
2014-10-15 14:44:31 -07:00
/// dropdown - See [https://github.com/google/blockly/wiki/Text#finding-text
/// https://github.com/google/blockly/wiki/Text#finding-text]. This would
2013-10-30 14:46:03 -07:00
/// replace "find first occurrence of text" below. (For more information on
/// how common text is factored out of dropdown menus, see
2013-12-20 16:25:26 -08:00
/// [https://translatewiki.net/wiki/Translating:Blockly#Drop-Down_Menus
/// https://translatewiki.net/wiki/Translating:Blockly#Drop-Down_Menus)].)
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-find-text.png]].
Blockly . Msg . TEXT _INDEXOF _OPERATOR _LAST = 'find last occurrence of text' ;
/// block text - Optional text to follow the rightmost block in a
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#finding-text
/// https://github.com/google/blockly/wiki/Text#finding-text in text ... find block]
2013-10-30 14:46:03 -07:00
/// (after the "a" in the below picture). This will be the empty string in most languages.
/// [[File:Blockly-find-text.png]].
Blockly . Msg . TEXT _INDEXOF _TAIL = '' ;
/// url - Information about extracting characters (letters, number, symbols, etc.) from text.
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _CHARAT _HELPURL = 'https://github.com/google/blockly/wiki/Text#extracting-text' ;
2013-10-30 14:46:03 -07:00
/// block text - Appears before the piece of text from which a letter (or number,
/// punctuation character, etc.) should be extracted, as shown below. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-single-character
/// https://github.com/google/blockly/wiki/Text#extracting-a-single-character].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-text-get.png]]
Blockly . Msg . TEXT _CHARAT _INPUT _INTEXT = 'in text' ;
/// dropdown - Indicates that the letter (or number, punctuation character, etc.) with the
/// specified index should be obtained from the preceding piece of text. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-single-character
/// https://github.com/google/blockly/wiki/Text#extracting-a-single-character].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-text-get.png]]
Blockly . Msg . TEXT _CHARAT _FROM _START = 'get letter #' ;
/// block text - Indicates that the letter (or number, punctuation character, etc.) with the
/// specified index from the end of a given piece of text should be obtained. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-single-character
/// https://github.com/google/blockly/wiki/Text#extracting-a-single-character].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-text-get.png]]
Blockly . Msg . TEXT _CHARAT _FROM _END = 'get letter # from end' ;
/// block text - Indicates that the first letter of the following piece of text should be
2014-10-15 14:44:31 -07:00
/// retrieved. See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character
/// https://github.com/google/blockly/wiki/Text#extracting-a-single-character].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-text-get.png]]
Blockly . Msg . TEXT _CHARAT _FIRST = 'get first letter' ;
/// block text - Indicates that the last letter (or number, punctuation mark, etc.) of the
/// following piece of text should be retrieved. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-single-character
/// https://github.com/google/blockly/wiki/Text#extracting-a-single-character].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-text-get.png]]
Blockly . Msg . TEXT _CHARAT _LAST = 'get last letter' ;
/// block text - Indicates that any letter (or number, punctuation mark, etc.) in the
/// following piece of text should be randomly selected. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-single-character
/// https://github.com/google/blockly/wiki/Text#extracting-a-single-character].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-text-get.png]]
Blockly . Msg . TEXT _CHARAT _RANDOM = 'get random letter' ;
/// block text - Text that goes after the rightmost block/dropdown when getting a single letter from
2013-12-20 16:25:26 -08:00
/// a piece of text, as in [https://blockly-demo.appspot.com/static/apps/code/index.html#3m23km these
2013-10-30 14:46:03 -07:00
/// blocks] or shown below. For most languages, this will be blank.
/// [[File:Blockly-text-get.png]]
Blockly . Msg . TEXT _CHARAT _TAIL = '' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Text#extracting-a-single-character
/// https://github.com/google/blockly/wiki/Text#extracting-a-single-character].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-text-get.png]]
Blockly . Msg . TEXT _CHARAT _TOOLTIP = 'Returns the letter at the specified position.' ;
2014-10-15 14:44:31 -07:00
/// See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text
/// https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _GET _SUBSTRING _TOOLTIP = 'Returns a specified portion of the text.' ;
/// url - Information about extracting characters from text. Reminder: urls are the
/// lowest priority translations. Feel free to skip.
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _GET _SUBSTRING _HELPURL = 'https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text' ;
2013-10-30 14:46:03 -07:00
/// block text - Precedes a piece of text from which a portion should be extracted.
/// [[File:Blockly-get-substring.png]]
Blockly . Msg . TEXT _GET _SUBSTRING _INPUT _IN _TEXT = 'in text' ;
/// dropdown - Indicates that the following number specifies the position (relative to the start
/// position) of the beginning of the region of text that should be obtained from the preceding
2014-10-15 14:44:31 -07:00
/// piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text
/// https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-substring.png]]
Blockly . Msg . TEXT _GET _SUBSTRING _START _FROM _START = 'get substring from letter #' ;
/// dropdown - Indicates that the following number specifies the position (relative to the end
/// position) of the beginning of the region of text that should be obtained from the preceding
2014-10-15 14:44:31 -07:00
/// piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text
/// https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].
2013-10-30 14:46:03 -07:00
/// Note: If {{msg-Blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will
/// automatically appear ''after'' this and any other
2013-12-20 16:25:26 -08:00
/// [https://translatewiki.net/wiki/Translating:Blockly#Ordinal_numbers ordinal numbers]
2013-10-30 14:46:03 -07:00
/// on this block.
/// [[File:Blockly-get-substring.png]]
Blockly . Msg . TEXT _GET _SUBSTRING _START _FROM _END = 'get substring from letter # from end' ;
/// block text - Indicates that a region starting with the first letter of the preceding piece
/// of text should be extracted. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text
/// https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-substring.png]]
Blockly . Msg . TEXT _GET _SUBSTRING _START _FIRST = 'get substring from first letter' ;
/// dropdown - Indicates that the following number specifies the position (relative to
/// the start position) of the end of the region of text that should be obtained from the
2014-11-14 14:21:03 -08:00
/// preceding piece of text. See
/// [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text
2014-10-15 14:44:31 -07:00
/// https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-substring.png]]
Blockly . Msg . TEXT _GET _SUBSTRING _END _FROM _START = 'to letter #' ;
/// dropdown - Indicates that the following number specifies the position (relative to the
/// end position) of the end of the region of text that should be obtained from the preceding
/// piece of text. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text
/// https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-substring.png]]
Blockly . Msg . TEXT _GET _SUBSTRING _END _FROM _END = 'to letter # from end' ;
/// block text - Indicates that a region ending with the last letter of the preceding piece
/// of text should be extracted. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text
/// https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-substring.png]]
Blockly . Msg . TEXT _GET _SUBSTRING _END _LAST = 'to last letter' ;
/// block text - Text that should go after the rightmost block/dropdown when
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text
2013-10-30 14:46:03 -07:00
/// extracting a region of text]. In most languages, this will be the empty string.
/// [[File:Blockly-get-substring.png]]
Blockly . Msg . TEXT _GET _SUBSTRING _TAIL = '' ;
/// url - Information about the case of letters (upper-case and lower-case).
2015-08-03 20:34:07 +02:00
Blockly . Msg . TEXT _CHANGECASE _HELPURL = 'https://github.com/google/blockly/wiki/Text#adjusting-text-case' ;
2013-10-30 14:46:03 -07:00
/// tooltip - Describes a block to adjust the case of letters. For more information on this block,
2014-10-15 14:44:31 -07:00
/// see [https://github.com/google/blockly/wiki/Text#adjusting-text-case
/// https://github.com/google/blockly/wiki/Text#adjusting-text-case].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _CHANGECASE _TOOLTIP = 'Return a copy of the text in a different case.' ;
/// block text - Indicates that all of the letters in the following piece of text should be
/// capitalized. If your language does not use case, you may indicate that this is not
/// applicable to your language. For more information on this block, see
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#adjusting-text-case
/// https://github.com/google/blockly/wiki/Text#adjusting-text-case].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _CHANGECASE _OPERATOR _UPPERCASE = 'to UPPER CASE' ;
2014-10-15 14:44:31 -07:00
/// block text - Indicates that all of the letters in the following piece of text should be converted to lower-case. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _CHANGECASE _OPERATOR _LOWERCASE = 'to lower case' ;
2014-10-15 14:44:31 -07:00
/// block text - Indicates that the first letter of each of the following words should be capitalized and the rest converted to lower-case. If your language does not use case, you may indicate that this is not applicable to your language. For more information on this block, see [https://github.com/google/blockly/wiki/Text#adjusting-text-case https://github.com/google/blockly/wiki/Text#adjusting-text-case].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _CHANGECASE _OPERATOR _TITLECASE = 'to Title Case' ;
/// url - Information about trimming (removing) text off the beginning and ends of pieces of text.
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _TRIM _HELPURL = 'https://github.com/google/blockly/wiki/Text#trimming-removing-spaces' ;
/// tooltip - See [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces
/// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _TRIM _TOOLTIP = 'Return a copy of the text with spaces removed from one or both ends.' ;
/// dropdown - Removes spaces from the beginning and end of a piece of text. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces
/// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces]. Note that neither
2013-12-20 16:25:26 -08:00
/// this nor the other options modify the original piece of text (that follows);
2013-10-30 14:46:03 -07:00
/// the block just returns a version of the text without the specified spaces.
2013-12-20 16:25:26 -08:00
Blockly . Msg . TEXT _TRIM _OPERATOR _BOTH = 'trim spaces from both sides of' ;
2013-10-30 14:46:03 -07:00
/// dropdown - Removes spaces from the beginning of a piece of text. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces
/// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces].
2013-10-30 14:46:03 -07:00
/// Note that in right-to-left scripts, this will remove spaces from the right side.
2013-12-20 16:25:26 -08:00
Blockly . Msg . TEXT _TRIM _OPERATOR _LEFT = 'trim spaces from left side of' ;
2013-10-30 14:46:03 -07:00
/// dropdown - Removes spaces from the end of a piece of text. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#trimming-removing-spaces
/// https://github.com/google/blockly/wiki/Text#trimming-removing-spaces].
2013-10-30 14:46:03 -07:00
/// Note that in right-to-left scripts, this will remove spaces from the left side.
2013-12-20 16:25:26 -08:00
Blockly . Msg . TEXT _TRIM _OPERATOR _RIGHT = 'trim spaces from right side of' ;
2013-10-30 14:46:03 -07:00
/// url - Information about displaying text on computers.
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _PRINT _HELPURL = 'https://github.com/google/blockly/wiki/Text#printing-text' ;
2013-10-30 14:46:03 -07:00
/// block text - Display the input on the screen. See
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Text#printing-text
/// https://github.com/google/blockly/wiki/Text#printing-text].
2013-10-30 14:46:03 -07:00
/// \n\nParameters:\n* %1 - the value to print
Blockly . Msg . TEXT _PRINT _TITLE = 'print %1' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Text#printing-text
/// https://github.com/google/blockly/wiki/Text#printing-text].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _PRINT _TOOLTIP = 'Print the specified text, number or other value.' ;
/// url - Information about getting text from users.
2014-10-15 14:44:31 -07:00
Blockly . Msg . TEXT _PROMPT _HELPURL = 'https://github.com/google/blockly/wiki/Text#getting-input-from-the-user' ;
2013-10-30 14:46:03 -07:00
/// dropdown - Specifies that a piece of text should be requested from the user with
2014-10-15 14:44:31 -07:00
/// the following message. See [https://github.com/google/blockly/wiki/Text#printing-text
/// https://github.com/google/blockly/wiki/Text#printing-text].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _PROMPT _TYPE _TEXT = 'prompt for text with message' ;
/// dropdown - Specifies that a number should be requested from the user with the
2014-10-15 14:44:31 -07:00
/// following message. See [https://github.com/google/blockly/wiki/Text#printing-text
/// https://github.com/google/blockly/wiki/Text#printing-text].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _PROMPT _TYPE _NUMBER = 'prompt for number with message' ;
/// dropdown - Precedes the message with which the user should be prompted for
2014-10-15 14:44:31 -07:00
/// a number. See [https://github.com/google/blockly/wiki/Text#printing-text
/// https://github.com/google/blockly/wiki/Text#printing-text].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _PROMPT _TOOLTIP _NUMBER = 'Prompt for user for a number.' ;
/// dropdown - Precedes the message with which the user should be prompted for some text.
2014-10-15 14:44:31 -07:00
/// See [https://github.com/google/blockly/wiki/Text#printing-text
/// https://github.com/google/blockly/wiki/Text#printing-text].
2013-10-30 14:46:03 -07:00
Blockly . Msg . TEXT _PROMPT _TOOLTIP _TEXT = 'Prompt for user for some text.' ;
Feature/merge feb 2017 (#791)
* Revert "Rebuild nov 3 16"
* Move injected css to start of head
* simplification
* lint
* Remove copy/paste buttons.
* Localisation updates from https://translatewiki.net.
* Don't split dropdown text if there is an image.
* Unblock push to master.
* Revert "Revert "Rebuild nov 3 16""
This reverts commit c8ca24a0007b70e137417e843459c87185141a55.
* rebuild
* Remove ifelse block and messages'
* Remove obsolete Gecko image hack. Apparently this has been fixed in Gecko.
* Add correct focus behavior for the modal. Update boundary sounds.
* Disallow clicks on disabled buttons.
* add back metadata tag to qqq
* revert qqq.json
* Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging. This is a backport of the block drag surface from scratch-blocks. At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move. At the end of the drag, the blocks are dropped back in the svg in their new position.
* API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
* String reference in JSON string messages (#741)
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
* Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
* Fix compiler errors.
* Break the sidebar out into its own individual component.
* Hide notification messages after a short time interval.
* Fix selection border on blocks that have been highlighted.
* controls_ifelse: Remove right-align. Remove Boolean check on statements. (#749)
* Move away from using a common modal service, since the block options and the toolbox modals are going to end up behaving fairly differently.
* Fix conflict between 'utils' and 'image dropdown' merges.
* Add a contextual modal for the toolbox.
* Fix some bugs arising in the toolbox modal for the no-categories case.
* Allow attaching blocks to a marked spot from the toolbox modal. This is the last prerequisite for removal of the existing on-screen toolbox.
* Delete the on-screen toolbox.
* Add warning sounds when the user reaches a boundary of the workspace.
* Stop some blocks from throwing errors in headless workspaces.
* Lint
* Fix speling.
* Fix broken highlighting when highlighted block is deleted. Issue 752.
* When the workspace is empty, make it easy for the user to add a new group of blocks to it.
* Handle the finer points for setting focus correctly after deleting blocks from the workspace.
* When user edits text in a field, set text, not value.
Existing text-editable fields don’t care (dropdown care, but are not
text-editable). But a note picker needs to set its value to 60 if text
is set to ‘C4’.
* Set the text not the value when closing a text editor.
Also rename variables for clarity.
* Localisation updates from https://translatewiki.net.
* Streamline the logic for block selection callbacks in the toolbox modal.
* Do not show disabled actions in the block options modal.
* Set focus correctly when toolbox modal is dismissed.
* Add information regarding target screen reader and browser.
* Rebuild Blockly.
* Remove unavailable blocks from toolbox modal. Hide unnecessary category name in a toolbox without categories.
* Do some refactoring and tidy-up. Pull some hardcoded strings out for i18n purposes; remove unused strings.
* Update config options for sidebar buttons.
* Minor refactoring. Remove unused dependencies.
* Improve styling of sidebar buttons.
* Remove clipboard functionality.
* Refactor and simplify marked spot logic.
* Change dropdowns to select fields instead of lists of buttons.
* Add ability to specify a css class for labels and buttons
* Don't make labels clickable
* console.log -> console.warn
* change 'class' to 'web-style'
* createSvgElement is now in utils. fix two calls.
* Improve comments.
* lint
* fix missing semicolon
* When adding a new block group from the toolbox modal, only show blocks with no output connections.
* Clean up the sidebar file and remove unneeded code.
* Remove some functions from utilsService and consolidate code in workspace-tree.component.js.
* Standardize indentation.
* Remove premature focus on buttons in modal dialogs, since this prevents readout of the dialog text.
* Localisation updates from https://translatewiki.net.
* Don't get Toolbox element unless needed.
* Associate flyout button callbacks directly with workspaces
* Add colour block to the block factory base block initial state
* Start getting helpurl and tooltip in
* Generate helpURL and tooltip for Javascript block definition
* Use Tab keys instead of arrow keys for dialog boxes. Set role=alertdialog and read out the header/text automatically. Ensure that Esc key actually closes dialogs and that all keystrokes are captured.
* Add an aria-describedby to the 'create new block group...' button in the workspace to give more context.
* Fix issue with aria-liveregion not speaking. Allow sufficient time for alert noise to play before speaking the notification.
* Make zoom speed independent of event granularity
Before, touchpads would give "smoother" scrolling by delivering lots of
mousewheel events with small distance changes. Because the code only
looked at the sign of deltaY, ten 5px scrolls would zoom 10x more than
one 50px scroll.
This change makes zooming with a touchpad more like zooming with a
mousewheel. On my laptop, a full-scale zoom (fully out to fully in) was
about a 5mm finger movement before, and is now about 3cm.
Fixes #758.
* Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG. This paves the way to make performance
improvements to workspace dragging.
* remove overflow-y on the block exporter labels so scroll bars do not show upin firefox. Also fix up the styles on the labels so that they display better in firefox. (#699)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure w… (#700)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure why that was there.
Also replaces bad names on input. There are probably more invalid names but this is
a start.
* update generator comments
* Move the call to disable resize before placeNewBlock so that it is of… (#777)
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock. This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
* Disable workspace resizing while loading the flyout from XML
* Localisation updates from https://translatewiki.net.
* Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.
* Address code review comments
* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
* Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. (#787)
* Localisation updates from https://translatewiki.net.
* Change the Python codegen for string quoting to match the behaviour of `repr` on a string in CPython.
* Localisation updates from https://translatewiki.net.
* Add an `allInputsConnected` method to `Block` and `Workspace` to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off `develop` instead of `master` as per discussion in PR #791.
* Localisation updates from https://translatewiki.net.
* Localisation updates from https://translatewiki.net.
* Use the drag surface when scrolling using the scrollbars. #783 (#789)
* End event groups when you finish editing a field
* Fix #794 and make the workspace grid drag along with the workspace. (#801)
There was some IE specific code that also applies to Edge so just updated
a conditional to include Edge.
* Now that text input's setText skips setValue, it needs to explicitly create a change event
* Check if the text has changed before firing an event
* Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory
* Routine rebuild
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Add a block to reverse a list (#844)
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Fix a few small errors and rebuild
* Call dynamic toolbox generators correctly
* cleanup
* Fix unit tests, and delete a few that relied on completely undefined behaviour
* Fix RTL text inputs
* eslintignore more tests
* Fix insertion marker highlighting, I think
* Make getFlyout public
2017-02-21 12:09:23 -08:00
/// block text - Title of a block that counts the number of instances of
/// a smaller pattern (%1) inside a longer string (%2).
Blockly . Msg . TEXT _COUNT _MESSAGE0 = 'count %1 in %2' ;
/// url - Information about counting how many times a string appears in another string.
Blockly . Msg . TEXT _COUNT _HELPURL = 'https://github.com/google/blockly/wiki/Text#counting-substrings' ;
/// tooltip - Short description of a block that counts how many times some text occurs within some other text.
Blockly . Msg . TEXT _COUNT _TOOLTIP = 'Count how many times some text occurs within some other text.' ;
/// block text - Title of a block that returns a copy of text (%3) with all
/// instances of some smaller text (%1) replaced with other text (%2).
Blockly . Msg . TEXT _REPLACE _MESSAGE0 = 'replace %1 with %2 in %3' ;
/// url - Information about replacing each copy text (or string, in computer lingo) with other text.
Blockly . Msg . TEXT _REPLACE _HELPURL = 'https://github.com/google/blockly/wiki/Text#replacing-substrings' ;
/// tooltip - Short description of a block that replaces copies of text in a large text with other text.
Blockly . Msg . TEXT _REPLACE _TOOLTIP = 'Replace all occurances of some text within some other text.' ;
/// block text - Title of block that returns a copy of text (%1) with the order
/// of letters and characters reversed.
Blockly . Msg . TEXT _REVERSE _MESSAGE0 = 'reverse %1' ;
/// url - Information about reversing a letters/characters in text.
Blockly . Msg . TEXT _REVERSE _HELPURL = 'https://github.com/google/blockly/wiki/Text#reversing-text' ;
/// tooltip - See [https://github.com/google/blockly/wiki/Text].
Blockly . Msg . TEXT _REVERSE _TOOLTIP = 'Reverses the order of the characters in the text.' ;
2013-10-30 14:46:03 -07:00
// Lists Blocks.
/// url - Information on empty lists.
2015-01-18 16:54:30 -08:00
Blockly . Msg . LISTS _CREATE _EMPTY _HELPURL = 'https://github.com/google/blockly/wiki/Lists#create-empty-list' ;
2014-10-15 14:44:31 -07:00
/// block text - See [https://github.com/google/blockly/wiki/Lists#create-empty-list https://github.com/google/blockly/wiki/Lists#create-empty-list].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _CREATE _EMPTY _TITLE = 'create empty list' ;
2014-10-15 14:44:31 -07:00
/// block text - See [https://github.com/google/blockly/wiki/Lists#create-empty-list https://github.com/google/blockly/wiki/Lists#create-empty-list].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _CREATE _EMPTY _TOOLTIP = 'Returns a list, of length 0, containing no data records' ;
2015-01-18 16:54:30 -08:00
/// url - Information on building lists.
Blockly . Msg . LISTS _CREATE _WITH _HELPURL = 'https://github.com/google/blockly/wiki/Lists#create-list-with' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#create-list-with https://github.com/google/blockly/wiki/Lists#create-list-with].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _CREATE _WITH _TOOLTIP = 'Create a list with any number of items.' ;
2014-10-15 14:44:31 -07:00
/// block text - See [https://github.com/google/blockly/wiki/Lists#create-list-with https://github.com/google/blockly/wiki/Lists#create-list-with].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _CREATE _WITH _INPUT _WITH = 'create list with' ;
2015-09-11 21:47:17 -07:00
/// block text - This appears in a sub-block when [https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs changing the number of inputs in a ''''create list with'''' block].\n{{Identical|List}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _CREATE _WITH _CONTAINER _TITLE _ADD = 'list' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _CREATE _WITH _CONTAINER _TOOLTIP = 'Add, remove, or reorder sections to reconfigure this list block.' ;
Blockly . Msg . LISTS _CREATE _WITH _ITEM _TITLE = Blockly . Msg . VARIABLES _DEFAULT _NAME ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs https://github.com/google/blockly/wiki/Lists#changing-number-of-inputs].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _CREATE _WITH _ITEM _TOOLTIP = 'Add an item to the list.' ;
2014-10-15 14:44:31 -07:00
/// url - Information about [https://github.com/google/blockly/wiki/Lists#create-list-with creating a list with multiple copies of a single item].
Blockly . Msg . LISTS _REPEAT _HELPURL = 'https://github.com/google/blockly/wiki/Lists#create-list-with' ;
/// url - See [https://github.com/google/blockly/wiki/Lists#create-list-with creating a list with multiple copies of a single item].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _REPEAT _TOOLTIP = 'Creates a list consisting of the given value repeated the specified number of times.' ;
2014-10-15 14:44:31 -07:00
/// block text - See [https://github.com/google/blockly/wiki/Lists#create-list-with
/// https://github.com/google/blockly/wiki/Lists#create-list-with].
2013-10-30 14:46:03 -07:00
///\n\nParameters:\n* %1 - the item (text) to be repeated\n* %2 - the number of times to repeat it
Blockly . Msg . LISTS _REPEAT _TITLE = 'create list with item %1 repeated %2 times' ;
/// url - Information about how the length of a list is computed (i.e., by the total number of elements, not the number of different elements).
2014-10-15 14:44:31 -07:00
Blockly . Msg . LISTS _LENGTH _HELPURL = 'https://github.com/google/blockly/wiki/Lists#length-of' ;
/// block text - See [https://github.com/google/blockly/wiki/Lists#length-of https://github.com/google/blockly/wiki/Lists#length-of].
2013-10-30 14:46:03 -07:00
/// \n\nParameters:\n* %1 - the list whose length is desired
Blockly . Msg . LISTS _LENGTH _TITLE = 'length of %1' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#length-of https://github.com/google/blockly/wiki/Lists#length-of Blockly:Lists:length of].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _LENGTH _TOOLTIP = 'Returns the length of a list.' ;
2014-10-15 14:44:31 -07:00
/// url - See [https://github.com/google/blockly/wiki/Lists#is-empty https://github.com/google/blockly/wiki/Lists#is-empty].
2015-06-08 18:38:33 -07:00
Blockly . Msg . LISTS _ISEMPTY _HELPURL = 'https://github.com/google/blockly/wiki/Lists#is-empty' ;
2014-10-15 14:44:31 -07:00
/// block text - See [https://github.com/google/blockly/wiki/Lists#is-empty
/// https://github.com/google/blockly/wiki/Lists#is-empty].
2013-10-30 14:46:03 -07:00
/// \n\nParameters:\n* %1 - the list to test
2015-06-08 18:38:33 -07:00
Blockly . Msg . LISTS _ISEMPTY _TITLE = '%1 is empty' ;
2014-10-15 14:44:31 -07:00
/// block tooltip - See [https://github.com/google/blockly/wiki/Lists#is-empty
/// https://github.com/google/blockly/wiki/Lists#is-empty].
2015-06-08 18:38:33 -07:00
Blockly . Msg . LISTS _ISEMPTY _TOOLTIP = 'Returns true if the list is empty.' ;
2013-10-30 14:46:03 -07:00
2014-09-18 16:52:00 -07:00
/// block text - Title of blocks operating on [https://github.com/google/blockly/wiki/Lists lists].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _INLIST = 'in list' ;
2014-10-15 14:44:31 -07:00
/// url - See [https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list
/// https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list].
Blockly . Msg . LISTS _INDEX _OF _HELPURL = 'https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _INDEX _OF _INPUT _IN _LIST = Blockly . Msg . LISTS _INLIST ;
2014-10-15 14:44:31 -07:00
/// dropdown - See [https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list
/// Lists#finding-items-in-a-list].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-list-find.png]]
Blockly . Msg . LISTS _INDEX _OF _FIRST = 'find first occurrence of item' ;
2014-10-15 14:44:31 -07:00
/// dropdown - See [https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list
/// https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-list-find.png]]
Blockly . Msg . LISTS _INDEX _OF _LAST = 'find last occurrence of item' ;
2016-07-08 18:58:28 -07:00
/// tooltip - %1 will be replaced by either the number 0 or -1 depending on the indexing mode. See [https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list
2014-10-15 14:44:31 -07:00
/// https://github.com/google/blockly/wiki/Lists#finding-items-in-a-list].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-list-find.png]]
2016-07-08 18:58:28 -07:00
Blockly . Msg . LISTS _INDEX _OF _TOOLTIP = 'Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found.' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _HELPURL = Blockly . Msg . LISTS _INDEX _OF _HELPURL ;
/// dropdown - Indicates that the user wishes to
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item
2013-10-30 14:46:03 -07:00
/// get an item from a list] without removing it from the list.
Blockly . Msg . LISTS _GET _INDEX _GET = 'get' ;
/// dropdown - Indicates that the user wishes to
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item
2013-10-30 14:46:03 -07:00
/// get and remove an item from a list], as opposed to merely getting
/// it without modifying the list.
Blockly . Msg . LISTS _GET _INDEX _GET _REMOVE = 'get and remove' ;
/// dropdown - Indicates that the user wishes to
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#removing-an-item
2015-06-08 15:54:18 -07:00
/// remove an item from a list].\n{{Identical|Remove}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _REMOVE = 'remove' ;
/// dropdown - Indicates that an index relative to the front of the list should be used to
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item get and/or remove
2013-10-30 14:46:03 -07:00
/// an item from a list]. Note: If {{msg-Blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will
/// automatically appear ''after'' this number (and any other ordinal numbers on this block).
/// See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly.
/// [[File:Blockly-list-get-item.png]]
Blockly . Msg . LISTS _GET _INDEX _FROM _START = '#' ;
/// dropdown - Indicates that an index relative to the end of the list should be used
2014-10-15 14:44:31 -07:00
/// to [https://github.com/google/blockly/wiki/Lists#getting-a-single-item access an item in a list].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-list-get-item.png]]
Blockly . Msg . LISTS _GET _INDEX _FROM _END = '# from end' ;
/// dropdown - Indicates that the '''first''' item should be
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-list-get-item.png]]
Blockly . Msg . LISTS _GET _INDEX _FIRST = 'first' ;
/// dropdown - Indicates that the '''last''' item should be
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-list-get-item.png]]
Blockly . Msg . LISTS _GET _INDEX _LAST = 'last' ;
/// dropdown - Indicates that a '''random''' item should be
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-list-get-item.png]]
Blockly . Msg . LISTS _GET _INDEX _RANDOM = 'random' ;
/// block text - Text that should go after the rightmost block/dropdown when
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-single-item
2013-10-30 14:46:03 -07:00
/// accessing an item from a list]. In most languages, this will be the empty string.
/// [[File:Blockly-list-get-item.png]]
Blockly . Msg . LISTS _GET _INDEX _TAIL = '' ;
Blockly . Msg . LISTS _GET _INDEX _INPUT _IN _LIST = Blockly . Msg . LISTS _INLIST ;
2016-07-09 04:23:01 -07:00
/// tooltip - Indicates the ordinal number that the first item in a list is referenced by. %1 will be replaced by either "#0" or "#1" depending on the indexing mode.
Blockly . Msg . LISTS _INDEX _FROM _START _TOOLTIP = '%1 is the first item.' ;
/// tooltip - Indicates the ordinal number that the last item in a list is referenced by. %1 will be replaced by either "#0" or "#1" depending on the indexing mode.
Blockly . Msg . LISTS _INDEX _FROM _END _TOOLTIP = '%1 is the last item.' ;
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for more information.
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _GET _FROM = 'Returns the item at the specified position in a list.' ;
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for more information.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _GET _FIRST = 'Returns the first item in a list.' ;
2016-07-09 04:23:01 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for more information.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _GET _LAST = 'Returns the last item in a list.' ;
2016-07-09 04:23:01 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for more information.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _GET _RANDOM = 'Returns a random item in a list.' ;
2016-07-09 04:23:01 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for '#' or '# from end'.
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _GET _REMOVE _FROM = 'Removes and returns the item at the specified position in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'first'.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _GET _REMOVE _FIRST = 'Removes and returns the first item in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'last'.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _GET _REMOVE _LAST = 'Removes and returns the last item in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'random'.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _GET _REMOVE _RANDOM = 'Removes and returns a random item in a list.' ;
2016-07-09 04:23:01 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for '#' or '# from end'.
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _REMOVE _FROM = 'Removes the item at the specified position in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'first'.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _REMOVE _FIRST = 'Removes the first item in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'last'.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _REMOVE _LAST = 'Removes the last item in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-and-removing-an-item] (for remove and return) and [https://github.com/google/blockly/wiki/Lists#getting-a-single-item] for 'random'.
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _INDEX _TOOLTIP _REMOVE _RANDOM = 'Removes a random item in a list.' ;
/// url - Information about putting items in lists.
2014-10-15 14:44:31 -07:00
Blockly . Msg . LISTS _SET _INDEX _HELPURL = 'https://github.com/google/blockly/wiki/Lists#in-list--set' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _SET _INDEX _INPUT _IN _LIST = Blockly . Msg . LISTS _INLIST ;
2014-10-15 14:44:31 -07:00
/// block text - [https://github.com/google/blockly/wiki/Lists#in-list--set
2013-10-30 14:46:03 -07:00
/// Replaces an item in a list].
/// [[File:Blockly-in-list-set-insert.png]]
Blockly . Msg . LISTS _SET _INDEX _SET = 'set' ;
2014-10-15 14:44:31 -07:00
/// block text - [https://github.com/google/blockly/wiki/Lists#in-list--insert-at
2013-10-30 14:46:03 -07:00
/// Inserts an item into a list].
/// [[File:Blockly-in-list-set-insert.png]]
Blockly . Msg . LISTS _SET _INDEX _INSERT = 'insert at' ;
/// block text - The word(s) after the position in the list and before the item to be set/inserted.
/// [[File:Blockly-in-list-set-insert.png]]
Blockly . Msg . LISTS _SET _INDEX _INPUT _TO = 'as' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block).
2016-07-09 04:23:01 -07:00
Blockly . Msg . LISTS _SET _INDEX _TOOLTIP _SET _FROM = 'Sets the item at the specified position in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block).
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _SET _INDEX _TOOLTIP _SET _FIRST = 'Sets the first item in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block).
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _SET _INDEX _TOOLTIP _SET _LAST = 'Sets the last item in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "set" block).
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _SET _INDEX _TOOLTIP _SET _RANDOM = 'Sets a random item in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "insert" block).
2016-07-09 04:23:01 -07:00
Blockly . Msg . LISTS _SET _INDEX _TOOLTIP _INSERT _FROM = 'Inserts the item at the specified position in a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "insert" block).
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _SET _INDEX _TOOLTIP _INSERT _FIRST = 'Inserts the item at the start of a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "insert" block).
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _SET _INDEX _TOOLTIP _INSERT _LAST = 'Append the item to the end of a list.' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the "get" block, the idea is the same for the "insert" block).
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _SET _INDEX _TOOLTIP _INSERT _RANDOM = 'Inserts the item randomly in a list.' ;
/// url - Information describing extracting a sublist from an existing list.
2014-10-15 14:44:31 -07:00
Blockly . Msg . LISTS _GET _SUBLIST _HELPURL = 'https://github.com/google/blockly/wiki/Lists#getting-a-sublist' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _SUBLIST _INPUT _IN _LIST = Blockly . Msg . LISTS _INLIST ;
/// dropdown - Indicates that an index relative to the front of the list should be used
/// to specify the beginning of the range from which to
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-sublist.png]]
/// Note: If {{msg-Blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will
/// automatically appear ''after'' this number (and any other ordinal numbers on this block).
/// See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly.
Blockly . Msg . LISTS _GET _SUBLIST _START _FROM _START = 'get sub-list from #' ;
/// dropdown - Indicates that an index relative to the end of the list should be used
/// to specify the beginning of the range from which to
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist].
2013-10-30 14:46:03 -07:00
Blockly . Msg . LISTS _GET _SUBLIST _START _FROM _END = 'get sub-list from # from end' ;
/// dropdown - Indicates that the
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist sublist to extract]
2013-10-30 14:46:03 -07:00
/// should begin with the list's first item.
Blockly . Msg . LISTS _GET _SUBLIST _START _FIRST = 'get sub-list from first' ;
/// dropdown - Indicates that an index relative to the front of the list should be
/// used to specify the end of the range from which to
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-sublist.png]]
Blockly . Msg . LISTS _GET _SUBLIST _END _FROM _START = 'to #' ;
/// dropdown - Indicates that an index relative to the end of the list should be
/// used to specify the end of the range from which to
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist].
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-sublist.png]]
Blockly . Msg . LISTS _GET _SUBLIST _END _FROM _END = 'to # from end' ;
/// dropdown - Indicates that the '''last''' item in the given list should be
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist the end
2013-10-30 14:46:03 -07:00
/// of the selected sublist].
/// [[File:Blockly-get-sublist.png]]
Blockly . Msg . LISTS _GET _SUBLIST _END _LAST = 'to last' ;
/// block text - This appears in the rightmost position ("tail") of the
/// sublist block, as described at
2014-10-15 14:44:31 -07:00
/// [https://github.com/google/blockly/wiki/Lists#getting-a-sublist
/// https://github.com/google/blockly/wiki/Lists#getting-a-sublist].
2013-10-30 14:46:03 -07:00
/// In English and most other languages, this is the empty string.
/// [[File:Blockly-get-sublist.png]]
Blockly . Msg . LISTS _GET _SUBLIST _TAIL = '' ;
2014-10-15 14:44:31 -07:00
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-sublist
/// https://github.com/google/blockly/wiki/Lists#getting-a-sublist] for more information.
2013-10-30 14:46:03 -07:00
/// [[File:Blockly-get-sublist.png]]
Blockly . Msg . LISTS _GET _SUBLIST _TOOLTIP = 'Creates a copy of the specified portion of a list.' ;
Feature/merge feb 2017 (#791)
* Revert "Rebuild nov 3 16"
* Move injected css to start of head
* simplification
* lint
* Remove copy/paste buttons.
* Localisation updates from https://translatewiki.net.
* Don't split dropdown text if there is an image.
* Unblock push to master.
* Revert "Revert "Rebuild nov 3 16""
This reverts commit c8ca24a0007b70e137417e843459c87185141a55.
* rebuild
* Remove ifelse block and messages'
* Remove obsolete Gecko image hack. Apparently this has been fixed in Gecko.
* Add correct focus behavior for the modal. Update boundary sounds.
* Disallow clicks on disabled buttons.
* add back metadata tag to qqq
* revert qqq.json
* Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging. This is a backport of the block drag surface from scratch-blocks. At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move. At the end of the drag, the blocks are dropped back in the svg in their new position.
* API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
* String reference in JSON string messages (#741)
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
* Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
* Fix compiler errors.
* Break the sidebar out into its own individual component.
* Hide notification messages after a short time interval.
* Fix selection border on blocks that have been highlighted.
* controls_ifelse: Remove right-align. Remove Boolean check on statements. (#749)
* Move away from using a common modal service, since the block options and the toolbox modals are going to end up behaving fairly differently.
* Fix conflict between 'utils' and 'image dropdown' merges.
* Add a contextual modal for the toolbox.
* Fix some bugs arising in the toolbox modal for the no-categories case.
* Allow attaching blocks to a marked spot from the toolbox modal. This is the last prerequisite for removal of the existing on-screen toolbox.
* Delete the on-screen toolbox.
* Add warning sounds when the user reaches a boundary of the workspace.
* Stop some blocks from throwing errors in headless workspaces.
* Lint
* Fix speling.
* Fix broken highlighting when highlighted block is deleted. Issue 752.
* When the workspace is empty, make it easy for the user to add a new group of blocks to it.
* Handle the finer points for setting focus correctly after deleting blocks from the workspace.
* When user edits text in a field, set text, not value.
Existing text-editable fields don’t care (dropdown care, but are not
text-editable). But a note picker needs to set its value to 60 if text
is set to ‘C4’.
* Set the text not the value when closing a text editor.
Also rename variables for clarity.
* Localisation updates from https://translatewiki.net.
* Streamline the logic for block selection callbacks in the toolbox modal.
* Do not show disabled actions in the block options modal.
* Set focus correctly when toolbox modal is dismissed.
* Add information regarding target screen reader and browser.
* Rebuild Blockly.
* Remove unavailable blocks from toolbox modal. Hide unnecessary category name in a toolbox without categories.
* Do some refactoring and tidy-up. Pull some hardcoded strings out for i18n purposes; remove unused strings.
* Update config options for sidebar buttons.
* Minor refactoring. Remove unused dependencies.
* Improve styling of sidebar buttons.
* Remove clipboard functionality.
* Refactor and simplify marked spot logic.
* Change dropdowns to select fields instead of lists of buttons.
* Add ability to specify a css class for labels and buttons
* Don't make labels clickable
* console.log -> console.warn
* change 'class' to 'web-style'
* createSvgElement is now in utils. fix two calls.
* Improve comments.
* lint
* fix missing semicolon
* When adding a new block group from the toolbox modal, only show blocks with no output connections.
* Clean up the sidebar file and remove unneeded code.
* Remove some functions from utilsService and consolidate code in workspace-tree.component.js.
* Standardize indentation.
* Remove premature focus on buttons in modal dialogs, since this prevents readout of the dialog text.
* Localisation updates from https://translatewiki.net.
* Don't get Toolbox element unless needed.
* Associate flyout button callbacks directly with workspaces
* Add colour block to the block factory base block initial state
* Start getting helpurl and tooltip in
* Generate helpURL and tooltip for Javascript block definition
* Use Tab keys instead of arrow keys for dialog boxes. Set role=alertdialog and read out the header/text automatically. Ensure that Esc key actually closes dialogs and that all keystrokes are captured.
* Add an aria-describedby to the 'create new block group...' button in the workspace to give more context.
* Fix issue with aria-liveregion not speaking. Allow sufficient time for alert noise to play before speaking the notification.
* Make zoom speed independent of event granularity
Before, touchpads would give "smoother" scrolling by delivering lots of
mousewheel events with small distance changes. Because the code only
looked at the sign of deltaY, ten 5px scrolls would zoom 10x more than
one 50px scroll.
This change makes zooming with a touchpad more like zooming with a
mousewheel. On my laptop, a full-scale zoom (fully out to fully in) was
about a 5mm finger movement before, and is now about 3cm.
Fixes #758.
* Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG. This paves the way to make performance
improvements to workspace dragging.
* remove overflow-y on the block exporter labels so scroll bars do not show upin firefox. Also fix up the styles on the labels so that they display better in firefox. (#699)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure w… (#700)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure why that was there.
Also replaces bad names on input. There are probably more invalid names but this is
a start.
* update generator comments
* Move the call to disable resize before placeNewBlock so that it is of… (#777)
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock. This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
* Disable workspace resizing while loading the flyout from XML
* Localisation updates from https://translatewiki.net.
* Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.
* Address code review comments
* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
* Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. (#787)
* Localisation updates from https://translatewiki.net.
* Change the Python codegen for string quoting to match the behaviour of `repr` on a string in CPython.
* Localisation updates from https://translatewiki.net.
* Add an `allInputsConnected` method to `Block` and `Workspace` to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off `develop` instead of `master` as per discussion in PR #791.
* Localisation updates from https://translatewiki.net.
* Localisation updates from https://translatewiki.net.
* Use the drag surface when scrolling using the scrollbars. #783 (#789)
* End event groups when you finish editing a field
* Fix #794 and make the workspace grid drag along with the workspace. (#801)
There was some IE specific code that also applies to Edge so just updated
a conditional to include Edge.
* Now that text input's setText skips setValue, it needs to explicitly create a change event
* Check if the text has changed before firing an event
* Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory
* Routine rebuild
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Add a block to reverse a list (#844)
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Fix a few small errors and rebuild
* Call dynamic toolbox generators correctly
* cleanup
* Fix unit tests, and delete a few that relied on completely undefined behaviour
* Fix RTL text inputs
* eslintignore more tests
* Fix insertion marker highlighting, I think
* Make getFlyout public
2017-02-21 12:09:23 -08:00
/// {{optional}}\nurl - Information describing sorting a list.
2016-05-04 17:03:24 -04:00
Blockly . Msg . LISTS _SORT _HELPURL = 'https://github.com/google/blockly/wiki/Lists#sorting-a-list' ;
2016-05-25 15:44:44 -07:00
/// Sort as type %1 (numeric or alphabetic) in order %2 (ascending or descending) a list of items %3.\n{{Identical|Sort}}
2016-05-04 17:03:24 -04:00
Blockly . Msg . LISTS _SORT _TITLE = 'sort %1 %2 %3' ;
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#sorting-a-list].
2016-05-06 10:35:05 -04:00
Blockly . Msg . LISTS _SORT _TOOLTIP = 'Sort a copy of a list.' ;
2016-05-14 03:50:35 -07:00
/// sorting order or direction from low to high value for numeric, or A-Z for alphabetic.\n{{Identical|Ascending}}
2016-05-04 17:03:24 -04:00
Blockly . Msg . LISTS _SORT _ORDER _ASCENDING = 'ascending' ;
2016-05-14 03:50:35 -07:00
/// sorting order or direction from high to low value for numeric, or Z-A for alphabetic.\n{{Identical|Descending}}
2016-05-04 17:03:24 -04:00
Blockly . Msg . LISTS _SORT _ORDER _DESCENDING = 'descending' ;
/// sort by treating each item as a number.
Blockly . Msg . LISTS _SORT _TYPE _NUMERIC = 'numeric' ;
/// sort by treating each item alphabetically, case-sensitive.
Blockly . Msg . LISTS _SORT _TYPE _TEXT = 'alphabetic' ;
/// sort by treating each item alphabetically, ignoring differences in case.
Blockly . Msg . LISTS _SORT _TYPE _IGNORECASE = 'alphabetic, ignore case' ;
2015-01-18 16:54:30 -08:00
/// url - Information describing splitting text into a list, or joining a list into text.
Blockly . Msg . LISTS _SPLIT _HELPURL = 'https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists' ;
/// dropdown - Indicates that text will be split up into a list (e.g. "a-b-c" -> ["a", "b", "c"]).
2015-08-03 20:34:07 +02:00
Blockly . Msg . LISTS _SPLIT _LIST _FROM _TEXT = 'make list from text' ;
2015-01-18 16:54:30 -08:00
/// dropdown - Indicates that a list will be joined together to form text (e.g. ["a", "b", "c"] -> "a-b-c").
Blockly . Msg . LISTS _SPLIT _TEXT _FROM _LIST = 'make text from list' ;
/// block text - Prompts for a letter to be used as a separator when splitting or joining text.
Blockly . Msg . LISTS _SPLIT _WITH _DELIMITER = 'with delimiter' ;
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#make-list-from-text
/// https://github.com/google/blockly/wiki/Lists#make-list-from-text] for more information.
Blockly . Msg . LISTS _SPLIT _TOOLTIP _SPLIT = 'Split text into a list of texts, breaking at each delimiter.' ;
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#make-text-from-list
/// https://github.com/google/blockly/wiki/Lists#make-text-from-list] for more information.
Blockly . Msg . LISTS _SPLIT _TOOLTIP _JOIN = 'Join a list of texts into one text, separated by a delimiter.' ;
Feature/merge feb 2017 (#791)
* Revert "Rebuild nov 3 16"
* Move injected css to start of head
* simplification
* lint
* Remove copy/paste buttons.
* Localisation updates from https://translatewiki.net.
* Don't split dropdown text if there is an image.
* Unblock push to master.
* Revert "Revert "Rebuild nov 3 16""
This reverts commit c8ca24a0007b70e137417e843459c87185141a55.
* rebuild
* Remove ifelse block and messages'
* Remove obsolete Gecko image hack. Apparently this has been fixed in Gecko.
* Add correct focus behavior for the modal. Update boundary sounds.
* Disallow clicks on disabled buttons.
* add back metadata tag to qqq
* revert qqq.json
* Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging. This is a backport of the block drag surface from scratch-blocks. At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move. At the end of the drag, the blocks are dropped back in the svg in their new position.
* API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
* String reference in JSON string messages (#741)
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
* Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
* Fix compiler errors.
* Break the sidebar out into its own individual component.
* Hide notification messages after a short time interval.
* Fix selection border on blocks that have been highlighted.
* controls_ifelse: Remove right-align. Remove Boolean check on statements. (#749)
* Move away from using a common modal service, since the block options and the toolbox modals are going to end up behaving fairly differently.
* Fix conflict between 'utils' and 'image dropdown' merges.
* Add a contextual modal for the toolbox.
* Fix some bugs arising in the toolbox modal for the no-categories case.
* Allow attaching blocks to a marked spot from the toolbox modal. This is the last prerequisite for removal of the existing on-screen toolbox.
* Delete the on-screen toolbox.
* Add warning sounds when the user reaches a boundary of the workspace.
* Stop some blocks from throwing errors in headless workspaces.
* Lint
* Fix speling.
* Fix broken highlighting when highlighted block is deleted. Issue 752.
* When the workspace is empty, make it easy for the user to add a new group of blocks to it.
* Handle the finer points for setting focus correctly after deleting blocks from the workspace.
* When user edits text in a field, set text, not value.
Existing text-editable fields don’t care (dropdown care, but are not
text-editable). But a note picker needs to set its value to 60 if text
is set to ‘C4’.
* Set the text not the value when closing a text editor.
Also rename variables for clarity.
* Localisation updates from https://translatewiki.net.
* Streamline the logic for block selection callbacks in the toolbox modal.
* Do not show disabled actions in the block options modal.
* Set focus correctly when toolbox modal is dismissed.
* Add information regarding target screen reader and browser.
* Rebuild Blockly.
* Remove unavailable blocks from toolbox modal. Hide unnecessary category name in a toolbox without categories.
* Do some refactoring and tidy-up. Pull some hardcoded strings out for i18n purposes; remove unused strings.
* Update config options for sidebar buttons.
* Minor refactoring. Remove unused dependencies.
* Improve styling of sidebar buttons.
* Remove clipboard functionality.
* Refactor and simplify marked spot logic.
* Change dropdowns to select fields instead of lists of buttons.
* Add ability to specify a css class for labels and buttons
* Don't make labels clickable
* console.log -> console.warn
* change 'class' to 'web-style'
* createSvgElement is now in utils. fix two calls.
* Improve comments.
* lint
* fix missing semicolon
* When adding a new block group from the toolbox modal, only show blocks with no output connections.
* Clean up the sidebar file and remove unneeded code.
* Remove some functions from utilsService and consolidate code in workspace-tree.component.js.
* Standardize indentation.
* Remove premature focus on buttons in modal dialogs, since this prevents readout of the dialog text.
* Localisation updates from https://translatewiki.net.
* Don't get Toolbox element unless needed.
* Associate flyout button callbacks directly with workspaces
* Add colour block to the block factory base block initial state
* Start getting helpurl and tooltip in
* Generate helpURL and tooltip for Javascript block definition
* Use Tab keys instead of arrow keys for dialog boxes. Set role=alertdialog and read out the header/text automatically. Ensure that Esc key actually closes dialogs and that all keystrokes are captured.
* Add an aria-describedby to the 'create new block group...' button in the workspace to give more context.
* Fix issue with aria-liveregion not speaking. Allow sufficient time for alert noise to play before speaking the notification.
* Make zoom speed independent of event granularity
Before, touchpads would give "smoother" scrolling by delivering lots of
mousewheel events with small distance changes. Because the code only
looked at the sign of deltaY, ten 5px scrolls would zoom 10x more than
one 50px scroll.
This change makes zooming with a touchpad more like zooming with a
mousewheel. On my laptop, a full-scale zoom (fully out to fully in) was
about a 5mm finger movement before, and is now about 3cm.
Fixes #758.
* Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG. This paves the way to make performance
improvements to workspace dragging.
* remove overflow-y on the block exporter labels so scroll bars do not show upin firefox. Also fix up the styles on the labels so that they display better in firefox. (#699)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure w… (#700)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure why that was there.
Also replaces bad names on input. There are probably more invalid names but this is
a start.
* update generator comments
* Move the call to disable resize before placeNewBlock so that it is of… (#777)
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock. This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
* Disable workspace resizing while loading the flyout from XML
* Localisation updates from https://translatewiki.net.
* Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.
* Address code review comments
* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
* Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. (#787)
* Localisation updates from https://translatewiki.net.
* Change the Python codegen for string quoting to match the behaviour of `repr` on a string in CPython.
* Localisation updates from https://translatewiki.net.
* Add an `allInputsConnected` method to `Block` and `Workspace` to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off `develop` instead of `master` as per discussion in PR #791.
* Localisation updates from https://translatewiki.net.
* Localisation updates from https://translatewiki.net.
* Use the drag surface when scrolling using the scrollbars. #783 (#789)
* End event groups when you finish editing a field
* Fix #794 and make the workspace grid drag along with the workspace. (#801)
There was some IE specific code that also applies to Edge so just updated
a conditional to include Edge.
* Now that text input's setText skips setValue, it needs to explicitly create a change event
* Check if the text has changed before firing an event
* Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory
* Routine rebuild
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Add a block to reverse a list (#844)
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Fix a few small errors and rebuild
* Call dynamic toolbox generators correctly
* cleanup
* Fix unit tests, and delete a few that relied on completely undefined behaviour
* Fix RTL text inputs
* eslintignore more tests
* Fix insertion marker highlighting, I think
* Make getFlyout public
2017-02-21 12:09:23 -08:00
/// url - Information describing reversing a list.
Blockly . Msg . LISTS _REVERSE _HELPURL = 'https://github.com/google/blockly/wiki/Lists#reversing-a-list' ;
/// block text - Title of block that returns a copy of a list (%1) with the order of items reversed.
Blockly . Msg . LISTS _REVERSE _MESSAGE0 = 'reverse %1' ;
/// tooltip - Short description for a block that reverses a copy of a list.
Blockly . Msg . LISTS _REVERSE _TOOLTIP = 'Reverse a copy of a list.' ;
2013-10-30 14:46:03 -07:00
/// grammar - Text that follows an ordinal number (a number that indicates
/// position relative to other numbers). In most languages, such text appears
/// before the number, so this should be blank. An exception is Hungarian.
/// See [[Translating:Blockly#Ordinal_numbers]] for more information.
Blockly . Msg . ORDINAL _NUMBER _SUFFIX = '' ;
// Variables Blocks.
2013-12-20 16:25:26 -08:00
/// url - Information about ''variables'' in computer programming. Consider using your language's translation of [https://en.wikipedia.org/wiki/Variable_(computer_science) https://en.wikipedia.org/wiki/Variable_(computer_science)], if it exists.
2014-10-15 14:44:31 -07:00
Blockly . Msg . VARIABLES _GET _HELPURL = 'https://github.com/google/blockly/wiki/Variables#get' ;
2013-10-30 14:46:03 -07:00
/// tooltip - This gets the value of the named variable without modifying it.
Blockly . Msg . VARIABLES _GET _TOOLTIP = 'Returns the value of this variable.' ;
/// context menu - Selecting this creates a block to set (change) the value of this variable.
/// \n\nParameters:\n* %1 - the name of the variable.
Blockly . Msg . VARIABLES _GET _CREATE _SET = 'Create "set %1"' ;
2013-12-20 16:25:26 -08:00
/// url - Information about ''variables'' in computer programming. Consider using your language's translation of [https://en.wikipedia.org/wiki/Variable_(computer_science) https://en.wikipedia.org/wiki/Variable_(computer_science)], if it exists.
2014-10-15 14:44:31 -07:00
Blockly . Msg . VARIABLES _SET _HELPURL = 'https://github.com/google/blockly/wiki/Variables#set' ;
2015-06-08 15:54:18 -07:00
/// block text - Change the value of a mathematical variable: '''set [the value of] x to 7'''.\n\nParameters:\n* %1 - the name of the variable.\n* %2 - the value to be assigned.
Blockly . Msg . VARIABLES _SET = 'set %1 to %2' ;
2013-10-30 14:46:03 -07:00
/// tooltip - This initializes or changes the value of the named variable.
Blockly . Msg . VARIABLES _SET _TOOLTIP = 'Sets this variable to be equal to the input.' ;
/// context menu - Selecting this creates a block to get (change) the value of
/// this variable.\n\nParameters:\n* %1 - the name of the variable.
Blockly . Msg . VARIABLES _SET _CREATE _GET = 'Create "get %1"' ;
// Procedures Blocks.
Merge google/blockly, May 2017 (#881)
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Option for moving one block from stack.
See thread in support group before merging.
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Expand stack-drag modifier key to include alt and ctrl.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* Localisation updates from https://translatewiki.net.
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Localisation updates from https://translatewiki.net.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Temporary fix for broken text field validation.
* rebuild
* Add a block to reverse a list (#844)
* Localisation updates from https://translatewiki.net.
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* Localisation updates from https://translatewiki.net.
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Localisation updates from https://translatewiki.net.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Localisation updates from https://translatewiki.net.
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* Potential bug fix for issue #661
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Clarification update.
Unraveling nested ternaries in Blockly.utils.tokenizeInterpolation_()
* Code correction from previous commit. Moved style to css.js and set ROUNDING=15;
* Fixing Enter so it properly propogates to dropdown selection. (#934)
Fixing FieldSegment so it updates dropdowns when the underlying dropdown changes.
* Localisation updates from https://translatewiki.net.
* Make variable add set/get block in context menu obey block limits
* Localisation updates from https://translatewiki.net.
* Use mutator extension for controls_if block
* Fix #946. Don't check for presence of constants.js
* Fix #945 (annotations) and an eslint issue (constant condition)
* Localisation updates from https://translatewiki.net.
* Fix #950: BlockFactory typo and copypasta
* Add safety checks for mutators and non-mutator extensions
* Handle mutations with both mixins and functions
* Adding warning on duplicate JSON block definition.
* period
* Make some functions private and add tests
* Localisation updates from https://translatewiki.net.
* Update help URL per #937.
Replace URL usages of %28 and %29 with normal parenthesis characters. (They aren't replaced by JavaScript's encodeURIComponent() function, and seem to work just fine without them.)
Added missing semicolon in build.py.
* Typo in comment.
* Make it easier to read the code that creates the variable category in the tolbox
* Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
* Annotation fixes
* Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964)
* Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899)
* Adding new minimap demo
* Basic code style changes. Adding a few more comments. Return early if disableScrollChange in onScrollChange listener.
* `unction` to `function` corrects #962 (#970)
* Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904. This calls blur and focus from workspace.markFocused and removes the event listener on focus events. markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus. As far as I can tell, there are no uses of the focus handler that actually did anything for us.
* Localisation updates from https://translatewiki.net.
* Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974)
* Adding horizontal scrolling. Changed scroll change callbacks from onScroll_ to setHandlePosition. onScroll_ is not challed when workspace is dragged.
* set background color to lilac if opening the playground from file:
* Registering mousemove and mouseup listener in mousedown event. Mousemove and Mouseup events are now listening over document.
* Localisation updates from https://translatewiki.net.
* Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9ff308ff5e361cf77acabb61a4bf4695). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979)
* Fix #969
* Localisation updates from https://translatewiki.net.
* Fix #986. Looks like the original PR just forgot this block. (#992)
* rebuild develop (#996)
* Added the variable modal and component and implemented basic renaming functionality. (#991)
* Fixing commenting from the last commit. (#1000)
* Localisation updates from https://translatewiki.net.
* RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead.
* Adding the remove variable modal and functionality to accessible Blockly. (#1011)
* Minimap position bug fix for browsers other than chrome. Added touch support.
* Adding an add variable modal to accessible Blockly. (#1015)
* Adding the remove variable modal and functionality to accessible Blockly.
* Adding the add variable modal for accessible Blockly.
* Block browser context menu in the toolbox and flyout
* Add links to the dev registration form and contributor guidelines
* Miscellaneous comment cleanup
* Adding the common modal class. (#1017)
Centralizes accessible modal behavior.
* - Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages
- Fixed bug with js_to_json.py script where it didn't recognize ' character
* - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
* Making text_count use a text color (like text_length, which also returns a number). (#1027)
* Enable google/blockly with continuous build on travis ci (#1023) (#1035)
* create .travis for ci job
* initial checkin for blocky-web travis ci job
* rename file to .travis.yaml for typo
* remove after_script
* added cache
* rename .travis.yaml to .travis.yml
* Update .travis.yml
* include build script
* fix yaml file format issue
* debug install part
* debug build issue
* Update .travis.yml
* remove cache for now
* Update .travis.yml
* Update .travis.yml
* Update .travis.yml
* more debug info
* Update .travis.yml
* Update .travis.yml
* fix typo
* installing chrome browser
* remove chrome setting config
* run build.py as part of npm install
* Update .travis.yml
* update karma dependency
* use karma as test runner
* fix typo
* remove karma test for now
* Update .travis.yml
* Update package.json
* add npm test target
* add browserstack-runner depdendency
* update browser support
* fix typo for test target
* fix chrome typo
* added closure dependency
* add google-closure-library
* include blockly_uncompressed.js and core.js dependency
* uncomment out core/*.js files
* add kama job as part of install
* remove browserstack add on for now
* fix karma config typo
* add karma-closure
* add os support
* remove typo config
* include more closure files
* change os back to linux
* use closure-library from node_modules
* change log level back to INFO
* change npm test target to use open browser command instead of karma
* change travis test target to use open command instead of karma
* list current directory
* find what's in current dir
* typo command
* Update .travis.yml
* typo again
* open right index.html
* use right path for index.html
* xdg-open to open default browser on travis
* exit browser after 5s wait
* change timeout to 1 min
* exit after opening up browser
* use browser only
* use karma
* remove un-needed dependency
* clean up script section
* fix typo
* update build status on readme
* initial commit for selenium integration tests
* update selenium jar path
* fix test_runner.js typo
* add more debug info
* check java version
* add && instead of 9288
* fix java path
* add logic to check if selenium is running or not
* add some deugging info
* initial commit to get chromedriver
* add chromedriver flag
* add get_chromedriver.sh to package.json and .travel
* change browser to chrome for now
* fix path issue
* update chromdriver path
* fix path issue again
* more debugging
* add debug msg
* fix typo
* minor fix for getting chromedriver
* install latest chrome browser
* clean up pakcage.json
* use npm target for test run
* remove removing trailing comma
* fix another trailing comma
* updated travis test target
* clean up scripts
* not sure nmp run preinstall
* redirect selenium log to tmp file
* revert writing console log to file
* update test summary
* more clean up
* minor clean up before pull request
* resolved closure-library conflict
1. add closure-library to dependencies instead of devDependencies.
2. add lint back in scripts block
* fix typo (adding comma) in script section
* Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
* Ensure useDragSurface is a boolean.
Fixed #988
* use pretest instead of preinstall in package.json (#1043)
* cherry pick for pretest fix
* put pretest target to test_setup.sh
* fix conflict
* cherry pick for get_chromedriver.sh
* add some sleep to wait download to finish
* use node.js stable
* use npm test target
* field_angle renders degree symbol consistently.
Fixes #973
* bumpNeighbours_ function moved to block_svg.
Fixed #1009
* Update RegEx in js-to-json to match windowi eol (#1050)
The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match.
* Fix French translation of "colour with rgb" block (#1053)
"colorier", which is currently used, is a verb and proposed "couleur" is
a noun: the block in question does not change colour of anything, it
creates new colour instead, thus noun is more applicable.
Also, noun is used in French translation of "random colour" block:
"couleur aléatoire".
* Enforcing non-empty names on value inputs and statement inputs. (#1054)
* Correcting #1054 (#1056)
single quotes. better logic.
* Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
* Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors. The old way was quite slow because it changed the stylesheet directly. See issue #981 for more details on implementation and tradeoffs. This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
* Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059)
* Merge master into develop (#1063)
- pick up translation changes
- clean up trailing spaces
* use goog.string.startswith instead of string.startswith (#1065)
* New jsinterpreter demo includes wait block. Both demos have improved UI for clarity. (#1001)
Refactor of interpreter demo
* Renamed demos/interpreter/index.html as demos/interpreter/step-execution.html (including redirect), and added demos/interpreter/async-execution.html.
* Refactored code to automatically generate/parse the blocks, eliminating the need for a "Parse JavaScript" button. Code is still shown in alert upon stepping to the first statement. Print statements now write to output <textarea> instead of modal dialogs.
* Fix #1069 (#1073)
* Fix cursor and mistaken css from merge
* Comment out broken field angle merge
* Fix broken merge with borders
* Add back original package json (woops)
* Remove render function for field angle, may not be the right way but it was broken...
* Revert merge blocking variable shadow blocks
* Add changes from built lang files
* Add back travis and readme
* Revert broken cleanup additions
* Add notes for scratch-block specific functions
* Revert change to css so blocks stay under the toolbox
* Add back accidentally removed files
* Use getFlyout_ instead of getFlyout everywhere
* Satisfy the linter
* Re-remove deprecated function
* Remove duplicated code in block_svg
* Add back flip_rtl option for images
* Remove more duplicated functions from past merges
* Fix flip_rtl code
* Revert renaming of getFlyout
2017-05-11 15:58:18 -04:00
/// url - Information about defining [https://en.wikipedia.org/wiki/Subroutine functions] that do not have return values.
Blockly . Msg . PROCEDURES _DEFNORETURN _HELPURL = 'https://en.wikipedia.org/wiki/Subroutine' ;
2014-09-08 14:26:52 -07:00
/// block text - This precedes the name of the function when defining it. See
2013-10-30 14:46:03 -07:00
/// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#c84aoc this sample
2014-09-08 14:26:52 -07:00
/// function definition].
2013-10-30 14:46:03 -07:00
Blockly . Msg . PROCEDURES _DEFNORETURN _TITLE = 'to' ;
/// default name - This acts as a placeholder for the name of a function on a
/// function definition block, as shown on
/// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#w7cfju this block].
/// The user will replace it with the function's name.
Blockly . Msg . PROCEDURES _DEFNORETURN _PROCEDURE = 'do something' ;
2014-09-08 14:26:52 -07:00
/// block text - This precedes the list of parameters on a function's defiition block. See
/// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample
2013-10-30 14:46:03 -07:00
/// function with parameters].
Blockly . Msg . PROCEDURES _BEFORE _PARAMS = 'with:' ;
2014-09-08 14:26:52 -07:00
/// block text - This precedes the list of parameters on a function's caller block. See
/// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample
/// function with parameters].
Blockly . Msg . PROCEDURES _CALL _BEFORE _PARAMS = 'with:' ;
2013-10-30 14:46:03 -07:00
/// block text - This appears next to the function's "body", the blocks that should be
/// run when the function is called, as shown in
2014-09-08 14:26:52 -07:00
/// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#voztpd this sample
/// function definition].
2013-10-30 14:46:03 -07:00
Blockly . Msg . PROCEDURES _DEFNORETURN _DO = '' ;
/// tooltip
Blockly . Msg . PROCEDURES _DEFNORETURN _TOOLTIP = 'Creates a function with no output.' ;
2015-12-17 15:34:23 -08:00
/// Placeholder text that the user is encouraged to replace with a description of what their function does.
Blockly . Msg . PROCEDURES _DEFNORETURN _COMMENT = 'Describe this function...' ;
Merge google/blockly, May 2017 (#881)
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Option for moving one block from stack.
See thread in support group before merging.
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Expand stack-drag modifier key to include alt and ctrl.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* Localisation updates from https://translatewiki.net.
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Localisation updates from https://translatewiki.net.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Temporary fix for broken text field validation.
* rebuild
* Add a block to reverse a list (#844)
* Localisation updates from https://translatewiki.net.
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* Localisation updates from https://translatewiki.net.
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Localisation updates from https://translatewiki.net.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Localisation updates from https://translatewiki.net.
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* Potential bug fix for issue #661
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Clarification update.
Unraveling nested ternaries in Blockly.utils.tokenizeInterpolation_()
* Code correction from previous commit. Moved style to css.js and set ROUNDING=15;
* Fixing Enter so it properly propogates to dropdown selection. (#934)
Fixing FieldSegment so it updates dropdowns when the underlying dropdown changes.
* Localisation updates from https://translatewiki.net.
* Make variable add set/get block in context menu obey block limits
* Localisation updates from https://translatewiki.net.
* Use mutator extension for controls_if block
* Fix #946. Don't check for presence of constants.js
* Fix #945 (annotations) and an eslint issue (constant condition)
* Localisation updates from https://translatewiki.net.
* Fix #950: BlockFactory typo and copypasta
* Add safety checks for mutators and non-mutator extensions
* Handle mutations with both mixins and functions
* Adding warning on duplicate JSON block definition.
* period
* Make some functions private and add tests
* Localisation updates from https://translatewiki.net.
* Update help URL per #937.
Replace URL usages of %28 and %29 with normal parenthesis characters. (They aren't replaced by JavaScript's encodeURIComponent() function, and seem to work just fine without them.)
Added missing semicolon in build.py.
* Typo in comment.
* Make it easier to read the code that creates the variable category in the tolbox
* Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
* Annotation fixes
* Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964)
* Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899)
* Adding new minimap demo
* Basic code style changes. Adding a few more comments. Return early if disableScrollChange in onScrollChange listener.
* `unction` to `function` corrects #962 (#970)
* Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904. This calls blur and focus from workspace.markFocused and removes the event listener on focus events. markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus. As far as I can tell, there are no uses of the focus handler that actually did anything for us.
* Localisation updates from https://translatewiki.net.
* Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974)
* Adding horizontal scrolling. Changed scroll change callbacks from onScroll_ to setHandlePosition. onScroll_ is not challed when workspace is dragged.
* set background color to lilac if opening the playground from file:
* Registering mousemove and mouseup listener in mousedown event. Mousemove and Mouseup events are now listening over document.
* Localisation updates from https://translatewiki.net.
* Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9ff308ff5e361cf77acabb61a4bf4695). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979)
* Fix #969
* Localisation updates from https://translatewiki.net.
* Fix #986. Looks like the original PR just forgot this block. (#992)
* rebuild develop (#996)
* Added the variable modal and component and implemented basic renaming functionality. (#991)
* Fixing commenting from the last commit. (#1000)
* Localisation updates from https://translatewiki.net.
* RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead.
* Adding the remove variable modal and functionality to accessible Blockly. (#1011)
* Minimap position bug fix for browsers other than chrome. Added touch support.
* Adding an add variable modal to accessible Blockly. (#1015)
* Adding the remove variable modal and functionality to accessible Blockly.
* Adding the add variable modal for accessible Blockly.
* Block browser context menu in the toolbox and flyout
* Add links to the dev registration form and contributor guidelines
* Miscellaneous comment cleanup
* Adding the common modal class. (#1017)
Centralizes accessible modal behavior.
* - Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages
- Fixed bug with js_to_json.py script where it didn't recognize ' character
* - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
* Making text_count use a text color (like text_length, which also returns a number). (#1027)
* Enable google/blockly with continuous build on travis ci (#1023) (#1035)
* create .travis for ci job
* initial checkin for blocky-web travis ci job
* rename file to .travis.yaml for typo
* remove after_script
* added cache
* rename .travis.yaml to .travis.yml
* Update .travis.yml
* include build script
* fix yaml file format issue
* debug install part
* debug build issue
* Update .travis.yml
* remove cache for now
* Update .travis.yml
* Update .travis.yml
* Update .travis.yml
* more debug info
* Update .travis.yml
* Update .travis.yml
* fix typo
* installing chrome browser
* remove chrome setting config
* run build.py as part of npm install
* Update .travis.yml
* update karma dependency
* use karma as test runner
* fix typo
* remove karma test for now
* Update .travis.yml
* Update package.json
* add npm test target
* add browserstack-runner depdendency
* update browser support
* fix typo for test target
* fix chrome typo
* added closure dependency
* add google-closure-library
* include blockly_uncompressed.js and core.js dependency
* uncomment out core/*.js files
* add kama job as part of install
* remove browserstack add on for now
* fix karma config typo
* add karma-closure
* add os support
* remove typo config
* include more closure files
* change os back to linux
* use closure-library from node_modules
* change log level back to INFO
* change npm test target to use open browser command instead of karma
* change travis test target to use open command instead of karma
* list current directory
* find what's in current dir
* typo command
* Update .travis.yml
* typo again
* open right index.html
* use right path for index.html
* xdg-open to open default browser on travis
* exit browser after 5s wait
* change timeout to 1 min
* exit after opening up browser
* use browser only
* use karma
* remove un-needed dependency
* clean up script section
* fix typo
* update build status on readme
* initial commit for selenium integration tests
* update selenium jar path
* fix test_runner.js typo
* add more debug info
* check java version
* add && instead of 9288
* fix java path
* add logic to check if selenium is running or not
* add some deugging info
* initial commit to get chromedriver
* add chromedriver flag
* add get_chromedriver.sh to package.json and .travel
* change browser to chrome for now
* fix path issue
* update chromdriver path
* fix path issue again
* more debugging
* add debug msg
* fix typo
* minor fix for getting chromedriver
* install latest chrome browser
* clean up pakcage.json
* use npm target for test run
* remove removing trailing comma
* fix another trailing comma
* updated travis test target
* clean up scripts
* not sure nmp run preinstall
* redirect selenium log to tmp file
* revert writing console log to file
* update test summary
* more clean up
* minor clean up before pull request
* resolved closure-library conflict
1. add closure-library to dependencies instead of devDependencies.
2. add lint back in scripts block
* fix typo (adding comma) in script section
* Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
* Ensure useDragSurface is a boolean.
Fixed #988
* use pretest instead of preinstall in package.json (#1043)
* cherry pick for pretest fix
* put pretest target to test_setup.sh
* fix conflict
* cherry pick for get_chromedriver.sh
* add some sleep to wait download to finish
* use node.js stable
* use npm test target
* field_angle renders degree symbol consistently.
Fixes #973
* bumpNeighbours_ function moved to block_svg.
Fixed #1009
* Update RegEx in js-to-json to match windowi eol (#1050)
The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match.
* Fix French translation of "colour with rgb" block (#1053)
"colorier", which is currently used, is a verb and proposed "couleur" is
a noun: the block in question does not change colour of anything, it
creates new colour instead, thus noun is more applicable.
Also, noun is used in French translation of "random colour" block:
"couleur aléatoire".
* Enforcing non-empty names on value inputs and statement inputs. (#1054)
* Correcting #1054 (#1056)
single quotes. better logic.
* Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
* Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors. The old way was quite slow because it changed the stylesheet directly. See issue #981 for more details on implementation and tradeoffs. This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
* Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059)
* Merge master into develop (#1063)
- pick up translation changes
- clean up trailing spaces
* use goog.string.startswith instead of string.startswith (#1065)
* New jsinterpreter demo includes wait block. Both demos have improved UI for clarity. (#1001)
Refactor of interpreter demo
* Renamed demos/interpreter/index.html as demos/interpreter/step-execution.html (including redirect), and added demos/interpreter/async-execution.html.
* Refactored code to automatically generate/parse the blocks, eliminating the need for a "Parse JavaScript" button. Code is still shown in alert upon stepping to the first statement. Print statements now write to output <textarea> instead of modal dialogs.
* Fix #1069 (#1073)
* Fix cursor and mistaken css from merge
* Comment out broken field angle merge
* Fix broken merge with borders
* Add back original package json (woops)
* Remove render function for field angle, may not be the right way but it was broken...
* Revert merge blocking variable shadow blocks
* Add changes from built lang files
* Add back travis and readme
* Revert broken cleanup additions
* Add notes for scratch-block specific functions
* Revert change to css so blocks stay under the toolbox
* Add back accidentally removed files
* Use getFlyout_ instead of getFlyout everywhere
* Satisfy the linter
* Re-remove deprecated function
* Remove duplicated code in block_svg
* Add back flip_rtl option for images
* Remove more duplicated functions from past merges
* Fix flip_rtl code
* Revert renaming of getFlyout
2017-05-11 15:58:18 -04:00
/// url - Information about defining [https://en.wikipedia.org/wiki/Subroutine functions] that have return values.
Blockly . Msg . PROCEDURES _DEFRETURN _HELPURL = 'https://en.wikipedia.org/wiki/Subroutine' ;
2013-10-30 14:46:03 -07:00
Blockly . Msg . PROCEDURES _DEFRETURN _TITLE = Blockly . Msg . PROCEDURES _DEFNORETURN _TITLE ;
Blockly . Msg . PROCEDURES _DEFRETURN _PROCEDURE = Blockly . Msg . PROCEDURES _DEFNORETURN _PROCEDURE ;
Blockly . Msg . PROCEDURES _DEFRETURN _DO = Blockly . Msg . PROCEDURES _DEFNORETURN _DO ;
2015-12-17 15:34:23 -08:00
Blockly . Msg . PROCEDURES _DEFRETURN _COMMENT = Blockly . Msg . PROCEDURES _DEFNORETURN _COMMENT ;
2013-10-30 14:46:03 -07:00
/// block text - This imperative or infinite verb precedes the value that is used as the return value
/// (output) of this function. See
/// [https://blockly-demo.appspot.com/static/apps/code/index.html?lang=en#6ot5y5 this sample
/// function that returns a value].
Blockly . Msg . PROCEDURES _DEFRETURN _RETURN = 'return' ;
/// tooltip
Blockly . Msg . PROCEDURES _DEFRETURN _TOOLTIP = 'Creates a function with an output.' ;
2014-09-08 14:26:52 -07:00
/// Label for a checkbox that controls if statements are allowed in a function.
Blockly . Msg . PROCEDURES _ALLOW _STATEMENTS = 'allow statements' ;
2013-10-30 14:46:03 -07:00
/// alert - The user has created a function with two parameters that have the same name. Every parameter must have a different name.
Blockly . Msg . PROCEDURES _DEF _DUPLICATE _WARNING = 'Warning: This function has duplicate parameters.' ;
Merge google/blockly, May 2017 (#881)
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Option for moving one block from stack.
See thread in support group before merging.
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Expand stack-drag modifier key to include alt and ctrl.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* Localisation updates from https://translatewiki.net.
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Localisation updates from https://translatewiki.net.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Temporary fix for broken text field validation.
* rebuild
* Add a block to reverse a list (#844)
* Localisation updates from https://translatewiki.net.
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* Localisation updates from https://translatewiki.net.
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Localisation updates from https://translatewiki.net.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Localisation updates from https://translatewiki.net.
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* Potential bug fix for issue #661
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Clarification update.
Unraveling nested ternaries in Blockly.utils.tokenizeInterpolation_()
* Code correction from previous commit. Moved style to css.js and set ROUNDING=15;
* Fixing Enter so it properly propogates to dropdown selection. (#934)
Fixing FieldSegment so it updates dropdowns when the underlying dropdown changes.
* Localisation updates from https://translatewiki.net.
* Make variable add set/get block in context menu obey block limits
* Localisation updates from https://translatewiki.net.
* Use mutator extension for controls_if block
* Fix #946. Don't check for presence of constants.js
* Fix #945 (annotations) and an eslint issue (constant condition)
* Localisation updates from https://translatewiki.net.
* Fix #950: BlockFactory typo and copypasta
* Add safety checks for mutators and non-mutator extensions
* Handle mutations with both mixins and functions
* Adding warning on duplicate JSON block definition.
* period
* Make some functions private and add tests
* Localisation updates from https://translatewiki.net.
* Update help URL per #937.
Replace URL usages of %28 and %29 with normal parenthesis characters. (They aren't replaced by JavaScript's encodeURIComponent() function, and seem to work just fine without them.)
Added missing semicolon in build.py.
* Typo in comment.
* Make it easier to read the code that creates the variable category in the tolbox
* Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
* Annotation fixes
* Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964)
* Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899)
* Adding new minimap demo
* Basic code style changes. Adding a few more comments. Return early if disableScrollChange in onScrollChange listener.
* `unction` to `function` corrects #962 (#970)
* Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904. This calls blur and focus from workspace.markFocused and removes the event listener on focus events. markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus. As far as I can tell, there are no uses of the focus handler that actually did anything for us.
* Localisation updates from https://translatewiki.net.
* Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974)
* Adding horizontal scrolling. Changed scroll change callbacks from onScroll_ to setHandlePosition. onScroll_ is not challed when workspace is dragged.
* set background color to lilac if opening the playground from file:
* Registering mousemove and mouseup listener in mousedown event. Mousemove and Mouseup events are now listening over document.
* Localisation updates from https://translatewiki.net.
* Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9ff308ff5e361cf77acabb61a4bf4695). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979)
* Fix #969
* Localisation updates from https://translatewiki.net.
* Fix #986. Looks like the original PR just forgot this block. (#992)
* rebuild develop (#996)
* Added the variable modal and component and implemented basic renaming functionality. (#991)
* Fixing commenting from the last commit. (#1000)
* Localisation updates from https://translatewiki.net.
* RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead.
* Adding the remove variable modal and functionality to accessible Blockly. (#1011)
* Minimap position bug fix for browsers other than chrome. Added touch support.
* Adding an add variable modal to accessible Blockly. (#1015)
* Adding the remove variable modal and functionality to accessible Blockly.
* Adding the add variable modal for accessible Blockly.
* Block browser context menu in the toolbox and flyout
* Add links to the dev registration form and contributor guidelines
* Miscellaneous comment cleanup
* Adding the common modal class. (#1017)
Centralizes accessible modal behavior.
* - Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages
- Fixed bug with js_to_json.py script where it didn't recognize ' character
* - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
* Making text_count use a text color (like text_length, which also returns a number). (#1027)
* Enable google/blockly with continuous build on travis ci (#1023) (#1035)
* create .travis for ci job
* initial checkin for blocky-web travis ci job
* rename file to .travis.yaml for typo
* remove after_script
* added cache
* rename .travis.yaml to .travis.yml
* Update .travis.yml
* include build script
* fix yaml file format issue
* debug install part
* debug build issue
* Update .travis.yml
* remove cache for now
* Update .travis.yml
* Update .travis.yml
* Update .travis.yml
* more debug info
* Update .travis.yml
* Update .travis.yml
* fix typo
* installing chrome browser
* remove chrome setting config
* run build.py as part of npm install
* Update .travis.yml
* update karma dependency
* use karma as test runner
* fix typo
* remove karma test for now
* Update .travis.yml
* Update package.json
* add npm test target
* add browserstack-runner depdendency
* update browser support
* fix typo for test target
* fix chrome typo
* added closure dependency
* add google-closure-library
* include blockly_uncompressed.js and core.js dependency
* uncomment out core/*.js files
* add kama job as part of install
* remove browserstack add on for now
* fix karma config typo
* add karma-closure
* add os support
* remove typo config
* include more closure files
* change os back to linux
* use closure-library from node_modules
* change log level back to INFO
* change npm test target to use open browser command instead of karma
* change travis test target to use open command instead of karma
* list current directory
* find what's in current dir
* typo command
* Update .travis.yml
* typo again
* open right index.html
* use right path for index.html
* xdg-open to open default browser on travis
* exit browser after 5s wait
* change timeout to 1 min
* exit after opening up browser
* use browser only
* use karma
* remove un-needed dependency
* clean up script section
* fix typo
* update build status on readme
* initial commit for selenium integration tests
* update selenium jar path
* fix test_runner.js typo
* add more debug info
* check java version
* add && instead of 9288
* fix java path
* add logic to check if selenium is running or not
* add some deugging info
* initial commit to get chromedriver
* add chromedriver flag
* add get_chromedriver.sh to package.json and .travel
* change browser to chrome for now
* fix path issue
* update chromdriver path
* fix path issue again
* more debugging
* add debug msg
* fix typo
* minor fix for getting chromedriver
* install latest chrome browser
* clean up pakcage.json
* use npm target for test run
* remove removing trailing comma
* fix another trailing comma
* updated travis test target
* clean up scripts
* not sure nmp run preinstall
* redirect selenium log to tmp file
* revert writing console log to file
* update test summary
* more clean up
* minor clean up before pull request
* resolved closure-library conflict
1. add closure-library to dependencies instead of devDependencies.
2. add lint back in scripts block
* fix typo (adding comma) in script section
* Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
* Ensure useDragSurface is a boolean.
Fixed #988
* use pretest instead of preinstall in package.json (#1043)
* cherry pick for pretest fix
* put pretest target to test_setup.sh
* fix conflict
* cherry pick for get_chromedriver.sh
* add some sleep to wait download to finish
* use node.js stable
* use npm test target
* field_angle renders degree symbol consistently.
Fixes #973
* bumpNeighbours_ function moved to block_svg.
Fixed #1009
* Update RegEx in js-to-json to match windowi eol (#1050)
The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match.
* Fix French translation of "colour with rgb" block (#1053)
"colorier", which is currently used, is a verb and proposed "couleur" is
a noun: the block in question does not change colour of anything, it
creates new colour instead, thus noun is more applicable.
Also, noun is used in French translation of "random colour" block:
"couleur aléatoire".
* Enforcing non-empty names on value inputs and statement inputs. (#1054)
* Correcting #1054 (#1056)
single quotes. better logic.
* Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
* Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors. The old way was quite slow because it changed the stylesheet directly. See issue #981 for more details on implementation and tradeoffs. This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
* Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059)
* Merge master into develop (#1063)
- pick up translation changes
- clean up trailing spaces
* use goog.string.startswith instead of string.startswith (#1065)
* New jsinterpreter demo includes wait block. Both demos have improved UI for clarity. (#1001)
Refactor of interpreter demo
* Renamed demos/interpreter/index.html as demos/interpreter/step-execution.html (including redirect), and added demos/interpreter/async-execution.html.
* Refactored code to automatically generate/parse the blocks, eliminating the need for a "Parse JavaScript" button. Code is still shown in alert upon stepping to the first statement. Print statements now write to output <textarea> instead of modal dialogs.
* Fix #1069 (#1073)
* Fix cursor and mistaken css from merge
* Comment out broken field angle merge
* Fix broken merge with borders
* Add back original package json (woops)
* Remove render function for field angle, may not be the right way but it was broken...
* Revert merge blocking variable shadow blocks
* Add changes from built lang files
* Add back travis and readme
* Revert broken cleanup additions
* Add notes for scratch-block specific functions
* Revert change to css so blocks stay under the toolbox
* Add back accidentally removed files
* Use getFlyout_ instead of getFlyout everywhere
* Satisfy the linter
* Re-remove deprecated function
* Remove duplicated code in block_svg
* Add back flip_rtl option for images
* Remove more duplicated functions from past merges
* Fix flip_rtl code
* Revert renaming of getFlyout
2017-05-11 15:58:18 -04:00
/// url - Information about calling [https://en.wikipedia.org/wiki/Subroutine functions] that do not return values.
Blockly . Msg . PROCEDURES _CALLNORETURN _HELPURL = 'https://en.wikipedia.org/wiki/Subroutine' ;
2013-10-30 14:46:03 -07:00
/// tooltip - This block causes the body (blocks inside) of the named function definition to be run.
Blockly . Msg . PROCEDURES _CALLNORETURN _TOOLTIP = 'Run the user-defined function "%1".' ;
Merge google/blockly, May 2017 (#881)
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Option for moving one block from stack.
See thread in support group before merging.
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Expand stack-drag modifier key to include alt and ctrl.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* Localisation updates from https://translatewiki.net.
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Localisation updates from https://translatewiki.net.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Temporary fix for broken text field validation.
* rebuild
* Add a block to reverse a list (#844)
* Localisation updates from https://translatewiki.net.
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* Localisation updates from https://translatewiki.net.
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Localisation updates from https://translatewiki.net.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Localisation updates from https://translatewiki.net.
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* Potential bug fix for issue #661
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Clarification update.
Unraveling nested ternaries in Blockly.utils.tokenizeInterpolation_()
* Code correction from previous commit. Moved style to css.js and set ROUNDING=15;
* Fixing Enter so it properly propogates to dropdown selection. (#934)
Fixing FieldSegment so it updates dropdowns when the underlying dropdown changes.
* Localisation updates from https://translatewiki.net.
* Make variable add set/get block in context menu obey block limits
* Localisation updates from https://translatewiki.net.
* Use mutator extension for controls_if block
* Fix #946. Don't check for presence of constants.js
* Fix #945 (annotations) and an eslint issue (constant condition)
* Localisation updates from https://translatewiki.net.
* Fix #950: BlockFactory typo and copypasta
* Add safety checks for mutators and non-mutator extensions
* Handle mutations with both mixins and functions
* Adding warning on duplicate JSON block definition.
* period
* Make some functions private and add tests
* Localisation updates from https://translatewiki.net.
* Update help URL per #937.
Replace URL usages of %28 and %29 with normal parenthesis characters. (They aren't replaced by JavaScript's encodeURIComponent() function, and seem to work just fine without them.)
Added missing semicolon in build.py.
* Typo in comment.
* Make it easier to read the code that creates the variable category in the tolbox
* Adding Blockly.Xml.appendDomToWorkspace() (#962)
This is a copy (with additional comments) of PR #822 (and also #961) by @qnoirhomme with unrelated files removed. See #822 for full review.
* Annotation fixes
* Fix bug #904 by explicitly grabbing focus on the workspace svg element. (#964)
* Potential fix for #888. Stops checking whether we are mid workspace drag since we do not always get mosue up events when blockly is in an iframe. (#899)
* Adding new minimap demo
* Basic code style changes. Adding a few more comments. Return early if disableScrollChange in onScrollChange listener.
* `unction` to `function` corrects #962 (#970)
* Cross browser friendly fix for #904. This calls blur and focus from … (#972)
* Cross browser friendly fix for #904. This calls blur and focus from workspace.markFocused and removes the event listener on focus events. markFocused is called from all of our mouse down handlers, which triggers the focus event leading to an infinite loop of focus. As far as I can tell, there are no uses of the focus handler that actually did anything for us.
* Localisation updates from https://translatewiki.net.
* Another attempt to fix #904 to keep the page from jumping to the focused workspace in IE 11 (#974)
* Adding horizontal scrolling. Changed scroll change callbacks from onScroll_ to setHandlePosition. onScroll_ is not challed when workspace is dragged.
* set background color to lilac if opening the playground from file:
* Registering mousemove and mouseup listener in mousedown event. Mousemove and Mouseup events are now listening over document.
* Localisation updates from https://translatewiki.net.
* Fix #967 by overriding the updateWidth method in FieldImage blocks to be a no-op. FieldImage fields should not change size after the width is set in init. The updateWidth and, therefore, getCachedWidth is now being called by BlockSvg renderFields_ (see commit d55d9cbd9ff308ff5e361cf77acabb61a4bf4695). IIUC, updateWidth/getCachedWidth was only called from render before which is overridden in FieldImage to be a no-op already. (#979)
* Fix #969
* Localisation updates from https://translatewiki.net.
* Fix #986. Looks like the original PR just forgot this block. (#992)
* rebuild develop (#996)
* Added the variable modal and component and implemented basic renaming functionality. (#991)
* Fixing commenting from the last commit. (#1000)
* Localisation updates from https://translatewiki.net.
* RemoveAttribute doesn't work on SVG elements in IE 10. Use setAttribute to null instead.
* Adding the remove variable modal and functionality to accessible Blockly. (#1011)
* Minimap position bug fix for browsers other than chrome. Added touch support.
* Adding an add variable modal to accessible Blockly. (#1015)
* Adding the remove variable modal and functionality to accessible Blockly.
* Adding the add variable modal for accessible Blockly.
* Block browser context menu in the toolbox and flyout
* Add links to the dev registration form and contributor guidelines
* Miscellaneous comment cleanup
* Adding the common modal class. (#1017)
Centralizes accessible modal behavior.
* - Changed error message referencing 'procedure' instead of 'function' (#1019)
- Added iOS specific UI messages
- Fixed bug with js_to_json.py script where it didn't recognize ' character
* - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
* Making text_count use a text color (like text_length, which also returns a number). (#1027)
* Enable google/blockly with continuous build on travis ci (#1023) (#1035)
* create .travis for ci job
* initial checkin for blocky-web travis ci job
* rename file to .travis.yaml for typo
* remove after_script
* added cache
* rename .travis.yaml to .travis.yml
* Update .travis.yml
* include build script
* fix yaml file format issue
* debug install part
* debug build issue
* Update .travis.yml
* remove cache for now
* Update .travis.yml
* Update .travis.yml
* Update .travis.yml
* more debug info
* Update .travis.yml
* Update .travis.yml
* fix typo
* installing chrome browser
* remove chrome setting config
* run build.py as part of npm install
* Update .travis.yml
* update karma dependency
* use karma as test runner
* fix typo
* remove karma test for now
* Update .travis.yml
* Update package.json
* add npm test target
* add browserstack-runner depdendency
* update browser support
* fix typo for test target
* fix chrome typo
* added closure dependency
* add google-closure-library
* include blockly_uncompressed.js and core.js dependency
* uncomment out core/*.js files
* add kama job as part of install
* remove browserstack add on for now
* fix karma config typo
* add karma-closure
* add os support
* remove typo config
* include more closure files
* change os back to linux
* use closure-library from node_modules
* change log level back to INFO
* change npm test target to use open browser command instead of karma
* change travis test target to use open command instead of karma
* list current directory
* find what's in current dir
* typo command
* Update .travis.yml
* typo again
* open right index.html
* use right path for index.html
* xdg-open to open default browser on travis
* exit browser after 5s wait
* change timeout to 1 min
* exit after opening up browser
* use browser only
* use karma
* remove un-needed dependency
* clean up script section
* fix typo
* update build status on readme
* initial commit for selenium integration tests
* update selenium jar path
* fix test_runner.js typo
* add more debug info
* check java version
* add && instead of 9288
* fix java path
* add logic to check if selenium is running or not
* add some deugging info
* initial commit to get chromedriver
* add chromedriver flag
* add get_chromedriver.sh to package.json and .travel
* change browser to chrome for now
* fix path issue
* update chromdriver path
* fix path issue again
* more debugging
* add debug msg
* fix typo
* minor fix for getting chromedriver
* install latest chrome browser
* clean up pakcage.json
* use npm target for test run
* remove removing trailing comma
* fix another trailing comma
* updated travis test target
* clean up scripts
* not sure nmp run preinstall
* redirect selenium log to tmp file
* revert writing console log to file
* update test summary
* more clean up
* minor clean up before pull request
* resolved closure-library conflict
1. add closure-library to dependencies instead of devDependencies.
2. add lint back in scripts block
* fix typo (adding comma) in script section
* Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
* Ensure useDragSurface is a boolean.
Fixed #988
* use pretest instead of preinstall in package.json (#1043)
* cherry pick for pretest fix
* put pretest target to test_setup.sh
* fix conflict
* cherry pick for get_chromedriver.sh
* add some sleep to wait download to finish
* use node.js stable
* use npm test target
* field_angle renders degree symbol consistently.
Fixes #973
* bumpNeighbours_ function moved to block_svg.
Fixed #1009
* Update RegEx in js-to-json to match windowi eol (#1050)
The current regex only works with the "\n" line endings as it expects no characters after the optional ";" at the end of the line. In windows, if it adds the "\r" it counts as a characters and is not part of the line terminator so it doesn't match.
* Fix French translation of "colour with rgb" block (#1053)
"colorier", which is currently used, is a verb and proposed "couleur" is
a noun: the block in question does not change colour of anything, it
creates new colour instead, thus noun is more applicable.
Also, noun is used in French translation of "random colour" block:
"couleur aléatoire".
* Enforcing non-empty names on value inputs and statement inputs. (#1054)
* Correcting #1054 (#1056)
single quotes. better logic.
* Created a variable model with name, id, and type.
Created a jsunit test file for variable model.
* Change how blockly handles cursors. The old way was quite slow becau… (#1057)
* Change how blockly handles cursors. The old way was quite slow because it changed the stylesheet directly. See issue #981 for more details on implementation and tradeoffs. This changes makes the following high level changes: deprecate Blockly.Css.setCursor, use built in open and closed hand cursor instead of custom .cur files, add css to draggable objects to set the open and closed hand cursors.
* Rebuild blockly_uncompressed to pick up a testing change to make travis happy. Fix a build warning from a multi-line string in the process. (#1059)
* Merge master into develop (#1063)
- pick up translation changes
- clean up trailing spaces
* use goog.string.startswith instead of string.startswith (#1065)
* New jsinterpreter demo includes wait block. Both demos have improved UI for clarity. (#1001)
Refactor of interpreter demo
* Renamed demos/interpreter/index.html as demos/interpreter/step-execution.html (including redirect), and added demos/interpreter/async-execution.html.
* Refactored code to automatically generate/parse the blocks, eliminating the need for a "Parse JavaScript" button. Code is still shown in alert upon stepping to the first statement. Print statements now write to output <textarea> instead of modal dialogs.
* Fix #1069 (#1073)
* Fix cursor and mistaken css from merge
* Comment out broken field angle merge
* Fix broken merge with borders
* Add back original package json (woops)
* Remove render function for field angle, may not be the right way but it was broken...
* Revert merge blocking variable shadow blocks
* Add changes from built lang files
* Add back travis and readme
* Revert broken cleanup additions
* Add notes for scratch-block specific functions
* Revert change to css so blocks stay under the toolbox
* Add back accidentally removed files
* Use getFlyout_ instead of getFlyout everywhere
* Satisfy the linter
* Re-remove deprecated function
* Remove duplicated code in block_svg
* Add back flip_rtl option for images
* Remove more duplicated functions from past merges
* Fix flip_rtl code
* Revert renaming of getFlyout
2017-05-11 15:58:18 -04:00
/// url - Information about calling [https://en.wikipedia.org/wiki/Subroutine functions] that return values.
Blockly . Msg . PROCEDURES _CALLRETURN _HELPURL = 'https://en.wikipedia.org/wiki/Subroutine' ;
2013-10-30 14:46:03 -07:00
/// tooltip - This block causes the body (blocks inside) of the named function definition to be run.\n\nParameters:\n* %1 - the name of the function.
Blockly . Msg . PROCEDURES _CALLRETURN _TOOLTIP = 'Run the user-defined function "%1" and use its output.' ;
/// block text - This text appears on a block in a window that appears when the user clicks
/// on the plus sign or star on a function definition block. It refers to the set of parameters
/// (referred to by the simpler term "inputs") to the function. See
/// [[Translating:Blockly#function_definitions]].
Blockly . Msg . PROCEDURES _MUTATORCONTAINER _TITLE = 'inputs' ;
2014-09-08 14:26:52 -07:00
/// tooltip
Blockly . Msg . PROCEDURES _MUTATORCONTAINER _TOOLTIP = 'Add, remove, or reorder inputs to this function.' ;
2013-10-30 14:46:03 -07:00
/// block text - This text appears on a block in a window that appears when the user clicks
/// on the plus sign or star on a function definition block]. It appears on the block for
/// adding an individual parameter (referred to by the simpler term "inputs") to the function.
/// See [[Translating:Blockly#function_definitions]].
Blockly . Msg . PROCEDURES _MUTATORARG _TITLE = 'input name:' ;
2014-09-08 14:26:52 -07:00
/// tooltip
Blockly . Msg . PROCEDURES _MUTATORARG _TOOLTIP = 'Add an input to the function.' ;
2013-10-30 14:46:03 -07:00
/// context menu - This appears on the context menu for function calls. Selecting
/// it causes the corresponding function definition to be highlighted (as shown at
/// [[Translating:Blockly#context_menus]].
Blockly . Msg . PROCEDURES _HIGHLIGHT _DEF = 'Highlight function definition' ;
/// context menu - This appears on the context menu for function definitions.
2015-09-11 21:47:17 -07:00
/// Selecting it creates a block to call the function.\n\nParameters:\n* %1 - the name of the function.\n{{Identical|Create}}
2013-10-30 14:46:03 -07:00
Blockly . Msg . PROCEDURES _CREATE _DO = 'Create "%1"' ;
/// tooltip - If the first value is true, this causes the second value to be returned
/// immediately from the enclosing function.
Blockly . Msg . PROCEDURES _IFRETURN _TOOLTIP = 'If a value is true, then return a second value.' ;
Feature/merge feb 2017 (#791)
* Revert "Rebuild nov 3 16"
* Move injected css to start of head
* simplification
* lint
* Remove copy/paste buttons.
* Localisation updates from https://translatewiki.net.
* Don't split dropdown text if there is an image.
* Unblock push to master.
* Revert "Revert "Rebuild nov 3 16""
This reverts commit c8ca24a0007b70e137417e843459c87185141a55.
* rebuild
* Remove ifelse block and messages'
* Remove obsolete Gecko image hack. Apparently this has been fixed in Gecko.
* Add correct focus behavior for the modal. Update boundary sounds.
* Disallow clicks on disabled buttons.
* add back metadata tag to qqq
* revert qqq.json
* Improve performance of block dragging. This is a backport of the blo… (#732)
Improve performance of block dragging. This is a backport of the block drag surface from scratch-blocks. At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move. At the end of the drag, the blocks are dropped back in the svg in their new position.
* API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
* String reference in JSON string messages (#741)
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
* Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
* Fix compiler errors.
* Break the sidebar out into its own individual component.
* Hide notification messages after a short time interval.
* Fix selection border on blocks that have been highlighted.
* controls_ifelse: Remove right-align. Remove Boolean check on statements. (#749)
* Move away from using a common modal service, since the block options and the toolbox modals are going to end up behaving fairly differently.
* Fix conflict between 'utils' and 'image dropdown' merges.
* Add a contextual modal for the toolbox.
* Fix some bugs arising in the toolbox modal for the no-categories case.
* Allow attaching blocks to a marked spot from the toolbox modal. This is the last prerequisite for removal of the existing on-screen toolbox.
* Delete the on-screen toolbox.
* Add warning sounds when the user reaches a boundary of the workspace.
* Stop some blocks from throwing errors in headless workspaces.
* Lint
* Fix speling.
* Fix broken highlighting when highlighted block is deleted. Issue 752.
* When the workspace is empty, make it easy for the user to add a new group of blocks to it.
* Handle the finer points for setting focus correctly after deleting blocks from the workspace.
* When user edits text in a field, set text, not value.
Existing text-editable fields don’t care (dropdown care, but are not
text-editable). But a note picker needs to set its value to 60 if text
is set to ‘C4’.
* Set the text not the value when closing a text editor.
Also rename variables for clarity.
* Localisation updates from https://translatewiki.net.
* Streamline the logic for block selection callbacks in the toolbox modal.
* Do not show disabled actions in the block options modal.
* Set focus correctly when toolbox modal is dismissed.
* Add information regarding target screen reader and browser.
* Rebuild Blockly.
* Remove unavailable blocks from toolbox modal. Hide unnecessary category name in a toolbox without categories.
* Do some refactoring and tidy-up. Pull some hardcoded strings out for i18n purposes; remove unused strings.
* Update config options for sidebar buttons.
* Minor refactoring. Remove unused dependencies.
* Improve styling of sidebar buttons.
* Remove clipboard functionality.
* Refactor and simplify marked spot logic.
* Change dropdowns to select fields instead of lists of buttons.
* Add ability to specify a css class for labels and buttons
* Don't make labels clickable
* console.log -> console.warn
* change 'class' to 'web-style'
* createSvgElement is now in utils. fix two calls.
* Improve comments.
* lint
* fix missing semicolon
* When adding a new block group from the toolbox modal, only show blocks with no output connections.
* Clean up the sidebar file and remove unneeded code.
* Remove some functions from utilsService and consolidate code in workspace-tree.component.js.
* Standardize indentation.
* Remove premature focus on buttons in modal dialogs, since this prevents readout of the dialog text.
* Localisation updates from https://translatewiki.net.
* Don't get Toolbox element unless needed.
* Associate flyout button callbacks directly with workspaces
* Add colour block to the block factory base block initial state
* Start getting helpurl and tooltip in
* Generate helpURL and tooltip for Javascript block definition
* Use Tab keys instead of arrow keys for dialog boxes. Set role=alertdialog and read out the header/text automatically. Ensure that Esc key actually closes dialogs and that all keystrokes are captured.
* Add an aria-describedby to the 'create new block group...' button in the workspace to give more context.
* Fix issue with aria-liveregion not speaking. Allow sufficient time for alert noise to play before speaking the notification.
* Make zoom speed independent of event granularity
Before, touchpads would give "smoother" scrolling by delivering lots of
mousewheel events with small distance changes. Because the code only
looked at the sign of deltaY, ten 5px scrolls would zoom 10x more than
one 50px scroll.
This change makes zooming with a touchpad more like zooming with a
mousewheel. On my laptop, a full-scale zoom (fully out to fully in) was
about a 5mm finger movement before, and is now about 3cm.
Fixes #758.
* Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG. This paves the way to make performance
improvements to workspace dragging.
* remove overflow-y on the block exporter labels so scroll bars do not show upin firefox. Also fix up the styles on the labels so that they display better in firefox. (#699)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure w… (#700)
* Fix #698 by adjusting the regex to not have \. Still not 100% sure why that was there.
Also replaces bad names on input. There are probably more invalid names but this is
a start.
* update generator comments
* Move the call to disable resize before placeNewBlock so that it is of… (#777)
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock. This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
* Disable workspace resizing while loading the flyout from XML
* Localisation updates from https://translatewiki.net.
* Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.
* Address code review comments
* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
* Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. (#787)
* Localisation updates from https://translatewiki.net.
* Change the Python codegen for string quoting to match the behaviour of `repr` on a string in CPython.
* Localisation updates from https://translatewiki.net.
* Add an `allInputsConnected` method to `Block` and `Workspace` to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off `develop` instead of `master` as per discussion in PR #791.
* Localisation updates from https://translatewiki.net.
* Localisation updates from https://translatewiki.net.
* Use the drag surface when scrolling using the scrollbars. #783 (#789)
* End event groups when you finish editing a field
* Fix #794 and make the workspace grid drag along with the workspace. (#801)
There was some IE specific code that also applies to Edge so just updated
a conditional to include Edge.
* Now that text input's setText skips setValue, it needs to explicitly create a change event
* Check if the text has changed before firing an event
* Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory
* Routine rebuild
* Move createDom call into the constructor of block drag surface. (#790)
* Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (#805)
* Don't connect to blocks under the flyout.
* recompile again. (#806)
* Fix german translation
* Fix german translation of 'delete x blocks'
* Adding unit tests for ifelse block.
* Improvements to the generator test framework.
* <field>, <value> reorder due to load/save.
* Use the npm closure library instead of the same library installed at a parallel directory
* Fix undo/redo for FieldCheckbox
Thanks to PR #813 by ademenev
* PR #818: Adding support for string table lookups in dropdown field labels
Adding support for string table lookups in dropdown field labels specified in JSON.
Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens. Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.
Replaces the direct JavaScript references (not pure JSON, and thus not portable).
Demonstrating this behavior in the logic_boolean dropdown.
* Integrating qqq.json changes into messages.json. (#820)
From commits b77f8cbebc5cef247116d3df6a428df8addbe53d and 4ecdedec9f8a69f78abf246e7a5db1e1a0be6b85
* Naming changes in mirror demo
* Adding support for untranslated messages. (#819)
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.
Template details: https://translatewiki.net/wiki/Template:Notranslate
* JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Fixes as per code review on PR.
* Reduce number of Closure files in App Engine upload.
* Python false is False. Issue #828.
* Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
* Fix bug in audioService where attached event callbacks were not being cleared properly.
* Rename workspace-tree to workspace-block.
* Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.).
* FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value. The constructor value parameter is now optional. Includes tests.
* Remove unnecessary check when attaching a new block to a marked connection.
* Remove debug info.
* Refactor and simplify field-segment.component.js.
* Replace single quotes with double. (#836)
Fixes commits in #832.
* Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.
Rewrote math_number as an example pure JSON block.
* Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.
Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
* JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.
Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
* Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
* Use setValue in fieldTextInput so that procedure renaming works
* Further cleanup and removal of unnecessary functions. Pull some strings out for i18n.
* Use bindEvent_ instead of bindEventWithChecks_ for longStop
* Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly.
* Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
* Dispose of unit test workspaces and blocks in finally blocks.
* Clarify JSON error message by echoing arg notation.
* New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
* Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
* Add a block to reverse a list (#844)
* Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.
Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.
Now warn on raw string in JSON 'extensions'.
* Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
* Update README.md
Add a link to our forum.
* Correcting math_change color
* Enable custom flyout categories.
* Add some safety
* Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861)
* .getOptions_() to .getOptions() (#869)
Fixes #867.
* Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
* annotation updates
* jsdoc corrections (#874)
* Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876.
* Attempt to work around the IE/Edge bug where `getComputedTextLength()` throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue.
* Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg
* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
* Don't try to get block position in a headless workspace
* Stop bumping neighbours in headless blockly
* Place context menu correctly on touch
* Clear all active desc ids when the 'Erase Workspace' button is pressed.
* Fix a bug where splicing a block between two linked blocks disconnects the group and messes up the focus.
* Deleting a top-level block does not cause blocks after it to be deleted. Properly handle the active desc for this case.
* Use the empty field placeholder for dropdowns that do not have a value selected.
* Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c74b3f712c3057565966c25d5cfdb10. (#895)
* Adding @namespace annotations for JSDoc. (#900)
* Fix typo causing TypeError (#901)
* Pinning the angular2 dependency, and including licenses. (#893)
* Add skeleton for tests on rendered workspaces
* Fix some lint errors
* Correct changedState in setWarningText() (#908)
When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
* Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin(). (#907)
Adds Block.prototype.mixin() and Blockly.Extensions.registerMixin().
This adds support for a common use pattern in extensions, and adds
error checking to avoid future incompatibilities.
* Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
* Improving errors/warnings with Block.toDevString() and Connection.toString(). (#911)
* Add isEditable to field, and add tests
* Separate tests
* Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
* Correction to logic_ternary type check (#920)
* Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
* Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
* Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
* Workspace isDraggable
* JSONify simple list blocks
* JSONify variable blocks
* Initial text block, with a mixin to generate quote image fields. (#923)
Text block now uses the extension "text_quotes", supported by Blockly.Constants.Text.QUOTE_IMAGE_MIXIN.quoteField_(fieldName), so that each platform can use the best platform appropriate image (size, density, etc.) for the quotes.
* Add no-op stub .neighbors() for headless Connection.
* Adding tests for logic_ternary block in a new jsunit test framework.
* Correcting output of the logic_null block.
* extension controls_if => controls_if_mutator.
* Renamed extension function constant, and moved variables into the mixin.
* Dereference string table references when loading variable fields from JSON.
* Moving FieldImage string dereferencing back into Block.interpolate_() (part of jsonInit()). This sets a clear boundary of where dereferencing should happen.
Towards this, I've added message dereferencing for other field types here, as well. I've used a pattern of field-type specific helper functions.
* Addressing comments.
* .utils.replaceMessageReferences(..) now gracefully returns non-string arguments.
* Fix a few small errors and rebuild
* Call dynamic toolbox generators correctly
* cleanup
* Fix unit tests, and delete a few that relied on completely undefined behaviour
* Fix RTL text inputs
* eslintignore more tests
* Fix insertion marker highlighting, I think
* Make getFlyout public
2017-02-21 12:09:23 -08:00
/// {{optional}}\nurl - Information about guard clauses.
2015-12-17 15:34:23 -08:00
Blockly . Msg . PROCEDURES _IFRETURN _HELPURL = 'http://c2.com/cgi/wiki?GuardClause' ;
2013-10-30 14:46:03 -07:00
/// warning - This appears if the user tries to use this block outside of a function definition.
Blockly . Msg . PROCEDURES _IFRETURN _WARNING = 'Warning: This block may be used only within a function definition.' ;