RaspberryPiFoundation / lesson_format

Lesson formatter
18 stars 28 forks source link

Norwegian scratch blocks in generated html #12

Closed wendelborg closed 10 years ago

wendelborg commented 10 years ago

Hi, we are trying to use lesson_format/build.py tool to generate Norwegian docs, including Norwegian scratch blocks. We have build.py running locally, and everything is generated correctly for en-GB docs. However, generating docs for any other language results in red scratch-blocks.

Got any tips on what we could be missing?

Best Regards, Tommy

tef commented 10 years ago

The scratch blocks renderer we use is http://blob8108.github.io/scratchblocks2/generator/, scratchblocks2. It has a specific format for scratch instructions.

http://blob8108.github.io/scratchblocks2/ has a little more information, including a link to this page on syntax rules.

http://wiki.scratch.mit.edu/wiki/Block_Plugin/Syntax

And, it seems to work! It looks like i've broken something for non-english scratch block rendering, but you have to be explicit about the language to get an example to work:

http://wiki.scratch.mit.edu/wiki/Block_Plugin/Syntax

tef commented 10 years ago

I'm going to check why it doesn't work

tef commented 10 years ago

Ok, it seems scratchblocks2 only loads one language by default. I will fix it to add every language, if I can

wendelborg commented 10 years ago

Fantastic! :)

tef commented 10 years ago

Fixed, I think.

wendelborg commented 10 years ago

Almost perfect! There is one issue with the manifest files: I have to select "en-GB" as language, if not the blocks turn up in the old red colour. Do you think that is fixable as well?

Good work, by the way :)

tef commented 10 years ago

That is bizarre. Can you push what you've got somewhere to github so I can try and reproduce it on my machine?

wendelborg commented 10 years ago

Tried again, got it to work, my bad.

The .md-file did not have a specified language, now it does and works nicely.

Very happy to have it working now, thanks for all the help!