#10604: blocktrans fails if a defined expression is not used -------------------------------+-------------------------------------------- Reporter: bartTC | Owner: nobody Status: new | Milestone: Component: Template system | Version: Keywords: i18n, blocktrans, | Stage: Unreviewed Has_patch: 0 | -------------------------------+-------------------------------------------- Blocktrans doesn't handle non-used expressions:
{{{ {% blocktrans count cl.result_count as total_count and cl.opts.verbose_name as verbose_name and cl.opts.verbose_name_plural as verbose_name_plural %} 0 of {{ total_count }} {{ verbose_name }} selected {% plural %} 0 of {{ total_count }} {{ verbose_name_plural }} selected {% endblocktrans %} }}} The above template raises an Exception with {{{KeyError: u'verbose_name'}}}. If I use verbose_name *and* verbose_name_plural in one group, it works. -- Ticket URL: <http://code.djangoproject.com/ticket/10604> Django <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 django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---