renciso218 / blockly

Automatically exported from code.google.com/p/blockly
0 stars 0 forks source link

i18n 'Procedures' and 'Variables' category in block list #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

To localize Blocks list. once to translate 'Procedures' and 'Variables' in 
category, I encounter:

  category: null,  // Procedures are handled specially.

What is the expected output? What do you see instead?

Able to localize Blocks category of  'Procedures' and 'Variables' 

Original issue reported on code.google.com by gasolin on 4 Jun 2012 at 11:21

GoogleCodeExporter commented 8 years ago
It's ok, these are defined at the top of blockly.js along with the remaining 
messages.  Just add a file which redefines them.

Original comment by neil.fra...@gmail.com on 4 Jun 2012 at 11:30

GoogleCodeExporter commented 8 years ago
Once I modify 

category: null,  // Procedures are handled specially.

to 

category: SomeCate,  // Procedures are handled specially.

the block list shows both 'SomeCate' and 'Procedures' in block list.

IMHO modify Blockly.MSG_PROCEDURE_CATEGORY and Blockly.MSG_VARIABLE_CATEGORY in 
blockly.js is not good enough because it needs to rebuild new 
blockly_compressed.js before use.

Original comment by gasolin on 5 Jun 2012 at 12:00

GoogleCodeExporter commented 8 years ago
Include a new file in your HTML page (after blockly_compressed.js) which simply 
contains:
...
Blockly.MSG_PROCEDURE_CATEGORY = 'Verfahren';
Blockly.MSG_MUTATOR_TOOLTIP = 'Bearbeiten Sie diesen Block';
... 

Original comment by neil.fra...@gmail.com on 5 Jun 2012 at 12:03

GoogleCodeExporter commented 8 years ago
Made an working zh_tw demo at 
http://www.gasolin.idv.tw/public/blockly/demos/code/index.html

Since Blockly.MSG_PROCEDURE_CATEGORY... is defined in html, 
it's a bit tricky to find a way to merge my contributions back to blockly 
itself.

Original comment by gasolin on 5 Jun 2012 at 2:36