On Sun, 2007-06-03 at 13:39 +1000, Malcolm Tredinnick wrote: > Hi Eugene, > > On Sat, 2007-06-02 at 21:46 +0000, Eugene Morozov wrote: [...] > > I've checked out unicode branch today and immediately found two bugs. > > This code doesn't work: > > def __unicode__(self): > > langs = dict(settings.LANGUAGES) > > return _("%s text of the page %s") % (langs[self.language], > > self.page.url) > > > > (I get TypeError: unsupported operand type(s) for %: '__proxy__' and > > 'tuple')
[...] > ugettext_lazy("some string %s") % some_variable > > is not doing what you expect. > > It's probably not a great idea to use ugettext_lazy and then immediately > substitute in variables (using ugettext() would be faster), but we can > probably hack something up (and it will be a hack, because Python > doesn't supply enough information to be able to override the '%' > operator perfectly in these cases) in order to have this work for > ugettext_lazy and gettext_lazy and friends so that they behave more like > strings there. This is fixed in [5420]. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---