Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #4899 -- Fixed a problem on Windows when generating message cat…

…alogs (caused by [5722]). Thanks, Ramiro Morales.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8b128dddd14791b18f37a142e3c428fe08a42908 1 parent 1e6ff90
Malcolm Tredinnick authored August 11, 2007

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. 9  django/bin/make-messages.py
9  django/bin/make-messages.py
@@ -84,7 +84,7 @@ def make_messages():
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,12 +101,13 @@ def make_messages():
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
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()
112 113
                     if errors:

0 notes on commit 8b128dd

Please sign in to comment.
Something went wrong with that request. Please try again.