Ticket #10234: makemessages_t10234_r10177.diff
File makemessages_t10234_r10177.diff, 1.2 KB (added by , 16 years ago) |
---|
-
django/core/management/commands/makemessages.py
145 145 if file_ext in extensions: 146 146 src = open(os.path.join(dirpath, file), "rU").read() 147 147 thefile = '%s.py' % file 148 open(os.path.join(dirpath, thefile), "w").write(templatize(src)) 148 try: 149 open(os.path.join(dirpath, thefile), "w").write(templatize(src)) 150 except SyntaxError, msg: 151 msg = "%s (file: %s)" % (msg, os.path.join(dirpath, file)) 152 raise SyntaxError(msg) 149 153 if verbosity > 1: 150 154 sys.stdout.write('processing file %s in %s\n' % (file, dirpath)) 151 155 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"' % (