Following changes are made with minimal touches;
- version dependent module imports
- codecs.open instead of open (for encoding errors)
- string_is_ascii modified for better compatibility
- In create_messages.py, synonym_defs are sorted as well to increase
testability, as Python 3 does not guarantee key order.
Note that this will cause previously generated files to have different
orders from the files generated without this patch.
- small changes; paranthesis around "print"s, has_key -> in,
"except x, y" -> "except x as y", sorted -> sort
Other files need similar small changes but are not touched as they are not
referenced from build.py
Fixes https://github.com/google/blockly/issues/2112
* Revert "Fix synonyms when compiled. (#1248)"
This reverts commit f08afbb351.
* Revert "Compatibility for Closure Compiler. (#1240)" [fc8d4c9]
* Adding exports to all messages.
* Fixed missing dependency to Blockly.defineBlocksWithJsonArray()
* Adding a fully compiled demo draft (still simple optimizations).
* Demo optimizations switched to advanced and enabled exports (for Blockly.Msg).
* Message interpolation updated to use the exported (global) Blockly.Msg array.
* Adding some debug compilation options to the build script.
* Adding SVG externs.
* Fixed Blockly.inject's config array to work with compilation.
* Reverting all compiled code.
This fixes commit b307ba1151.
This fixes commit dec6910b67.
* Reverting all compiled code.
This fixes commit 824c806ec3.
* Removing old todo
* Merge commit 'fe96bec765f0eb58c5321101965100c2716760ed' into compile-messages-with-externs
* commit 'fe96bec765f0eb58c5321101965100c2716760ed':
Fixes positional index for Czech translation (#1264)
Missed one use of string instead of .property in extensions.js (#1262)
Update extensions.js to be compatible with ADVANCED_OPTIMIZATIONS (#1253)
Fix type tags and todo placement.
Procedure block renames variable in mutator if there is a case change.
* Fixes based on review by @NeilFraser
- 80 cols
- using goog.global instead of window
- @export on the same line as messages
* BF: Moving the msg dependency earlier, since Blockly.Msg.en is filling the Blockly.Msg object, which is empty without Blockly.Msg.en (and the rest of the code is using it as Blockly.Msg).
* Updating some texts in the demo's html file to be more descriptive.
* Commenting the debug options in the build, to maximize the optimizations. They are not removed, to allow anybody to turn them on if needed (since they are not documented on the Closure Compiler's REST API pages).
* BF: fixed blocks_compressed.js compilation, as it now requires Blockly namespace to exist.
* SVG externs file updated based on the one in https://github.com/google/closure-compiler/blob/master/contrib/externs/svg.js (eliminating 2 warnings)
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.
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
Instead of a hard to handle UnicodeEncodeError exception, check the keys and
print a human readable error. Turn more format strings into utf-8 to avoid the
exception.
Fixes#116