diff --git a/BlockTemplates.md b/BlockTemplates.md deleted file mode 100644 index f382e50..0000000 --- a/BlockTemplates.md +++ /dev/null @@ -1,5 +0,0 @@ -**This describes work in progress. Use of this functionality is not yet recommended.** - -# Introduction - -[Creating new blocks in JavaScript](https://code.google.com/p/blockly/wiki/Tutorial_CreateYourFirstBlock) can be repetitive and error-prone, especially if the blocks have [mutators](https://code.google.com/p/blockly/wiki/CreatingMutators). The purpose of the block template system is to enable new blocks to be added with less work and worry. \ No newline at end of file diff --git a/CachingArguments.md b/CachingArguments.md index e91401b..a4357c2 100644 --- a/CachingArguments.md +++ b/CachingArguments.md @@ -1,4 +1,4 @@ -**[Creating Custom Blocks](wiki/CustomBlocks): [Generating Code](wiki/GeneratingCode): Caching Arguments** +**[Creating Custom Blocks](CustomBlocks): [Generating Code](GeneratingCode): Caching Arguments** # Caching Arguments diff --git a/CloudStorageWithAppEngine.md b/CloudStorageWithAppEngine.md index b5d0c1e..a39100b 100644 --- a/CloudStorageWithAppEngine.md +++ b/CloudStorageWithAppEngine.md @@ -1,10 +1,10 @@ -**[Installation](wiki/Installation): Cloud Storage** +**[Installation](Installation): Cloud Storage** # Introduction If your application is hosted on App Engine, a cloud storage service is available that allows users to save, load, share, and publish their programs. -_Note that the [RealtimeCollaboration](wiki/RealtimeCollaboration) feature provides an alternate way to save, load, share, and publish programs. It does, however, currently require users to have a Google Account._ +_Note that the [RealtimeCollaboration](RealtimeCollaboration) feature provides an alternate way to save, load, share, and publish programs. It does, however, currently require users to have a Google Account._ ## Setting up App Engine @@ -28,7 +28,7 @@ Once Blockly is uploaded you can point a browser to the URL you created in step ## Talking to the Cloud -Examine the source of the [storage demo](https://blockly-demo.appspot.com/static/demos/storage/index.html) at [demos/storage/index.html](https://code.google.com/p/blockly/source/browse/trunk/demos/storage/index.html) and note the following features. First, there is a script include that loads the cloud storage API: +Examine the [storage demo](https://blockly-demo.appspot.com/static/demos/storage/index.html)'s source at [demos/storage/index.html](https://github.com/google/blockly/tree/master/demos/storage/index.html) and note the following features. First, there is a script include that loads the cloud storage API: ``` @@ -42,7 +42,7 @@ There are also these message definitions, which you should modify as desired: BlocklyStorage.XML_ERROR = 'Could not load your saved file.\n'+ 'Perhaps it was created with a different version of Blockly?'; ``` -Translations into other languages can be found at [apps/json](https://code.google.com/p/blockly/source/browse/#svn%2Ftrunk%2Fapps%2Fjson). +Translations into other languages can be found at [apps/json](https://github.com/google/blockly/tree/master/apps/json). Saving the current blocks is a single call to ` BlocklyStorage.link() `: diff --git a/ContributingCode.md b/ContributingCode.md index 62e6b96..2fe96b3 100644 --- a/ContributingCode.md +++ b/ContributingCode.md @@ -38,7 +38,7 @@ svn ls https://blockly.googlecode.com/svn/trunk and type 'p' to accept Server certificate (p)ermanently to access the https resource. -[Install Closure library](https://code.google.com/p/blockly/wiki/Closure). +[Install Closure library](Closure). ### Update the code @@ -52,13 +52,13 @@ gclient sync * Do some work. * cd trunk * ` gcl change ` - * [Run tests](wiki/UnitTesting). + * [Run tests](UnitTesting). * ` gcl upload xxxx ` * Go to the url on codereview.appspot.com returned by ` gcl upload `. * Click on "Publish+Mail Comments", fill in the reviewer field, and send. * Get "LGTM" (Looks Good To Me) from reviewer. * ` gclient sync ` - * [Run tests](wiki/UnitTesting). + * [Run tests](UnitTesting). * ` gcl commit xxxx ` ### Branching @@ -73,4 +73,4 @@ To merge in changes from the main branch, run the following from the subdirector ``` svn merge https://blockly.googlecode.com/svn/trunk -``` \ No newline at end of file +``` diff --git a/CreatingMessageDescriptions.md b/CreatingMessageDescriptions.md deleted file mode 100644 index c396c40..0000000 --- a/CreatingMessageDescriptions.md +++ /dev/null @@ -1,82 +0,0 @@ -# Introduction - -In order to translate the Blockly language, we need to add descriptions for every piece of text currently displayed in English. There are 343 such messages, which are too many for the core Blockly team to mark up themselves. We are looking for volunteers who are experienced with Blockly to help add descriptions to these messages. - -# Background - -Please read [The Blockly Language](https://translatewiki.net/wiki/Translating:Blockly#The_Blockly_Language) within [the Blockly translation instructions](https://translatewiki.net/wiki/Translating:Blockly#The_Blockly_Language) on Translatewiki. This describes each of the types of text that appear in the language file: - * block text - * block input text - * tooltip - * context menu - * url - * dropdown choice - * prompt - * button -It is possible that there are other types I have not yet categorized. - -# Examples - -I have written descriptions for 43 messages. See https://code.google.com/p/blockly/source/browse/branches/i18n/language/en/messages.js. - -The general format is: -``` -/** @desc - */ -Blockly. = goog.getMsg(""); -``` - -For example, the following definition of MSG\_DUPLICATE\_BLOCK indicates that the English-language text "Duplicate" appears on a "context menu" and that the user selects it in order to "make a duplicate of the selected block". - -``` -/** @desc context menu - make a duplicate of the selected block */ -Blockly.MSG_DUPLICATE_BLOCK = goog.getMsg("Duplicate"); -``` - -Descriptions can contain [wikitext](https://www.mediawiki.org/wiki/Help:Formatting), which will be properly displayed to the translator. Specifically, you can include links to further information, as in this example: - -``` -/** @desc tooltip - how if statements work (see [https://code.google.com/p/blockly/wiki/If_Then]) */ -Blockly.LANG_CONTROLS_IF_TOOLTIP_1 = goog.getMsg("If a value is true, then do some blocks"); -``` - -Descriptions may also contain bold text, indicated by pairs of 3 single quotes, to show how a word might be used in a sentence: - -``` -/** @desc block text - if (as in: '''if''' there is a path to the right, turn right). */ -Blockly.LANG_CONTROLS_IF_MSG_IF = goog.getMsg("if"); -``` - -Descriptions may not include double quotes("). - -# Sections - -| **Name** | **# messages** | **corresponding source code** | **author** | **status** | -|:---------|:---------------|:------------------------------|:-----------|:-----------| -| context menus | 12 | [block.js](https://code.google.com/p/blockly/source/browse/trunk/core/block.js) | Ellen | done | -| variable renaming| 5 | [variables.js](https://code.google.com/p/blockly/source/browse/trunk/core/variables.js) | Ellen | done | -| colour | 16 | [colours.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/colour.js) | Ellen | done | -| controls: if | 15 | [control.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/control.js) | Ellen | done | -| controls: repeat, while | 11 | [control.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/control.js) | -- | -- | -| controls: for, foreach, control flow | 19 | [control.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/control.js) | -- | -- | -| logic | 27 | [logic.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/logic.js) | -- | -- | -| math | 77 | [math.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/math.js) | -- | -- | -| text | 56 | [text.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/text.js) | -- | -- | -| lists | 70 | [lists.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/lists.js) | -- | -- | -| variables | 10 | [variables.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/variables.js) | Alexandros | in progress | -| procedures | 24 | [procedures.js](https://code.google.com/p/blockly/source/browse/trunk/language/common/procedures.js) | -- | -- | - -# Steps - -To volunteer: - 1. Visit and read through the file [messages.js](https://code.google.com/p/blockly/source/browse/branches/i18n/language/en/messages.js) to see how descriptions are written. - 1. Decide on a section you would like to volunteer for. - 1. Write descriptions for a few of the messages. - 1. Post a message to the [Blockly discussion group](https://groups.google.com/forum/?fromgroups#!forum/blockly) (or send it directly to me) with the above information and how long the work would take you. - -Tips for translating messages: - * If you're not sure how the message is used, play around with the [code application](https://blockly-demo.appspot.com/static/apps/code/index.html) and/or view the source code. - * If a message consists of two (or more) strings joined by a plus sign, please combine them into a single string. - * You can make additions to [the Blockly translation instructions](https://translatewiki.net/wiki/Translating:Blockly#The_Blockly_Language). - * If you run into trouble, ask for help. - -Also feel free to suggest improvements to the descriptions I wrote. \ No newline at end of file diff --git a/CustomBlocks.md b/CustomBlocks.md index b587b96..10e0848 100644 --- a/CustomBlocks.md +++ b/CustomBlocks.md @@ -10,22 +10,22 @@ In most cases the easiest approach is to just find a really similar block which The first step is to create a block; specifying its shape, labels, and connection points. This is done in the ` language/ ` directory. -→ More info on [Defining Blocks](wiki/DefiningBlocks)... +→ More info on [Defining Blocks](DefiningBlocks)... Advanced blocks may dynamically change their shape in response to the user or other factors. -→ More info on [Creating Mutators](wiki/CreatingMutators)... +→ More info on [Creating Mutators](CreatingMutators)... ## Code Generation The second step is to create the generator code to export the new block to a programming language (such as JavaScript, Python, or Dart). This is done in the ` generators/ ` directory. -→ More info on [Generating Code](wiki/GeneratingCode)... +→ More info on [Generating Code](GeneratingCode)... To generate code that is both clean and correct, one must be mindful of the order of operations list for the given language. -→ More info on [Operator Precedence](wiki/OperatorPrecedence)... +→ More info on [Operator Precedence](OperatorPrecedence)... Creating more complicated blocks requires the use of temporary variables and/or utility functions. This is particularly true when an input is used twice and needs to be cached. -→ More info on [Caching Arguments](wiki/CachingArguments)... \ No newline at end of file +→ More info on [Caching Arguments](CachingArguments)... \ No newline at end of file diff --git a/DefiningBlocks.md b/DefiningBlocks.md index 305c310..a67c7cd 100644 --- a/DefiningBlocks.md +++ b/DefiningBlocks.md @@ -1,4 +1,4 @@ -**[Creating Custom Blocks](wiki/CustomBlocks): Defining Blocks** +**[Creating Custom Blocks](CustomBlocks): Defining Blocks** Note that much of block creation can be done through the Blockly GUI using [Block Factory](https://blockly-demo.appspot.com/static/apps/blockfactory/index.html) instead of manually creating the code given below. @@ -30,21 +30,21 @@ Blockly.Blocks['text_length'] = { The ` init ` function creates the block's shape. In the context of this function the keyword ` this ` is the actual block being created. There are several functions commonly used in an ` init ` function: - * [setHelpUrl](wiki/#setHelpUrl) - * [setColour](wiki/#setColour) - * [setOutput](wiki/#setOutput) - * [setPreviousStatement](wiki/#setPreviousStatement) - * [setNextStatement](wiki/#setNextStatement) - * [appendDummyInput, appendValueInput, appendStatementInput ](wiki/#appendDummyInput,_appendValueInput,_appendStatementInput) - * [setCheck](wiki/#setCheck) - * [setAlign](wiki/#setAlign) - * [appendField](wiki/#appendField) - * [setInputsInline](wiki/#setInputsInline) - * [setTooltip](wiki/#setTooltip) - * [setMutator](wiki/#setMutator) - * [setDeletable](wiki/#setDeletable) - * [setEditable](wiki/#setEditable) - * [setMovable](wiki/#setMovable) + * [setHelpUrl](#setHelpUrl) + * [setColour](#setColour) + * [setOutput](#setOutput) + * [setPreviousStatement](#setPreviousStatement) + * [setNextStatement](#setNextStatement) + * [appendDummyInput, appendValueInput, appendStatementInput ](#appendDummyInput,_appendValueInput,_appendStatementInput) + * [setCheck](#setCheck) + * [setAlign](#setAlign) + * [appendField](#appendField) + * [setInputsInline](#setInputsInline) + * [setTooltip](#setTooltip) + * [setMutator](#setMutator) + * [setDeletable](#setDeletable) + * [setEditable](#setEditable) + * [setMovable](#setMovable) ### setHelpUrl @@ -140,7 +140,7 @@ Once an input is created and appended to the block, it may be configured using ' input.setCheck(Number); ``` -This optional function is used for type-checking of connected inputs. If given an argument of null, then this input may be connected to any block. See [setOutput](wiki/#setOutput) for details on the expected values. +This optional function is used for type-checking of connected inputs. If given an argument of null, then this input may be connected to any block. See [setOutput](#setOutput) for details on the expected values. #### setAlign @@ -184,7 +184,7 @@ Optionally, the ` FieldTextInput ` constructor can also take a second argument w Another field element is a drop-down menu. Just like the text input field, the drop-down menu is created separately, then appended to the input row. The ` FieldDropdown ` object is created with a list of menu options, or with a generator function. -→ More info on [Drop-down Menus](wiki/DropDown)... +→ More info on [Drop-down Menus](DropDown)... ``` var variable = new Blockly.FieldVariable('item'); @@ -258,7 +258,7 @@ Tooltips may also be defined as a function instead of a static string. This all ![](controls_if.png) -Mutators allow advanced blocks to change shape, most notably as a result of users opening a dialog to add, remove or rearrange components. Creating a mutator is not trivial and is the subject of a separate page: [Creating Mutators](wiki/CreatingMutators). +Mutators allow advanced blocks to change shape, most notably as a result of users opening a dialog to add, remove or rearrange components. Creating a mutator is not trivial and is the subject of a separate page: [Creating Mutators](CreatingMutators). ### setDeletable diff --git a/DropDown.md b/DropDown.md index 370dbd0..ba422b6 100644 --- a/DropDown.md +++ b/DropDown.md @@ -1,4 +1,4 @@ -**[Creating Custom Blocks](wiki/CustomBlocks): [Defining Blocks](wiki/DefiningBlocks): Drop-down Menus** +**[Creating Custom Blocks](CustomBlocks): [Defining Blocks](DefiningBlocks): Drop-down Menus** Drop-down menus can be somewhat complicated field elements used in creating blocks. diff --git a/Future.md b/Future.md index a592674..9fd6348 100644 --- a/Future.md +++ b/Future.md @@ -6,7 +6,7 @@ Blockly is in active development with changes landing every day. We are aware o It is important that everyone be able to use Blockly. That means running in as many environments as possible: - * [Translating Blockly](wiki/Translation) (or just some demo apps) into your language is extremely helpful. Less that 5% of the world [speaks English](https://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers) natively. Help us reach the billions of people who are missing out. + * [Translating Blockly](Translation) (or just some demo apps) into your language is extremely helpful. Less that 5% of the world [speaks English](https://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers) natively. Help us reach the billions of people who are missing out. * Touch screen support (for Android and iOS tablets in particular) is critical. Currently Blockly kinda-sorta works, but we need to do much better. * Good support for IE 10 and IE 9 (IE 8 is assumed to be a lost cause). The Google developers do not have easy access to Windows computers, so any help to improve IE is appreciated. diff --git a/GeneratingCode.md b/GeneratingCode.md index fecde3e..b6422cd 100644 --- a/GeneratingCode.md +++ b/GeneratingCode.md @@ -1,4 +1,4 @@ -**[Creating Custom Blocks](wiki/CustomBlocks): Generating Code** +**[Creating Custom Blocks](CustomBlocks): Generating Code** # Generating Code @@ -24,9 +24,9 @@ Blockly.JavaScript['text_indexOf'] = function(block) { The first task for any block's code generator is to collect all the arguments and field data. There are several functions commonly used for this task: - * [getFieldValue](wiki/#getFieldValue) - * [valueToCode](wiki/#valueToCode) - * [statementToCode](wiki/#statementToCode) + * [getFieldValue](#getFieldValue) + * [valueToCode](#valueToCode) + * [statementToCode](#statementToCode) ### getFieldValue diff --git a/InjectingFixedSize.md b/InjectingFixedSize.md index 28fd060..05b6504 100644 --- a/InjectingFixedSize.md +++ b/InjectingFixedSize.md @@ -1,4 +1,4 @@ -**[Installation](wiki/Installation): Injecting Fixed-sized Blockly** +**[Installation](Installation): Injecting Fixed-sized Blockly** # Introduction @@ -7,7 +7,7 @@ The simplest way to put Blockly into a webpage is to inject it into an empty 'di * One can't have more than one instance of Blockly on the same page. * Blockly cannot easily reflow as the window resizes. -Both of these issues may be solved by [injecting Blockly into an iframe](wiki/InjectingResizable). +Both of these issues may be solved by [injecting Blockly into an iframe](InjectingResizable). ## Injection @@ -30,7 +30,7 @@ Add an empty div to the page and set its size:
``` -Add the structure of the toolbox (see [Defining the Toolbox](wiki/Toolbox) for more information): +Add the structure of the toolbox (see [Defining the Toolbox](Toolbox) for more information): ```