Author carsten.klein@axn-software.de
Recipients carsten.klein@axn-software.de, docs@python
Date 2013-01-28.21:15:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359407746.0.0.0107296426233.issue17067@psf.upfronthosting.co.za>
In-reply-to
Content
The examples for the topic presented are rather weak. In fact, they merely present do nothing replacements for an actually working, deferred localization mechanism or some sort of prototypical implementation thereof.

As such I propose that they be replaced with something more meaningful,
for example such as 


class DeferredTranslation(object):

    def __init__(self, message, ...):

        self.message = message

    def __str__(self):

        return gettext.translation(...).lgettext(self.message)


def _(message, ...):

    return DeferredTranslation(message, ...)


MSG = _('localized message')


Or something else along that way other than the currently presented examples :D
History
Date User Action Args
2013-01-28 21:15:46carsten.klein@axn-software.desetrecipients: + carsten.klein@axn-software.de, docs@python
2013-01-28 21:15:45carsten.klein@axn-software.desetmessageid: <1359407746.0.0.0107296426233.issue17067@psf.upfronthosting.co.za>
2013-01-28 21:15:45carsten.klein@axn-software.delinkissue17067 messages
2013-01-28 21:15:45carsten.klein@axn-software.decreate