[Python-ideas] Gettext syntax (was Re: Allow "assigning" to ...)
M.-A. Lemburg
mal at egenix.com
Thu Feb 12 14:09:10 CET 2015
On 12.02.2015 12:41, Wichert Akkerman wrote:
>
>> On 12 Feb 2015, at 10:00, M.-A. Lemburg <mal at egenix.com> wrote:
>>
>> On 12.02.2015 04:33, Terry Reedy wrote:
>>> A possible solution would be to give 3.x str a __pos__ or __neg__ method, so +'python' or -'python'
>>> would mean the translation of 'python' (the snake). This would be even *less* intrusive and easier
>>> to write than _('python').
>>
>> Doesn't read well:
>>
>> label = +'I like' + +'Python'
>>
>> and this is even worse, IMO:
>>
>> label = -'I like' + -'Python'
>>
>>
>> I think the proper way of doing this would be to add a string
>> literal modifier like we have with r'' for raw strings,
>> e.g. i'Internationalized String’.
>
> As far as I know every other language as well as all i18n-related tools use _(..) to mark translatable strings. Changing Python from using that same standard (as most, if not all i18n-supporting Python software does) to something sounds like a huge step backwards.
Depends on how you look at it, I guess :-)
_(...) is a kludge which was invented because languages don't address
the need at the language level. i"want this translated" would be such
language level syntax.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Feb 12 2015)
>>> Python Projects, Coaching and Consulting ... http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
More information about the Python-ideas
mailing list