Changeset 5842
- Timestamp:
- 08/11/07 02:01:46 (1 year ago)
- Files:
-
- django/trunk/django/bin/make-messages.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/bin/make-messages.py
r5722 r5842 85 85 cmd = 'xgettext %s -d %s -L Perl --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy:1,2 --from-code UTF-8 -o - "%s"' % ( 86 86 os.path.exists(potfile) and '--omit-header' or '', domain, os.path.join(dirpath, thefile)) 87 (stdin, stdout, stderr) = os.popen3(cmd, ' b')87 (stdin, stdout, stderr) = os.popen3(cmd, 't') 88 88 msgs = stdout.read() 89 89 errors = stderr.read() … … 102 102 if file.endswith('.html'): 103 103 src = open(os.path.join(dirpath, file), "rb").read() 104 open(os.path.join(dirpath, '%s.py' % file), "wb").write(templatize(src))105 104 thefile = '%s.py' % file 106 if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath)) 105 open(os.path.join(dirpath, thefile), "wb").write(templatize(src)) 106 if verbose: 107 sys.stdout.write('processing file %s in %s\n' % (file, dirpath)) 107 108 cmd = 'xgettext -d %s -L Python --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy:1,2 --keyword=ugettext_noop --keyword=ugettext_lazy --keyword=ungettext_lazy:1,2 --from-code UTF-8 -o - "%s"' % ( 108 109 domain, os.path.join(dirpath, thefile)) 109 (stdin, stdout, stderr) = os.popen3(cmd, ' b')110 (stdin, stdout, stderr) = os.popen3(cmd, 't') 110 111 msgs = stdout.read() 111 112 errors = stderr.read()
