Comment 3 for bug 1804289

Revision history for this message
Gloria Gu (gloria-gu) wrote :

@Akihiro,

I did some trace...
the code in openstack_dashboard/dashboards/settings/user/forms.py line 109 calls
translation.check_for_language(lang_code)

it calls
/usr/lib/python2.7/site-packages/django/utils/translation/__init__.py 202 check_for_languge(lang_code)

which will call /usr/lib/python2.7/site-packages/django/utils/translation/trans_real.py 421 check_for_language which finds all the path in all_locale_paths() to check the mo files

def all_locale_paths():
    """
    Returns a list of paths to user-provides languages files.
    """
    globalpath = os.path.join(
        os.path.dirname(upath(sys.modules[settings.__module__].__file__)), 'locale')
    return [globalpath] + list(settings.LOCALE_PATHS)

from my trace...I noticed gloabalpath is actually the django path and settings.LOCALE_PATHS are from the setings.py mentioned above....what did I miss here?