Ticket #4899: ticket-4899.2.diff
File ticket-4899.2.diff, 1.8 KB (added by , 17 years ago) |
---|
-
django/bin/make-messages.py
84 84 thefile = '%s.py' % file 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() 90 90 if errors: … … 101 101 thefile = file 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 105 open(os.path.join(dirpath, thefile), "wb").write(templatize(src)) 106 106 if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath)) 107 107 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 108 domain, os.path.join(dirpath, thefile)) 109 (stdin, stdout, stderr) = os.popen3(cmd, ' b')109 (stdin, stdout, stderr) = os.popen3(cmd, 't') 110 110 msgs = stdout.read() 111 111 errors = stderr.read() 112 112 if errors: