mirror of https://github.com/django/django.git
Fixed #4899 -- Fixed a problem on Windows when generating message catalogs (caused by [5722]). Thanks, Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1e6ff907d5
commit
8b128dddd1
|
@ -84,7 +84,7 @@ def make_messages():
|
||||||
thefile = '%s.py' % file
|
thefile = '%s.py' % file
|
||||||
cmd = 'xgettext %s -d %s -L Perl --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy:1,2 --from-code UTF-8 -o - "%s"' % (
|
cmd = 'xgettext %s -d %s -L Perl --keyword=gettext_noop --keyword=gettext_lazy --keyword=ngettext_lazy:1,2 --from-code UTF-8 -o - "%s"' % (
|
||||||
os.path.exists(potfile) and '--omit-header' or '', domain, os.path.join(dirpath, thefile))
|
os.path.exists(potfile) and '--omit-header' or '', domain, os.path.join(dirpath, thefile))
|
||||||
(stdin, stdout, stderr) = os.popen3(cmd, 'b')
|
(stdin, stdout, stderr) = os.popen3(cmd, 't')
|
||||||
msgs = stdout.read()
|
msgs = stdout.read()
|
||||||
errors = stderr.read()
|
errors = stderr.read()
|
||||||
if errors:
|
if errors:
|
||||||
|
@ -101,12 +101,13 @@ def make_messages():
|
||||||
thefile = file
|
thefile = file
|
||||||
if file.endswith('.html'):
|
if file.endswith('.html'):
|
||||||
src = open(os.path.join(dirpath, file), "rb").read()
|
src = open(os.path.join(dirpath, file), "rb").read()
|
||||||
open(os.path.join(dirpath, '%s.py' % file), "wb").write(templatize(src))
|
|
||||||
thefile = '%s.py' % file
|
thefile = '%s.py' % file
|
||||||
if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath))
|
open(os.path.join(dirpath, thefile), "wb").write(templatize(src))
|
||||||
|
if verbose:
|
||||||
|
sys.stdout.write('processing file %s in %s\n' % (file, dirpath))
|
||||||
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"' % (
|
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"' % (
|
||||||
domain, os.path.join(dirpath, thefile))
|
domain, os.path.join(dirpath, thefile))
|
||||||
(stdin, stdout, stderr) = os.popen3(cmd, 'b')
|
(stdin, stdout, stderr) = os.popen3(cmd, 't')
|
||||||
msgs = stdout.read()
|
msgs = stdout.read()
|
||||||
errors = stderr.read()
|
errors = stderr.read()
|
||||||
if errors:
|
if errors:
|
||||||
|
|
Loading…
Reference in New Issue