diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-11-24 03:32:26 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-11-24 03:32:26 +0000 |
| commit | 28fd32318fda234c7788a7a6ec2049f0fbb066d7 (patch) | |
| tree | 364055676f84a4ff1990aecc34ae29acb2aef0f7 | |
| parent | eab4a2259657ec1193b3ea2fcdcdf3a4371397d8 (diff) | |
Updated django.utils.translation due to template changes from [1379]. From new-admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/utils/translation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/translation.py b/django/utils/translation.py index ae9788e56d..a8a943e391 100644 --- a/django/utils/translation.py +++ b/django/utils/translation.py @@ -364,18 +364,18 @@ endblock_re = re.compile(r"""^\s*endblocktrans$""") plural_re = re.compile(r"""^\s*plural$""") constant_re = re.compile(r"""_\(((?:".*?")|(?:'.*?'))\)""") def templateize(src): - from django.core.template import tokenize, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK """ Turns a Django template into something that is understood by xgettext. It does so by translating the Django translation tags into standard gettext function invocations. """ + from django.core.template import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK out = StringIO() intrans = False inplural = False singular = [] plural = [] - for t in tokenize(src): + for t in Lexer(src, None).tokenize(): if intrans: if t.token_type == TOKEN_BLOCK: endbmatch = endblock_re.match(t.contents) |
