BlocklyProp
BlocklyProp copied to clipboard
Setup blocks and system for internationalization
Replace text strings in block definitions with defined constant strings in the _messages.js file.
Here's a checklist:
- Headers, setups, and globals
- No local variables
- With init block
- In the right places?
- Code location
- definition followed by generator
- In the menu order
- Help system
- URL
- Link is valid
- Anchors?
- Tooltip
- Block definition
- inputs simplified (no extra dummy or value inputs)
- replace text with constants
- constants names the same +numbered
- constants added to _messages.js
- Block generator
- checking for init block (and comment out if none?)
- No local variables
Update - making a lot of progress here, but there is a long ways to go. One problem that I am running into is that there are blocks that were common to both the SPIN and propC stuff. The blocks are now completely separate, but that actually made one thing worse - there is a file, messages.js that contains the translation on the blocks themselves. I have weeded out a lot of unnecessary stuff, but I think it may actually be more efficient to move the s3 over to PropC ahead of completing this task - otherwise we'll end up doing some work on SPIN blocks only to have that work dumped when we make the transition anyway.
Getting a full set of PropC generating blocks for the s3 shouldn't actually be that difficult - I started building a few this evening and it's not too bad. I think the harder technical challenge is getting the blockly system itself converted over.
I think once it is there, the whole blockly system can go on a diet, and we can trim away a number of unnecessary files, and compress the rest and really clean things up under the hood.
Needs #824 completed first.
I agree that we do not want to spend time on Blocks emitting Spin code until we have the converted library in place. I have a copy of the work Andy did earlier this week on the Spin to C conversion but I have not yet created a PR for it. Monday I think. The rest of this could get easier if it is all emitting a single language.
You know how I feel about this :)
I'd love to free this system from Spin once and for all.
Sent from my iPhone
On Nov 25, 2016, at 11:07 PM, Matthew Matz [email protected] wrote:
Update - making a lot of progress here, but there is a long ways to go. One problem that I am running into is that there are blocks that were common to both the SPIN and propC stuff. The blocks are now completely separate, but that actually made one thing worse - there is a file, messages.js that contains the translation on the blocks themselves. I have weeded out a lot of unnecessary stuff, but I think it may actually be more efficient to move the s3 over to PropC ahead of completing this task - otherwise we'll end up doing some work on SPIN blocks only to have that work dumped when we make the transition anyway.
Getting a full set of PropC generating blocks for the s3 shouldn't actually be that difficult - I started building a few this evening and it's not too bad. I think the harder technical challenge is getting the blockly system itself converted over.
I think once it is there, the whole blockly system can go on a diet, and we can trim away a number of unnecessary files, and compress the rest and really clean things up under the hood.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@zfi Don't upload Andy's library yet - I'm still a little ways away from that point, and I've already ran into a couple things that look like they will need some editing (he alluded to the need for it in the email, and now I see what he's talking about).
The UI will have to be combed through for text that isn't already set in the translation files.