We have had numerous requests to support Right-to-Left (RTL) languages especially Arabic but were unable to do so previously as the editor we use for syntax highlighting and autocompletions, CodeMirror, did not have support for RTL languages in the version which was available when we started Print Scratch.
The new version of CodeMirror includes full support for RTL languages and with version 3 of our Converter we have upgraded to this new version. You will have to switch to version 3 of the Converter in order to use Arabic.
We used Reverso and Google Translate to do the Arabic translations for the Examples page. If you find any issues with the translations and wish to contribute, please get in contact with us via email support@printscratch.com.
As of June 24, 2024 version 3 of the Converter is now available in beta .This has been in the works for some time and we initially estimated that it would be available by the end of Q1 this year however several additional enhancements were incorporated which pushed back the delivery date. The new version includes several enhancements:
We have updated the editor we used for syntax highlighting and autocompletions CodeMirror to the their latest version 6. This required a complete rewrite of the components from version 5 as version 6 is not backward compatible with version 5. This upgrade has given us the ability to now support Right-to-left languages.
With the ability to support Right-to-left languages we have introduced Arabic as our newest language. We have had numerous requests to include Arabic and are pleased to add it to the list of supported languages.
Although Scratch is probably the most popular block coding language, there are others on the market and we want to support all of them. As such version 3 of the converter, users can select the platform that they will be entering the scripts for. We are working with other providers to bring other platforms to market as quickly as possible.
Previously the only supported editor actions where Save, Copy, Paste and Clear. We have now added the defacto text editor options of Undo, Redo and Cut. We have also added a highlight action which will insert the "highlight!" directive to any selected lines. Multi-select is now also available in the editor by holding the Ctrl key.
The editor has been reorganised with the options specific to the Editor, which were previously available on the bottom of the image options, now being displayed at the top of the editor. Just click on the gears icon to choose your editor options.
In implementing a workaround for a bug in Firefox which resulted in blocks with images e.g. "when flag clicked" and "turn right (90) degrees" not including the "green flag" and "turn right" images when generated, we introduced a bug which cause those images "green flag" and "right arrow" to not scale well resulting in a low res image. We have completed redone this so that it works in Firefox and the images are high res when scaled.
For users with the free tier plan, images in the Preview will be displayed with a "Created on printscratch.com" watermark. This watermark is removed when the image is generated.
User 'Hendrik' pointed out to Support that when he generated images with the Firefox browser with script that included blocks with images, the images were not included in the generated image even though the images were shown in the Preview window.
For example the following code:
when flag clicked
turn right (90) degrees
turn left (90) degrees
repeat (10)
move (10) steps
Although the image appears fine in the Preview window, none of the images e.g. green flag, turn left nor turn right are included in the final image.
The Dev team traced the issue to a long standing bug with the Firefox browser and implemented a workaround that corrected the issue.
Thanks 'Hendrik' for drawing this to our attention.
Consider the following as an assessment question "Give the order in which the following blocks should be arranged to cause a Balloon sprite to rise from the bottom of the Stage to the top". When listing the blocks it would be nice to list them in any order however there is a problem. Currently the Editor will only allow Hat blocks to be place at the top of a stack. To allow for this situation we created a new instruction "strict" which when set to "no" will allow blocks to be placed in any order.
If you enter the following script into the editor it will generate an error on line 9 "Hat blocks have to be the first block in a script ..."
go to x (0) y (-180) ~ Block 1
separator
move (10) steps ~ Block 2
separator
point in direction (0) ~ Block 3
separator
repeat until <(y position) gt (175)> ~ Block 4
space
when flag clicked ~ Block 5
To get around that error you can provide the instruction "-- strict: no", the Editor will then allow Hat blocks to be place anywhere within a script. The updated script should be:
-- strict: no
go to x (0) y (-180) ~ Block 1
separator
move (10) steps ~ Block 2
separator
point in direction (0) ~ Block 3
separator
repeat until <(y position) gt (175)> ~ Block 4
space
when flag clicked ~ Block 5
Additionally, "-- strict: no" will also allow the "myblock" directive to the used without a corresponding "define". Again, this is useful if you are designing assessment questions that require a custom block but don't require the definition of the block to be provided.
Give the new strict instruction a try and see what you can create.
We have changed the way that blocks are displayed when marked with the "highlight" directive for the Black & White color option in an attempt to make the highlighted blocks stand out more.
Now when blocks are highlighted and the color option is Black & White, the outline of the highlighted blocked will be darkened and all other blocks, which have not been highlighted, will be dimmed, visually drawing attention to the highlighted blocks. See the example script below.
when flag clicked
pen down
go to x (-100) y (100)
highlight!repeat (4)
move (200) steps
turn right (90) degrees
pen up
Remember that the "highlight" directive can also be placed on the interior of a command to highlight different parts of it. For example try these command to see how different blocks are highlighted:
if <highlight!<key [right arrow] pressed> and <(x position) lt (190)>> then
if <<highlight!key [right arrow] pressed> and <(x position) lt (190)>> then
if <<key [highlight!right arrow] pressed> and <(x position) lt (190)>> then
Try out the new highlight for Black & White blocks and let us know what you think.
In an attempt to simplify script entry when typing scripts into the Editor we have introduced autocompletion. Type the first few characters of a block and a list of matching blocks will appear. The blocks will be sorted from most frequently to least frequently used so the most common blocks will be listed first.
Simply press Tab to accept an option. If the block selected requires fields to be completed the cursor will advance to the first empty field. You can use the key sequence "Ctrl-m" on Windows machines, or "Cmd-m" on Macs, to move to the next empty field.
The Editor now also support auto-indent and auto-outdent. The editor will automatically indent the next line when a C-block is entered and will automatically outdent when the cap blocks "delete this clone" and "stop [all]" are entered. The Editor will also automatically outdent "else" blocks.
Our benchmark tests show that these enhancements speed up the entering of scripts by up to 70%.
We've added new options to the Editor section of the Options that allow you to control whether autocompletion if enabled or not; whether to include blocks for the extensions that require a device for example Makey Makey and Microbit; to control the size of the text in the editor and to control the number of spaces used to indent a line.
All in all, we think we have accomplished our original goal of simplifying script entry. As usual any feedback is welcomed.
We have added support for Finnish. Starting in 2016 the Finnish school curriculum introduced coding as key content for all subjects. We look forward to working with our Finnish partners to bring Print Scratch to as many Finnish educators as possible.
This brings the number of supported languages to 10, the other nine being - English, French, Spanish, Spanish (Latin American), German, Dutch, Italian, Portuguese and Portuguese (Brazilian).
Due to loads of requests, the next language we will be adding support for is Arabic. However, it will require significant changes as it is will be the first RTL (Right-To-Left) language we'll be supporting. We anticipate completion in the first quarter of 2024. If you're willing to assist with the translation of the Examples page into Arabic please get in touch.