Internationalizing numerals #1920
Replies: 4 comments 1 reply
-
Thanks for pushing this @eddieantonio!! I think we should support it, I mean we are going all the way now with doing it proper right?! @alaaeddin-swidan what do you think about (Eastern) Arabic numbers? I happen to have a call later today with the Hindi/Bengali translators, I will ask them, but I know that in an earlier version of their translation they did use their own numbers which maks sense of course and I manually changed them |
Beta Was this translation helpful? Give feedback.
-
Yeah we allow texts to be of any letter type so that should work. I think it would not be superhard to include to be honest, just replacing the lark builtin |
Beta Was this translation helpful? Give feedback.
-
Another good point @eddieantonio!
|
Beta Was this translation helpful? Give feedback.
-
Well what do you know?! Python does not allow to use Hindi numerals (in fact @eddieantonio, we had an issue open for this already!! #1043) which describes that it does not parse: Buuuuuuuuut (thank you Python developers!!!) you can convert strings in non-Latin numbers and that works, which is how our turtle (accidentally) works: So I think I can make this work with a little bit of parser changes and a lot of casts! |
Beta Was this translation helpful? Give feedback.
-
This is a discussion about how Hedy can support different numeral systems, especially for languages that do not use Western Arabic numerals (i.e., the digits 0123456789).
Hedy currently has two burgeoning translations that may want to use their own numerals: Arabic and Bengali.
Parsing numerals should be fairly straightforward. Around level 6, calculations are now possible. That means digits are now printed to the screen. At this point, we might want to parse the ASCII digits, and then produce numerals in the more appropriate numbering system.
My question is: is this desirable? I don't know Arabic or Bengali—would speakers of these languages prefer or benefit from these changes?
I just tried this, and Hedy (at level 1) already supports parsing (Eastern) Arabic and Bengali numbers! 🤯 Try this in Turtle:
At level 6, things start to break down. I believe
INT
is the wrong terminal here: https://github.com/Felienne/hedy/blob/0a81750a0301431d38ed5d6ba6073f7d7300514e/grammars/level6-Additions.lark#L25Beta Was this translation helpful? Give feedback.
All reactions