Commit Graph

23 Commits

Author SHA1 Message Date
Neil Fraser
c438188ab1 Delete two unused i18n scripts
These date back to before Blockly Games was separated from Blockly.
2019-04-25 17:13:49 -07:00
Omer Karaduman
3235c6c831 Fix issues related to Python 3 compatibility 2018-11-18 21:37:50 +01:00
Omer Karaduman
cf050069c1 Make build.py compatible with Python 2 and 3
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
2018-11-16 22:58:05 +01:00
Andrew n marshall
02ea01c234 Revert changes to i18n/js_to_json.py from 4cb4b42 (#1935) 2018-06-25 17:34:55 -07:00
Neil Fraser
4cb4b42f8d Use named properties on Msg. 2018-04-27 11:50:51 -07:00
Tom
a6245f4c6e Compile messages with externs and demo with advanced optimizations (#1259)
* 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)
2017-08-08 11:16:49 -07:00
Neil Fraser
f08afbb351 Fix synonyms when compiled. (#1248) 2017-08-01 18:03:09 -07:00
Neil Fraser
fc8d4c90b4 Compatibility for Closure Compiler. (#1240) 2017-07-31 09:07:41 -07:00
Carlos
b1aadd109b 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.
2017-04-18 13:54:12 -07:00
vicng
dfc50ba843 - 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
2017-04-06 12:41:09 -07:00
Andrew n marshall
560d373c93 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
2017-01-13 15:32:00 -08:00
Stefan Sauer
f0c7356645 Handle non ascii characters in keys with an error.
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
2015-06-22 16:58:30 +02:00
Neil Fraser
1c39a638e3 Lint fixes. 2015-01-22 15:58:10 -08:00
Neil Fraser
6748e43d30 Remove Puzzle app (now in Blockly Games). 2014-10-15 17:02:22 -07:00
Neil Fraser
6539211104 Change official project URL. 2014-10-07 13:09:55 -07:00
Neil Fraser
7122410373 Changing project location from Google Code to GitHub. 2014-09-08 15:18:02 -07:00
Neil Fraser
d1eb6f607b Adding new files for latest version. 2014-09-08 14:32:07 -07:00
Neil Fraser
d998a1c8ec Update to latest version. 2014-09-08 14:26:52 -07:00
ellen.spertus
6ee38cdec3 Automatic commit Tue Jan 28 03:00:09 PST 2014 2014-01-28 03:00:09 -08:00
ellen.spertus
eb5895d70a Automatic commit Sat Dec 14 03:00:02 PST 2013 2013-12-14 03:00:02 -08:00
ellen.spertus
08e5254196 Manual commit 2013-11-25 17:33:36 -08:00
ellen.spertus
fadc65eda2 Cron update Wed Nov 13 09:42:10 PST 2013 2013-11-13 09:42:12 -08:00
ellen.spertus
a8acffd81c New initial commit with .svn directories and their contents ignored. 2013-10-30 14:46:03 -07:00