scratch-blocks/demos/plane
2016-08-03 18:33:18 -07:00
..
generated Add Estonian translations to the code and plane demos (#505) 2016-07-26 17:20:54 -07:00
soy Move Plane app to demos. 2014-11-18 22:21:00 -08:00
xlf Add Estonian translations to the code and plane demos (#505) 2016-07-26 17:20:54 -07:00
blocks.js Make the "seats =" block not deletable. 2015-01-28 16:07:30 -05:00
icon.png Move Plane app to demos. 2014-11-18 22:21:00 -08:00
index.html Remove unneeded HTML attributes (Google style guide). 2014-12-02 18:22:46 -08:00
plane.js Make it easy to disable unconnected blocks. 2016-06-21 04:31:45 -07:00
README.txt Change plane demo readme cli quotation marks for better compatibility. 2015-07-27 02:24:25 +01:00
slider.js Adding more type documentation. 2015-07-13 15:03:22 -07:00
style.css Remove obsolete webkit CSS prefixes. 2016-08-03 18:33:18 -07:00
template.soy Clean up for demo apps. 2016-01-08 13:58:18 -08:00

This Blockly demo uses Closure Templates to create a multilingual application.
Any changes to the template.soy file require a recompile.  Here is the command
to generate a quick English version for debugging:

java -jar soy/SoyToJsSrcCompiler.jar --outputPathFormat generated/en.js --srcs template.soy

To generate a full set of language translations, first extract all the strings
from template.soy using this command:

java -jar soy/SoyMsgExtractor.jar --outputFile xlf/extracted_msgs.xlf  template.soy

This generates xlf/extracted_msgs.xlf, which may then be used by any
XLIFF-compatible translation console to generate a set of files with the
translated strings.  These should be placed in the xlf directory.

Finally, generate all the language versions wih this command:

java -jar soy/SoyToJsSrcCompiler.jar --locales ar,be-tarask,br,ca,da,de,el,en,es,fa,fr,he,hrx,hu,ia,is,it,ja,ko,ms,nb,nl,pl,pms,pt-br,ro,ru,sc,sv,th,tr,uk,vi,zh-hans,zh-hant --messageFilePathFormat xlf/translated_msgs_{LOCALE}.xlf --outputPathFormat "generated/{LOCALE}.js" template.soy

This is the process that Google uses for maintaining Blockly Games in 40+
languages.  The XLIFF fromat is simple enough that it is trival to write a
Python script to reformat it into some other format (such as JSON) for
compatability with other translation consoles.

For more information, see message translation for Closure Templates:
https://developers.google.com/closure/templates/docs/translation