Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate language resources #48

Closed
GoogleCodeExporter opened this issue Jun 9, 2015 · 3 comments
Closed

Separate language resources #48

GoogleCodeExporter opened this issue Jun 9, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

from group discussion 
https://groups.google.com/forum/?fromgroups#!topic/blockly/xwhG5dBZFbE

It need some balance since Blockly needs to declare the block piece by piece 
(not only just about the text, but where to put input fields and dropdown 
menu), and not all languages are ordered as english syntax. 

For example, I need to change some string and input column order of the 
original Blockly block, to reflect more comfortable Traditional Chinese syntax.

Not sure if JS support the override feature that we can extract strings from 
basic english version, and allow to override functions that needs the syntax 
customization. Then we will have an easier multi-language friendly structure.


TODO:

Extract Block Strings to _messages.js for easier i18n

1. Rename language/en to language/common,
2. Extract strings from language/en to _messages.js

The string format is 'Blockly.LANG_CONTROLS_' + block id, ex:

// Control Blocks
Blockly.LANG_CONTROLS_IF_HELPURL = 
'http://code.google.com/p/blockly/wiki/If_Then';
Blockly.LANG_CONTROLS_IF_TOOLTIP_1 = 'If a value is true, then do some 
statements.';
Blockly.LANG_CONTROLS_IF_TOOLTIP_2 = 'If a value is true, then do the first 
block of statements.\n' +
               'Otherwise, do the second block of statements.';
Blockly.LANG_CONTROLS_IF_TOOLTIP_3 = 'If the first value is true, then do the 
first block of statements.\n' +
               'Otherwise, if the second value is true, do the second block of statements.';
Blockly.LANG_CONTROLS_IF_TOOLTIP_4 = 'If the first value is true, then do the 
first block of statements.\n' +
               'Otherwise, if the second value is true, do the second block of statements.\n' +
               'If none of the values are true, do the last block of statements.';


Original issue reported on code.google.com by gasolin on 22 Jun 2012 at 1:55

@GoogleCodeExporter
Copy link
Author

Hi gasolin.
I'm mnagaku.

in maze demo's frame.html

  <script type="text/javascript" src="../../language/en/logic.js"></script>

this line has not been fixed yet.

  <script type="text/javascript" src="../../language/common/logic.js"></script>

thx!

Original comment by mnag...@gmail.com on 1 Jul 2012 at 7:23

@GoogleCodeExporter
Copy link
Author

mnagaku, 

maze demo was fixed in r299, thanks

Original comment by gasolin on 2 Jul 2012 at 2:08

@GoogleCodeExporter
Copy link
Author

fixed at r348

Original comment by gasolin on 12 Jul 2012 at 12:55

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant