1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

i18n: fixed bug in the templateize function to turn templates into something grokable for xgettext

git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@852 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Georg Bauer 2005-10-13 14:49:48 +00:00
parent b34e844c2f
commit b61aee47fc

View File

@ -48,7 +48,7 @@ def templateize(src):
start = src.find('{') start = src.find('{')
if start >= 0 and src[start+1] in ('{', '%'): if start >= 0 and src[start+1] in ('{', '%'):
o.append(blank(src[:start])) o.append(blank(src[:start]))
end = src.find(src[start+1] == '{' and '}' or '%', start) end = src.find(src[start+1] == '{' and '}}' or '%}', start)
if end >= 0: if end >= 0:
o.append(src[start:end+2]) o.append(src[start:end+2])
src = src[end+2:] src = src[end+2:]