Ticket #5491: make_mess_file_sort.diff

File make_mess_file_sort.diff, 854 bytes (added by Ramiro Morales, 17 years ago)
  • django/bin/make-messages.py

    diff -r e3e70e197d8d django/bin/make-messages.py
    a b def make_messages():  
    7474        if os.path.exists(potfile):
    7575            os.unlink(potfile)
    7676
     77        all_files = []
    7778        for (dirpath, dirnames, filenames) in os.walk("."):
    7879            for file in filenames:
     80                all_files.append(os.path.join(dirpath, file))
     81            all_files.sort()
     82            for file_full_path in all_files:
     83                (dirpath, file) = os.path.split(file_full_path)
    7984                if domain == 'djangojs' and file.endswith('.js'):
    8085                    if verbose: sys.stdout.write('processing file %s in %s\n' % (file, dirpath))
    8186                    src = open(os.path.join(dirpath, file), "rb").read()
Back to Top