hedyorg / hedy

Hedy is a gradual programming language to teach children programming. Gradual languages use different language levels, where each level adds new concepts and syntactic complexity. At the end of the Hedy level sequence, kids master a subset of syntactically valid Python.
https://www.hedy.org
European Union Public License 1.2
1.26k stars 282 forks source link

🖊️ Translate boolean values to the preferred language when printed #5547

Closed boryanagoncharenko closed 1 month ago

boryanagoncharenko commented 1 month ago

Language idea incl level In level 15 and up, we have support for boolean values. Unlike other literal values, booleans can be printed and the output is always the Python boolean value:

a = true
print a
# outputs 'True'

Currently, if the value true is substituted its translated counterpart (e.g. вярно in Bulgarian), the output will remain True. Instead, we would like to be able to translate the boolean keyword to the supplied language.

boryanagoncharenko commented 1 month ago

The plan was to make translate boolean values just like numbers are translated to the preferred language because this is an easy option and then later make the bigger and nicer change https://github.com/hedyorg/hedy/issues/5548. However, turns out this change is not a small one. So instead of changing the same code twice, let's implement the nicer change directly.