Code

Ticket #10867: django-makemessages.patch

File django-makemessages.patch, 688 bytes (added by diegobz, 5 years ago)

makemessages, see only directories, please! (now there we go)

  • makemessages.py

     
    11import re 
    22import os 
    33import sys 
     4import glob 
    45import warnings 
    56from itertools import dropwhile 
    67from optparse import make_option 
     
    9596    if locale is not None: 
    9697        languages.append(locale) 
    9798    elif all: 
    98         languages = [el for el in os.listdir(localedir) if not el.startswith('.')] 
     99        locale_dirs = filter(os.path.isdir, glob.glob('%s/*' % localedir)) 
     100        languages = [os.path.basename(l) for l in locale_dirs] 
    99101 
    100102    for locale in languages: 
    101103        if verbosity > 0: