Django

Code

Changeset 5842

Show
Ignore:
Timestamp:
08/11/07 02:01:46 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4899 -- Fixed a problem on Windows when generating message catalogs (caused by [5722]). Thanks, Ramiro Morales.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/bin/make-messages.py

    r5722 r5842  
    8585                    cmd = 'xgettext %s -d %s -L Perl --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy:1,2 --from-code UTF-8 -o - "%s"' % ( 
    8686                        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') 
    8888                    msgs = stdout.read() 
    8989                    errors = stderr.read() 
     
    102102                    if file.endswith('.html'): 
    103103                        src = open(os.path.join(dirpath, file), "rb").read() 
    104                         open(os.path.join(dirpath, '%s.py' % file), "wb").write(templatize(src)) 
    105104                        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)) 
    107108                    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"' % ( 
    108109                        domain, os.path.join(dirpath, thefile)) 
    109                     (stdin, stdout, stderr) = os.popen3(cmd, 'b') 
     110                    (stdin, stdout, stderr) = os.popen3(cmd, 't') 
    110111                    msgs = stdout.read() 
    111112                    errors = stderr.read()