Django

Code

Changeset 739

Show
Ignore:
Timestamp:
09/30/05 03:53:35 (3 years ago)
Author:
hugo
Message:

i18n template tag now accepts varibles with filters or strings.
Variables with filters won't be pulled out for translation, of course, but
will just run the result of the filter through the translation engine.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/i18n/django/core/defaulttags.py

    r726 r739  
    304304                s = s[1:-1] 
    305305            else: 
    306                 raise template.TemplateSyntaxError("i18n must be called as {% i18n _('some message') %}"
     306                s = template.resolve_variable_with_filters(s, context
    307307            return translation.gettext(s) % context 
    308308        else: