Non-English names in the turtle module (with Spanish example)

I've created a prototype for how we could add foreign language names to the turtle.py module and erase the language barrier for non-English schoolkids. The Tortuga module has the same functionality as You can test it out by running "pip install tortuga" https://pypi.python.org/pypi/Tortuga Since Python 2 doesn't have simpledialog, I used the PyMsgBox pure-python module for the input boxes. This code is small enough that it could be added into turtle.py. (It's just used for simple tkinter dialog boxes.) Check out the diff between Tortuga and turtle.py here: https://www.diffchecker.com/2xmbrkhk This file can be easily adapted to support multiple programming languages. Thoughts? Suggestions? -Al

Al Sweigart writes:
I noticed that "ayudarme" ("help me") isn't implemented. Whether that's a barrier or not, I don't know. I suspect it needs testing, because I can imagine that kids might not use help if it were available, preferring to ask the kid next to them. The error messages aren't translated. That definitely needs to be done.
This file can be easily adapted to support multiple programming languages.
Maybe it's just me, but putting multiple languages in a single file might be confusing to the user if you just add all the language bindings to locals(). I really would like to see (but won't do it myself) a structure where "tortuga" imports "turtle", defines some variables which contain the dictionaries, and calls an "install language" utility (new in turtle) that does what's necessary to hook up the dictionaries to the turtle commands.

On 9/16/2015 6:28 PM, Al Sweigart wrote:
I've created a prototype for how we could add foreign language names to the turtle.py module
Before going very far with turtle.py, you should be aware that the current turtle.py, writen by Gregor Lingl, is a replacement for the first version. It has two problems. First, it was never properly contributed to Python. Lingl did not sign the contributor agreement before Martin von Loewis committed it, and has not done so subsequently when requested. It has its own copyright and proprietary license, which pydev has violated. Second, the original was written in tkinter, while Gregor's version is writen in his custom graphics language, which in turn is implemented in tkinter. Gregor planned to also implement his new intermediate layer in some other framework, though he never did. I personally will not touch the current turtle.py. I would rather revert to the original tkinter version, fix that, and move forward. But I am currently busy enough with IDLE.
and erase the language barrier for non-English schoolkids.
The third problem is that this is not a a priority for any core developer. Turtle itself is not anyone's priority.
The Tortuga module has the same functionality as
turtle, I presume
You can test it out by running "pip install tortuga"
You should keep this as a pypi project. Future turtle.py could be changed to load external dictionaries without being monkey patched, but even that would do nothing for existing installations. I feel strongly that language packs not be put in the stdlib. Each dictionary has to be checked for accuracy and suitability for kids. This is not a job for pydev.
Since Python 2 doesn't have simpledialog,
Since python-ideas is for possible new features, and new features only go in future 3.x releases, code discussed here should be Python 3.
I think only one language should be loaded at a time. With 50 languages, it is possible that the same 'word' (sequence of letters) might be used by different languages to translate different turtle words. Then the last language loaded would win.
Thoughts? Suggestions?
Good idea. Go ahead and do it -- on pypi. -- Terry Jan Reedy

Al Sweigart writes:
I noticed that "ayudarme" ("help me") isn't implemented. Whether that's a barrier or not, I don't know. I suspect it needs testing, because I can imagine that kids might not use help if it were available, preferring to ask the kid next to them. The error messages aren't translated. That definitely needs to be done.
This file can be easily adapted to support multiple programming languages.
Maybe it's just me, but putting multiple languages in a single file might be confusing to the user if you just add all the language bindings to locals(). I really would like to see (but won't do it myself) a structure where "tortuga" imports "turtle", defines some variables which contain the dictionaries, and calls an "install language" utility (new in turtle) that does what's necessary to hook up the dictionaries to the turtle commands.

On 9/16/2015 6:28 PM, Al Sweigart wrote:
I've created a prototype for how we could add foreign language names to the turtle.py module
Before going very far with turtle.py, you should be aware that the current turtle.py, writen by Gregor Lingl, is a replacement for the first version. It has two problems. First, it was never properly contributed to Python. Lingl did not sign the contributor agreement before Martin von Loewis committed it, and has not done so subsequently when requested. It has its own copyright and proprietary license, which pydev has violated. Second, the original was written in tkinter, while Gregor's version is writen in his custom graphics language, which in turn is implemented in tkinter. Gregor planned to also implement his new intermediate layer in some other framework, though he never did. I personally will not touch the current turtle.py. I would rather revert to the original tkinter version, fix that, and move forward. But I am currently busy enough with IDLE.
and erase the language barrier for non-English schoolkids.
The third problem is that this is not a a priority for any core developer. Turtle itself is not anyone's priority.
The Tortuga module has the same functionality as
turtle, I presume
You can test it out by running "pip install tortuga"
You should keep this as a pypi project. Future turtle.py could be changed to load external dictionaries without being monkey patched, but even that would do nothing for existing installations. I feel strongly that language packs not be put in the stdlib. Each dictionary has to be checked for accuracy and suitability for kids. This is not a job for pydev.
Since Python 2 doesn't have simpledialog,
Since python-ideas is for possible new features, and new features only go in future 3.x releases, code discussed here should be Python 3.
I think only one language should be loaded at a time. With 50 languages, it is possible that the same 'word' (sequence of letters) might be used by different languages to translate different turtle words. Then the last language loaded would win.
Thoughts? Suggestions?
Good idea. Go ahead and do it -- on pypi. -- Terry Jan Reedy
participants (3)
-
Al Sweigart
-
Stephen J. Turnbull
-
Terry Reedy