← Back to team overview

phatch-dev team mailing list archive

Re: request for feedback: translating variables?

 

On Fri, Jun 4, 2010 at 8:57 AM, Nadia Alramli <nadiana@xxxxxxxxx> wrote:
>
>
> On Fri, Jun 4, 2010 at 1:56 PM, Stani <spe.stani.be@xxxxxxxxx> wrote:
>>
>> Hi,
>>
>> Right now we let people translate variables as for example <filename>,
>> but this gives troubles as variable names can't have spaces inside
>> them. There are two solutions:
>> 1) translate the variables but replace spaces by underscores, for
>> example <nom_du_fichier>
>> 2) keep variables in english just like any programming language is
>> also not translated
>>
>> Option 2 feels the most clean to me as option 1 is a hack. Maybe some
>> languages will add for example ' which is also not allowed in
>> variables. When I gave a workshop on LGM, I noticed Phatch is broken
>> in many languages because of this:
>> https://bugs.launchpad.net/phatch/+bug/566124
>>
>> I'd like to get your feedback, otherwise I go with option 2.
>
> I really prefer the second option too. I can think of a lot of possible
> issues in the first option. For example in languages that are written from
> right to left (like Arabic) things can get confusing. Also what about Exif
> variables?
> Best regards,
> Nadia

I know this isn't v3 yet, but this should put you at ease with option 2:

"""
For Python 3.0 and beyond, the following policy is prescribed for
    the standard library (see PEP 3131): All identifiers in the Python
    standard library MUST use ASCII-only identifiers, and SHOULD use
    English words wherever feasible (in many cases, abbreviations and
    technical terms are used which aren't English).
"""

http://www.python.org/dev/peps/pep-0008/

-- 
Carl K



References