On 9/26/07, Wolfram Kriesing <[EMAIL PROTECTED]> wrote:
>
> I ran into the problem while doing this:
>
> >>> from django.utils.translation import gettext_lazy as _
> >>> s = _("my string")
> >>> s += _("my second string")
> Traceback (most recent call last):
>   File "<console>", line 1, in ?
> TypeError: unsupported operand type(s) for +=: '__proxy__' and '__proxy__'

You can use:

from django.utils.translation import string_concat
s = string_concat(_("my string"), _("my second string"))

> is that really the way its thought to work? if so, it breaks BC and
> its not handy and intuitive.

Malcolm Tredinnick explains some of the reasons behind the lazy
evaluation of i18n'd strings in this message:
http://groups.google.com/group/django-developers/msg/9e8d5c6123ad48a4


Cheers,

Andrew

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to