Fixed #5491 -- Changed PO file generation to sort the filenames we scan prior
to passing them to gettext. This should help reduce the changes in line orderings caused by different translators using different operating systems and locales. Based on a patch from Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e79e2df47b
commit
10466470c0
|
@ -74,8 +74,11 @@ def make_messages():
|
|||
if os.path.exists(potfile):
|
||||
os.unlink(potfile)
|
||||
|
||||
all_files = []
|
||||
for (dirpath, dirnames, filenames) in os.walk("."):
|
||||
for file in filenames:
|
||||
all_files.extend([(dirpath, f) for f in filenames])
|
||||
all_files.sort()
|
||||
for dirpath, file in all_files:
|
||||
if domain == 'djangojs' and file.endswith('.js'):
|
||||
if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath))
|
||||
src = open(os.path.join(dirpath, file), "rb").read()
|
||||
|
|
Loading…
Reference in New Issue