[Python-ideas] Non-English names in the turtle module.

Al Sweigart asweigart at gmail.com
Fri Sep 4 01:12:51 CEST 2015

Just to reply to both Petr and Random832 at once:

By "formatted to fit the code style of the turtle module" I meant that the
names would be pushed together without camelcase or underscores (as they
are already done in the turtle module).

But you do bring up good points. Whether things like "de la" are omitted or
how things can be abbreviated is left entirely up to the native speaker
doing the translation. I don't see any way around it.

But, as a rough guide, the Scratch tool has already done lots of
translation work and translators can piggy back off their wording choices.

The turtle module has been around long enough that I already see it's API
as set in stone, for better or worse. If the English names should be
changed, I see that as a separate issue.

I don't see a reason to hide the English names. I want the names to be
available without additional setup, i.e. there is no "language" setting
that needs to be specified first. The fewer setup steps the better. All
names in all languages would be available. I don't see being able to mix,
say, English and Spanish names in the same program as a big enough problem
that we have to force a fix to prevent it.

I'd like to keep the setup as simple and as similar to existing code as
possible. There is a slight difference between "import x" and "from x
import x" and I'd want to avoid that. From a technical perspective, I don't
think the additional names will hinder the maintenance of the turtle module
(which rarely changes itself). Though I'll know for sure what the technical
issues are, if any, once I produce the patch.

The idea for putting these modules on PyPI is interesting. My only
hesitation is I don't want "but it's already on PyPI" as an excuse not to
include these changes into the standard library turtle module.


On Thu, Sep 3, 2015 at 3:55 PM, Petr Viktorin <encukou at gmail.com> wrote:

> On Thu, Sep 3, 2015 at 11:27 PM,  <random832 at fastmail.us> wrote:
> > On Thu, Sep 3, 2015, at 16:53, Al Sweigart wrote:
> >> https://github.com/asweigart/idle-reimagined/wiki/Turtle-Translations
> >
> > A couple of downsides I noticed:
> >
> > "The names will later be formatted to fit the code style of the turtle
> > module. " is a bit handwavy, to be honest. Are things like "de la"
> > required or optional? Should an apostrophe/space/hyphen become an
> > underscore or be omitted? What can be abbreviated? What
> > case/inflection/conjugation should be used? These are decisions that
> > have to be made by native speakers based on what will be understandable
> > to beginners who know each language.
> >
> > Your names aren't very consistent - I don't know French that well, but I
> > doubt the module would benefit from mixing "plume", "crayon", and
> > "stylo". What to call a pen needs to be decided at a high level and used
> > globally. Also, things like "set...", "get...", "on...", need to be
> > translated to something consistent throughout the module.
> >
> > For that matter, the naming conventions in the *English* ones are a bit
> > questionable and inconsistent. Maybe this is an opportunity to clean up
> > that API.
> >
> > Also, a bug to report: I know enough Spanish to know that "pantalla
> > clara" means "clear screen" as a noun [screen that is clear], not a verb
> > [clearing the screen]. The English is ambiguous, but most other
> > languages are not.
> >
> > For design questions: Is it important to hide the English names? Is it
> > important to be able to use the classes interchangeably to code that is
> > written to use a different language's method names? Can the same name in
> > one language ever translate to two different names in another language
> > depending on context?
> I would not be surprised if, among all languages in the world, there'd
> be a clash in one of turtle's attribute names.
> Why put everything in the same namespace? It might be better to use
> more of those – perhaps something like "from turtle.translations
> import tortuga" ("tortuga" being Spanish for turtle). That is probably
> too long, so why not just "import tortuga"? That "tortuga" module
> could live on PyPI for a while, before it's considered for addition to
> either the stdlib, or just the installers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150903/087b107d/attachment-0001.html>

More information about the Python-ideas mailing list