scratchfoundation / scratchfoundation/scratch-blocks
Restrictors & localization of numbers
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 1.6k
- Avg merge
- 4h 51m
- Merged PRs (30d)
- 12
Description
Currently scratch-blocks restrictors restrict typing decimal numbers to the "." character.
A comment from @cpseager:
"Hard coding with . is not great for future localisation for languages such as French and German that use comma as the decimal separator. Scratch 2 never supported European numbers correctly, but it would be great if Scratch 3 did!"
Blockly also has this problem - since its validators use JavaScript to force numbers.
The VM also wouldn't know how to deal with , separated numbers right now. How could we deal with this?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the scratch-blocks restrictors, Blockly validators, and VM number handling named in the issue. Determine how localized decimal separators should be represented across those components and define the expected behavior for French and German-style numbers. The work is done when localized input is accepted and handled consistently without breaking existing decimal-number behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- localization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100