#4539: translation.ugettext loses variable content from blocktrans
------------------------------------------+---------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: new | Component:
Internationalization
Version: SVN | Resolution:
Keywords: blocktrans | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------------------------+---------------------------------
Changes (by [EMAIL PROTECTED]):
* has_patch: 0 => 1
Comment:
Replying to [comment:2 Simon G. <[EMAIL PROTECTED]>]:
> I can confirm this behavior on r5724. It appears that the values are
getting lost when going through {{{translation.ugettext}}} in
{{{BlockTranslateNode.render}}}
Problem solved. Context was updated during variable resolving. So, in rare
cases, could occur resolving from bad scope. Small patch adds temporary
dictionary, which is after successful resolving put to context as inner
scope. Please, ''check'', that I understand well to how Context.update()
works. It looks, that it doesn't update current scope but adds new one. So
I've worked with it in this way.
Patch is against r6098
--
Ticket URL: <http://code.djangoproject.com/ticket/4539#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---