def lang_stats(resources=None, languages=None):
    locale_dirs = _get_locale_dirs()

    for name, dir_ in locale_dirs:
        if resources and not name in resources:
            continue
        print("\nShowing translations stats for '%s':" % name) 
        langs = sorted([d for d in os.listdir(dir_) if not d.startswith('_')])
        for lang in langs:
            if languages and not lang in languages:
                continue
            # TODO: merge first with the latest en catalog
            p = Popen("msgfmt -vc -o /dev/null %(path)s/%(lang)s/LC_MESSAGES/django%(ext)s.po" % {
                'path': dir_, 'lang': lang, 'ext': 'js' if name.endswith('-js') else ''},
                stdout=PIPE, stderr=PIPE, shell=True)
            output, errors = p.communicate()
            if p.returncode == 0:
                # msgfmt output stats on stderr
                print("%s: %s" % (lang, errors.strip()))
Constructor.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/scripts/manage_translations.py/lang_stats--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/lib_config.py/LibConfigRegistry.__init__