﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22409	Adding custom locale throws NoneType error	mbhagya@…	nobody	"I have installed a language in the settings bundle:

{{{
LANG_INFO.update({'zh-hk': {'bidi': False,
                            'code': 'zh-hk',
                            'name': u'Traditional Chinese',
                            'name_local': '\u7e41\u9ad4\u4e2d\u6587',}
                  })

LANGUAGES += (('zh-hk', gettext_noop('Traditional Chinese')), )
LOCALE_PATHS += (C_SERVER_DIR + 'appC/locale',)
}}}


When I start the server and set ""Accept-Language"" to zh-hk, the server works fine.
But when I start the server, first send a ""zh-tw"" request and then send a ""zh-hk"" request, the server throws 500 with the following stack trace:


{{{
Traceback (most recent call last):
  File ""/Library/Python/2.7/site-packages/django/core/handlers/base.py"", line 92, in get_response
    response = middleware_method(request)
  File ""/Library/Python/2.7/site-packages/django/middleware/locale.py"", line 24, in process_request
    translation.activate(language)
  File ""/Library/Python/2.7/site-packages/django/utils/translation/__init__.py"", line 90, in activate
    return _trans.activate(language)
  File ""/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py"", line 183, in activate
    _active.value = translation(language)
  File ""/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py"", line 173, in translation
    current_translation = _fetch(language, fallback=default_translation)
  File ""/Library/Python/2.7/site-packages/django/utils/translation/trans_real.py"", line 141, in _fetch
    res._info = res._info.copy()
AttributeError: 'NoneType' object has no attribute '_info'
}}}
"	Bug	closed	Translations	1.5	Normal	duplicate		dikumar@…	Unreviewed	0	0	0	0	0	0
