Ticket #6380: make-messages.py.diff
File make-messages.py.diff, 1.0 KB (added by , 17 years ago) |
---|
-
django/bin/make-messages.py
74 74 if os.path.exists(potfile): 75 75 os.unlink(potfile) 76 76 77 all_files = [] 78 for (dirpath, dirnames, filenames) in os.walk("."): 79 all_files.extend([(dirpath, f) for f in filenames]) 77 def get_files( root ): 78 all_files = [] 79 elements = os.listdir( root ) 80 for element in elements: 81 path = os.path.join(root,element) 82 if os.path.isdir( path ): 83 all_files.extend( get_files( path ) ) 84 pass 85 elif os.path.isfile( path ): 86 all_files.append( (root,element) ) 87 return all_files 88 89 all_files = get_files(".") 80 90 all_files.sort() 81 91 for dirpath, file in all_files: 82 92 if domain == 'djangojs' and file.endswith('.js'):