Changeset 2132
- Timestamp:
- 01/27/06 09:49:50 (3 years ago)
- Files:
-
- django/trunk/django/bin/make-messages.py (modified) (2 diffs)
- django/trunk/django/utils/translation.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/bin/make-messages.py
r2056 r2132 1 1 #!/usr/bin/python 2 2 3 from django.utils.translation import templat eize3 from django.utils.translation import templatize 4 4 import re 5 5 import os … … 97 97 if file.endswith('.html'): 98 98 src = open(os.path.join(dirpath, file), "rb").read() 99 open(os.path.join(dirpath, '%s.py' % file), "wb").write(templat eize(src))99 open(os.path.join(dirpath, '%s.py' % file), "wb").write(templatize(src)) 100 100 thefile = '%s.py' % file 101 101 if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath)) django/trunk/django/utils/translation.py
r1941 r2132 370 370 """ 371 371 Changes every non-whitespace character to the given char. 372 Used in the templat eize function.372 Used in the templatize function. 373 373 """ 374 374 return dot_re.sub(char, src) … … 379 379 plural_re = re.compile(r"""^\s*plural$""") 380 380 constant_re = re.compile(r"""_\(((?:".*?")|(?:'.*?'))\)""") 381 def templat eize(src):381 def templatize(src): 382 382 """ 383 383 Turns a Django template into something that is understood by xgettext. It
