Ticket #5494: root-locale-js-catalog.diff
File root-locale-js-catalog.diff, 1.1 KB (added by , 17 years ago) |
---|
-
django/views/i18n.py
110 110 packages = ['django.conf'] 111 111 if type(packages) in (str, unicode): 112 112 packages = packages.split('+') 113 packages = [p for p in packages if p == 'django.conf' or p in settings.INSTALLED_APPS]113 packages = [p for p in packages if p == 'django.conf' or p == '' or p in settings.INSTALLED_APPS] 114 114 default_locale = to_locale(settings.LANGUAGE_CODE) 115 115 locale = to_locale(get_language()) 116 116 t = {} 117 117 paths = [] 118 118 # first load all english languages files for defaults 119 119 for package in packages: 120 p = __import__(package, {}, {}, ['']) 121 path = os.path.join(os.path.dirname(p.__file__), 'locale') 120 if p == '': 121 path = 'locale' 122 else: 123 p = __import__(package, {}, {}, ['']) 124 path = os.path.join(os.path.dirname(p.__file__), 'locale') 122 125 paths.append(path) 123 126 try: 124 127 catalog = gettext_module.translation(domain, path, ['en'])