Fixed #4899 -- Fixed a problem with PO file header generation caused by [5708].

Thanks, Ramiro Morales.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-07-17 10:25:43 +00:00
parent c92ce31d60
commit 23404cdec4
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import re
import os
import sys
import getopt
from itertools import dropwhile
pythonize_re = re.compile(r'\n\s*//')
@ -118,7 +119,7 @@ def make_messages():
msgs = msgs.replace(old, new)
if os.path.exists(potfile):
# Strip the header
msgs = '\n'.join(msgs.split('\n')[17:])
msgs = '\n'.join(dropwhile(len, msgs.split('\n')))
else:
msgs = msgs.replace('charset=CHARSET', 'charset=UTF-8')
if msgs: